/* 章丘特产网 - 公共样式 */

:root {
    --zq-primary: #4CAF50;
    --zq-primary-dark: #388E3C;
    --zq-primary-light: #C8E6C9;
    --zq-orange: #FF9800;
    --zq-orange-dark: #F57C00;
    --zq-gold: #D4AF37;
    --zq-red: #E53935;
    --zq-text: #333;
    --zq-text-light: #666;
    --zq-text-mute: #999;
    --zq-bg: #f5f5f5;
    --zq-card: #fff;
    --zq-border: #eee;
    --zq-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --zq-radius: 12px;
    --zq-radius-sm: 6px;
}

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

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

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

/* ===== 顶部导航 ===== */
.zq-header {
    background: linear-gradient(135deg, var(--zq-primary) 0%, var(--zq-primary-dark) 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.zq-header-top {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 16px;
}
.zq-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}
.zq-logo-icon { font-size: 28px; }
.zq-search-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    cursor: pointer;
}
.zq-search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
}
.zq-search-box input::placeholder { color: #999; }
.zq-header-actions {
    display: flex;
    gap: 12px;
    font-size: 13px;
}
.zq-header-actions a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.2s;
}
.zq-header-actions a:hover { background: rgba(255, 255, 255, 0.28); }

/* 主导航条 */
.zq-nav {
    background: #fff;
    border-bottom: 1px solid var(--zq-border);
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 12px;
}
.zq-nav::-webkit-scrollbar { display: none; }
.zq-nav-inner {
    display: flex;
    gap: 4px;
    max-width: 1200px;
    margin: 0 auto;
}
.zq-nav-item {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--zq-text-light);
    position: relative;
    transition: color 0.2s;
    flex-shrink: 0;
}
.zq-nav-item.active {
    color: var(--zq-primary);
    font-weight: 600;
}
.zq-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--zq-primary);
    border-radius: 2px;
}
.zq-nav-item:hover { color: var(--zq-primary); }

/* ===== 通用容器 ===== */
.zq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* ===== 通用标题 ===== */
.zq-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 16px;
}
.zq-section-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--zq-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.zq-section-title h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--zq-primary);
    border-radius: 2px;
}
.zq-section-title .more {
    color: var(--zq-text-mute);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.zq-section-title .more:hover { color: var(--zq-primary); }

/* ===== 按钮 ===== */
.zq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.zq-btn-primary {
    background: var(--zq-primary);
    color: #fff;
}
.zq-btn-primary:hover { background: var(--zq-primary-dark); }
.zq-btn-orange {
    background: var(--zq-orange);
    color: #fff;
}
.zq-btn-orange:hover { background: var(--zq-orange-dark); }
.zq-btn-outline {
    background: #fff;
    color: var(--zq-primary);
    border: 1px solid var(--zq-primary);
}
.zq-btn-outline:hover { background: var(--zq-primary-light); }
.zq-btn-lg {
    padding: 12px 32px;
    font-size: 16px;
}
.zq-btn-block {
    display: flex;
    width: 100%;
}

/* ===== 商品卡片 ===== */
.zq-product-card {
    background: var(--zq-card);
    border-radius: var(--zq-radius);
    overflow: hidden;
    box-shadow: var(--zq-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}
.zq-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.zq-product-img {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8f5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
}
.zq-product-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--zq-red);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.zq-product-tag-orange {
    background: var(--zq-orange);
}
.zq-product-tag-gold {
    background: var(--zq-gold);
}
.zq-product-info {
    padding: 10px 12px 12px;
}
.zq-product-name {
    font-size: 14px;
    color: var(--zq-text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 38px;
}
.zq-product-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 8px;
}
.zq-product-price {
    color: var(--zq-red);
    font-weight: 700;
    font-size: 16px;
}
.zq-product-price-group {
    color: var(--zq-orange);
    font-size: 12px;
    font-weight: 600;
}
.zq-product-original {
    color: var(--zq-text-mute);
    text-decoration: line-through;
    font-size: 12px;
    margin-left: 4px;
    font-weight: normal;
}
.zq-product-sales {
    color: var(--zq-text-mute);
    font-size: 12px;
}

/* ===== 网格 ===== */
.zq-grid {
    display: grid;
    gap: 12px;
}
.zq-grid-2 { grid-template-columns: repeat(2, 1fr); }
.zq-grid-3 { grid-template-columns: repeat(3, 1fr); }
.zq-grid-4 { grid-template-columns: repeat(4, 1fr); }
.zq-grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 768px) {
    .zq-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .zq-grid-5 { grid-template-columns: repeat(2, 1fr); }
    .zq-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 空状态 ===== */
.zq-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--zq-text-mute);
}
.zq-empty-icon { font-size: 64px; margin-bottom: 12px; }

/* ===== 卡片 ===== */
.zq-card {
    background: var(--zq-card);
    border-radius: var(--zq-radius);
    box-shadow: var(--zq-shadow);
    padding: 16px;
}

/* ===== 标签 ===== */
.zq-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 4px;
    margin-bottom: 4px;
}
.zq-tag-green {
    background: var(--zq-primary-light);
    color: var(--zq-primary-dark);
}
.zq-tag-orange {
    background: #FFE0B2;
    color: var(--zq-orange-dark);
}
.zq-tag-gold {
    background: #FFF8DC;
    color: var(--zq-gold);
}
.zq-tag-red {
    background: #FFCDD2;
    color: var(--zq-red);
}

/* ===== 浮动购物车按钮 ===== */
.zq-fab-cart {
    position: fixed;
    right: 16px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--zq-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
    z-index: 99;
    font-size: 24px;
}
.zq-fab-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--zq-red);
    color: #fff;
    font-size: 11px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ===== 底部 footer ===== */
.zq-footer {
    background: #2E2E2E;
    color: #ccc;
    padding: 30px 20px;
    margin-top: 40px;
}
.zq-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.zq-footer h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 12px;
}
.zq-footer-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 20px;
}
.zq-footer ul li {
    font-size: 13px;
    margin-bottom: 6px;
    color: #999;
}
.zq-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 12px;
    color: #888;
}
@media (max-width: 768px) {
    .zq-footer-cols { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .zq-container { padding: 12px; }
    .zq-header-top { padding: 10px 12px; gap: 8px; }
    .zq-logo { font-size: 16px; }
    .zq-logo-icon { font-size: 22px; }
    .zq-search-box { padding: 6px 12px; }
    .zq-header-actions { gap: 6px; font-size: 12px; }
    .zq-header-actions a { padding: 4px 8px; }
    .zq-section-title { margin: 16px 0 12px; }
    .zq-section-title h2 { font-size: 17px; }
}

/* 工具类 */
.zq-flex { display: flex; }
.zq-flex-center { display: flex; align-items: center; justify-content: center; }
.zq-flex-between { display: flex; align-items: center; justify-content: space-between; }
.zq-gap-8 { gap: 8px; }
.zq-gap-12 { gap: 12px; }
.zq-gap-16 { gap: 16px; }
.zq-mt-12 { margin-top: 12px; }
.zq-mt-16 { margin-top: 16px; }
.zq-mt-24 { margin-top: 24px; }
.zq-text-mute { color: var(--zq-text-mute); }
.zq-text-primary { color: var(--zq-primary); }
.zq-text-orange { color: var(--zq-orange); }
.zq-text-red { color: var(--zq-red); }
.zq-text-bold { font-weight: 700; }
.zq-text-small { font-size: 12px; }
.zq-fw-600 { font-weight: 600; }