/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Inter', sans-serif;
    color: #333;
    background-color: #fcfcfc;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* 固定导航栏高度补偿，防止内容被遮住 */
    padding-top: 90px;
}

/* 导航栏 */
header.navbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4rem;
    padding: 0 4rem;
    height: 90px;
    background-color: #fff;
    /* 固定在页面顶部，不随滚动消失 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    color: #4a4a4a;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links li a:hover {
    color: #000;
}

.nav-links li.active a {
    color: #000;
    font-weight: 700;
}

.nav-links li.active a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background-color: #000;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #666;
}

.header-icons i {
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
}

.header-icons i:hover {
    color: #000;
}

.cart-icon {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.menu-btn {
    font-size: 1.8rem !important;
}

/* 英雄区：桌面端采用复杂的斜切背景 */
.hero {
    position: relative;
    min-height: calc(100vh - 90px);
    background-color: #111;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0 4rem;
}

/* 斜切白底遮罩，含发光效果 */
.hero-bg-split {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 65%;
    height: 120%;
    background: linear-gradient(115deg, #ffffff 60%, transparent 100%);
    /* filter: drop-shadow(20px 0 30px rgba(255,255,255,0.9)); */
    transform: skewX(-15deg);
    z-index: 1;
    box-shadow: 30px 0 60px 20px rgba(255,255,255,0.7);
}

.hero::before {
     content: '';
     position: absolute;
     top: 0; left: 0; width: 100%; height: 100%;
     background: radial-gradient(circle at 45% 50%, rgba(255,255,255,0.6) 0%, transparent 60%);
     z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
}

/* 左侧文案 */
.text-block {
    max-width: 500px;
    animation: fadeRight 1s ease forwards;
}

.text-subtitle {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    font-weight: 500;
}

.text-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.text-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.8;
    max-width: 400px;
    font-weight: 400;
}

/* 右侧产品包装盒效果 */
.products-container {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    perspective: 1000px;
    animation: fadeLeft 1s ease forwards;
    margin-top: 4rem;
}

.product-box {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 1.5rem 0.5rem;
    text-align: center;
    box-shadow: -15px 15px 30px rgba(0,0,0,0.6);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border-left: 1px solid rgba(255,255,255,0.3);
    border-top: 1px solid rgba(255,255,255,0.3);
}

.product-box:hover {
    transform: translateY(-15px) scale(1.02);
    z-index: 20 !important;
}

/* 盒子顶部伪3D */
.product-box::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -8px;
    width: 100%;
    height: 15px;
    background: inherit;
    filter: brightness(0.9);
    transform: skewX(-45deg);
    transform-origin: bottom;
}

.product-box::after {
    content: '';
    position: absolute;
    top: -7px;
    left: -15px;
    width: 15px;
    height: 100%;
    background: inherit;
    filter: brightness(0.6);
    transform: skewY(-45deg);
    transform-origin: right;
    border-right: 1px solid rgba(0,0,0,0.1);
}

.box-text-logo {
    font-family: 'Playfair Display', serif;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.box-text-name {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.box-text-desc {
    font-size: 0.45rem;
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

/* 各种不同款式的高低和颜色设定 */
.b-white { background: linear-gradient(135deg, #ffffff, #e0e0e0); color: #222; }
.b-light { background: linear-gradient(135deg, #f0f0f0, #cccccc); color: #333; }
.b-gray  { background: linear-gradient(135deg, #a0a0a0, #737373); color: #fff; }
.b-dark  { background: linear-gradient(135deg, #444444, #222222); color: #fff; }
.b-black { background: linear-gradient(135deg, #222222, #0a0a0a); color: #fff; }

.box-1 { width: 80px; height: 120px; z-index: 10; margin-right:-10px; }
.box-2 { width: 90px; height: 260px; z-index: 9; margin-right:-15px; }
.box-3 { width: 100px; height: 350px; z-index: 8; margin-right:-5px; }
.box-4 { width: 95px; height: 320px; z-index: 7; margin-right:-10px; }
.box-5 { width: 110px; height: 110px; z-index: 15; position: absolute; left: 240px; bottom: 150px; } /* EYE CREAM stacked */
.box-6 { width: 110px; height: 150px; z-index: 16; position: absolute; left: 240px; bottom: 0; } /* NECK CREAM stacked */
.box-7 { width: 90px; height: 280px; z-index: 5; margin-left: 115px; margin-right:-10px; }
.box-8 { width: 90px; height: 310px; z-index: 4; margin-right:-10px; }
.box-9 { width: 110px; height: 340px; z-index: 3; }

/* 特性区（主要用于适配手机端展示，桌面端可适当隐藏或置底） */
.features {
    display: block; /* Desktop default hidden before, but now we show dl channels */
    padding: 4rem 2rem;
    background: #fff;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-item i {
    font-size: 3rem;
    color: #111;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.feature-item .line {
    width: 30px;
    height: 1px;
    background-color: #333;
}

/* 悬浮语言切换 */
.lang-switch {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: background 0.3s;
}

.lang-switch:hover {
    background: rgba(0, 0, 0, 1);
}

/* 动画 */
@keyframes fadeRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* -------------------------------------------
   移动端适配 (Mobile Responsive)
   ------------------------------------------- */
@media (max-width: 900px) {
    header.navbar {
        padding: 0.8rem 1.5rem;
        height: auto;
        min-height: 70px;
    }
    
    /* 将包裹Logo和菜单的容器做成上下排列以节约横向宽度 */
    header.navbar > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.8rem !important;
        width: 100%;
    }

    /* 将中间菜单恢复显示，且设置为高级炫酷的手机端横向拨动模式 */
    .nav-links {
        display: flex;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        gap: 1rem;
        padding-bottom: 0.2rem;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 强行隐藏丑陋的手机浏览器原生横向滚动条 */
    .nav-links::-webkit-scrollbar {
        display: none;
    }

    /* 缩小死板的字号并用!important强行碾压写在HTML里的 2rem 超级大间距，让选项更紧凑 */
    .nav-links li a {
        font-size: 0.85rem;
        margin-left: 0.5rem !important;
    }

    .header-icons .ph-magnifying-glass,
    .header-icons .ph-heart {
        display: none; /* 隐藏部分图标 */
    }

    /* 移动端主视图：变为上下结构布局 */
    .hero {
        flex-direction: column;
        padding: 0;
        min-height: auto;
        background-color: #fff; /* 去掉全黑底 */
    }

    .hero-bg-split {
        /* 配合图片2的样式，将背景缩小放到产品图背后，不需要全屏倾斜背景 */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: none;
        background: linear-gradient(160deg, #ffffff 40%, transparent 80%);
        box-shadow: none;
    }
    
    .hero::before {
        display: none;
    }

    .hero-content {
        flex-direction: column;
        padding-top: 2rem;
        background: #fff;
    }

    .text-block {
        padding: 0 1.5rem;
        text-align: left;
        margin-bottom: 2rem;
    }

    .text-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .text-subtitle {
        font-size: 0.7rem;
    }

    .text-desc {
        font-size: 0.8rem;
    }

    /* 移动端产品区域包裹一层背景（像图片2一样） */
    .products-wrapper-mobile {
        width: 100%;
        background: linear-gradient(90deg, #d4d4d4, #000000);
        padding: 2rem 1rem 0;
        display: flex;
        justify-content: center;
        overflow: hidden;
        position: relative;
    }

    .products-wrapper-mobile::before {
         content: '';
         position: absolute;
         top: 0; left: 0; width: 60%; height: 100%;
         background: #fff;
         transform: skewX(-30deg) translateX(-30%);
         box-shadow: 10px 0 20px rgba(255,255,255,0.8);
    }

    .products-container {
        margin-top: 0;
        transform: scale(0.65); /* 缩小显示产品盒子 */
        transform-origin: bottom center;
        margin-bottom: -1px;
    }

    /* 显示下方的特点卡片 */
    .features {
        display: block;
    }

    .lang-switch {
        bottom: 1.5rem;
        left: 1.5rem;  /* 移动端放左下角 */
        right: auto;
    }
}

/* -------------------------------------------
   双语无缝切换引擎 (i18n CSS Engine)
   ------------------------------------------- */
.lang-en { display: none !important; }
.lang-cn { display: inherit; }

/* 当 body 加上 en-mode 后，瞬间翻转 */
body.en-mode .lang-en { display: inherit !important; }
body.en-mode .lang-cn { display: none !important; }

/* 针对特定行内包裹或非块级元素使用 inline 保障 */
span.lang-en, a .lang-en { display: none !important; }
span.lang-cn, a .lang-cn { display: inline !important; }
body.en-mode span.lang-en, body.en-mode a .lang-en { display: inline !important; }
body.en-mode span.lang-cn, body.en-mode a .lang-cn { display: none !important; }

/* ==============================
   首页 Hero Banner 轮播方案
   ============================== */
.hero-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;  /* 消除 img 底部的基线间距 */
}

/* 轮播容器 */
.hero-slides {
    position: relative;
    width: 100%;
}

/* 单张幻灯片默认隐藏 */
.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

/* Active状态恢复在文档流，并淡入显示 */
.hero-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.hero-banner-img {
    width: 100%;
    height: auto;
    display: block;
}

/* 轮播原点指示器 (居中浮靠在最下面一点) */
.hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}
.hero-indicators .dot {
    width: 40px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4); /* 加阴影防止白色背景下看不见 */
}
.hero-indicators .dot.active {
    background-color: rgba(255, 255, 255, 1);
}

/* 手机端：图片高度比例截断式处理 (保证图片不无限拉长，保证轮播图整体容器高度) */
@media (max-width: 900px) {
    .hero-banner {
        width: 100%;
        /* 兼容所有国产老浏览器的 16:9 比例方案！彻底解决 aspect-ratio 兼容失败导致的大白边 */
        padding-top: 56.25%; 
        position: relative;
    }
    .hero-slides {
        position: absolute;
        top: 0; left: 0;
        width: 100%; 
        height: 100%; 
    }
    .hero-slide {
        height: 100%;
    }
    .hero-slide.active {
        position: absolute; 
    }
    .hero-banner-img {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        object-fit: cover;
        object-position: left center;
    }
    .hero-indicators {
        bottom: 1rem;
    }
    .hero-indicators .dot {
        width: 30px;
        height: 3px;
    }
}

/* ==============================
   抗衰衡量指数模块 (横向滑动区域)
   ============================== */
.coeff-section {
    width: 100%;
    padding: 4rem 0;
    background-color: #fff;
    text-align: center;
}
.coeff-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 2.5rem;
    font-weight: 700;
}
.coeff-scroll-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0.5rem;
    box-sizing: border-box;
    /* 核心：用 flex 横排，让 [左箭头] [图片列表] [右箭头] 排成一行 */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 左右箭头 —— 不用绝对定位，作为 flex 子项自然排列 */
.coeff-arrow {
    flex-shrink: 0;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.coeff-arrow:hover {
    background: #111 !important;
    border-color: #111 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.coeff-arrow:hover svg polyline {
    stroke: #fff;
}
.coeff-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}
.coeff-scroll-container:active {
    cursor: grabbing; 
}
.coeff-scroll-container::-webkit-scrollbar {
    display: none; 
}
.coeff-img {
    /* 一页展示 3 张大图：(容器宽度 - 2个gap) / 3 */
    flex: 0 0 calc((100% - 3rem) / 3);
    width: calc((100% - 3rem) / 3);
    height: auto;
    object-fit: cover;
    border-radius: 12px; 
    scroll-snap-align: start;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); 
    
    /* 核心兼容防阻断 */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
    pointer-events: none;
}

@media (max-width: 900px) {
    .coeff-section {
        padding: 2.5rem 0;
    }
    .coeff-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .coeff-scroll-wrapper {
        padding: 0 0.3rem;
        gap: 0.3rem;
    }
    .coeff-scroll-container {
        gap: 0.8rem;
        padding: 0 0 1rem 0;
    }
    .coeff-img {
        /* 手机端一页展示 1 张大图，撑满整屏 */
        flex: 0 0 100%;
        width: 100%;
        scroll-snap-align: start;
    }
    /* 手机端箭头缩小 */
    .coeff-arrow {
        min-width: 32px !important;
        min-height: 32px !important;
    }
}
