/* ============================================================
   watch-price.css · 祥哥玩表 品牌回收价格表公共样式
   各品牌通过 body 上的 data-brand 属性切换品牌色
   ============================================================ */

/* ---- CSS 变量（默认：劳力士） ---- */
:root {
    --brand-primary: #006039;
    --brand-secondary: #A67B3D;
    --brand-dark: #1a1a1a;
    --brand-bg: #f5f3ef;
    --brand-hover-bg: #f0faf5;
    --brand-notice-bg: linear-gradient(135deg, #fef9e7, #fdf2d5);
    --brand-notice-border: #A67B3D;
    --brand-notice-color: #5a4a2a;
    --brand-border-color: #e5e0d8;
    --brand-tip-bg: #e8f5e9;
    --brand-footer-link: #006039;
}

/* 卡地亚 */
[data-brand="cartier"] {
    --brand-primary: #C41E3A;
    --brand-secondary: #B8860B;
    --brand-dark: #1a1a1a;
    --brand-bg: #f8f6f3;
    --brand-hover-bg: #fdf0f2;
    --brand-notice-bg: linear-gradient(135deg, #fef9e7, #fdf2d5);
    --brand-notice-border: #B8860B;
    --brand-notice-color: #5a4a2a;
    --brand-border-color: #e5e0d8;
    --brand-tip-bg: #fff0f2;
    --brand-footer-link: #C41E3A;
}

/* 欧米茄 */
[data-brand="omega"] {
    --brand-primary: #003D7A;
    --brand-secondary: #C5A55A;
    --brand-dark: #1a1a2e;
    --brand-bg: #f5f6fa;
    --brand-hover-bg: #f0f4ff;
    --brand-notice-bg: linear-gradient(135deg, #f0f4ff, #e6edf7);
    --brand-notice-border: #003D7A;
    --brand-notice-color: #2d3a4a;
    --brand-border-color: #e0e3eb;
    --brand-tip-bg: #eef2ff;
    --brand-footer-link: #003D7A;
}

/* 浪琴 */
[data-brand="longines"] {
    --brand-primary: #008B5E;
    --brand-secondary: #B8935A;
    --brand-dark: #1a2a22;
    --brand-bg: #f6f7f4;
    --brand-hover-bg: #edf7f2;
    --brand-notice-bg: linear-gradient(135deg, #edf7f2, #e2efe8);
    --brand-notice-border: #008B5E;
    --brand-notice-color: #2d4a3a;
    --brand-border-color: #dde0d8;
    --brand-tip-bg: #edf7f2;
    --brand-footer-link: #008B5E;
}

/* 万国 IWC */
[data-brand="iwc"] {
    --brand-primary: #1A3A5C;
    --brand-secondary: #A88B5A;
    --brand-dark: #0f1f30;
    --brand-bg: #f5f6f8;
    --brand-hover-bg: #e8edf3;
    --brand-notice-bg: linear-gradient(135deg, #e8edf3, #dce3ed);
    --brand-notice-border: #1A3A5C;
    --brand-notice-color: #2a3a4a;
    --brand-border-color: #d8dce3;
    --brand-tip-bg: #e8edf3;
    --brand-footer-link: #1A3A5C;
}

/* 积家 JLC */
[data-brand="jlc"] {
    --brand-primary: #7A1A2E;
    --brand-secondary: #C5A05A;
    --brand-dark: #1a0f12;
    --brand-bg: #f7f4f5;
    --brand-hover-bg: #f7eef0;
    --brand-notice-bg: linear-gradient(135deg, #f7eef0, #f0e4e7);
    --brand-notice-border: #7A1A2E;
    --brand-notice-color: #4a2a32;
    --brand-border-color: #ddd8da;
    --brand-tip-bg: #f7eef0;
    --brand-footer-link: #7A1A2E;
}

/* ---- 基础重置 ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--brand-bg);
    color: #2d2d2d;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 90px;
}

/* ---- Header ---- */
.header {
    background: linear-gradient(135deg, var(--brand-dark) 0%, #2d2d2d 100%);
    color: #fff;
    padding: 40px 24px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.header::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}
.header h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 4px;
}
.header h1 .brand-color {
    color: var(--brand-secondary);
}
.header .subtitle {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 4px;
}
.header .badge {
    display: inline-block;
    background: var(--brand-primary);
    color: #fff;
    font-size: 12px;
    padding: 3px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
}
.header .update-info {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}
.header .update-info strong {
    color: #ccc;
}

/* ---- 导航栏 ---- */
.nav-bar {
    display: flex;
    justify-content: center;
    background: #222;
    flex-wrap: wrap;
}
.nav-bar a {
    display: block;
    padding: 10px 20px;
    color: #aaa;
    text-decoration: none;
    font-size: 13px;
    transition: all .2s ease;
    border-bottom: 2px solid transparent;
}
.nav-bar a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}
.nav-bar a.active {
    color: var(--brand-secondary);
    border-bottom-color: var(--brand-primary);
    background: rgba(255,255,255,0.03);
}

/* ---- 容器 ---- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ---- 价格说明 ---- */
.notice {
    background: var(--brand-notice-bg);
    border-left: 4px solid var(--brand-notice-border);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--brand-notice-color);
    line-height: 1.6;
}

/* ---- 统计卡片 ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid var(--brand-border-color);
}
.stat-card .num {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-primary);
    line-height: 1.2;
}
.stat-card .label {
    font-size: 12px;
    color: #6b6b6b;
    margin-top: 2px;
}

/* ---- 系列区块 ---- */
.series-section {
    margin-bottom: 28px;
}
.series-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brand-primary);
}
.series-header .icon {
    width: 32px; height: 32px;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.series-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--brand-dark);
}
.series-header .count {
    font-size: 11px;
    color: #6b6b6b;
    background: var(--brand-bg);
    padding: 2px 10px;
    border-radius: 10px;
}
.series-intro {
    font-size: 13px;
    color: #6b6b6b;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* ---- 表格 ---- */
.table-wrap {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--brand-border-color);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.table-scroll {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    font-size: 14px;
}
thead {
    background: var(--brand-dark);
}
thead th {
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .3px;
    white-space: nowrap;
}
thead th:not(:last-child) {
    border-right: 1px solid rgba(255,255,255,0.08);
}
tbody tr {
    border-bottom: 1px solid var(--brand-border-color);
}
tbody tr:hover {
    background: var(--brand-hover-bg);
}
tbody td {
    padding: 11px 14px;
    vertical-align: middle;
}
.model-cell {
    font-weight: 600;
}
.price-cell {
    font-weight: 600;
    color: var(--brand-primary);
    white-space: nowrap;
}
.price-range {
    display: block;
    font-size: 11px;
    color: #6b6b6b;
    font-weight: 400;
    margin-top: 1px;
}

/* ---- 趋势 ---- */
.trend-up {
    color: #c0392b;
}
.trend-down {
    color: #27ae60;
}
.trend-stable {
    color: #888;
}

/* ---- 标签 ---- */
.tag-hot {
    display: inline-block;
    background: #fee2e2;
    color: #dc2626;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 4px;
}
.tag-new {
    display: inline-block;
    background: #dbeafe;
    color: #2563eb;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 4px;
}

/* ---- 操作按钮 ---- */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s ease;
    border: 1px solid var(--brand-border-color);
    background: #fff;
    color: #6b6b6b;
    white-space: nowrap;
    line-height: 1;
}
.action-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--brand-hover-bg);
}
.action-btn.faved {
    border-color: #eab308;
    color: #eab308;
    background: #fefce8;
}
.action-btn.faved .star-icon::before {
    content: '⭐';
}
.star-icon::before {
    content: '☆';
}
.actions-cell {
    white-space: nowrap;
    display: flex;
    gap: 4px;
}

/* ---- 收藏栏 ---- */
.fav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid var(--brand-primary);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform .3s ease;
}
.fav-bar.visible {
    transform: translateY(0);
}
.fav-bar .label {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.fav-bar .label span {
    color: var(--brand-secondary);
}
.fav-items {
    display: flex;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
}
.fav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-bg);
    border: 1px solid var(--brand-border-color);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
}
.fav-item .remove {
    cursor: pointer;
    color: #999;
    font-size: 14px;
    line-height: 1;
}
.fav-item .remove:hover {
    color: #dc2626;
}
.fav-bar-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}
.fav-bar-actions button {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    border: none;
    font-weight: 500;
}
.btn-compare {
    background: var(--brand-primary);
    color: #fff;
}
.btn-compare:hover {
    filter: brightness(0.9);
}
.btn-clear {
    background: #f3f4f6;
    color: #666;
}

/* ---- 弹窗 ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--brand-border-color);
}
.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}
.modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--brand-bg);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}
.modal-close:hover {
    background: #e5e7eb;
}
.modal-body {
    padding: 24px;
}
.chart-container {
    position: relative;
    height: 320px;
    margin-bottom: 16px;
}
.chart-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.chart-stat {
    background: var(--brand-bg);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}
.chart-stat .val {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-primary);
}
.chart-stat .lbl {
    font-size: 11px;
    color: #6b6b6b;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.compare-table th,
.compare-table td {
    padding: 10px 14px;
    border: 1px solid var(--brand-border-color);
    text-align: center;
}
.compare-table th {
    background: var(--brand-bg);
    font-weight: 600;
    text-align: left;
    width: 100px;
}
.compare-table .highlight {
    color: var(--brand-primary);
    font-weight: 700;
}

/* ---- 小贴士 ---- */
.tip-box {
    background: var(--brand-tip-bg);
    border-radius: 10px;
    padding: 18px 22px;
    margin: 32px 0 20px;
}
.tip-box h3 {
    font-size: 15px;
    color: var(--brand-primary);
    margin-bottom: 6px;
}
.tip-box ul {
    list-style: none;
    font-size: 13px;
    color: #444;
    line-height: 2;
}
.tip-box ul li::before {
    content: '✓ ';
    color: var(--brand-primary);
    font-weight: 700;
}

/* ---- 底部 ---- */
.footer {
    text-align: center;
    padding: 28px 16px;
    color: #6b6b6b;
    font-size: 13px;
    border-top: 1px solid var(--brand-border-color);
    margin-top: 16px;
}
.footer a {
    color: var(--brand-footer-link);
    text-decoration: none;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .header {
        padding: 28px 16px 22px;
    }
    .header h1 {
        font-size: 22px;
    }
    .container {
        padding: 16px 10px 80px;
    }
    .nav-bar a {
        padding: 6px 12px;
        font-size: 11px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    thead th,
    tbody td {
        padding: 9px 10px;
        font-size: 12px;
    }
    .series-header h2 {
        font-size: 16px;
    }
    table {
        min-width: 600px;
    }
    .modal-body {
        padding: 16px;
    }
    .chart-container {
        height: 240px;
    }
}
