/* ========== 基础变量 ========== */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(99, 102, 241, 0.4);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --gold: #ffd966;
    --gold-dim: rgba(255, 204, 0, 0.3);
    --red: #ef4444;
    --green: #22c55e;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 40px rgba(99, 102, 241, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1280px;
}

/* ========== Reset ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ========== Banner Header ========== */
.site-header {
    background: linear-gradient(135deg, #0f1724 0%, #1a1f3a 50%, #0f1724 100%);
    border-bottom: 1px solid var(--gold-dim);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}
.header-content {
    text-align: center;
    padding: 44px 24px 28px;
}
.brand-badge {
    display: inline-block;
    border: 1px solid var(--gold-dim);
    border-left: 4px solid var(--gold);
    border-radius: 40px;
    padding: 6px 24px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gold);
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}
.site-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #ffffff 0%, var(--gold) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}
.site-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* 一级导航 */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.main-nav a {
    color: var(--gold);
    font-weight: 500;
    font-size: 0.92rem;
    padding: 8px 20px;
    border-radius: 24px;
    transition: var(--transition);
    white-space: nowrap;
}
.main-nav a:hover {
    background: rgba(255, 204, 0, 0.15);
    color: #fff;
}
.main-nav a.active {
    background: linear-gradient(135deg, var(--gold), #ffb800);
    color: #1a1f3a;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(255, 204, 0, 0.35);
}

/* 下拉菜单 */
.nav-item {
    position: relative;
}
.nav-item .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.nav-arrow {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
    opacity: 0.7;
}
.nav-item:hover .nav-arrow {
    transform: rotate(180deg);
    opacity: 1;
}
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 160px;
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1724 100%);
    border: 1px solid var(--gold-dim);
    border-radius: 12px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    z-index: 100;
}
.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-link {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 400;
    transition: var(--transition);
    white-space: nowrap;
}
.dropdown-link:hover {
    color: var(--gold);
    background: rgba(255, 204, 0, 0.08);
    padding-left: 24px;
}
.dropdown-link.active {
    color: var(--gold);
    background: rgba(255, 204, 0, 0.12);
    font-weight: 600;
}

/* 汉堡按钮 */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 110;
}
.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========== 二级品类栏 ========== */
.sub-bar {
    background: rgba(99, 102, 241, 0.06);
    border-bottom: 1px solid var(--border-color);
}
.sub-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 32px;
}
.sub-link {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}
.sub-link:hover {
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.08);
}
.sub-link.active {
    color: var(--accent-light);
    background: rgba(99, 102, 241, 0.12);
    font-weight: 600;
}

/* ========== 移动端菜单 ========== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    z-index: 105;
    overflow-y: auto;
    padding: 70px 20px 30px;
}
.mobile-menu.open { display: flex; flex-direction: column; gap: 2px; }
.mobile-menu a {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--gold);
    transition: var(--transition);
}
.mobile-menu a:hover,
.mobile-menu a.active { background: rgba(255,204,0,0.12); color: #fff; }
.mobile-menu a.mobile-sub {
    padding-left: 44px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}
.mobile-menu a.mobile-sub.active { color: var(--gold); }

/* ========== 轮播 ========== */
.carousel-section { max-width: var(--max-width); margin: 24px auto 0; padding: 0 24px; }
.carousel-wrap { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3.2 / 1; }
.carousel-track { width: 100%; height: 100%; position: relative; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px);
    color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center;
    transition: var(--transition); z-index: 5; opacity: 0;
}
.carousel-wrap:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover { background: rgba(99, 102, 241, 0.6); }
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }
.carousel-nav {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; gap: 0; z-index: 5;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 20px 12px 10px;
}
.carousel-dot {
    flex: 1; padding: 8px 4px; font-size: 0.8rem; font-weight: 500;
    color: rgba(255,255,255,0.6); text-align: center;
    border-bottom: 2px solid transparent; transition: var(--transition);
}
.carousel-dot:hover { color: rgba(255,255,255,0.9); }
.carousel-dot.active { color: #fff; border-bottom-color: var(--accent-light); }

/* ========== 主内容 ========== */
.main-content {
    max-width: var(--max-width); margin: 32px auto; padding: 0 24px;
    min-height: 50vh;
}
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.section-header h2 { font-size: 1.5rem; font-weight: 700; }
.product-count { color: var(--text-muted); font-size: 0.9rem; }

/* ========== 商品网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.product-card {
    display: flex; flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden; transition: var(--transition);
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
    background: var(--bg-card-hover);
}
.product-img-wrap {
    position: relative; aspect-ratio: 1 / 1; overflow: hidden;
    background: var(--bg-secondary);
}
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.badge-featured {
    position: absolute; top: 12px; left: 12px;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    color: #fff; padding: 4px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-discount {
    position: absolute; top: 12px; right: 12px;
    background: var(--red); color: #fff;
    padding: 4px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 700;
}
.product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-name {
    font-size: 0.95rem; font-weight: 500; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 12px; flex: 1;
}
.product-price-row { display: flex; align-items: baseline; gap: 8px; }
.price-now { font-size: 1.2rem; font-weight: 700; color: var(--red); }
.price-orig { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; }
.coupon-tag {
    display: inline-block; margin-top: 8px;
    padding: 3px 10px; border-radius: 4px;
    background: rgba(34, 197, 94, 0.12); color: var(--green);
    font-size: 0.75rem; font-weight: 600;
}

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 80px 24px; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: 16px; }

/* ========== 分页 ========== */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin-top: 40px; padding-bottom: 20px;
}
.page-btn {
    padding: 10px 24px; border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
    transition: var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent-light); background: var(--accent-glow); }
.page-info { color: var(--text-muted); font-size: 0.9rem; }

/* ========== 页脚 ========== */
.site-footer {
    text-align: center; padding: 32px 24px; margin-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 0.85rem;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .header-content { padding: 36px 16px 20px; }
    .site-title { font-size: 1.8rem; }
    .site-subtitle { font-size: 0.92rem; margin-bottom: 16px; }
    .main-nav { display: none; }
    .nav-dropdown { display: none; }
    .brand-badge { font-size: 0.78rem; padding: 4px 16px; }
    .hamburger-btn { display: flex; }
    .carousel-section { padding: 0 16px; margin-top: 16px; }
    .carousel-wrap { aspect-ratio: 2.5 / 1; border-radius: var(--radius-sm); }
    .carousel-btn { width: 36px; height: 36px; font-size: 14px; opacity: 1; }
    .main-content { padding: 0 16px; margin: 20px auto; }
    .section-header h2 { font-size: 1.2rem; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-info { padding: 12px; }
    .product-name { font-size: 0.85rem; margin-bottom: 8px; }
    .price-now { font-size: 1rem; }
    .price-orig { font-size: 0.75rem; }
    .badge-featured, .badge-discount { font-size: 0.7rem; padding: 3px 8px; }
}
@media (max-width: 480px) {
    .site-title { font-size: 1.5rem; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-info { padding: 10px; }
    .product-name { -webkit-line-clamp: 1; font-size: 0.8rem; }
    .coupon-tag { font-size: 0.7rem; }
}
