/* 全局样式 - 炫酷游戏风 深色主题外贸虚拟产品站 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #22d3ee;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --danger: #ef4444;
    --success: #10b981;
}
body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
}
a {
    color: var(--secondary);
    text-decoration: none;
}
a:hover {
    color: var(--primary);
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部导航 */
header {
    background: rgba(15,23,42,0.95);
    position: sticky;
    top:0;
    z-index: 999;
    border-bottom:1px solid rgba(99,102,241,0.2);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding:14px 0;
}
.nav-links {
    display: flex;
    gap:24px;
}
.nav-links a {
    color:var(--text-white);
    font-weight:500;
    transition:0.2s;
}
.nav-links a:hover {
    color:var(--secondary);
}
.header-right {
    display:flex;
    align-items:center;
    gap:16px;
}
.search-box {
    position:relative;
}
.search-box input {
    background:#1e293b;
    border:1px solid #334155;
    border-radius:8px;
    padding:8px 36px 8px 12px;
    color:#fff;
    width:240px;
}
.search-box i {
    position:absolute;
    right:10px;
    top:50%;
    transform:translateY(-50%);
    color:var(--text-gray);
}
.icon-btn {
    background:transparent;
    border:none;
    color:#fff;
    font-size:18px;
    cursor:pointer;
    position:relative;
}
.badge {
    position:absolute;
    top:-6px;
    right:-6px;
    background:var(--danger);
    border-radius:50%;
    width:18px;
    height:18px;
    font-size:11px;
    display:flex;
    align-items:center;
    justify-content:center;
}

/* 轮播banner */
.banner-slider {
    width:100%;
    height:480px;
    position:relative;
    overflow:hidden;
}
.slide-item {
    position:absolute;
    width:100%;
    height:100%;
    background:linear-gradient(135deg,#4f46e5,#06b6d4);
    display:flex;
    align-items:center;
    justify-content:center;
    opacity:0;
    transition:opacity 0.6s ease;
}
.slide-item.active {
    opacity:1;
}
.slide-content {
    text-align:center;
    padding:0 20px;
}
.slide-content h2 {
    font-size:48px;
    margin-bottom:16px;
    text-shadow:0 2px 12px #000;
}
.slide-content p {
    font-size:18px;
    margin-bottom:24px;
}
.btn-primary {
    background:var(--primary);
    color:#fff;
    padding:12px 28px;
    border-radius:8px;
    border:none;
    font-weight:600;
    cursor:pointer;
    transition:0.3s;
}
.btn-primary:hover {
    background:var(--primary-dark);
}
.slider-arrow {
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    background:rgba(0,0,0,0.4);
    color:#fff;
    border:none;
    width:44px;
    height:44px;
    border-radius:50%;
    font-size:20px;
    cursor:pointer;
    z-index:10;
}
.slider-arrow.prev {left:20px;}
.slider-arrow.next {right:20px;}

/* 首页栏目区块 */
.section {
    padding:50px 0;
}
.section-title {
    font-size:32px;
    margin-bottom:30px;
    position:relative;
    padding-left:16px;
}
.section-title::before {
    content:"";
    position:absolute;
    left:0;
    top:4px;
    bottom:4px;
    width:4px;
    background:var(--secondary);
    border-radius:2px;
}

/* 产品卡片多种样式 */
.product-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:24px;
}
.product-card {
    background:var(--bg-card);
    border-radius:12px;
    overflow:hidden;
    transition:0.3s;
    border:1px solid rgba(99,102,241,0.15);
}
.product-card:hover {
    transform:translateY(-6px);
    box-shadow:0 12px 30px rgba(99,102,241,0.25);
}
.product-img-wrap {
    height:200px;
    overflow:hidden;
}
.product-img-wrap img {
    width:100%;
    height:100%;
    object-fit:cover;
}
.product-info {
    padding:16px;
}
.product-name {
    font-size:17px;
    margin-bottom:8px;
}
.product-price {
    font-size:20px;
    font-weight:bold;
    color:var(--secondary);
    margin-bottom:12px;
}
.product-actions {
    display:flex;
    gap:8px;
}
.btn-sm {
    padding:8px 12px;
    font-size:14px;
    flex:1;
    border-radius:6px;
    border:none;
    cursor:pointer;
}
.btn-cart {
    background:var(--primary);
    color:#fff;
}
.btn-fav {
    background:#334155;
    color:#fff;
}

/* 卡片变体2 - 横向卡片（首页使用） */
.product-card-horizontal {
    display:flex;
    background:var(--bg-card);
    border-radius:12px;
    overflow:hidden;
    margin-bottom:16px;
    border:1px solid rgba(99,102,241,0.15);
}
.product-card-horizontal .product-img-wrap {
    width:160px;
    height:140px;
}
.product-card-horizontal .product-info {
    flex:1;
}

/* 侧边弹窗：购物车、收藏 */
.side-drawer {
    position:fixed;
    top:0;
    right:-400px;
    width:380px;
    height:100vh;
    background:var(--bg-card);
    z-index:1000;
    transition:right 0.3s ease;
    border-left:1px solid #334155;
}
.side-drawer.open {
    right:0;
}
.drawer-header {
    padding:18px 20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px solid #334155;
}
.drawer-close {
    background:none;
    border:none;
    color:#fff;
    font-size:22px;
    cursor:pointer;
}
.drawer-body {
    padding:20px;
    height:calc(100vh - 130px);
    overflow-y:auto;
}
.drawer-footer {
    padding:16px 20px;
    border-top:1px solid #334155;
}
.drawer-total {
    display:flex;
    justify-content:space-between;
    margin-bottom:12px;
    font-size:18px;
    font-weight:bold;
}
.drawer-item {
    display:flex;
    gap:12px;
    padding:12px 0;
    border-bottom:1px solid #2d3748;
}
.drawer-item-img {
    width:70px;
    height:70px;
    border-radius:6px;
    object-fit:cover;
}
.drawer-item-info {
    flex:1;
}
.drawer-item-name {
    font-size:15px;
}
.drawer-item-price {
    color:var(--secondary);
}
.drawer-item-remove {
    color:var(--danger);
    background:none;
    border:none;
    cursor:pointer;
}

/* 历史浏览记录 */
.history-section {
    margin-top:40px;
}
.history-list {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
    gap:16px;
}
.history-item {
    background:#1e293b;
    border-radius:8px;
    overflow:hidden;
}
.history-item img {
    width:100%;
    height:120px;
    object-fit:cover;
}
.history-item p {
    padding:8px;
    font-size:14px;
}

/* product-list页面：筛选、分页 */
.filter-bar {
    background:var(--bg-card);
    padding:16px;
    border-radius:10px;
    margin-bottom:24px;
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    align-items:center;
}
.filter-item {
    display:flex;
    align-items:center;
    gap:8px;
}
.filter-item select {
    background:#2d3748;
    color:#fff;
    border:1px solid #475569;
    padding:8px 12px;
    border-radius:6px;
}
.pagination-wrap {
    margin-top:36px;
    display:flex;
    justify-content:center;
    gap:8px;
}
.pagination-btn {
    background:#2d3748;
    color:#fff;
    border:none;
    width:40px;
    height:40px;
    border-radius:6px;
    cursor:pointer;
}
.pagination-btn.active {
    background:var(--primary);
}

/* product-detail页面 */
.detail-wrap {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:32px;
}
.detail-img-wrap {
    border-radius:12px;
    overflow:hidden;
}
.detail-img-wrap img {
    width:100%;
}
.detail-info h1 {
    font-size:32px;
    margin-bottom:16px;
}
.detail-price {
    font-size:28px;
    color:var(--secondary);
    margin-bottom:20px;
}
.detail-desc {
    color:var(--text-gray);
    margin-bottom:24px;
}
.detail-actions {
    display:flex;
    gap:12px;
}

/* 通用页面 about / contact / policy */
.page-content {
    padding:40px 0;
}
.page-content h1 {
    font-size:34px;
    margin-bottom:24px;
}
.page-content p {
    color:var(--text-gray);
    margin-bottom:16px;
    font-size:16px;
}
.contact-info {
    background:var(--bg-card);
    padding:24px;
    border-radius:12px;
    margin-top:24px;
}
.contact-info p {
    margin-bottom:10px;
}

/* 页脚 */
footer {
    background:#0b1120;
    padding:50px 0 24px;
    margin-top:60px;
    border-top:1px solid #1e293b;
}
.footer-inner {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:32px;
    margin-bottom:36px;
}
.footer-col h4 {
    font-size:18px;
    margin-bottom:16px;
}
.footer-col ul {
    list-style:none;
}
.footer-col li {
    margin-bottom:8px;
}
.footer-col li a {
    color:var(--text-gray);
}
.footer-col li a:hover {
    color:var(--secondary);
}
.payment-img {
    max-width:100%;
    margin-top:12px;
}
.copyright {
    text-align:center;
    color:var(--text-gray);
    padding-top:24px;
    border-top:1px solid #1e293b;
}

/* 遮罩层 */
.overlay {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    z-index:999;
    display:none;
}
.overlay.show {
    display:block;
}

/* 响应式 */
@media(max-width:768px) {
    .header-inner {
        flex-direction:column;
        gap:12px;
    }
    .detail-wrap {
        grid-template-columns:1fr;
    }
    .side-drawer {
        width:100%;
        right:-100%;
    }
    .banner-slider {
        height:320px;
    }
    .slide-content h2 {
        font-size:32px;
    }
}
