/* ============================================================
   补全样式 —— 根据 HTML 结构补齐第二个 CSS 缺失的部分
   追加到第二个 CSS 文件末尾即可
   ============================================================ */

/* ---------- 1. HTML 中用到但未定义的变量 ---------- */
:root {
    --primary: #ffffff;
    --primary-dark: #F8F7F5;
    --text-primary: #111815;
    --text-secondary: #5C6460;
    --border-light: #E6E8E6;
    --border-heavy: #C9CECB;
    --bg-card: #ffffff;
    --bg-elevated: #F5F5F2;
    --accent: #2A302C;
    --accent-light: #434945;
    --accent-glow: rgba(42, 48, 44, 0.08);
    --transition-smooth: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    --shadow-elevation: 0 18px 32px -10px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.02);
    --glass-bg: rgba(255, 255, 255, 0.97);
    --radius-full: 9999px;
}

/* ---------- 2. 通用工具类 ---------- */
.bg-white {
    background-color: var(--white);
    padding: var(--section-padding);
}

.text-center {
    text-align: center;
}

/* 淡入动画（stats-section 的 .stat-card.fade-in 用到） */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.9s ease forwards;
}
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.stat-card.fade-in:nth-child(2) { animation-delay: 0.15s; }
.stat-card.fade-in:nth-child(3) { animation-delay: 0.3s; }
.stat-card.fade-in:nth-child(4) { animation-delay: 0.45s; }

/* ---------- 3. bg-white 区块里的 h2 标题 ---------- */
.bg-white h2 {
    font-size: 36px;
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--black);
    letter-spacing: 1px;
    line-height: 1.3;
    display: inline-block;
    position: relative;
    padding-bottom: 16px;
    margin: 0 0 40px;
}
.bg-white h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 2px;
    opacity: 0.8;
}
.bg-white h2 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}
.bg-white h2 a:hover {
    color: var(--gold);
}

/* ---------- 4. 产品网格（4 列） ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: left;
}
.products-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 网格中的 product-card 取消第二个 CSS 的固定宽度设置 */
.products-grid .product-card {
    flex: none;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* ---------- 5. 产品图片容器 ---------- */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--gray-light);
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image a {
    display: block;
    width: 100%;
    height: 100%;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* ---------- 6. 产品信息里的产品名 / 分类 / 价格 ---------- */
.product-info > a:not(.product-link) {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    line-height: 1.35;
    letter-spacing: 0.5px;
    transition: var(--transition);
}
.product-info > a:not(.product-link):hover {
    color: var(--gold);
}

.product-category {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 6px;
    font-family: var(--font-sans);
}
.product-category:empty {
    display: none;
}

.product-price {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}
.product-price:empty {
    display: none;
    margin: 0;
}

/* product-link 贴底对齐 */
.product-info .product-link {
    margin-top: auto;
    align-self: flex-start;
}

/* ---------- 7. 横向服务卡片滑块 ---------- */
.scroll-container {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 覆盖第二个 CSS 里 .slider-controls 的绝对定位（此处为一组顶部按钮） */
.scroll-container .slider-controls {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 0;
    margin: 0 0 24px;
    pointer-events: auto;
}

/* 滚动按钮（覆盖 .slider-controls button 的默认样式） */
.scroll-container .slider-controls .nav-btn {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--white);
    color: var(--black);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 0;
    line-height: 1;
    font-family: var(--font-sans);
}
.scroll-container .slider-controls .nav-btn:hover {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(184, 150, 104, 0.3);
}
.scroll-container .slider-controls .nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(184, 150, 104, 0.25);
}

/* 横向滚动容器 */
.services-horizontal {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 20px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-light) rgba(0, 0, 0, 0.05);
}
.services-horizontal::-webkit-scrollbar {
    height: 4px;
}
.services-horizontal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
}
.services-horizontal::-webkit-scrollbar-thumb {
    background: var(--gold-light);
    border-radius: 4px;
}
.services-horizontal::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* 服务卡片 */
.service-card {
    flex: 0 0 360px;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: 20px;
    padding: 70px 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    transition: var(--transition);
    text-align: center;
    overflow: hidden;
    cursor: pointer;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    opacity: 0;
    transition: var(--transition);
}
.service-card:hover::before {
    opacity: 1;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.08), 0 10px 30px rgba(184, 150, 104, 0.06);
    border-color: rgba(184, 150, 104, 0.15);
}
.service-card h3 {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--black);
    margin: 0;
    letter-spacing: 2px;
    line-height: 1.4;
}
.service-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}
.service-card:hover h3 a {
    color: var(--gold);
}

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1200px) {
    .products-grid,
    .products-grid.cols-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    .bg-white h2 {
        font-size: 32px;
    }
}

@media (max-width: 992px) {
    .products-grid,
    .products-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .bg-white h2 {
        font-size: 28px;
        margin-bottom: 32px;
    }
    .service-card {
        flex: 0 0 300px;
        padding: 56px 30px;
    }
    .service-card h3 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .bg-white {
        padding: 60px 0;
    }
    .products-grid,
    .products-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .bg-white h2 {
        font-size: 24px;
        margin-bottom: 28px;
        padding-bottom: 12px;
    }
    .product-info > a:not(.product-link) {
        font-size: 17px;
    }
    .scroll-container .slider-controls .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
    .service-card {
        flex: 0 0 260px;
        padding: 48px 24px;
    }
    .service-card h3 {
        font-size: 18px;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 480px) {
    .bg-white {
        padding: 48px 0;
    }
    .products-grid,
    .products-grid.cols-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .bg-white h2 {
        font-size: 22px;
    }
    .service-card {
        flex: 0 0 220px;
        padding: 40px 20px;
    }
    .service-card h3 {
        font-size: 16px;
    }
}
















