/* =========================================================
   AOSEN INTERNATIONAL LIMITED - Product Page Styles
   Shared across all 4 product pages (EN & ZH)
   ========================================================= */

/* ============ Page Top Spacing ============ */
.page-top { padding-top: 108px; }

/* ============ Breadcrumb ============ */
.breadcrumb {
    background: var(--c-bg-light);
    padding: 16px 0;
    border-bottom: 1px solid var(--c-mid);
}
.breadcrumb a {
    font-size: 14px;
    color: var(--c-brand);
}
.breadcrumb a:hover {
    color: var(--c-dark);
}
.breadcrumb span {
    font-size: 14px;
    color: var(--c-dark);
}

/* ============ Hero Image Section ============ */
.product-hero {
    padding: 40px 0 50px;
    text-align: center;
}
.product-hero img {
    border-radius: 14px;
    margin: 0 auto 26px;
    box-shadow: var(--shadow);
}
.product-hero h1 {
    font-size: 38px;
    color: var(--c-dark);
    margin-bottom: 10px;
    font-weight: 800;
}
.product-hero p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    color: var(--c-dark);
    opacity: 0.8;
}

/* ============ Product Features ============ */
.features {
    padding: 40px 0 50px;
}
.features h2,
.specs h2 {
    text-align: center;
    font-size: 30px;
    color: var(--c-dark);
    margin-bottom: 30px;
    font-weight: 800;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-item {
    background: var(--c-white);
    border: 1px solid var(--c-bg-light);
    border-radius: 10px;
    padding: 22px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--c-accent);
}
.feature-item .fi {
    font-size: 30px;
    display: block;
    margin-bottom: 12px;
}
.feature-item h4 {
    color: var(--c-dark);
    margin-bottom: 6px;
    font-size: 17px;
}
.feature-item p {
    font-size: 13px;
    color: var(--c-dark);
    opacity: 0.75;
}

/* ============ Specification Table ============ */
.specs {
    padding: 40px 0 50px;
    background: var(--c-bg-light);
}
.spec-table {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    border-collapse: collapse;
    background: var(--c-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.spec-table th,
.spec-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--c-bg-light);
}
.spec-table th {
    background: var(--c-brand);
    color: var(--c-white);
    width: 30%;
}
.spec-table tr:nth-child(even) {
    background: var(--c-bg-light);
}
.spec-table tr:last-child td {
    border-bottom: none;
}
/* 订购信息导语 —— 与 .spec-table 同宽居中，仅部分页面使用 */
.specs-note {
    max-width: 800px;
    margin: 0 auto 22px;
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
    color: var(--c-dark);
    opacity: 0.8;
}

/* ============ Inquiry Section ============ */
.inquiry {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, var(--c-bg-light), var(--c-mid));
}
.inquiry h2 {
    font-size: 28px;
    color: var(--c-dark);
    margin-bottom: 10px;
}
.inquiry p {
    margin-bottom: 24px;
    color: var(--c-dark);
    opacity: 0.8;
}

/* ============ Related Products ============ */
.related {
    padding: 50px 0;
}
.related h2 {
    text-align: center;
    font-size: 30px;
    color: var(--c-dark);
    margin-bottom: 30px;
    font-weight: 800;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.related-item {
    background: var(--c-white);
    border: 1px solid var(--c-bg-light);
    border-radius: 10px;
    padding: 26px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.related-item:hover {
    transform: translateY(-5px);
    border-color: var(--c-accent);
}
.related-item h4 {
    color: var(--c-dark);
    margin-bottom: 8px;
}
.related-item .btn {
    padding: 8px 18px;
    font-size: 14px;
    margin-top: 10px;
}

/* ============ Responsive Products ============ */
@media (max-width: 992px) {
    .feature-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .product-hero h1 { font-size: 28px; }
    .feature-grid, .related-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Candle Product Wall  (三格聚焦产品墙)
   ---------------------------------------------------------
   形态要点：
   - 严格只显示 3 张：主卡 52%，两侧各 21.5%（+ 间隙），
     卡片尺寸全部由 JS 按容器宽算出并写成 CSS 变量，
     所以无论窗口多宽，可视区内永远是 3 张。
   - 中间高、两边低：三张卡**垂直居中对齐**，
     高度 主 100% / 侧 64%，缩小从上下两端同时收。
   - 离散切换：每 3 秒整组左移一格，走完即停，不是连续流动。
   - 移位与缩放同用 --wall-anim 时长与曲线，整组一起呼吸。
   - 纯图片展示，不承载任何文字。
   ========================================================= */

/* ---- 区块外壳 ---- */
.candle-wall-section {
    padding: 50px 0 56px;
    overflow: hidden;
}

/* 滚动视窗：横向溢出裁切，两端渐隐 */
.candle-wall {
    position: relative;
    /* 墙整体限宽：超宽屏不再无限拉伸，三张卡保持舒适比例 */
    max-width: 1680px;
    margin: 0 auto;
    /* 高度由 JS 按主卡高度写入（--wall-h） */
    height: var(--wall-h, 560px);
    overflow: hidden;
    cursor: grab;
    /* 拖拽时禁止浏览器接管手势 */
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-mask-image: linear-gradient(to right,
        transparent 0,
        #000 5%,
        #000 95%,
        transparent 100%);
    mask-image: linear-gradient(to right,
        transparent 0,
        #000 5%,
        #000 95%,
        transparent 100%);
}
.candle-wall.is-dragging {
    cursor: grabbing;
}

/* ---- 轨道 ---- */
/* 卡片依次排列。每张卡占一格：格宽 = 主卡宽 + 间隙。
   关键：卡片的**外盒尺寸恒定**（永远是格宽），
   大小变化发生在内部 .candle-wall-card-inner 上。
   这样 flex 布局不会因为某张卡变大而互相挤压，
   位移量才严格等于一格。 */
.candle-wall-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;       /* 垂直居中对齐 —— 对称缩放的关键，
                                  也让卡片在墙内自动居中，不依赖 translateY */
    will-change: transform;
    /* 移位与缩放共用同一条缓出曲线，走完即停 */
    transition: transform var(--wall-anim, 640ms)
                cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- 单张卡片（外盒=格子，尺寸恒定） ---- */
.candle-wall-card {
    flex: 0 0 auto;
    position: relative;
    width: var(--wall-slot, 700px);
    height: var(--wall-h, 560px);
    display: flex;
    align-items: center;
    justify-content: center;
    /* 外盒不做尺寸过渡：格子大小恒定，过渡交给内层。
       但透明度要过渡 —— 由 JS 按角色写入，侧卡略降。 */
    transition: opacity var(--wall-anim, 640ms) ease;
}
/* 左邻卡在格子里靠右对齐、右邻卡靠左对齐 ——
   这样侧卡紧贴主卡，能露出完整一张，
   同时格子的多余部分朝墙外溢出，保留"还有更多"的延伸感。 */
.candle-wall-card.is-left { justify-content: flex-end; }
.candle-wall-card.is-right { justify-content: flex-start; }

/* ---- 卡片内层（真正缩放的那一层） ---- */
.candle-wall-card-inner {
    position: relative;
    width: var(--wall-side-w, 280px);
    height: var(--wall-side-h, 280px);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(8, 34, 23, 0.18);
    transition: width var(--wall-anim, 640ms) cubic-bezier(0.22, 0.61, 0.36, 1),
                height var(--wall-anim, 640ms) cubic-bezier(0.22, 0.61, 0.36, 1),
                box-shadow var(--wall-anim, 640ms) ease;
}
/* 主展示位：最宽最高，垂直居中 → 上下同时向外扩 */
.candle-wall-card.is-center .candle-wall-card-inner {
    width: var(--wall-main-w, 640px);
    height: var(--wall-main-h, 640px);
    box-shadow: 0 18px 48px rgba(8, 34, 23, 0.26);
}
.candle-wall-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* 卡片表面压暗层：两侧变暗，中心通透，突出 C 位。
   用真实元素而非 ::after —— 便于 JS 直接写 opacity。
   压暗色取品牌深绿，避免用纯黑导致侧卡发灰发脏。 */
.candle-wall-card-veil {
    position: absolute;
    inset: 0;
    background: #04170F;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--wall-anim, 640ms) ease;
}
/* 压暗层只在非中心卡上生效，JS 会写 opacity；
   中心卡由 JS 直接写 0，这里不再用 !important 抢。 */

/* ---- 手动切换箭头：主展示位正下方居中 ---- */
.candle-wall-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 26px;
}
.candle-wall-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(74, 144, 162, 0.45);
    border-radius: 50%;
    background: transparent;
    color: var(--c-dark, #2C5F7A);
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease,
                color 0.25s ease;
}
.candle-wall-arrow svg {
    width: 18px;
    height: 18px;
    display: block;
}
.candle-wall-arrow:hover {
    background: var(--c-brand, #4A90A2);
    border-color: var(--c-brand, #4A90A2);
    color: #fff;
}
.candle-wall-arrow:focus-visible {
    outline: 2px solid var(--c-brand, #4A90A2);
    outline-offset: 3px;
}

/* 箭头下方进度指示：15 个小点提示当前位置 */
.candle-wall-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}
.candle-wall-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-mid, #B3D9E8);
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.candle-wall-dot.is-active {
    background: var(--c-brand, #4A90A2);
    transform: scale(1.5);
}

/* 指针悬停时图片轻微放大，强化可交互感。
   作用在 img 上，不动内层尺寸，避免与 JS 的缩放过渡打架。 */
@media (hover: hover) {
    .candle-wall-card-inner img {
        transition: transform 0.5s ease;
    }
    .candle-wall-card:hover .candle-wall-card-inner img {
        transform: scale(1.045);
    }
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .candle-wall-section { padding: 32px 0 38px; }
    .candle-wall-nav { margin-top: 18px; gap: 14px; }
    .candle-wall-arrow { width: 38px; height: 38px; }
    .candle-wall-arrow svg { width: 16px; height: 16px; }
}

/* ---- 尊重"减少动态效果" ---- */
@media (prefers-reduced-motion: reduce) {
    .candle-wall-track,
    .candle-wall-card-inner,
    .candle-wall-card-veil {
        transition-duration: 1ms;
    }
    .candle-wall-card:hover .candle-wall-card-inner img {
        transform: none;
    }
}

