/* ================================================================
   安徽诺农商城 - 全局样式
   配色: 品牌绿 #2D8C3C / 价格红 #E4393C / 深色文字 #333
   ================================================================ */

/* ---- CSS 变量 ---- */
:root {
    --brand-green: #2D8C3C;
    --brand-green-dark: #1E6B2A;
    --brand-green-light: #E8F5E9;
    --brand-green-gradient: linear-gradient(135deg, #2D8C3C 0%, #4CAF50 100%);
    --price-red: #E4393C;
    --price-red-light: #FFF0F0;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-white: #FFFFFF;
    --bg-light: #F5F5F5;
    --bg-card: #FFFFFF;
    --border-light: #E8E8E8;
    --border-lighter: #F0F0F0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 24px rgba(45, 140, 60, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', 'Noto Sans SC', 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
}

/* ---- Reset ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================================
   顶部信息栏
   ================================================================ */
.top-bar {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    color: #bbb;
    font-size: 12px;
    height: 36px;
    line-height: 36px;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a {
    color: #ccc;
    margin-left: 12px;
}

.top-links a:hover { color: #fff; }
.top-links .divider { color: #555; margin: 0 4px; }

/* ================================================================
   主头部
   ================================================================ */
.main-header {
    background: var(--bg-white);
    padding: 18px 0;
    border-bottom: 3px solid var(--brand-green);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 24px;
    font-weight: 900;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-green-gradient);
    color: white;
    border-radius: 10px;
    letter-spacing: 0;
}

.logo-name {
    font-size: 22px;
    font-weight: 900;
    color: var(--brand-green);
    letter-spacing: 1px;
    display: block;
    line-height: 1.2;
}

.logo-slogan {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    display: block;
}

/* 搜索栏 */
.search-bar {
    flex: 1;
    max-width: 560px;
    display: flex;
    border: 2px solid var(--brand-green);
    border-radius: 25px;
    overflow: hidden;
    transition: var(--transition);
}

.search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(45, 140, 60, 0.15);
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 20px;
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--text-primary);
}

.search-bar input::placeholder { color: #bbb; }

.search-bar button {
    background: var(--brand-green-gradient);
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 500;
}

.search-bar button:hover {
    filter: brightness(1.1);
}

.header-slogan {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
}

.slogan-badge {
    background: var(--brand-green-light);
    color: var(--brand-green);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(45, 140, 60, 0.15);
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
}

.slogan-badge:hover {
    background: rgba(45, 140, 60, 0.12);
    border-color: rgba(45, 140, 60, 0.3);
    transform: translateY(-1px);
}

/* 头部购物车链接 */
.header-cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-green-light);
    color: var(--brand-green);
    transition: var(--transition);
    margin-left: 4px;
}

.header-cart-link:hover {
    background: var(--brand-green);
    color: white;
}

.header-cart-link .icon {
    width: 20px;
    height: 20px;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--price-red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    line-height: 1;
}

/* ================================================================
   导航栏
   ================================================================ */
.main-nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    display: flex;
    align-items: stretch;
    height: 46px;
}

.nav-categories {
    position: relative;
}

.nav-cat-trigger {
    background: var(--brand-green-gradient);
    color: white;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    height: 100%;
    transition: var(--transition);
}

.nav-cat-trigger:hover {
    filter: brightness(1.1);
}

.nav-cat-icon { font-size: 16px; }

.nav-cat-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 200;
    overflow: hidden;
}

.nav-categories:hover .nav-cat-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-lighter);
    transition: var(--transition);
}

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

.nav-cat-item:hover {
    background: var(--brand-green-light);
    color: var(--brand-green);
    padding-left: 26px;
}

.cat-icon { font-size: 18px; }

.nav-links {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.nav-links a {
    padding: 0 18px;
    font-size: 14px;
    color: var(--text-primary);
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    font-weight: 400;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--brand-green);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--brand-green);
    font-weight: 500;
}

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

/* ================================================================
   首页 - Banner
   ================================================================ */
.hero-banner {
    background: var(--brand-green-gradient);
    padding: 60px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(30deg);
    pointer-events: none;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 40%;
    height: 200%;
    background: rgba(255, 255, 255, 0.03);
    transform: rotate(-20deg);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 4px;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 28px;
    letter-spacing: 2px;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ================================================================
   首页 - 分类网格
   ================================================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.section-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-title .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-light), transparent);
}

.section-title .more-link {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-title .more-link:hover {
    color: var(--brand-green);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-lighter);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-green);
}

.category-card .cat-emoji {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
    transition: var(--transition);
}

.category-card:hover .cat-emoji {
    transform: scale(1.15);
}

.category-card .cat-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ================================================================
   商品卡片网格
   ================================================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-lighter);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-card-img {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: var(--bg-light);
    overflow: hidden;
}

.product-card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-card-img img {
    transform: scale(1.06);
}

.product-card-img .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--price-red);
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.product-card-img .placeholder-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-green-light) 0%, #f0f9f0 100%);
    font-size: 48px;
}

.product-card-img .placeholder-name {
    font-size: 14px;
    color: var(--brand-green);
    margin-top: 8px;
    font-weight: 500;
    text-align: center;
    padding: 0 8px;
}

.product-card-body {
    padding: 14px 16px 18px;
}

.product-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--price-red);
    margin-bottom: 6px;
}

.product-card-price small {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 2px;
}

.product-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.product-card-origin {
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-card-sold {
    color: var(--brand-green);
    font-weight: 500;
}

/* ================================================================
   分类列表页
   ================================================================ */
.page-breadcrumb {
    background: var(--bg-white);
    padding: 14px 0;
    border-bottom: 1px solid var(--border-lighter);
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb-inner a { color: var(--text-secondary); }
.breadcrumb-inner a:hover { color: var(--brand-green); }
.breadcrumb-inner .sep { margin: 0 8px; }

.category-page {
    padding: 24px 0 48px;
}

.sort-bar {
    background: var(--bg-white);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-lighter);
}

.sort-bar span {
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 8px;
}

.sort-btn {
    background: none;
    border: 1px solid var(--border-light);
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    font-family: var(--font-family);
}

.sort-btn:hover,
.sort-btn.active {
    background: var(--brand-green);
    color: white;
    border-color: var(--brand-green);
}

.product-count {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-muted);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--brand-green);
    color: var(--brand-green);
}

.pagination .current {
    background: var(--brand-green);
    color: white;
    border-color: var(--brand-green);
}

.pagination .disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
}

/* ================================================================
   商品详情页
   ================================================================ */
.product-detail-page {
    padding: 24px 0 48px;
}

.product-detail-main {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 32px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

/* 商品图片 */
.product-gallery {
    position: relative;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-main-image .detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-green-light) 0%, #f0f9f0 100%);
    font-size: 80px;
}

.product-main-image .detail-placeholder span {
    font-size: 18px;
    color: var(--brand-green);
    margin-top: 12px;
    font-weight: 500;
}

.product-thumbnails {
    display: flex;
    gap: 8px;
}

/* 商品详情页缩略图画廊 */
.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    overflow-x: auto;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gallery-thumb:hover {
    border-color: #b0bec5;
}

.gallery-thumb.active {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 1px var(--brand-green);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 商品操作消息提示 */
.product-action-msg {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s;
    border-radius: var(--radius-sm);
    font-size: 14px;
    padding: 0 16px;
    margin-bottom: 0;
}

.product-action-msg.show {
    max-height: 60px;
    opacity: 1;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.product-action-msg.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.product-action-msg.info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.product-action-msg.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.product-thumbnails .thumb {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-light);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.product-thumbnails .thumb.active,
.product-thumbnails .thumb:hover {
    border-color: var(--brand-green);
}

/* 商品信息 */
.product-info {
    display: flex;
    flex-direction: column;
}

.product-info .product-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.product-info .product-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.price-block {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF0F0 100%);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.price-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.price-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--price-red);
    letter-spacing: -1px;
}

.price-value small {
    font-size: 16px;
    font-weight: 500;
}

.price-unit {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 4px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-top: 10px;
}

.price-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.price-meta strong {
    color: var(--price-red);
}

/* 信息行 */
.info-rows {
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-lighter);
    font-size: 14px;
}

.info-row:last-child { border-bottom: none; }

.info-row .label {
    color: var(--text-muted);
    width: 72px;
    flex-shrink: 0;
}

.info-row .value {
    color: var(--text-primary);
    font-weight: 500;
}

.info-row .tag {
    background: var(--brand-green-light);
    color: var(--brand-green);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 6px;
}

/* 购买区域 */
.buy-section {
    margin-top: auto;
    padding-top: 20px;
}

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

.quantity-selector label {
    font-size: 14px;
    color: var(--text-muted);
    width: 72px;
}

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

.qty-btn {
    background: var(--bg-light);
    border: none;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-secondary);
    font-family: var(--font-family);
}

.qty-btn:hover {
    background: var(--brand-green-light);
    color: var(--brand-green);
}

.qty-input {
    width: 56px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    text-align: center;
    font-size: 14px;
    font-family: var(--font-family);
    outline: none;
}

.buy-buttons {
    display: flex;
    gap: 12px;
}

.btn-buy {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
}

.btn-buy-now {
    background: var(--price-red);
    color: white;
}

.btn-buy-now:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(228, 57, 60, 0.3);
}

.btn-add-cart {
    background: var(--brand-green-gradient);
    color: white;
}

.btn-add-cart:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.btn-contact {
    background: #FF9800;
    color: white;
}

.btn-contact:hover {
    background: #F57C00;
    transform: translateY(-1px);
}

/* ---- 商品详情下半区 ---- */
.product-detail-bottom {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

/* 详情 / 参数 Tabs */
.detail-tabs {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    background: var(--bg-light);
}

.tab-btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    background: none;
    position: relative;
    transition: var(--transition);
    font-family: var(--font-family);
}

.tab-btn:hover { color: var(--brand-green); }

.tab-btn.active {
    color: var(--brand-green);
    background: var(--bg-white);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--brand-green);
}

.tab-content {
    padding: 28px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 规格参数表 */
.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr:nth-child(even) {
    background: var(--bg-light);
}

.spec-table td {
    padding: 12px 18px;
    font-size: 14px;
    border: 1px solid var(--border-lighter);
}

.spec-table .spec-name {
    width: 120px;
    color: var(--text-muted);
    font-weight: 500;
    background: #FAFAFA;
}

.spec-table .spec-value {
    color: var(--text-primary);
}

/* 图文详情 */
.detail-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.detail-content p {
    margin-bottom: 16px;
}

/* 侧边栏 - 商家信息 */
.store-sidebar {
    position: sticky;
    top: 80px;
}

.store-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.store-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-green);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-info-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
}

.store-info-row .s-label {
    color: var(--text-muted);
    width: 72px;
    flex-shrink: 0;
}

.store-info-row .s-value {
    color: var(--text-primary);
    font-weight: 500;
}

.store-credit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #FFF8E1;
    color: #F57F17;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.store-cert {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.cert-badge {
    background: var(--brand-green-light);
    color: var(--brand-green);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* 相关推荐侧边栏 */
.related-card {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-lighter);
    transition: var(--transition);
}

.related-card:last-child { border-bottom: none; }

.related-card:hover { opacity: 0.8; }

.related-card .r-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    overflow: hidden;
}

.related-card .r-info {
    flex: 1;
    min-width: 0;
}

.related-card .r-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card .r-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--price-red);
}

/* ================================================================
   关于我们页面
   ================================================================ */
.about-page {
    padding: 40px 0 60px;
}

.about-hero {
    background: var(--brand-green-gradient);
    border-radius: var(--radius-lg);
    padding: 60px 48px;
    color: white;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.about-hero h1 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.about-hero p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.about-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.about-card .card-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.about-card .card-icon-text {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-green-gradient);
    color: white;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.about-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.about-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ================================================================
   下单页
   ================================================================ */
.checkout-page {
    padding: 40px 0 60px;
}

.checkout-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}

.checkout-box h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--brand-green);
}

.order-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    align-items: center;
    border: 1px solid var(--border-lighter);
    transition: border-color 0.2s;
}

.order-item:hover {
    border-color: var(--border-light);
}

.order-item .oi-img {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    background: var(--brand-green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
    overflow: hidden;
}

.order-item .oi-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item .oi-info {
    flex: 1;
    min-width: 0;
}

.order-item .oi-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.order-item .oi-info .oi-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.order-item .oi-info .oi-price {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

.order-item .oi-subtotal {
    font-size: 22px;
    font-weight: 700;
    color: var(--price-red);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 100px;
    text-align: right;
}

.order-form .form-group {
    margin-bottom: 20px;
}

.order-form label:not(.payment-option) {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.order-form input,
.order-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-family);
    outline: none;
    transition: var(--transition);
}

.order-form input:focus,
.order-form textarea:focus {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(45, 140, 60, 0.1);
}

.order-total {
    text-align: right;
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
    margin-top: 16px;
}

.order-total .total-price {
    font-size: 28px;
    font-weight: 900;
    color: var(--price-red);
}

.payment-notice {
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 24px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.payment-notice .notice-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F57F17;
    color: white;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
}

.payment-notice .notice-text h4 {
    font-size: 15px;
    font-weight: 700;
    color: #F57F17;
    margin-bottom: 6px;
}

.payment-notice .notice-text p {
    font-size: 13px;
    color: #795548;
    line-height: 1.6;
}

.btn-submit-order {
    width: 100%;
    padding: 16px;
    background: var(--brand-green-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit-order:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-hover);
}

.btn-submit-order:disabled {
    background: #aaa;
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
}

.btn-loading {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 购买模式切换 */
.buyer-mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--brand-green);
}

.buyer-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: white;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
}

.buyer-tab.active {
    background: var(--brand-green);
    color: white;
}

.buyer-tab:not(.active):hover {
    background: var(--brand-green-light);
}

/* 区块标题 */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

/* 登录提示 */
.login-prompt {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #c8e6c9;
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.login-prompt-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.login-prompt-inner svg {
    stroke: var(--brand-green);
    flex-shrink: 0;
}

.login-prompt-inner h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-prompt-inner p {
    font-size: 13px;
    color: var(--text-muted);
}

.login-prompt-btns {
    display: flex;
    gap: 12px;
}

.btn-go-login, .btn-go-register {
    padding: 10px 28px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}

.btn-go-login {
    background: var(--brand-green);
    color: white;
}

.btn-go-login:hover {
    opacity: 0.9;
    color: white;
}

.btn-go-register {
    background: white;
    color: var(--brand-green);
    border: 1px solid var(--brand-green);
}

.btn-go-register:hover {
    background: var(--brand-green-light);
}

/* 支付方式 */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.payment-option:hover {
    border-color: #b0bec5;
}

.payment-option.selected {
    border-color: var(--brand-green);
    background: #f1f8e9;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wechat-icon { background: #e8f5e9; }
.alipay-icon { background: #e3f2fd; }
.bank-icon { background: #fff3e0; }

.payment-info {
    flex: 1;
}

.payment-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.payment-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.payment-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.payment-option.selected .payment-check {
    background: var(--brand-green);
}

/* 订单明细 */
.order-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.order-total-row.total-final {
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
    padding-top: 16px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.free-shipping {
    color: var(--brand-green);
    font-weight: 500;
}

/* 安全标识 */
.checkout-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ================================================================
   搜索页
   ================================================================ */
.search-page {
    padding: 24px 0 48px;
}

.search-header {
    background: var(--bg-white);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.search-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.search-header h2 .keyword {
    color: var(--price-red);
}

/* ================================================================
   底部 Footer
   ================================================================ */
.main-footer {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    color: #aaa;
    padding: 48px 0 0;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--brand-green);
}

.footer-col p {
    font-size: 13px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 13px;
    color: #aaa;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--brand-green);
    padding-left: 4px;
}

.footer-contact p {
    font-size: 13px;
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 12px;
    color: #666;
}

.footer-bottom a {
    color: #888;
}

.footer-bottom a:hover {
    color: var(--brand-green);
}

/* ================================================================
   SVG 图标全局样式
   ================================================================ */
.icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    flex-shrink: 0;
    display: inline-block;
}

.cat-svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: var(--transition);
}

.nav-cat-item:hover .cat-svg {
    opacity: 1;
    stroke: var(--brand-green);
}

/* footer 服务保障条 */
.footer-services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 40px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.service-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    stroke: var(--brand-green);
    opacity: 0.9;
}

.service-item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.service-item strong {
    color: #eee;
    font-size: 14px;
    font-weight: 600;
}

.service-item span {
    color: #888;
    font-size: 12px;
}

/* footer 联系方式 SVG */
.footer-contact .icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    stroke: var(--brand-green);
    opacity: 0.8;
}

/* header 标签 SVG */
.slogan-badge .icon {
    width: 15px;
    height: 15px;
    stroke: var(--brand-green);
    flex-shrink: 0;
}

/* 搜索按钮 SVG */
.search-bar button .icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    stroke: white;
}

/* 顶栏电话 SVG */
.top-links .icon {
    width: 12px;
    height: 12px;
    margin-right: 3px;
}

/* 关于页面 SVG 图标 */
.about-card .card-svg {
    width: 52px;
    height: 52px;
    padding: 12px;
    background: var(--brand-green-gradient);
    border-radius: 12px;
    margin-bottom: 16px;
    stroke: white;
    flex-shrink: 0;
}

/* ================================================================
   用户评价样式
   ================================================================ */
.review-summary {
    padding: 20px 24px;
    background: var(--brand-green-light);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.review-score {
    display: flex;
    align-items: center;
    gap: 16px;
}

.score-num {
    font-size: 42px;
    font-weight: 900;
    color: var(--brand-green);
    line-height: 1;
}

.score-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-stars {
    color: #f59e0b;
    font-size: 18px;
    letter-spacing: 2px;
}

.score-count {
    font-size: 13px;
    color: var(--text-muted);
}

.review-list {
    display: flex;
    flex-direction: column;
}

.review-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.review-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.review-user .icon {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
}

.review-date {
    font-size: 12px;
    color: var(--text-muted);
}

.review-stars {
    color: #f59e0b;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.review-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}
/* ================================================================
   登录 / 注册页面
   ================================================================ */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.auth-box {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.input-with-btn {
    display: flex;
    gap: 10px;
}

.input-with-btn input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    box-sizing: border-box;
}

.input-with-btn input:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn-send-code {
    white-space: nowrap;
    padding: 0 16px;
    background: var(--brand-green);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-send-code:hover {
    opacity: 0.9;
}

.btn-send-code:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    accent-color: var(--brand-green);
}

.remember-me a {
    color: var(--brand-green);
}

.forgot-link {
    color: var(--text-muted);
}

.forgot-link:hover {
    color: var(--brand-green);
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: var(--brand-green-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-auth:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-register {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

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

.auth-footer a {
    color: var(--brand-green);
    font-weight: 500;
}

.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
    border-color: var(--brand-green);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

/* 认证消息提示 */
.auth-msg {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.auth-msg-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.auth-msg-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.auth-msg-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* ================================================================
   协议 / 隐私政策页面
   ================================================================ */
.policy-page {
    padding: 40px 20px;
}

.policy-box {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 48px;
}

.policy-box h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
}

.policy-update {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.policy-box h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 28px;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid var(--brand-green);
}

.policy-box p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
}

.policy-back {
    text-align: center;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-back {
    display: inline-block;
    padding: 10px 32px;
    background: var(--brand-green);
    color: white;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-back:hover {
    opacity: 0.9;
    color: white;
}

/* ================================================================
   购物车页面
   ================================================================ */
.cart-page {
    padding: 24px 0 48px;
}

.cart-page .page-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.cart-page .page-title svg {
    stroke: var(--brand-green);
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    color: var(--text-muted);
    gap: 16px;
}

.cart-empty p {
    font-size: 18px;
    color: var(--text-secondary);
}

.btn-go-shopping {
    background: var(--brand-green-gradient);
    color: white;
    padding: 12px 32px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-go-shopping:hover {
    filter: brightness(1.1);
    color: white;
}

.cart-header-row {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    padding: 14px 20px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border-light);
    border-top: none;
    background: white;
    transition: background 0.2s;
}

.cart-item:hover {
    background: #fafffe;
}

.cart-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.cart-col-check { width: 40px; flex-shrink: 0; }
.cart-col-product { flex: 1; min-width: 0; }
.cart-col-price { width: 120px; text-align: center; flex-shrink: 0; }
.cart-col-qty { width: 140px; text-align: center; flex-shrink: 0; }
.cart-col-total { width: 100px; text-align: center; flex-shrink: 0; font-weight: 600; color: var(--price-red); }
.cart-col-action { width: 60px; text-align: center; flex-shrink: 0; }

.cart-product-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.cart-product-link:hover {
    color: var(--brand-green);
}

.cart-product-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    flex-shrink: 0;
}

.cart-product-name {
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-qty-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cart-qty-controls button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-light);
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    transition: background 0.2s;
}

.cart-qty-controls button:hover {
    background: var(--brand-green-light);
    color: var(--brand-green);
}

.cart-qty-controls input {
    width: 48px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.cart-qty-controls input::-webkit-outer-spin-button,
.cart-qty-controls input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    transition: color 0.2s;
}

.btn-remove:hover {
    color: var(--price-red);
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-top: -1px;
}

.cart-footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.cart-footer-left label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.btn-delete-selected, .btn-clear-cart {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    transition: color 0.2s;
}

.btn-delete-selected:hover, .btn-clear-cart:hover {
    color: var(--price-red);
}

.cart-footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.cart-total-price {
    font-size: 20px;
    color: var(--price-red);
}

.btn-checkout {
    background: var(--brand-green-gradient);
    color: white;
    border: none;
    padding: 12px 36px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
}

.btn-checkout:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-hover);
}

/* ================================================================
   响应式
   ================================================================ */

/* ---- 平板适配（1024px 以下） ---- */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .product-detail-main { grid-template-columns: 1fr; }
    .product-detail-bottom { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .about-content { grid-template-columns: 1fr; }
}

/* ---- 手机端适配（768px 以下） ---- */
@media (max-width: 768px) {

    /* 容器缩小内边距 */
    .container { padding: 0 12px; }

    /* --- 顶部信息栏优化 --- */
    .top-bar { height: 32px; line-height: 32px; font-size: 11px; }
    .top-welcome { display: none; }
    .top-links { width: 100%; display: flex; justify-content: flex-end; }
    .top-links a { margin-left: 8px; font-size: 12px; }

    /* --- Header 优化 --- */
    .main-header { padding: 10px 0; }
    .header-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .logo { gap: 6px; }
    .logo-icon { width: 36px; height: 36px; font-size: 20px; border-radius: 8px; }
    .logo-name { font-size: 17px; letter-spacing: 0.5px; }
    .logo-slogan { font-size: 10px; letter-spacing: 1px; }

    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
        border-radius: 20px;
        border-width: 1.5px;
    }
    .search-bar input { padding: 8px 14px; font-size: 13px; }
    .search-bar button { padding: 8px 14px; font-size: 13px; }
    .search-bar button span,
    .search-bar button { gap: 2px; }

    .header-slogan { display: none; }

    /* --- 导航栏优化 --- */
    .main-nav { z-index: 100; }
    .nav-inner { height: 40px; }

    /* 隐藏分类菜单触发器和下拉菜单 */
    .nav-categories { display: none !important; }

    .nav-links {
        flex: 1;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-left: 0;
        padding: 0 4px;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links a {
        padding: 0 12px;
        white-space: nowrap;
        font-size: 13px;
        height: 100%;
    }

    /* --- Hero Banner 优化 --- */
    .hero-banner { padding: 32px 0; margin-bottom: 24px; }
    .hero-content h1 { font-size: 24px; letter-spacing: 2px; margin-bottom: 8px; }
    .hero-content p { font-size: 13px; margin-bottom: 16px; letter-spacing: 1px; }
    .hero-tags { gap: 8px; }
    .hero-tag { padding: 6px 14px; font-size: 12px; border-radius: 20px; }

    /* --- 分类卡片优化 --- */
    .section-title { margin-bottom: 16px; padding-bottom: 12px; }
    .section-title h2 { font-size: 18px; }
    .section-title .more-link { font-size: 12px; }

    .category-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
    .category-card {
        padding: 18px 10px;
        border-radius: 8px;
        position: relative;
        overflow: hidden;
    }
    .category-card .cat-name { font-size: 14px; font-weight: 600; }

    /* 给分类卡片添加装饰渐变背景 */
    .category-card:nth-child(1) { background: linear-gradient(135deg, #FFF5F5 0%, #FFF 100%); border-color: #FFE0E0; }
    .category-card:nth-child(2) { background: linear-gradient(135deg, #F0FFF0 0%, #FFF 100%); border-color: #D0F0D0; }
    .category-card:nth-child(3) { background: linear-gradient(135deg, #FFF8E1 0%, #FFF 100%); border-color: #FFE0A0; }
    .category-card:nth-child(4) { background: linear-gradient(135deg, #F3E5F5 0%, #FFF 100%); border-color: #E0C0F0; }
    .category-card:nth-child(5) { background: linear-gradient(135deg, #E8F5E9 0%, #FFF 100%); border-color: #C8E6C9; }
    .category-card:nth-child(6) { background: linear-gradient(135deg, #FFF3E0 0%, #FFF 100%); border-color: #FFE0B2; }

    /* --- 排序栏优化 --- */
    .sort-bar {
        padding: 10px 12px;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 16px;
    }
    .sort-bar::-webkit-scrollbar { display: none; }
    .sort-bar > span:first-child { display: none; }
    .sort-btn {
        padding: 5px 12px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .product-count {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 11px;
    }

    /* --- 分页优化 --- */
    .pagination { gap: 4px; margin-top: 20px; margin-bottom: 16px; flex-wrap: wrap; justify-content: center; }
    .pagination a, .pagination span {
        min-width: 32px; height: 32px; padding: 0 8px; font-size: 12px;
    }

    /* --- 商品卡片优化 --- */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
    .product-card { border-radius: 8px; }
    .product-card-body { padding: 10px; }
    .product-card-title { font-size: 13px; line-height: 1.4; }
    .product-card-subtitle { font-size: 11px; margin-top: 2px; }
    .product-card-price { font-size: 16px; margin: 4px 0; }
    .product-card-price small { font-size: 11px; }
    .product-card-meta { font-size: 11px; }
    .product-card-origin { font-size: 10px; }
    .product-card-sold { font-size: 10px; }
    .product-card-img .badge { font-size: 10px; padding: 2px 6px; top: 6px; left: 6px; }


    /* --- Footer 优化 --- */
    .main-footer { padding: 24px 0 0; margin-top: 24px; }

    .footer-services {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px 0;
        margin-bottom: 16px;
    }
    .service-icon { width: 24px; height: 24px; }
    .service-item { gap: 8px; }
    .service-item strong { font-size: 12px; }
    .service-item span { font-size: 10px; }

    /* Footer 区块改为 2 列 */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding-bottom: 16px;
    }
    /* 关于我们独占一行 */
    .footer-col:first-child {
        grid-column: 1 / -1;
    }
    .footer-col h4 {
        font-size: 14px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    .footer-col p { font-size: 12px; line-height: 1.6; }

    /* 链接改为横向 flex-wrap 排列 */
    .footer-links {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 6px 12px !important;
    }
    .footer-links a {
        font-size: 12px;
        white-space: nowrap;
    }
    .footer-links a:hover { padding-left: 0; }

    .footer-contact p {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .footer-bottom {
        font-size: 11px;
        padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    }

    /* --- 商品详情页优化 --- */
    .buy-buttons { flex-direction: column; }
    .product-detail-main { padding: 16px; }

    /* --- 回到顶部按钮 --- */
    .back-to-top {
        bottom: 24px !important;
        right: 16px !important;
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
    }
}

/* ---- 超小屏幕适配（480px 以下） ---- */
@media (max-width: 480px) {

    .container { padding: 0 10px; }

    /* 商品卡片继续保持双列 */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    /* 分类仍然 3 列但更紧凑 */
    .category-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .category-card { padding: 14px 8px; }
    .category-card .cat-name { font-size: 12px; }

    /* Header 更紧凑 */
    .logo-icon { width: 32px; height: 32px; font-size: 18px; }
    .logo-name { font-size: 15px; }
    .logo-slogan { display: none; }

    .search-bar input { padding: 7px 12px; font-size: 12px; }
    .search-bar button { padding: 7px 12px; font-size: 12px; }

    /* Hero 更紧凑 */
    .hero-banner { padding: 24px 0; margin-bottom: 16px; }
    .hero-content h1 { font-size: 20px; letter-spacing: 1px; }
    .hero-content p { font-size: 12px; margin-bottom: 12px; }
    .hero-tag { padding: 5px 12px; font-size: 11px; }

    /* 商品卡片更紧凑 */
    .product-card-body { padding: 8px; }
    .product-card-title { font-size: 12px; }
    .product-card-subtitle { font-size: 10px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
    .product-card-price { font-size: 15px; }
    .product-card-meta { flex-direction: column; gap: 2px; align-items: flex-start; }

    /* section 标题更紧凑 */
    .section-title { margin-bottom: 12px; padding-bottom: 10px; gap: 8px; }
    .section-title h2 { font-size: 16px; }

    /* Footer 服务一行一个 */
    .footer-services { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 0; }
    .service-item { flex-direction: column; text-align: center; gap: 6px; }
    .service-icon { width: 24px; height: 24px; }
    .service-item strong { font-size: 12px; }
    .service-item span { font-size: 10px; }

    /* nav 链接更紧凑 */
    .nav-links a { padding: 0 10px; font-size: 12px; }
    .nav-inner { height: 36px; }
}

/* ---- 极小屏幕（360px 以下） ---- */
@media (max-width: 360px) {
    .hero-content h1 { font-size: 18px; }
    .hero-tags { gap: 6px; }
    .hero-tag { padding: 4px 10px; font-size: 10px; }
    .products-grid { gap: 6px; }
    .product-card-title { font-size: 11px; }
    .product-card-price { font-size: 14px; }
    .category-card { padding: 12px 6px; }
    .category-card .cat-name { font-size: 11px; }
}
