@charset "utf-8";
/* CSS Document */

/* ===================== 全局变量 ===================== */
:root {
    --bg-dark: #16212b;
    --bg-section: #1e2a35;
    --bg-hover: #263746;
    --text-main: #f5f7fa;
    --text-sub: #b0bec5;
    --text-muted: #78909c;
    --accent: #b08d57;
    --accent-light: #d4b483;
    --shadow: 0 12px 30px rgba(0,0,0,0.35);
    --radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC",
                 "Microsoft YaHei", sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===================== 顶部导航栏 ===================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(22, 33, 43, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}

.navbar .logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-sub);
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.2s ease;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 2px 0;
    transition: 0.3s;
}

/* ===================== 主视觉搜索区 ===================== */
.hero {
    padding: 64px;
    text-align: center;
    background: linear-gradient(180deg, #16212b 0%, #1e2a35 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(176,141,87,0.08) 0%, transparent 70%);
    transform: rotate(25deg);
    pointer-events: none;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 16px;
    position: relative;
}

/* 搜索框区域 - 原生 sticky 吸顶，稳定无跳动 */
.search-wrapper {
    position: sticky;
    top: 68px;        /* 导航栏高度，吸顶后位于导航栏下方 */
    z-index: 99;
    margin: 0 auto;
    max-width: 640px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 4px;
    padding: 5px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    transition: box-shadow 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px;
    font-size: 1rem;
    border-radius: 4px;
    background: transparent;
    color: #333;
    width: 100%;
}

.placeholder-roller {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    height: 1.2em;
    line-height: 1.2em;
    overflow: hidden;
    color: #999;
    text-align: left;
}

.placeholder-list {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.placeholder-item {
    display: block;
    height: 1.2em;
    line-height: 1.2em;
    white-space: nowrap;
}

.search-input-wrapper.has-value .placeholder-roller {
    opacity: 0;
    visibility: hidden;
}

.search-box button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 32px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.search-box button:hover {
    background: var(--accent-light);
}

/* ===================== 重点板块区 ===================== */
.feature-section {
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 1600px;
    margin: 0 auto;
}

.feature-block {
    position: relative;
    padding: 50px 40px;
    border-radius: var(--radius);
    background: var(--bg-section);
    overflow: hidden;
    transition: transform 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
}

.feature-block:hover {
    transform: translateY(-10px);
    background: var(--bg-hover);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.feature-block h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.feature-block p {
    font-size: 1rem;
    color: var(--text-sub);
    line-height: 1.8;
    max-width: 64%;
}

.feature-block .feature-link {
    margin-top: 32px;
    display: inline-block;
    font-weight: 600;
    text-align: right;
    letter-spacing: 1px;
    color: var(--accent);
    position: relative;
    transition: color 0.3s;
}

.feature-block .feature-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.feature-block:hover .feature-link {
    color: var(--accent-light);
}

.feature-block:hover .feature-link::after {
    transform: scaleX(1);
    transform-origin: left;
}

.feature-search {
    background: linear-gradient(135deg, #1e2a35 0%, #243544 100%);
}

.feature-agent {
    background: linear-gradient(135deg, #1e2a35 0%, #2a3542 100%);
}

/* ===================== 产品分类区 ===================== */
.products-section {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-heading {
    text-align: center;
    margin-bottom: 16px;
}

.section-heading h2 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-heading p {
    color: var(--text-sub);
    letter-spacing: 1px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.product-item {
    background: var(--bg-section);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    transition: all 0.35s ease;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.product-item:hover {
    transform: translateY(-6px);
    background: var(--bg-hover);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.product-item h3 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.product-item p {
    color: var(--text-sub);
    font-size: 0.95rem;
}

/* ===================== 底部信息区 ===================== */
.footer {
    background: #0f1720;
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.footer .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.footer .footer-links a {
    color: var(--text-sub);
    transition: color 0.3s;
}

.footer .footer-links a:hover {
    color: #fff;
}

.footer .beian {
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ===================== 响应式适配 ===================== */
@media (max-width: 900px) {
    .navbar {
        padding: 0 20px;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        width: 100%;
        background: rgba(22, 33, 43, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-toggle {
        display: flex;
    }
    .feature-section {
        grid-template-columns: 1fr;
        padding: 32px;
        gap: 32px;
    }
    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .search-box button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 32px;
    }
    .hero-title {
        font-size: 1.6rem;
    }
    .feature-block {
        padding: 30px 20px;
    }
    .feature-block h2 {
        font-size: 1.5rem;
    }
    .footer {
        padding: 30px 20px;
    }
}

/* ===================== 商品连续滚动模块 ===================== */
.carousel-section {
    padding: 0;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
    cursor: grab;
    touch-action: pan-y;
    padding-top: 4px;
}

.carousel-viewport:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    align-items: flex-start;
    width: max-content;
    will-change: transform;
}

.carousel-item {
    flex: 0 0 auto;
    width: 220px;
    margin-right: 16px;
    background: #1e2a35;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background 0.3s ease;
}

.carousel-item:hover {
    transform: translateY(-4px);
    background: #263746;
}

.carousel-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
    display: block;
}

.carousel-item .item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f5f7fa;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-item .item-model {
    font-size: 0.8rem;
    color: #78909c;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .carousel-item {
        width: 160px;
        margin-right: 10px;
        padding: 8px;
    }
    .carousel-item img {
        height: 130px;
    }
    .carousel-item .item-title {
        font-size: 0.85rem;
    }
}