/* ========== 全局 ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans SC', sans-serif; background: #0d0d1a; color: #e2e2f0; min-height: 100vh; }
a { text-decoration: none; color: inherit; }

/* ========== 导航 ========== */
.shop-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; background: rgba(13,13,26,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(201,169,110,0.1); }
.shop-nav-logo { font-family: 'Noto Serif SC', serif; font-size: 18px; font-weight: 700; color: #c9a96e; display: flex; align-items: center; gap: 6px; }
.shop-nav-logo span { font-size: 22px; }
.shop-nav-links { display: flex; gap: 24px; }
.shop-nav-links a { font-size: 14px; color: #8888a8; transition: 0.2s; }
.shop-nav-links a:hover, .shop-nav-links a.active { color: #c9a96e; }
.shop-nav-right { display: flex; align-items: center; gap: 16px; }
.nav-cart-btn { position: relative; font-size: 20px; color: #8888a8; transition: 0.2s; }
.nav-cart-btn:hover { color: #c9a96e; }
.nav-cart-badge { position: absolute; top: -6px; right: -10px; background: #e74c3c; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.nav-user-btn { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: #c9a96e; }

/* ========== Banner ========== */
.shop-banner { margin-top: 56px; padding: 60px 24px 40px; text-align: center; background: linear-gradient(180deg, rgba(201,169,110,0.08) 0%, transparent 100%); }
.shop-banner h1 { font-family: 'Noto Serif SC', serif; font-size: 32px; font-weight: 900; background: linear-gradient(135deg, #c9a96e, #f0d9a0, #c9a96e); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.shop-banner p { font-size: 14px; color: #8888a8; letter-spacing: 2px; }

/* ========== 分类栏 ========== */
.shop-categories { display: flex; justify-content: center; gap: 10px; padding: 16px 24px; flex-wrap: wrap; }
.cat-btn { padding: 8px 20px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); background: transparent; color: #8888a8; font-size: 13px; cursor: pointer; transition: 0.2s; }
.cat-btn:hover, .cat-btn.active { background: rgba(201,169,110,0.15); border-color: rgba(201,169,110,0.3); color: #c9a96e; }

/* ========== 商品网格 ========== */
.shop-container { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.shop-loading { text-align: center; padding: 60px; color: #8888a8; font-size: 14px; grid-column: 1 / -1; }
.shop-empty { text-align: center; padding: 80px 20px; color: #555; font-size: 14px; grid-column: 1 / -1; }
.shop-empty .icon { font-size: 48px; margin-bottom: 12px; }

/* ========== 商品卡片 ========== */
.product-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; overflow: hidden; cursor: pointer; transition: 0.3s; }
.product-card:hover { transform: translateY(-4px); border-color: rgba(201,169,110,0.2); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.product-card-img { aspect-ratio: 1; background: #1a1a2e; display: flex; align-items: center; justify-content: center; font-size: 48px; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 14px; }
.product-card-name { font-size: 15px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.product-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: rgba(255,255,255,0.05); color: #8888a8; }
.product-tag.wuxing { background: rgba(108,92,231,0.15); color: #a29bfe; }
.product-card-price { margin-bottom: 6px; }
.price-current { font-size: 18px; font-weight: 800; color: #e74c3c; }
.price-original { font-size: 12px; color: #555; text-decoration: line-through; margin-left: 6px; }
.product-card-meta { display: flex; justify-content: space-between; font-size: 11px; color: #555; }
.sold-out-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #e74c3c; }

/* ========== 详情页 ========== */
.detail-container { max-width: 1000px; margin: 72px auto 60px; padding: 0 24px; }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.detail-gallery { border-radius: 14px; overflow: hidden; background: #1a1a2e; }
.detail-gallery img { width: 100%; display: block; }
.detail-gallery-thumbs { display: flex; gap: 8px; padding: 8px; }
.detail-gallery-thumbs img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; cursor: pointer; border: 2px solid transparent; transition: 0.2s; }
.detail-gallery-thumbs img.active, .detail-gallery-thumbs img:hover { border-color: #c9a96e; }
.detail-info { padding: 8px 0; }
.detail-name { font-family: 'Noto Serif SC', serif; font-size: 24px; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.detail-price-row { margin-bottom: 12px; }
.detail-price { font-size: 28px; font-weight: 900; color: #e74c3c; }
.detail-original { font-size: 14px; color: #555; text-decoration: line-through; margin-left: 8px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-recommend { padding: 12px 16px; background: rgba(201,169,110,0.08); border-left: 3px solid #c9a96e; border-radius: 0 8px 8px 0; font-size: 13px; color: #c9a96e; margin-bottom: 16px; }
.detail-meta { display: flex; gap: 20px; font-size: 13px; color: #8888a8; margin-bottom: 16px; }
.detail-qty { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.detail-qty label { font-size: 14px; color: #8888a8; }
.qty-ctrl { display: flex; align-items: center; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; overflow: hidden; }
.qty-ctrl button { width: 36px; height: 36px; background: rgba(255,255,255,0.05); border: none; color: #e2e2f0; font-size: 18px; cursor: pointer; transition: 0.2s; }
.qty-ctrl button:hover { background: rgba(201,169,110,0.15); color: #c9a96e; }
.qty-ctrl input { width: 50px; height: 36px; text-align: center; background: transparent; border: none; border-left: 1px solid rgba(255,255,255,0.05); border-right: 1px solid rgba(255,255,255,0.05); color: #e2e2f0; font-size: 15px; outline: none; }
.detail-actions { display: flex; gap: 12px; }
.btn-add-cart { flex: 1; padding: 14px; border: 1px solid rgba(201,169,110,0.3); background: rgba(201,169,110,0.1); color: #c9a96e; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-add-cart:hover { background: rgba(201,169,110,0.2); }
.btn-buy-now { flex: 1; padding: 14px; border: none; background: linear-gradient(135deg, #a8893e, #c9a96e); color: #1a1a1a; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.btn-buy-now:hover { filter: brightness(1.1); }
.detail-desc { margin-top: 32px; padding: 24px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 14px; }
.detail-desc h3 { font-size: 16px; margin-bottom: 12px; color: #c9a96e; }
.detail-desc p { font-size: 14px; color: #8888a8; line-height: 1.8; }

/* ========== 购物车 ========== */
.cart-container { max-width: 800px; margin: 72px auto 60px; padding: 0 24px; }
.cart-title { font-size: 22px; margin-bottom: 20px; }
.cart-empty { text-align: center; padding: 80px 20px; color: #555; font-size: 14px; }
.cart-empty .icon { font-size: 48px; margin-bottom: 12px; }
.cart-item { display: flex; align-items: center; gap: 14px; padding: 16px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; margin-bottom: 8px; }
.cart-item-img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: 14px; color: #e74c3c; font-weight: 700; margin-top: 4px; }
.cart-item-remove { font-size: 12px; color: #e74c3c; cursor: pointer; margin-top: 4px; display: inline-block; }
.cart-item-remove:hover { text-decoration: underline; }
.cart-footer { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; margin-top: 16px; }
.cart-total .amount { font-size: 24px; font-weight: 800; color: #e74c3c; }
.btn-checkout { padding: 14px 40px; background: linear-gradient(135deg, #a8893e, #c9a96e); color: #1a1a1a; border: none; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.btn-checkout:hover { filter: brightness(1.1); }

/* ========== 结算页 ========== */
.checkout-container { max-width: 700px; margin: 72px auto 60px; padding: 0 24px; }
.checkout-section { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.checkout-section h3 { font-size: 15px; margin-bottom: 14px; color: #c9a96e; }
.address-option { padding: 12px 16px; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: 0.2s; }
.address-option:hover { border-color: rgba(201,169,110,0.2); }
.address-option.selected { border-color: rgba(201,169,110,0.4); background: rgba(201,169,110,0.05); }
.address-option .name { font-weight: 600; margin-right: 12px; }
.address-option .addr { font-size: 13px; color: #8888a8; }
.pay-options { display: flex; flex-direction: column; gap: 8px; }
.pay-option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; }
.pay-option input[type="checkbox"] { accent-color: #c9a96e; }
.pay-option .balance { margin-left: auto; font-size: 12px; color: #8888a8; }
.checkout-summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: #8888a8; }
.checkout-summary .row.total { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 12px; margin-top: 4px; }
.checkout-summary .row.total .amount { font-size: 22px; font-weight: 800; color: #e74c3c; }
.btn-place-order { width: 100%; padding: 16px; background: linear-gradient(135deg, #a8893e, #c9a96e); color: #1a1a1a; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.2s; margin-top: 8px; }
.btn-place-order:hover { filter: brightness(1.1); }

/* ========== 充值弹窗 ========== */
.recharge-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 2000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.tier-card { padding: 16px 8px; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; text-align: center; cursor: pointer; transition: 0.2s; }
.tier-card:hover, .tier-card.selected { border-color: rgba(201,169,110,0.3); background: rgba(201,169,110,0.1); }
.tier-amount { font-size: 20px; font-weight: 800; color: #c9a96e; }
.tier-voucher { font-size: 12px; color: #8888a8; margin-top: 4px; }
.tier-points { font-size: 11px; color: #27ae60; margin-top: 2px; }
.pay-method-btns { display: flex; gap: 10px; margin-bottom: 20px; }
.pay-method-btn { flex: 1; padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: transparent; color: #e2e2f0; font-size: 14px; cursor: pointer; transition: 0.2s; }
.pay-method-btn:hover, .pay-method-btn.selected { border-color: rgba(201,169,110,0.3); background: rgba(201,169,110,0.1); }
.qrcode-area { text-align: center; padding: 20px; }
.qrcode-area .order-no { font-size: 12px; color: #8888a8; margin-top: 8px; }
.qrcode-area .tip { font-size: 13px; color: #c9a96e; margin-top: 12px; }
.recharge-status { padding: 12px; font-size: 14px; color: #8888a8; }

/* ========== Toast ========== */
.shop-toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); padding: 10px 28px; background: rgba(39,174,96,0.9); color: #fff; border-radius: 8px; font-size: 14px; z-index: 3000; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ========== 登录弹窗 ========== */
.auth-overlay.show { display: flex !important; }
.auth-tab.active { background: rgba(201,169,110,0.15) !important; color: #c9a96e !important; }
.auth-msg { font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.auth-msg.error { color: #e74c3c; }
.auth-msg.success { color: #27ae60; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .shop-nav-links { display: none; }
    .shop-banner h1 { font-size: 24px; }
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-actions { flex-direction: column; }
    .cart-item { flex-wrap: wrap; }
    .cart-footer { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 480px) {
    .shop-grid { grid-template-columns: 1fr; }
    .tier-grid { grid-template-columns: repeat(2, 1fr); }
}
