/* ============================================================
   邻里鲜蔬 - 全局样式
   ============================================================ */

/* ===== 基础重置 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #dcfce7;
    --primary-bg: #f0fdf4;
    --text: #1e293b;
    --text-sub: #64748b;
    --text-light: #94a3b8;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --red: #ef4444;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; gap: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 30px; }
.logo-text {
    font-size: 21px; font-weight: 800;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.page-title { font-size: 17px; font-weight: 600; }

.nav { display: flex; gap: 4px; }

.nav-link {
    padding: 8px 18px; border-radius: 24px;
    font-size: 14px; font-weight: 500; color: var(--text-sub);
    transition: all 0.2s;
}
.nav-link:hover { background: var(--primary-light); color: var(--primary-dark); }
.nav-link.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; box-shadow: 0 2px 8px rgba(34,197,94,0.3);
}

.header-right { display: flex; align-items: center; gap: 12px; }

.cart {
    position: relative; cursor: pointer; font-size: 22px;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); border-radius: 50%;
    transition: all 0.2s;
}
.cart:hover { background: var(--primary-light); transform: scale(1.08); }

.cart-count {
    position: absolute; top: -4px; right: -4px;
    min-width: 20px; height: 20px; line-height: 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff; font-size: 11px; font-weight: 700;
    text-align: center; border-radius: 10px; padding: 0 5px;
    box-shadow: 0 2px 6px rgba(239,68,68,0.4);
    display: none;
}

/* ===== Banner ===== */
.banner {
    background: linear-gradient(135deg, #059669, #16a34a 50%, #22c55e);
    padding: 56px 0 48px; color: #fff;
    position: relative; overflow: hidden;
}
.banner::before {
    content: ''; position: absolute;
    top: -50%; right: -15%; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
    border-radius: 50%; animation: float 8s ease-in-out infinite;
}
.banner::after {
    content: ''; position: absolute;
    bottom: -40%; left: -10%; width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
    border-radius: 50%; animation: float 10s ease-in-out infinite reverse;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-20px)} }

.banner-content { position: relative; z-index: 1; }
.banner h1 { font-size: 36px; font-weight: 900; letter-spacing: 3px; margin-bottom: 10px; }
.banner p { font-size: 17px; opacity: 0.92; margin-bottom: 24px; }

.banner-tags { display: flex; gap: 12px; flex-wrap: wrap; }
.tag {
    background: rgba(255,255,255,0.18); backdrop-filter: blur(12px);
    padding: 8px 18px; border-radius: 24px;
    font-size: 13px; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}
.tag:hover { background: rgba(255,255,255,0.28); transform: translateY(-2px); }

.banner-btn {
    display: inline-block; margin-top: 20px;
    background: rgba(255,255,255,0.2); backdrop-filter: blur(12px);
    padding: 12px 32px; border-radius: 28px;
    font-size: 15px; font-weight: 700; color: #fff;
    border: 1.5px solid rgba(255,255,255,0.3); transition: all 0.3s;
}
.banner-btn:hover { background: #fff; color: var(--primary-dark); }

/* ===== Page Banner ===== */
.page-banner {
    background: linear-gradient(135deg, #059669, #16a34a 50%, #22c55e);
    padding: 52px 0 44px; color: #fff; text-align: center;
}
.page-banner h1 { font-size: 34px; font-weight: 900; margin-bottom: 8px; }
.page-banner p { font-size: 16px; opacity: 0.92; }

/* ===== Service Bar ===== */
.service-bar {
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 18px 0;
}
.service-items {
    display: flex; justify-content: space-around; flex-wrap: wrap; gap: 16px;
}
.service-item { display: flex; align-items: center; gap: 10px; }
.service-icon { font-size: 28px; }
.service-item strong { display: block; font-size: 14px; font-weight: 700; }
.service-item span { font-size: 12px; color: var(--text-sub); }

/* ===== Category Shortcuts ===== */
.category-shortcuts { padding: 48px 0; background: var(--card); }
.category-shortcuts-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.category-shortcut-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 16px; text-align: center;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: var(--radius);
    border: 1.5px solid rgba(34,197,94,0.12);
    transition: all 0.3s;
}
.category-shortcut-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(34,197,94,0.15);
    border-color: var(--primary);
}
.category-shortcut-emoji { font-size: 48px; margin-bottom: 12px; }
.category-shortcut-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.category-shortcut-desc { font-size: 13px; color: var(--text-sub); }

/* ===== Flash Sale ===== */
.flash-sale-section {
    padding: 48px 0;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}
.flash-sale-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.flash-sale-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.flash-sale-icon { font-size: 28px; }
.flash-sale-title h2 { font-size: 28px; font-weight: 800; color: #ea580c; }
.flash-sale-timer { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-sub); }
.timer-value {
    background: #1e293b; color: #fff;
    padding: 4px 10px; border-radius: 6px;
    font-weight: 700; font-size: 14px; font-family: monospace;
}
.flash-sale-more { font-size: 14px; color: #ea580c; font-weight: 600; }
.flash-sale-more:hover { text-decoration: underline; }

.flash-sale-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.flash-sale-card {
    background: #fff; border-radius: var(--radius);
    padding: 20px; text-align: center;
    transition: all 0.3s; box-shadow: var(--shadow);
}
.flash-sale-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.flash-sale-emoji { font-size: 52px; margin-bottom: 12px; }
.flash-sale-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.flash-sale-prices {
    display: flex; align-items: baseline; justify-content: center;
    gap: 6px; margin-bottom: 10px;
}
.flash-sale-price { font-size: 22px; font-weight: 900; color: var(--red); }
.flash-sale-original { font-size: 13px; color: var(--text-light); text-decoration: line-through; }
.flash-sale-discount {
    background: #fef2f2; color: var(--red);
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.flash-sale-progress {
    width: 100%; height: 8px; background: #fef2f2;
    border-radius: 4px; overflow: hidden; margin-bottom: 6px;
}
.flash-sale-bar {
    height: 100%; background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 4px;
}
.flash-sale-meta { font-size: 12px; color: var(--text-light); margin-bottom: 12px; }
.flash-sale-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff; border: none;
    padding: 10px 28px; border-radius: 24px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; box-shadow: 0 3px 10px rgba(239,68,68,0.3);
}
.flash-sale-btn:hover { transform: scale(1.05); }

/* ===== Section Common ===== */
.section-title {
    text-align: center; font-size: 28px; font-weight: 800; margin-bottom: 40px;
}
.section-subtitle {
    text-align: center; font-size: 14px; color: var(--text-sub);
    margin-top: -32px; margin-bottom: 36px;
}
.section-header { margin-bottom: 28px; }
.section-header h2 { font-size: 26px; font-weight: 800; }
.section-desc { font-size: 14px; color: var(--text-sub); margin-top: 6px; }
.section-more {
    float: right; font-size: 14px; color: var(--primary);
    font-weight: 600; margin-top: -28px;
}
.section-more:hover { text-decoration: underline; }

/* ===== Products Grid ===== */
.main { padding: 32px 0 60px; }

.product-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}

.product-card {
    background: var(--card); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s; cursor: pointer;
}
.product-card:hover {
    transform: translateY(-6px); box-shadow: var(--shadow-lg);
    border-color: rgba(34,197,94,0.15);
}

.product-img {
    width: 100%; height: 180px;
    display: flex; align-items: center; justify-content: center;
    font-size: 64px; position: relative;
}
.product-img::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
    background: linear-gradient(transparent, rgba(255,255,255,0.5));
}

.product-badge {
    position: absolute; top: 12px; left: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 12px; border-radius: 14px; z-index: 1;
    box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}
.product-badge.new {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 2px 8px rgba(34,197,94,0.3);
}

.product-info { padding: 16px 18px 18px; }
.product-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.product-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 6px; line-height: 1.5; }
.product-origin { font-size: 12px; color: var(--text-light); margin-bottom: 10px; }

.product-bottom { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 22px; font-weight: 900; color: var(--red); }
.product-price .unit { font-size: 13px; font-weight: 400; color: var(--text-sub); }
.product-price .original {
    font-size: 12px; color: var(--text-light);
    text-decoration: line-through; margin-left: 6px; font-weight: 400;
}

.btn-add-cart {
    width: 38px; height: 38px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(34,197,94,0.3);
}
.btn-add-cart:hover { transform: scale(1.15) rotate(90deg); }

/* ===== Guarantee ===== */
.guarantee-section { padding: 72px 0; background: var(--card); }
.guarantee-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.guarantee-card {
    text-align: center; padding: 36px 20px;
    border-radius: var(--radius); background: var(--bg);
    transition: all 0.3s; border: 1px solid transparent;
}
.guarantee-card:hover {
    transform: translateY(-6px); box-shadow: var(--shadow-lg);
    border-color: var(--primary-light); background: var(--primary-bg);
}
.guarantee-icon { font-size: 48px; margin-bottom: 16px; display: block; }
.guarantee-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.guarantee-card p { font-size: 14px; color: var(--text-sub); line-height: 1.7; }

/* ===== Reviews ===== */
.reviews-section { padding: 72px 0; background: var(--card); }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review-card {
    background: var(--bg); border-radius: var(--radius);
    padding: 24px; transition: all 0.3s; border: 1px solid transparent;
}
.review-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.review-avatar { font-size: 32px; }
.review-name { font-size: 14px; font-weight: 600; }
.review-stars { font-size: 12px; }
.review-date { margin-left: auto; font-size: 12px; color: var(--text-light); }
.review-content { font-size: 14px; color: var(--text-sub); line-height: 1.7; margin-bottom: 12px; }
.review-product {
    font-size: 12px; color: var(--text-light);
    padding-top: 10px; border-top: 1px solid var(--border);
}

/* ===== Delivery ===== */
.delivery-section {
    padding: 72px 0;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}
.delivery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.delivery-card {
    background: var(--card); border-radius: var(--radius);
    padding: 36px 24px; text-align: center;
    box-shadow: var(--shadow); border: 1px solid rgba(34,197,94,0.1);
    transition: all 0.3s;
}
.delivery-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.delivery-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.delivery-card p { font-size: 14px; color: var(--text-sub); margin-bottom: 4px; }

/* ===== Subscribe ===== */
.subscribe-section { padding: 48px 0; background: var(--bg); }
.subscribe-card {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 20px; padding: 48px; color: #fff;
    text-align: center; position: relative; overflow: hidden;
}
.subscribe-card::before {
    content: ''; position: absolute;
    top: -30%; right: -10%; width: 300px; height: 300px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
}
.subscribe-content { position: relative; z-index: 1; }
.subscribe-content h2 { font-size: 30px; font-weight: 900; margin-bottom: 12px; }
.subscribe-content p { font-size: 16px; opacity: 0.95; margin-bottom: 28px; }
.subscribe-content strong { font-size: 20px; color: #fef08a; }

.subscribe-form {
    display: flex; gap: 12px; max-width: 420px; margin: 0 auto;
}
.subscribe-input {
    flex: 1; padding: 14px 20px; border-radius: 28px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15); color: #fff;
    font-size: 15px; outline: none;
}
.subscribe-input::placeholder { color: rgba(255,255,255,0.6); }
.subscribe-input:focus { border-color: #fff; background: rgba(255,255,255,0.25); }
.subscribe-btn {
    padding: 14px 28px; border-radius: 28px;
    background: #fff; color: var(--primary-dark);
    border: none; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.subscribe-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.15); }

/* ===== Product Detail Modal ===== */
.product-detail-modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 500;
}
.product-detail-modal.show { display: flex; align-items: center; justify-content: center; }
.product-detail-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
}
.product-detail-content {
    position: relative; background: var(--card);
    border-radius: 20px; width: 90%; max-width: 700px;
    max-height: 85vh; overflow-y: auto;
    animation: scaleIn 0.3s ease; box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
@keyframes scaleIn { from{transform:scale(0.9);opacity:0} to{transform:scale(1);opacity:1} }

.product-detail-close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: var(--bg); font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; z-index: 1;
}
.product-detail-close:hover { background: var(--border); }

.product-detail-body { display: flex; gap: 32px; padding: 32px; }
.product-detail-left { flex-shrink: 0; }
.product-detail-img {
    width: 200px; height: 200px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; font-size: 80px;
}
.product-detail-right { flex: 1; }
.product-detail-name { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.product-detail-desc { font-size: 14px; color: var(--text-sub); margin-bottom: 16px; line-height: 1.6; }
.product-detail-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px; }
.product-detail-price { font-size: 32px; font-weight: 900; color: var(--red); }
.product-detail-unit { font-size: 14px; color: var(--text-sub); }
.product-detail-original { font-size: 16px; color: var(--text-light); text-decoration: line-through; }

.product-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.detail-tag {
    background: var(--bg); padding: 6px 14px;
    border-radius: 20px; font-size: 13px; color: var(--text-sub);
}
.product-detail-nutrition {
    background: var(--primary-bg); border-radius: var(--radius-sm);
    padding: 16px; margin-bottom: 24px;
}
.product-detail-nutrition h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.product-detail-nutrition p { font-size: 13px; color: var(--text-sub); line-height: 1.6; }

.product-detail-actions { display: flex; gap: 12px; }
.btn-detail-cart, .btn-detail-buy {
    flex: 1; padding: 14px; border-radius: 28px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; border: none;
}
.btn-detail-cart {
    background: var(--primary-bg); color: var(--primary-dark);
    border: 2px solid var(--primary);
}
.btn-detail-cart:hover { background: var(--primary-light); }
.btn-detail-buy {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; box-shadow: 0 4px 14px rgba(34,197,94,0.3);
}
.btn-detail-buy:hover { transform: translateY(-2px); }

/* ===== Products Page ===== */
.filter-bar {
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 18px 0; position: sticky; top: 64px; z-index: 90;
}
.filter-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.search-box { position: relative; flex: 1; min-width: 200px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; }
.search-input {
    width: 100%; padding: 10px 16px 10px 40px;
    border: 1.5px solid var(--border); border-radius: 24px;
    font-size: 14px; outline: none; transition: all 0.2s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(34,197,94,0.1); }

.filter-tabs { display: flex; gap: 6px; }
.filter-tab {
    padding: 8px 18px; border-radius: 24px;
    border: 1.5px solid var(--border); background: #fff;
    font-size: 13px; font-weight: 600; color: var(--text-sub);
    cursor: pointer; transition: all 0.2s;
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary-dark); }
.filter-tab.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; border-color: transparent;
}

.sort-select {
    padding: 10px 16px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-size: 13px;
    outline: none; background: #fff; cursor: pointer;
}
.sort-select:focus { border-color: var(--primary); }

.products-page { padding-bottom: 80px; }
.products-toolbar { margin-bottom: 20px; }
.products-count { font-size: 14px; color: var(--text-sub); }

.products-empty { text-align: center; padding: 80px 0; }
.products-empty .empty-icon { font-size: 64px; margin-bottom: 16px; }
.products-empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.products-empty p { font-size: 14px; color: var(--text-sub); }

/* ===== Cart Modal ===== */
.cart-modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.5);
    z-index: 200; backdrop-filter: blur(6px);
}
.cart-modal.show { display: flex; align-items: flex-end; justify-content: center; }
.cart-modal-content {
    background: var(--card); width: 100%; max-width: 500px;
    border-radius: 24px 24px 0 0; max-height: 70vh;
    display: flex; flex-direction: column;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }

.cart-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 24px 24px 18px; border-bottom: 1px solid var(--border);
}
.cart-modal-header h3 { font-size: 18px; font-weight: 700; }
.cart-modal-close {
    font-size: 24px; cursor: pointer; color: var(--text-sub);
    width: 36px; height: 36px; display: flex;
    align-items: center; justify-content: center;
    border-radius: 50%; transition: all 0.2s;
}
.cart-modal-close:hover { background: var(--bg); }

.cart-modal-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { text-align: center; padding: 48px 0; color: var(--text-light); font-size: 15px; }

.cart-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 0; border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-emoji {
    font-size: 36px; width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-bg); border-radius: var(--radius-sm);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.cart-item-price { font-size: 14px; color: var(--red); font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 10px; }
.qty-btn {
    width: 30px; height: 30px; border-radius: 50%;
    border: 1.5px solid var(--border); background: #fff;
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.qty-num { font-size: 15px; font-weight: 700; min-width: 22px; text-align: center; }

.cart-modal-footer {
    padding: 18px 24px; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.cart-total { font-size: 15px; color: var(--text-sub); }
.cart-total-price { font-size: 24px; font-weight: 900; color: var(--red); }
.btn-checkout {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; border: none; padding: 14px 36px;
    border-radius: 28px; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(34,197,94,0.3);
}
.btn-checkout:hover { transform: translateY(-2px); }

/* ===== Payment Page ===== */
.payment-page { padding-bottom: 40px; }
.payment-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.payment-right { position: sticky; top: 88px; }

.order-card {
    background: var(--card); border-radius: var(--radius);
    padding: 24px; margin-bottom: 16px;
    box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.04);
}
.order-card-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.order-icon { font-size: 22px; }
.order-card-header h3 { font-size: 16px; font-weight: 700; }
.order-items-count { margin-left: auto; font-size: 13px; color: var(--text-light); }

.order-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0; border-bottom: 1px solid var(--border);
}
.order-item:last-child { border-bottom: none; }
.order-item-img {
    font-size: 36px; width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-bg); border-radius: var(--radius-sm);
}
.order-item-info { flex: 1; }
.order-item-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.order-item-spec { font-size: 13px; color: var(--text-sub); }
.order-item-right { text-align: right; }
.order-item-price { font-size: 15px; font-weight: 700; color: var(--red); }
.order-item-qty { font-size: 13px; color: var(--text-sub); margin-top: 2px; }

/* Form */
.delivery-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 600; }
.required { color: var(--red); }
.form-input, .form-textarea {
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: 13px 16px; font-size: 14px; font-family: inherit;
    transition: all 0.2s; outline: none; background: var(--bg);
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.1);
}
.form-textarea { resize: vertical; }
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    padding-right: 36px;
}

/* Coupon */
.coupon-section { display: flex; flex-direction: column; gap: 14px; }
.coupon-input-row { display: flex; gap: 10px; }
.coupon-input { flex: 1; }
.btn-coupon {
    padding: 10px 20px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--primary); background: #fff;
    color: var(--primary-dark); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.btn-coupon:hover { background: var(--primary-bg); }

.coupon-available { display: flex; flex-direction: column; gap: 10px; }
.coupon-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.coupon-item:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.coupon-item.selected { border-color: var(--primary); background: var(--primary-bg); }
.coupon-value { font-size: 22px; font-weight: 900; color: var(--red); min-width: 60px; text-align: center; }
.coupon-info { flex: 1; }
.coupon-name { font-size: 14px; font-weight: 600; }
.coupon-rule { font-size: 12px; color: var(--text-sub); }
.coupon-check {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: transparent; transition: all 0.2s;
}
.coupon-item.selected .coupon-check { border-color: var(--primary); background: var(--primary); color: #fff; }
.coupon-discount { color: var(--red); font-weight: 700; }

/* Payment Methods */
.payment-methods { display: flex; flex-direction: column; gap: 12px; }
.payment-method {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.payment-method:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.payment-method.selected { border-color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 3px rgba(34,197,94,0.1); }
.payment-method-left { display: flex; align-items: center; gap: 14px; }
.payment-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.alipay-icon { background: #e6f0ff; }
.wechat-icon { background: #e6f7ee; }
.payment-info { display: flex; flex-direction: column; }
.payment-name { font-size: 15px; font-weight: 600; }
.payment-desc { font-size: 12px; color: var(--text-sub); }
.payment-radio { width: 24px; height: 24px; border: 2px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.payment-method.selected .payment-radio { border-color: var(--primary); }
.radio-circle { width: 12px; height: 12px; border-radius: 50%; background: transparent; transition: all 0.2s; }
.payment-method.selected .radio-circle { background: var(--primary); }

/* Summary */
.order-summary-card { position: relative; }
.summary-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.summary-items { margin-bottom: 12px; }
.summary-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13px; color: var(--text-sub); }
.summary-item-emoji { font-size: 18px; }
.summary-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-item-qty { color: var(--text-light); }
.summary-item-price { font-weight: 600; color: var(--text); }
.summary-divider { height: 1px; background: var(--border); margin: 12px 0; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; color: var(--text-sub); }
.summary-total { font-size: 16px; font-weight: 700; color: var(--text); }
.total-price { font-size: 24px; font-weight: 900; color: var(--red); }
.delivery-fee { color: var(--primary); font-weight: 600; }
.summary-tip { margin-top: 16px; font-size: 12px; color: var(--text-light); text-align: center; line-height: 1.6; }
.summary-tip a { color: var(--primary); }

.btn-submit {
    width: 100%; margin-top: 20px; padding: 16px;
    border-radius: 30px; font-size: 16px; font-weight: 700;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; border: none; cursor: pointer;
    transition: all 0.2s; box-shadow: 0 4px 16px rgba(34,197,94,0.35);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(34,197,94,0.45); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== About Page ===== */
.about-section { padding: 72px 0; }
.about-section.bg-light { background: var(--card); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-text h2 { font-size: 30px; font-weight: 800; margin-bottom: 24px; }
.about-text p { font-size: 15px; color: var(--text-sub); line-height: 1.9; margin-bottom: 14px; }
.about-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stat-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: var(--radius); padding: 32px 20px; text-align: center;
    border: 1px solid rgba(34,197,94,0.15); transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-number {
    font-size: 40px; font-weight: 900;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}
.stat-label { font-size: 14px; color: var(--text-sub); font-weight: 500; }

.advantages-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.advantage-card {
    background: var(--bg); border-radius: var(--radius); padding: 32px;
    display: flex; gap: 20px; align-items: flex-start; transition: all 0.3s;
    border: 1px solid transparent;
}
.advantage-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-light); background: var(--primary-bg); }
.advantage-icon { font-size: 44px; flex-shrink: 0; }
.advantage-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.advantage-card p { font-size: 14px; color: var(--text-sub); line-height: 1.8; }

.timeline { max-width: 700px; margin: 0 auto; position: relative; padding-left: 44px; }
.timeline::before {
    content: ''; position: absolute; left: 17px; top: 0; bottom: 0;
    width: 3px; background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-dot {
    position: absolute; left: -35px; top: 6px;
    width: 14px; height: 14px; border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 3px solid var(--primary-light);
    box-shadow: 0 0 0 4px rgba(34,197,94,0.1);
}
.timeline-content {
    background: var(--card); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.04); transition: all 0.3s;
}
.timeline-content:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.timeline-date { font-size: 13px; color: var(--primary); font-weight: 700; margin-bottom: 8px; }
.timeline-content h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.timeline-content p { font-size: 14px; color: var(--text-sub); line-height: 1.7; }

.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.cert-card {
    background: var(--bg); border-radius: var(--radius); padding: 32px;
    display: flex; gap: 18px; align-items: flex-start; transition: all 0.3s;
    border: 1px solid transparent;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-light); background: var(--primary-bg); }
.cert-icon { font-size: 40px; flex-shrink: 0; }
.cert-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.cert-card p { font-size: 13px; color: var(--text-sub); line-height: 1.7; }

/* ===== Contact Page ===== */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.contact-card {
    background: var(--card); border-radius: var(--radius);
    padding: 36px 20px; text-align: center;
    box-shadow: var(--shadow); transition: all 0.3s; border: 1px solid transparent;
}
.contact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.contact-icon { font-size: 44px; margin-bottom: 18px; display: block; }
.contact-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.contact-value { font-size: 17px; font-weight: 800; color: var(--primary-dark); margin-bottom: 6px; }
.contact-desc { font-size: 13px; color: var(--text-sub); }

.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--card); border-radius: var(--radius);
    margin-bottom: 12px; overflow: hidden;
    box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.04);
}
.faq-question {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; cursor: pointer;
    font-size: 15px; font-weight: 600; transition: all 0.2s;
}
.faq-question:hover { background: var(--primary-bg); }
.faq-arrow { font-size: 12px; color: var(--text-light); transition: transform 0.3s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer p { padding: 0 24px 20px; font-size: 14px; color: var(--text-sub); line-height: 1.8; }

/* ===== Legal Pages ===== */
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-update { font-size: 13px; color: var(--text-light); margin-bottom: 36px; text-align: center; }
.legal-content h2 {
    font-size: 20px; font-weight: 700; margin: 36px 0 16px;
    padding-left: 14px; border-left: 4px solid var(--primary);
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p { font-size: 15px; color: var(--text-sub); line-height: 1.9; margin-bottom: 12px; }

/* ===== Modal ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 300;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px);
}
.modal-box {
    background: var(--card); border-radius: var(--radius);
    padding: 44px 36px 36px; text-align: center;
    max-width: 380px; width: 90%;
    animation: scaleIn 0.3s ease; box-shadow: var(--shadow-lg);
}
.modal-icon { font-size: 52px; margin-bottom: 18px; }
.modal-title { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.modal-desc { font-size: 14px; color: var(--text-sub); margin-bottom: 28px; line-height: 1.7; }
.btn-modal-close {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; border: none; padding: 13px 44px;
    border-radius: 28px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}
.btn-modal-close:hover { transform: translateY(-2px); }

/* ===== Toast ===== */
.toast {
    position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
    background: rgba(30,41,59,0.9); backdrop-filter: blur(8px);
    color: #fff; padding: 12px 28px; border-radius: 24px;
    font-size: 14px; font-weight: 500; z-index: 400;
    box-shadow: var(--shadow-lg); white-space: nowrap; display: none;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    color: #94a3b8; padding: 48px 0 24px;
}
.footer-content { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 36px; }
.footer-info h4, .footer-contact h4, .footer-links h4 {
    color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 14px;
}
.footer-info p, .footer-contact p, .footer-links p { font-size: 14px; line-height: 1.9; }
.footer-links a { color: #94a3b8; transition: all 0.2s; }
.footer-links a:hover { color: var(--primary); padding-left: 4px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px; text-align: center; font-size: 13px;
}
.footer-bottom .icp { margin-top: 8px; font-size: 12px; }
.footer-bottom .icp a { color: #64748b; transition: color 0.2s; }
.footer-bottom .icp a:hover { color: #94a3b8; }
.footer-bottom .icp img { height: 14px; vertical-align: middle; margin-right: 2px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .flash-sale-grid { grid-template-columns: repeat(2, 1fr); }
    .guarantee-grid { grid-template-columns: repeat(2, 1fr); }
    .payment-layout { grid-template-columns: 1fr; }
    .payment-right { position: static; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .header-inner { height: 56px; }
    .banner { padding: 36px 0 28px; }
    .banner h1 { font-size: 26px; }
    .banner p { font-size: 14px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-img { height: 150px; font-size: 52px; }
    .product-info { padding: 12px 14px 14px; }
    .product-name { font-size: 14px; }
    .product-desc { font-size: 12px; margin-bottom: 6px; }
    .product-price { font-size: 18px; }
    .btn-add-cart { width: 34px; height: 34px; font-size: 18px; }
    .footer-content { flex-direction: column; gap: 28px; }
    .service-items { gap: 12px; }
    .category-shortcuts-grid { grid-template-columns: repeat(2, 1fr); }
    .reviews-grid { grid-template-columns: 1fr; }
    .advantages-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .cert-grid { grid-template-columns: 1fr; }
    .guarantee-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .delivery-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 24px; }
    .filter-inner { flex-direction: column; }
    .search-box { width: 100%; }
    .filter-tabs { overflow-x: auto; width: 100%; padding-bottom: 4px; }
    .form-row { grid-template-columns: 1fr; }
    .subscribe-form { flex-direction: column; }
    .subscribe-card { padding: 32px 20px; }
    .product-detail-body { flex-direction: column; }
    .product-detail-img { width: 100%; height: 180px; }
    .flash-sale-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-img { height: 120px; font-size: 44px; }
    .guarantee-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .about-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
