/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --danger: #ef4444;
    --success: #10b981;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ========== 顶部导航 ========== */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.header-top {
    background: rgba(0,0,0,0.15);
    font-size: 13px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.header-top a:hover { opacity: 0.8; }

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--white);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
}

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

.nav-links a {
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s;
}

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

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 15px 8px 36px;
    border-radius: 20px;
    border: none;
    outline: none;
    width: 220px;
    font-size: 14px;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

.cart-btn {
    position: relative;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--white);
    font-weight: 500;
    transition: background 0.3s;
}

.cart-btn:hover { background: rgba(255,255,255,0.3); }

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

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

/* ========== 英雄区域 ========== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 800;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-btn {
    background: var(--accent);
    color: var(--white);
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
}

/* ========== 分类导航 ========== */
.categories {
    background: var(--white);
    padding: 30px 0;
    margin-top: -30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
}

.categories .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.category-item {
    text-align: center;
    padding: 20px 10px;
    border-radius: var(--radius);
    transition: all 0.3s;
    cursor: pointer;
}

.category-item:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, var(--primary-light), #ede9fe);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.category-item h3 {
    font-size: 15px;
    font-weight: 600;
}

/* ========== 区块标题 ========== */
.section {
    padding: 50px 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 26px;
    position: relative;
    padding-left: 15px;
}

.section-title h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.more-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
}

.more-link:hover { text-decoration: underline; }

/* ========== 商品网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.product-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    position: relative;
    overflow: hidden;
}

.product-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.product-tag.hot { background: var(--accent); }
.product-tag.new { background: var(--success); }

.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
    flex: 1;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    color: var(--danger);
    font-size: 20px;
    font-weight: 700;
}

.product-price small {
    font-size: 12px;
    text-decoration: line-through;
    color: var(--text-light);
    margin-left: 6px;
    font-weight: 400;
}

.add-cart-btn {
    background: var(--primary);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.3s;
}

.add-cart-btn:hover { background: var(--primary-dark); }

/* ========== 商品列表页 ========== */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 40px 0;
}

.page-header h1 { font-size: 32px; margin-bottom: 8px; }
.page-header p { opacity: 0.9; }

.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

.products-wrapper {
    display: flex;
    gap: 30px;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
}

.filter-box {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.filter-box h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.filter-list { list-style: none; }

.filter-list li {
    padding: 8px 0;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    transition: color 0.3s;
}

.filter-list li:hover,
.filter-list li.active {
    color: var(--primary);
    font-weight: 600;
}

.price-range input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.price-range span { margin: 0 8px; color: var(--text-light); }

.products-main { flex: 1; }

.sort-bar {
    background: var(--white);
    padding: 15px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.sort-options { display: flex; gap: 15px; }

.sort-option {
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s;
}

.sort-option:hover,
.sort-option.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

/* ========== 商品详情页 ========== */
.detail-wrapper {
    padding: 30px 0;
}

.detail-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.detail-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.detail-image {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: var(--radius);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 180px;
}

.detail-info h1 {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.detail-rating {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.stars { color: var(--accent); }

.detail-price-box {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.detail-price {
    color: var(--danger);
    font-size: 36px;
    font-weight: 800;
}

.detail-price small {
    font-size: 16px;
    text-decoration: line-through;
    color: var(--text-light);
    margin-left: 12px;
    font-weight: 400;
}

.detail-meta {
    list-style: none;
    margin-bottom: 25px;
}

.detail-meta li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 1px dashed var(--border);
}

.detail-meta li span {
    display: inline-block;
    width: 80px;
    color: var(--text);
    font-weight: 500;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.quantity-selector label {
    font-size: 14px;
    font-weight: 500;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    background: var(--bg);
    font-size: 18px;
    color: var(--text);
    transition: background 0.3s;
}

.qty-btn:hover { background: var(--border); }

.qty-input {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-accent {
    background: var(--accent);
    color: var(--white);
}

.btn-accent:hover { opacity: 0.9; }

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.detail-tabs {
    border-top: 1px solid var(--border);
    padding: 0 40px 40px;
}

.tabs-header {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
}

.tab-item {
    padding: 15px 25px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
}

.tab-content h3 {
    margin: 20px 0 10px;
    font-size: 16px;
    color: var(--primary);
}

.tab-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.tab-content ul li { margin-bottom: 6px; }

/* ========== 购物车 ========== */
.cart-page { padding: 30px 0; }

.cart-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
}

.cart-items {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    padding: 15px 25px;
    background: var(--bg);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    padding: 20px 25px;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.cart-product {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cart-product-img {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.cart-product-name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-product-spec {
    font-size: 12px;
    color: var(--text-light);
}

.cart-price {
    color: var(--danger);
    font-weight: 600;
}

.cart-total-item {
    font-weight: 700;
    color: var(--danger);
    font-size: 16px;
}

.cart-remove {
    color: var(--danger);
    background: none;
    font-size: 14px;
    padding: 5px;
    transition: opacity 0.3s;
}

.cart-remove:hover { opacity: 0.7; }

.cart-sidebar {
    height: fit-content;
}

.summary-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
}

.summary-box h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-light);
}

.summary-row.total {
    border-top: 1px dashed var(--border);
    margin-top: 15px;
    padding-top: 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.summary-row.total span:last-child {
    color: var(--danger);
    font-size: 28px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: var(--accent);
    color: var(--white);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s;
}

.checkout-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.payment-methods {
    margin-top: 20px;
}

.payment-methods h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-light);
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.payment-option:hover,
.payment-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-icon { font-size: 22px; }

.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.empty-cart p {
    color: var(--text-light);
    margin-bottom: 25px;
}

/* ========== 结算弹窗 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 500px;
    max-width: 90%;
    padding: 35px;
    animation: modalIn 0.3s;
}

@keyframes modalIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 { font-size: 22px; }

.modal-close {
    background: none;
    font-size: 24px;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.pay-btn {
    width: 100%;
    padding: 16px;
    background: var(--success);
    color: var(--white);
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    margin-top: 10px;
    transition: all 0.3s;
}

.pay-btn:hover { background: #059669; }

.pay-success {
    text-align: center;
    padding: 30px 0;
}

.pay-success-icon {
    font-size: 70px;
    margin-bottom: 15px;
}

.pay-success h2 {
    color: var(--success);
    margin-bottom: 10px;
}

/* ========== 登录注册 ========== */
.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 440px;
    padding: 40px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: var(--bg);
    border-radius: 8px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.3s;
}

.auth-btn:hover { background: var(--primary-dark); }

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-light);
}

/* ========== 个人中心 ========== */
.account-wrapper {
    padding: 30px 0;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 25px;
}

.account-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    height: fit-content;
}

.account-avatar {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.account-avatar-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    margin: 0 auto 10px;
}

.account-avatar h4 { font-size: 16px; }

.account-menu { list-style: none; }

.account-menu li {
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.3s;
    margin-bottom: 5px;
}

.account-menu li:hover,
.account-menu li.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.account-content {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.account-content h2 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.order-list { list-style: none; }

.order-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 15px;
    align-items: center;
}

.order-img {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.order-info h4 { margin-bottom: 5px; }
.order-info p { font-size: 13px; color: var(--text-light); }

.order-status {
    text-align: right;
}

.order-status .price {
    color: var(--danger);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
}

.order-status .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    background: var(--primary-light);
    color: var(--primary);
}

/* ========== 底部 ========== */
.footer {
    background: #1f2937;
    color: #9ca3af;
    margin-top: auto;
}

.footer-main {
    padding: 50px 0 30px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-about .footer-logo {
    color: var(--white);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-about p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-contact { font-size: 13px; line-height: 2; }

.footer h4 {
    color: var(--white);
    font-size: 15px;
    margin-bottom: 20px;
}

.footer ul { list-style: none; }

.footer ul li { margin-bottom: 10px; font-size: 14px; }

.footer ul li a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}

/* ========== 消息提示 ========== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--text);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 999;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.3s;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ========== 回到顶部 ========== */
.back-top {
    position: fixed;
    bottom: 40px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 50;
}

.back-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-top:hover { background: var(--primary-dark); }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 30px; }
    .detail-main { grid-template-columns: 1fr; padding: 25px; }
    .cart-container { grid-template-columns: 1fr; }
    .cart-header { display: none; }
    .cart-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .account-wrapper { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr 1fr; }
    .product-img { height: 160px; }
    .products-wrapper { flex-direction: column; }
    .sidebar { width: 100%; }
}

@media (max-width: 500px) {
    .search-box { display: none; }
    .container { padding: 0 15px; }
    .footer-main { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-img { height: 130px; font-size: 50px; }
    .product-card .add-cart-btn { display: none; }
    .hero { padding: 40px 0; }
    .hero h1 { font-size: 24px; }
    .action-buttons { flex-direction: column; }
    .auth-box { padding: 30px 20px; }
}
