:root {
    --primary-dark: #0f0c1d;
    --secondary-dark: #1a1730;
    --accent-gold: #d4af37;
    --accent-purple: #9b5de5;
    --accent-blue: #4361ee;
    --text-light: #f8f9fa;
    --text-gray: #adb5bd;
    --card-bg: rgba(255, 255, 255, 0.05);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    --gradient-gold: linear-gradient(135deg, var(--accent-gold), #f9c74f);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}
html, body {
    touch-action: manipulation;
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background-color: rgba(15, 12, 29, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo span {
    margin-top: 8px;
    margin-left: 10px;
    font-size: 1.3rem;
}

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

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* 遮罩 */
.order-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: 0.35s ease;
    z-index: 999;
}

/* 遮罩显示 */
.order-mask.show {
    opacity: 1;
    pointer-events: auto;
}

/* 弹出层 */
.order-popup {
    position: fixed;
    left: 50%;
    top: 120%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 380px;
    background: var(--secondary-dark);
    padding: 1.2rem;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1001;
    text-align: center;
}

/* 显示 */
.order-popup.show {
    top: 45%;
}

/* 输入框 */
.order-popup input {
    width: 100%;
    padding: 0.7rem;
    margin-top: 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
    outline: none;
}

/* 按钮 */
.order-popup button {
    width: 100%;
    margin-top: 1rem;
    padding: 0.7rem;
    border: none;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 1rem;
}

/* 查询结果 */
.order-result {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #ddd;
}
.order-list {
    margin-top: 1rem;
    height: 200px;
    text-align: left;
    overflow-y: auto;
    overflow-x: hidden;

    /* Firefox */
    scrollbar-width: none;

    /* IE / Edge（旧） */
    -ms-overflow-style: none;
}

/* Chrome / Safari / 新 Edge */
.order-list::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.order-item {
    padding: 1rem;
}

.gap-3 {
     gap: 0.75rem;
 }

.justify-center {
     justify-content: center;
 }

.flex-wrap {
     flex-wrap: wrap;
 }


.flex {
     display: flex;
 }

.mt-6 {
     margin-top: 1.5rem;
 }

.text-emerald-400 {
    color: #00ff88;
}

.text-xs {
     font-size: 0.95rem;
     line-height: 1rem;
 }

.py-1\.5 {
     padding-top: 0.375rem;
     padding-bottom: 0.375rem;
 }


.px-3 {
     padding-left: 0.75rem;
     padding-right: 0.75rem;
 }

.bg-emerald-500\/10 {
     background-color: #050505;
 }

.border-emerald-500\/20 {
    border: 1px solid #00ff88;
 }

.border {
     border-width: 1px;
 }

.rounded-full {
     border-radius: 10px;
 }

.gap-1\.5 {
     gap: 0.375rem;
 }

.items-center {
     align-items: center;
 }

.go-pay {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto 0;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background: var(--accent-blue);
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
}
.go-pay.disabled {
    background: #ccc;        /* 灰色 */
    color: #666;             /* 字体灰 */
    cursor: not-allowed;     /* 鼠标变禁用 */
    pointer-events: none;    /* 关键：禁止点击 */
}

/* 页面标题 */
.page-header {
    padding: 3rem 5% 2rem;
    text-align: center;
    background: linear-gradient(rgba(15, 12, 29, 0.9), rgba(15, 12, 29, 0.9)), url('bebda4e38f71.avif');
    background-size: cover;
    background-position: center;
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* 商品筛选 */
.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.category-more {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.category-btn {
    padding: 0.7rem 1.5rem;
    margin: 5px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn.active, .category-btn:hover {
    background: var(--gradient-primary);
}

.reveal-btn {
    width: 55%;
    padding: 0.7rem 1.5rem;
    margin: 5px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.search-box {
    width: 100%;
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

.search-box input {
    width: 95%;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #fff;
    outline: none;
    transition: 0.25s;
}

.search-box input:focus {
    border-color: #4f9cff;
    background: rgba(255,255,255,0.12);
}


/* 商品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    padding: 2rem 5% 0;
    transition: opacity 0.25s ease-in-out;
}

.products-grid.fade-out {
    opacity: 0;
}

.products-grid.fade-in {
    opacity: 1;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    display: block;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: rgba(212, 175, 55, 0.3);
}
.no-goods {
    text-align: center;
    color: var(--accent-gold);
    display: none;
}

.product-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-dark);
    margin: 5px 0 5px 0;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.product-detail-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--card-bg);
}

.product-detail-gallery-mobile {
    display: none;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}

.product-img {
    width: 100%;
    max-width: 200px;
    border-radius: var(--border-radius);
    display: block;
}

.lazy-img {
    opacity: 0;
    transition: opacity .4s ease;
}

.lazy-img.loaded {
    opacity: 1;
}

.product-detail-img {
    height: 100%;
}

.product-detail-info {
    max-width: 800px;
    margin: 10px auto;
    padding: 1rem 0;
    background: var(--card-bg);
    border-radius: var(--border-radius);
}

.product-detail-title {
    text-align: center;
    padding: 5px;
    font-size: 1.5rem;
    margin: 0 1rem 1rem 1rem;
}
.product-detail-stock {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-gray);
}
.product-detail-delivery {
    margin-top: 1rem;
    padding: 0.2rem 0.5rem;
    width: 92px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.product-detail-delivery {
    background: rgba(32, 201, 151, 0.2);
    color: #20c997;
    border: 1px solid rgba(32, 201, 151, 0.3);
}

.detail-delivery {
    margin-top: 1rem;
    padding: 0.2rem 0.4rem 0.4rem 0.2rem;
    width: 90px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.detail-delivery {
    background: rgba(32, 201, 151, 0.2);
    color: #20c997;
    border: 1px solid rgba(32, 201, 151, 0.3);
}

.quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-input {
    width: 60px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    border-right: none;
    color: var(--text-light);
    text-align: center;
    font-size: 1.2rem;
}

.email-hint {
    margin-left: 10px;
    margin-bottom: -10px;
    display: none;
    color: #ff6b6b;
}

.order-detail {
    background: var(--card-bg);
    padding: 2rem 2rem 0 2rem;
}

.order-form {
    background: var(--card-bg);
    padding: 0 2rem 2rem 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.form-label span{
    margin-left: 2rem;
}

.form-label.required::after {
    content: '*';
    color: #ff6b6b;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-gray);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method.active, .payment-method:hover {
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
}

.payment-method i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
}

.submit-order {
    width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-order:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(155, 93, 229, 0.4);
}

.product-description-section {
    padding: 2rem;
}

.product-description-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

.product-description-content {
    color: var(--text-gray);
    line-height: 1.8;
}

.product-content {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.product-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.product-title {
    height: 40px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.product-index-price {
    text-align: right;
}

.product-stock {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.product-delivery {
    font-size: 0.9rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.product-delivery i {
    margin-right: 5px;
}

.order-button {
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.order-button:hover {
    background: var(--gradient-gold);
    color: var(--primary-dark);
}

/* 特色区域 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem 5%;
    background: var(--secondary-dark);
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-gray);
}

.page-nav {
    max-width: 800px;
    margin: 10px auto;
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-nav .placeholder {
    width: 48%;
}

.page-nav a {
    max-width: 48%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-gray);
}
.page-nav a:hover {
     color: var(--accent-gold);
 }

.page-nav .prev {
    text-align: left;
}

.page-nav .next {
    text-align: right;
}

/* 页脚 */
footer {
    background: var(--secondary-dark);
    padding: 0 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-gray);
    font-size: 0.9rem;
}

.sitemap {
    color: #1a1730;
}

.back-to-top {
    display: none;
    position: fixed;
    bottom: 120px;
    right: 6px;
    z-index: 99;
}
#back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18%;
    width: 54px;
    height: 54px;
    border: rgb(34, 34, 34);
    background-color: rgb(34, 34, 34);
}

.btn-primary {
    color: #fff;
    background-color: #222;
    border-color: #222
}

/* 移动端适配 */

@media (max-width: 992px) {
    .product-detail-info {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--primary-dark);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition);
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .product-image {
        height: auto;
        margin: 0;
    }

    .product-title {
        width: 100%;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .product-price {
        font-size: 1rem;
    }
    .product-detail-title {
        text-align: left;
        font-size: 1.2rem;
        margin: 0 0.5rem 1rem 2rem;
    }
}

@media (max-width: 496px) {
    .product-detail-container {
        grid-template-columns: 1fr;
    }

    .product-detail-gallery {
        display: none;
    }

    .product-detail-gallery-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 0.5rem;
    }
}
@media (max-width: 576px) {
    .page-header {
        padding: 2rem 5% 1.5rem;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    .category-filter {
        flex-direction: column;
        align-items: center;
    }

    .category-btn {
        width: 80%;
    }

    .reveal-btn {
        width: 80%;
    }

    .features {
        grid-template-columns: 1fr;
    }
}

/* 遮罩 */
.category-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 998;
}

/* 遮罩激活 */
.category-mask.show {
    opacity: 1;
    pointer-events: auto;
}

/* 分类弹出浮层动画 */
.category-more-popup {
    position: fixed;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 380px;
    max-height: 40vh;               /* 限制最大高度 */
    overflow-y: auto;               /* 内容可滚动 */
    background: var(--secondary-dark);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    transition:
            top 0.45s cubic-bezier(0.23, 1, 0.32, 1),
            transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 999;
}

/* 弹出中间 */
.category-more-popup.show {
    top: 45%;
    transform: translate(-50%, -10%);
}
.loading_mask{
    position: fixed;
    inset: 0;
    z-index: 9999;

    background: rgba(0,0,0,.5);

    display: none;

    align-items: center;
    justify-content: center;
}

.loading_box{
    display: flex;
    align-items: center;
    justify-content: center;
}

body.loading{
    overflow: hidden;
    height: 100vh;
}
@media (min-width: 768px) {
    /* PC 端全部展示，不折叠 */
    .category-main { display: none; }
    .category-more {
        max-height: none;
    }
    .category-more-popup {
        position: static;
        transform: none;
        top: auto;
        width: 100%;
        max-width: none;
        max-height: none;
        overflow: visible;
        box-shadow: none;
        padding: 0;
        background:none;
    }
    .category-mask {
        display: none !important;
    }
    .search-box {
        width: 20%;
    }
    .form-control {
        width: 400px;
    }
}