/**
 * Ethantheme 产品页前端样式
 * ----------------------------------------------------
 * 适用：单产品页（single-product）与产品归档页（archive-product）
 * 设计：flat 设计，B2B/SaaS 审美，全部使用 var(--eth-*) 变量
 * 结构：
 *   1. Hero 区：画廊 slider + 视频 + 缩略图导航 + 信息区
 *   2. 内容区：TOC（sticky）+ 古腾堡内容 + 侧边栏（三栏布局）
 *   3. 客户评价：slide 滚动
 *   4. 相关产品 / 相关新闻
 *   5. 通用：Section 标题、面包屑、按钮组
 *   6. 产品归档 / 列表页
 *   7. 响应式
 */

/* =========================================================
 * 1. Hero 区
 * ========================================================= */

/* 覆盖 GeneratePress .grid-container 宽度：本页使用全宽，避免文章页 1350px 限制影响布局 */
.grid-container {
    max-width: 100% !important;
}

.eth-product-hero {
    padding-block: var(--eth-space-xl);
    background: var(--eth-bg-surface);
}
.eth-product-hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--eth-space-xl);
    align-items: start;
}
.eth-product-hero__grid--no-media {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

/* --- 画廊 Slider --- */
.eth-product-hero__media {
    position: sticky;
    top: var(--eth-space-l);
}
.eth-product-slider {
    position: relative;
    border-radius: var(--eth-radius-l);
    overflow: hidden;
    background: var(--eth-bg-muted);
    aspect-ratio: 4 / 3;
}
.eth-product-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--eth-transition-m);
    pointer-events: none;
}
.eth-product-slider__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}
.eth-product-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 视频 slide */
.eth-product-slider__slide--video .eth-product-slider__video {
    width: 100%;
    height: 100%;
    background: #000;
}
.eth-product-slider__slide--video .eth-product-slider__video iframe,
.eth-product-slider__slide--video .eth-product-slider__video video {
    width: 100%;
    height: 100%;
    border: 0;
}
/* 导航箭头：完整定义见下方增强版（L841+ ），此处仅保留位置属性 */
.eth-product-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eth-product-slider__nav--prev { left: var(--eth-space-s); }
.eth-product-slider__nav--next { right: var(--eth-space-s); }
/* 圆点指示器 */
.eth-product-slider__dots {
    position: absolute;
    bottom: var(--eth-space-s);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--eth-space-2xs);
    z-index: 3;
}
.eth-product-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: var(--eth-radius-full);
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    transition: background var(--eth-transition-s), width var(--eth-transition-s);
}
.eth-product-slider__dot.is-active {
    background: var(--eth-primary);
    width: 24px;
}

/* --- 缩略图导航 --- */
.eth-product-thumbs {
    display: flex;
    gap: var(--eth-space-2xs);
    margin-top: var(--eth-space-s);
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 2px;
}
.eth-product-thumbs__item {
    flex: 0 0 72px;
    aspect-ratio: 1 / 1;
    border-radius: var(--eth-radius-s);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--eth-transition-s);
    background: var(--eth-bg-muted);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eth-product-thumbs__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.eth-product-thumbs__item:hover { border-color: var(--eth-primary-40); }
.eth-product-thumbs__item.is-active { border-color: var(--eth-primary); }
.eth-product-thumbs__play {
    font-size: 20px;
    color: var(--eth-text-muted);
}

/* --- 信息区 --- */
.eth-product-info {
    display: flex;
    flex-direction: column;
    gap: var(--eth-space-m);
}
.eth-product-info__title {
    font-size: var(--eth-fs-h1);
    font-weight: var(--eth-fw-bold);
    color: var(--eth-text-title);
    line-height: var(--eth-lh-tight);
    margin: 0;
}
.eth-product-info__subtitle {
    font-size: var(--eth-fs-h3);
    font-weight: var(--eth-fw-regular);
    color: var(--eth-text-muted);
    margin: 0;
}
.eth-product-info__description {
    font-size: var(--eth-fs-body);
    color: var(--eth-text-body);
    line-height: var(--eth-lh-body);
}
.eth-product-info__description p { margin: 0 0 var(--eth-space-xs); }
.eth-product-info__description p:last-child { margin-bottom: 0; }
.eth-product-info__model {
    display: inline-block;
    padding: 0.3em 0.8em;
    background: var(--eth-bg-muted);
    border-radius: var(--eth-radius-s);
    font-size: var(--eth-fs-small);
    color: var(--eth-text-muted);
    font-weight: var(--eth-fw-medium);
    align-self: flex-start;
}

/* --- 内联规格表（Schema 兼容） --- */
.eth-product-specs-inline {
    margin: 0;
    border-top: 1px solid var(--eth-border);
}
.eth-product-specs-inline__row {
    display: flex;
    gap: var(--eth-space-s);
    padding: var(--eth-space-2xs) 0;
    border-bottom: 1px solid var(--eth-border);
}
.eth-product-specs-inline__label {
    flex: 0 0 40%;
    font-weight: var(--eth-fw-semibold);
    color: var(--eth-text-title);
    font-size: var(--eth-fs-small);
    margin: 0;
}
.eth-product-specs-inline__value {
    flex: 1;
    color: var(--eth-text-body);
    font-size: var(--eth-fs-small);
    margin: 0;
}

/* --- 按钮组 --- */
.eth-product-info__actions,
.eth-btn-group {
    display: flex;
    gap: var(--eth-space-s);
    flex-wrap: wrap;
    margin-top: var(--eth-space-s);
}
.eth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7em 1.8em;
    border-radius: var(--eth-radius-m);
    font-size: var(--eth-fs-body);
    font-weight: var(--eth-fw-semibold);
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background var(--eth-transition-s), color var(--eth-transition-s),
                border-color var(--eth-transition-s), transform var(--eth-transition-s);
}
.eth-btn--primary {
    background: var(--eth-primary);
    color: #fff;
}
.eth-btn--primary:hover {
    background: var(--eth-primary-d-1);
    transform: translateY(-1px);
}

@media (max-width: 992px) {
    .eth-product-hero__grid { grid-template-columns: 1fr; }
    .eth-product-hero__media { position: static; }
}

/* =========================================================
 * 2. 内容区：TOC + 内容 + 侧边栏
 * ========================================================= */
.eth-product-content {
    padding-block: var(--eth-space-xl);
}
.eth-product-content__container {
    display: grid;
    gap: var(--eth-space-xl);
    align-items: start;
}
/* 默认单栏 */
.eth-product-content__container { grid-template-columns: 1fr; }

/* 有 TOC */
.eth-product-content.has-toc .eth-product-content__container {
    grid-template-columns: 260px 1fr;
}
/* 有侧边栏 */
.eth-product-content.has-sidebar .eth-product-content__container {
    grid-template-columns: 1fr 300px;
}
/* TOC + 侧边栏（三栏）：突破 1350px 限制，加宽容器 + 减小 gap */
.eth-product-content.has-toc.has-sidebar .eth-product-content__container {
    grid-template-columns: 260px 1fr 300px;
    gap: var(--eth-space-m);
    max-width: 1600px;
}
/* 侧边栏在左 */
.eth-product-content--sidebar-left.has-toc.has-sidebar .eth-product-content__container {
    grid-template-columns: 260px 300px 1fr;
    gap: var(--eth-space-m);
    max-width: 1600px;
}
.eth-product-content--sidebar-left:not(.has-toc).has-sidebar .eth-product-content__container {
    grid-template-columns: 300px 1fr;
}

/* --- TOC 内容导航 --- */
.eth-toc {
    position: sticky;
    top: var(--eth-space-l);
    max-height: calc(100vh - var(--eth-space-xl) * 2);
    overflow-y: auto;
    scrollbar-width: thin;
}
.eth-toc__inner {
    padding: var(--eth-space-m);
    background: var(--eth-bg-surface);
    border-radius: var(--eth-radius-m);
    box-shadow: var(--eth-shadow-s);
    border: 1px solid var(--eth-border);
}
.eth-toc__title {
    font-size: var(--eth-fs-small);
    font-weight: var(--eth-fw-bold);
    color: var(--eth-text-title);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--eth-space-xs);
    padding-bottom: var(--eth-space-2xs);
    border-bottom: 1px solid var(--eth-border);
}
.eth-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.eth-toc__list li { margin: 0; }
.eth-toc__list a {
    display: block;
    padding: var(--eth-space-3xs) var(--eth-space-2xs);
    color: var(--eth-text-muted);
    text-decoration: none;
    font-size: var(--eth-fs-small);
    line-height: 1.4;
    border-left: 2px solid transparent;
    transition: color var(--eth-transition-s), border-color var(--eth-transition-s), background var(--eth-transition-s);
}
.eth-toc__list a:hover {
    color: var(--eth-text-title);
    background: var(--eth-bg-muted);
}
.eth-toc__list a.is-active {
    color: var(--eth-primary);
    border-left-color: var(--eth-primary);
    font-weight: var(--eth-fw-semibold);
}
/* 二级标题缩进 */
.eth-toc__list .eth-toc__sub-item a {
    padding-left: var(--eth-space-m);
    font-size: var(--eth-fs-xs);
}

/* --- 内容主体 --- */
.eth-product-content__main {
    min-width: 0; /* 防止 grid 溢出 */
}
.eth-product-entry {
    font-size: var(--eth-fs-body);
    color: var(--eth-text-body);
    line-height: var(--eth-lh-body);
}
.eth-product-entry > *:first-child { margin-top: 0; }
.eth-product-entry > *:last-child { margin-bottom: 0; }
.eth-product-entry h2 {
    font-size: var(--eth-fs-h2);
    color: var(--eth-text-title);
    margin-top: var(--eth-space-l);
    margin-bottom: var(--eth-space-s);
    scroll-margin-top: var(--eth-space-xl);
}
.eth-product-entry h3 {
    font-size: var(--eth-fs-h3);
    color: var(--eth-text-title);
    margin-top: var(--eth-space-m);
    margin-bottom: var(--eth-space-xs);
    scroll-margin-top: var(--eth-space-xl);
}
.eth-product-entry p { margin: 0 0 var(--eth-space-s); }
.eth-product-entry img { max-width: 100%; height: auto; border-radius: var(--eth-radius-m); }
.eth-product-entry ul,
.eth-product-entry ol { margin: 0 0 var(--eth-space-s); padding-left: 1.5em; }
.eth-product-entry li { margin-bottom: var(--eth-space-3xs); }
.eth-product-entry blockquote {
    margin: var(--eth-space-s) 0;
    padding: var(--eth-space-s) var(--eth-space-m);
    border-left: 4px solid var(--eth-primary);
    background: var(--eth-bg-muted);
    border-radius: 0 var(--eth-radius-s) var(--eth-radius-s) 0;
}
.eth-product-entry a { color: var(--eth-primary); text-decoration: underline; }
.eth-product-entry a:hover { color: var(--eth-primary-d-1); }
.eth-product-entry table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--eth-space-s) 0;
}
.eth-product-entry table th,
.eth-product-entry table td {
    padding: var(--eth-space-2xs) var(--eth-space-s);
    border: 1px solid var(--eth-border);
    text-align: left;
}
.eth-product-entry table th {
    background: var(--eth-bg-muted);
    font-weight: var(--eth-fw-semibold);
}

/* --- 侧边栏 --- */
.eth-product-sidebar {
    position: sticky;
    top: var(--eth-space-l);
    max-height: calc(100vh - var(--eth-space-xl) * 2);
    overflow-y: auto;
    scrollbar-width: thin;
}
.eth-product-widget {
    background: var(--eth-bg-surface);
    border-radius: var(--eth-radius-m);
    padding: var(--eth-space-m);
    margin-bottom: var(--eth-space-s);
    box-shadow: var(--eth-shadow-xs);
    border: 1px solid var(--eth-border);
}
.eth-product-widget:last-child { margin-bottom: 0; }
.eth-product-widget__title {
    font-size: var(--eth-fs-small);
    font-weight: var(--eth-fw-bold);
    color: var(--eth-text-title);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--eth-space-xs);
    padding-bottom: var(--eth-space-2xs);
    border-bottom: 2px solid var(--eth-primary);
}

@media (max-width: 1100px) {
    .eth-product-content.has-toc.has-sidebar .eth-product-content__container,
    .eth-product-content--sidebar-left.has-toc.has-sidebar .eth-product-content__container {
        grid-template-columns: 1fr;
    }
    .eth-toc,
    .eth-product-sidebar { position: static; max-height: none; }
}
@media (max-width: 768px) {
    .eth-product-content.has-toc .eth-product-content__container,
    .eth-product-content.has-sidebar .eth-product-content__container,
    .eth-product-content--sidebar-left:not(.has-toc).has-sidebar .eth-product-content__container {
        grid-template-columns: 1fr;
    }
    .eth-toc,
    .eth-product-sidebar { position: static; max-height: none; }
}

/* =========================================================
 * 3. 客户评价（slide 滚动）
 * ========================================================= */
.eth-product-reviews {
    padding-block: var(--eth-space-xl);
    background: var(--eth-bg-body);
}
.eth-reviews-slider {
    position: relative;
    overflow: hidden;
}
.eth-reviews-slider__track {
    display: flex;
    transition: transform var(--eth-transition-l);
    gap: var(--eth-space-m);
}
.eth-reviews-slider .eth-review-card {
    flex: 0 0 calc(33.333% - var(--eth-space-m) * 2 / 3);
    min-width: 0;
}
.eth-reviews-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: var(--eth-radius-full);
    border: none;
    background: var(--eth-bg-surface);
    color: var(--eth-text-title);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--eth-transition-s), box-shadow var(--eth-transition-s);
    z-index: 3;
    box-shadow: var(--eth-shadow-s);
}
.eth-reviews-slider__nav:hover {
    background: var(--eth-primary);
    color: #fff;
}
.eth-reviews-slider__nav--prev { left: var(--eth-space-2xs); }
.eth-reviews-slider__nav--next { right: var(--eth-space-2xs); }
.eth-reviews-slider__dots {
    display: flex;
    justify-content: center;
    gap: var(--eth-space-2xs);
    margin-top: var(--eth-space-m);
}
.eth-reviews-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: var(--eth-radius-full);
    border: none;
    background: var(--eth-bg-muted);
    cursor: pointer;
    padding: 0;
    transition: background var(--eth-transition-s), width var(--eth-transition-s);
}
.eth-reviews-slider__dot.is-active {
    background: var(--eth-primary);
    width: 24px;
}

/* 评价卡片 */
.eth-review-card {
    background: var(--eth-bg-surface);
    border-radius: var(--eth-radius-m);
    padding: var(--eth-space-m);
    box-shadow: var(--eth-shadow-s);
    transition: box-shadow var(--eth-transition-m), transform var(--eth-transition-m);
    display: flex;
    flex-direction: column;
    gap: var(--eth-space-2xs);
    margin: 0;
}
.eth-review-card:hover {
    box-shadow: var(--eth-shadow-m);
    transform: translateY(-2px);
}
.eth-review-card__avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--eth-radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.eth-review-card__rating {
    display: flex;
    gap: 2px;
}
.eth-review-card__star { color: var(--eth-bg-muted); font-size: var(--eth-fs-body); }
.eth-review-card__star.is-filled { color: #f5a623; }
.eth-review-card__content {
    color: var(--eth-text-body);
    line-height: var(--eth-lh-body);
    font-style: italic;
    margin: 0;
    flex: 1;
}
.eth-review-card__author {
    display: flex;
    align-items: center;
    gap: var(--eth-space-2xs);
    font-size: var(--eth-fs-small);
}
.eth-review-card__author-name { font-weight: var(--eth-fw-semibold); color: var(--eth-text-title); }
.eth-review-card__author-type {
    display: inline-block;
    padding: 0.2em 0.6em;
    background: var(--eth-primary-10);
    color: var(--eth-primary);
    border-radius: var(--eth-radius-full);
    font-size: var(--eth-fs-xs);
    font-weight: var(--eth-fw-semibold);
}

@media (max-width: 992px) {
    .eth-reviews-slider .eth-review-card {
        flex: 0 0 calc(50% - var(--eth-space-m) / 2);
    }
}
@media (max-width: 600px) {
    .eth-reviews-slider .eth-review-card {
        flex: 0 0 100%;
    }
}

/* =========================================================
 * 4. 相关产品 / 相关新闻区
 * ========================================================= */
.eth-product-related,
.eth-product-news {
    padding-block: var(--eth-space-xl);
}

/* =========================================================
 * 5. 通用：Section 标题、面包屑
 * ========================================================= */
.eth-product-section__title {
    font-size: var(--eth-fs-h2);
    font-weight: var(--eth-fw-semibold);
    color: var(--eth-text-title);
    margin-bottom: var(--eth-space-m);
    text-align: center;
}

.eth-product-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--eth-space-2xs);
    font-size: var(--eth-fs-small);
    color: var(--eth-text-muted);
    margin-bottom: var(--eth-space-m);
    flex-wrap: wrap;
}
.eth-product-breadcrumb a { color: var(--eth-text-muted); text-decoration: none; transition: color var(--eth-transition-s); }
.eth-product-breadcrumb a:hover { color: var(--eth-primary); }
.eth-product-breadcrumb__sep { opacity: 0.5; }
.eth-product-breadcrumb__current { color: var(--eth-text-title); font-weight: var(--eth-fw-medium); }

/* =========================================================
 * 6. 产品归档 / 列表页
 * ========================================================= */
.eth-products-archive {
    background: var(--eth-bg-body);
}
.eth-products-archive__hero {
    background: var(--eth-bg-surface);
}
.eth-products-archive__title {
    margin: 0;
    color: var(--eth-text-title);
}
.eth-products-archive__description {
    max-width: var(--eth-container-narrow);
    margin-top: var(--eth-space-s);
    color: var(--eth-text-body);
}
.eth-subcat-nav__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--eth-space-s);
    margin: 0;
    padding: 0;
    list-style: none;
}
.eth-subcat-nav__item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--eth-space-s);
    padding: var(--eth-space-s);
    border: 1px solid var(--eth-border);
    border-radius: var(--eth-radius-m);
    background: var(--eth-bg-surface);
}
.eth-subcat-nav__count {
    display: inline-flex;
    min-width: 2rem;
    min-height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--eth-radius-full);
    background: var(--eth-primary-10);
    color: var(--eth-primary);
    font-size: var(--eth-fs-xs);
}
.eth-products-archive .navigation.pagination {
    margin-top: var(--eth-space-l);
}

/* 产品页联系模块 */
.eth-product-contact {
    background: var(--eth-bg-surface);
}
.eth-product-contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: var(--eth-space-xl);
    align-items: start;
}
.eth-product-contact .eth-product-section__title {
    text-align: left;
}
.eth-product-contact__form {
    padding: var(--eth-space-m);
    border: 1px solid var(--eth-border);
    border-radius: var(--eth-radius-m);
    background: var(--eth-bg-body);
}
.eth-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: var(--eth-space-m);
}
.eth-product-card {
    border-radius: var(--eth-radius-m);
    overflow: hidden;
    background: var(--eth-bg-surface);
    box-shadow: var(--eth-shadow-s);
    transition: box-shadow var(--eth-transition-m), transform var(--eth-transition-m);
}
.eth-product-card:hover {
    box-shadow: var(--eth-shadow-l);
    transform: translateY(-4px);
}
.eth-product-card__link { display: block; text-decoration: none; }
.eth-product-card__image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--eth-bg-muted);
}
.eth-product-card__image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--eth-transition-l);
}
.eth-product-card:hover .eth-product-card__image img { transform: scale(1.05); }
.eth-product-card__body { padding: var(--eth-space-m); }
.eth-product-card__title {
    font-size: var(--eth-fs-body);
    font-weight: var(--eth-fw-semibold);
    color: var(--eth-text-title);
    margin: 0 0 var(--eth-space-2xs);
    transition: color var(--eth-transition-s);
}
.eth-product-card:hover .eth-product-card__title { color: var(--eth-primary); }
.eth-product-card__excerpt {
    font-size: var(--eth-fs-small);
    color: var(--eth-text-muted);
    line-height: var(--eth-lh-body);
    margin: 0;
}

/* =========================================================
 * 7. 响应式补充
 * ========================================================= */
@media (max-width: 768px) {
    .eth-product-info__title { font-size: var(--eth-fs-h2); }
    .eth-product-thumbs__item { flex: 0 0 56px; }
    .eth-product-contact__grid { grid-template-columns: 1fr; }
}

/* =========================================================
 * 8. Product Hero 2.0 — square media, editorial information
 * ========================================================= */
.eth-product-hero {
    overflow: clip;
    padding-block: clamp(2.25rem, 5vw, 5rem);
    background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--eth-primary) 7%, transparent), transparent 34rem),
        var(--eth-bg-surface);
}

.eth-product-hero__grid {
    grid-template-columns: minmax(0, 600px) minmax(320px, 1fr);
    gap: clamp(2.25rem, 5.5vw, 6rem);
    align-items: center;
}

.eth-product-hero__media {
    position: sticky;
    top: clamp(1rem, 4vw, 3rem);
    width: 100%;
    max-width: 600px;
}

.eth-product-slider {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
    border: 1px solid color-mix(in srgb, var(--eth-border) 80%, transparent);
    border-radius: clamp(1rem, 2vw, 1.5rem);
    background: color-mix(in srgb, var(--eth-bg-muted) 78%, #fff);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
    isolation: isolate;
}

.eth-product-slider--single {
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.065);
}

.eth-product-slider__slide,
.eth-product-slider__slide.is-active {
    position: absolute;
    inset: 0;
}

.eth-product-slider__slide {
    z-index: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translate3d(4.5%, 0, 0) scale(0.985);
    transition:
        opacity 440ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.eth-product-slider[data-direction="prev"] .eth-product-slider__slide {
    transform: translate3d(-4.5%, 0, 0) scale(0.985);
}

.eth-product-slider__slide.is-active {
    z-index: 2;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    pointer-events: auto;
}

.eth-product-slider[data-direction="next"] .eth-product-slider__slide.is-leaving {
    z-index: 1;
    opacity: 0;
    transform: translate3d(-3.5%, 0, 0) scale(0.99);
}

.eth-product-slider[data-direction="prev"] .eth-product-slider__slide.is-leaving {
    z-index: 1;
    opacity: 0;
    transform: translate3d(3.5%, 0, 0) scale(0.99);
}

.eth-product-slider__slide img,
.eth-product-slider__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eth-product-slider__slide--video .eth-product-slider__video,
.eth-product-slider__slide--video .wp-video,
.eth-product-slider__slide--video iframe,
.eth-product-slider__slide--video video {
    width: 100% !important;
    max-width: 600px !important;
    height: 100% !important;
    max-height: 600px;
    aspect-ratio: 1;
}

.eth-product-slider__nav {
    width: 56px;
    height: 56px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--eth-radius-full);
    background: rgba(255, 255, 255, 0.92);
    color: var(--eth-text-title);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
    opacity: 1;
    transform: translateY(-50%) scale(1);
    transition: background 220ms ease, box-shadow 220ms ease, color 220ms ease;
}

.eth-product-slider__nav svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eth-product-slider__nav:hover {
    background: #fff;
    color: var(--eth-text-title);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.eth-product-slider__nav:focus-visible,
.eth-product-thumbs__item:focus-visible,
.eth-product-slider__dot:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--eth-primary) 32%, transparent);
    outline-offset: 3px;
}

.eth-product-slider__dots {
    bottom: 1.1rem;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.eth-product-slider__dot {
    width: 7px;
    height: 7px;
    background: color-mix(in srgb, var(--eth-text-muted) 44%, transparent);
}

.eth-product-slider__dot.is-active {
    width: 20px;
    background: var(--eth-primary);
}

.eth-product-thumbs {
    display: grid;
    grid-auto-columns: 72px;
    grid-auto-flow: column;
    gap: 0.65rem;
    margin-top: 0.85rem;
    padding: 0.2rem 0.1rem 0.6rem;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
}

.eth-product-thumbs__item {
    width: 72px;
    height: 72px;
    border: 1px solid var(--eth-border);
    border-radius: 0.7rem;
    background: color-mix(in srgb, var(--eth-bg-muted) 75%, #fff);
    opacity: 0.72;
    scroll-snap-align: start;
    transition: border-color 220ms ease, box-shadow 260ms ease, opacity 220ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.eth-product-thumbs__item:hover {
    border-color: color-mix(in srgb, var(--eth-primary) 48%, var(--eth-border));
    opacity: 1;
    transform: translateY(-2px);
}

.eth-product-thumbs__item.is-active {
    border-color: var(--eth-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--eth-primary) 16%, transparent);
    opacity: 1;
}

.eth-product-thumbs__item img {
    object-fit: cover;
}

.eth-product-info {
    gap: clamp(1rem, 2vw, 1.45rem);
    padding-block: clamp(0.5rem, 3vw, 2rem);
}

.eth-product-info__eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    color: var(--eth-text-muted);
    font-size: 0.74rem;
    font-weight: var(--eth-fw-semibold);
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.eth-product-info__eyebrow a {
    color: var(--eth-primary);
    text-decoration: none;
}

.eth-product-info__eyebrow span::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    margin-right: 0.55rem;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}

.eth-product-info__title {
    max-width: 16ch;
    font-size: clamp(2.15rem, 4vw, 4.5rem);
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 1.03;
}

.eth-product-info__subtitle {
    max-width: 34ch;
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.45;
}

.eth-product-info__description {
    max-width: 62ch;
    color: var(--eth-text-muted);
    line-height: 1.75;
}

.eth-product-specs-inline {
    border-top-color: color-mix(in srgb, var(--eth-border) 82%, transparent);
}

.eth-product-specs-inline__row {
    padding: 0.7rem 0;
    border-bottom-color: color-mix(in srgb, var(--eth-border) 82%, transparent);
}

.eth-product-specs-inline__label,
.eth-product-specs-inline__value {
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .eth-product-hero__grid {
        grid-template-columns: minmax(0, 540px) minmax(300px, 1fr);
        gap: clamp(2rem, 4vw, 3.5rem);
    }
}

@media (max-width: 880px) {
    .eth-product-hero__grid {
        grid-template-columns: minmax(0, 600px);
        justify-content: center;
    }

    .eth-product-hero__media {
        position: static;
    }

    .eth-product-info__title {
        max-width: 20ch;
    }
}

@media (max-width: 600px) {
    .eth-product-hero {
        padding-block: 1.5rem 2.75rem;
    }

    .eth-product-slider {
        border-radius: 1rem;
    }

    .eth-product-slider__nav {
        width: 40px;
        height: 40px;
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    .eth-product-slider__nav--prev { left: 0.75rem; }
    .eth-product-slider__nav--next { right: 0.75rem; }

    .eth-product-thumbs {
        grid-auto-columns: 60px;
    }

    .eth-product-thumbs__item {
        width: 60px;
        height: 60px;
    }

    .eth-product-info__title {
        font-size: clamp(2rem, 10vw, 3rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .eth-product-slider__slide,
    .eth-product-slider__nav,
    .eth-product-thumbs__item {
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
 * Gallery zoom button + click zones + lightbox
 * ========================================================= */
.eth-product-slider__zoom {
    position: absolute;
    top: var(--eth-space-s);
    right: var(--eth-space-s);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--eth-radius-full);
    background: rgba(255, 255, 255, 0.9);
    color: var(--eth-text-title);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 240ms ease, transform 240ms ease, background 200ms ease;
}
.eth-product-slider__zoom svg {
    width: 24px;
    height: 24px;
}
.eth-product-slider__slide.is-active:hover .eth-product-slider__zoom {
    opacity: 1;
    transform: scale(1);
}
.eth-product-slider__zoom:hover {
    background: #fff;
}
.eth-product-slider__slide.is-active {
    cursor: pointer;
}

/* --- Lightbox --- */
.eth-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(6px);
}
.eth-lightbox[hidden] {
    display: none;
}
.eth-lightbox__image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--eth-radius-s);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.eth-lightbox__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: var(--eth-radius-full);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms ease;
}
.eth-lightbox__close svg {
    width: 28px;
    height: 28px;
}
.eth-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.25);
}
.eth-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    border-radius: var(--eth-radius-full);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms ease;
}
.eth-lightbox__nav svg {
    width: 32px;
    height: 32px;
}
.eth-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.25);
}
.eth-lightbox__nav--prev { left: 1.5rem; }
.eth-lightbox__nav--next { right: 1.5rem; }
.eth-lightbox__counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--eth-fs-small);
    letter-spacing: 0.05em;
}
@media (max-width: 600px) {
    .eth-lightbox__nav { width: 44px; height: 44px; }
    .eth-lightbox__nav svg { width: 24px; height: 24px; }
    .eth-lightbox__nav--prev { left: 0.75rem; }
    .eth-lightbox__nav--next { right: 0.75rem; }
    .eth-lightbox__close { width: 44px; height: 44px; top: 1rem; right: 1rem; }
}

/* =========================================================
 * TOC optimization (reference article.css style)
 * ========================================================= */
.eth-product-content__toc {
    position: sticky;
    top: var(--eth-space-l);
    max-height: calc(100vh - var(--eth-space-xl) * 2);
    overflow-y: auto;
    align-self: start;
    scrollbar-width: thin;
}
.eth-product-content__toc .eth-toc__inner {
    padding: var(--eth-space-m);
    background: var(--eth-bg-surface);
    border: 1px solid var(--eth-border);
    border-radius: var(--eth-radius-m);
    box-shadow: var(--eth-shadow-s);
}
.eth-product-content__toc .eth-toc__title {
    margin: 0 0 var(--eth-space-xs);
    padding-bottom: var(--eth-space-2xs);
    border-bottom: 1px solid var(--eth-border);
    color: var(--eth-text-title);
    font-size: var(--eth-fs-small);
    font-weight: var(--eth-fw-bold);
    text-transform: none;
    letter-spacing: 0;
}
.eth-product-content__toc .eth-toc__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.eth-product-content__toc .eth-toc__list a {
    display: block;
    padding: var(--eth-space-3xs) var(--eth-space-2xs);
    border-left: 2px solid transparent;
    color: var(--eth-text-muted);
    font-size: var(--eth-fs-small);
    text-decoration: none;
    line-height: 1.4;
    transition: color var(--eth-transition-s), border-color var(--eth-transition-s);
}
.eth-product-content__toc .eth-toc__list a:hover {
    color: var(--eth-text-title);
}
.eth-product-content__toc .eth-toc__list a.is-active {
    color: var(--eth-primary);
    border-left-color: var(--eth-primary);
}
.eth-product-content__toc .eth-toc__sub-item a {
    padding-left: var(--eth-space-m);
    font-size: var(--eth-fs-xs);
}
