/* ============================================================
   智享生活 - 主样式表
   ============================================================ */

/* ========== CSS变量 ========== */
:root {
    --primary-color: #e63946;
    --primary-dark: #c1121f;
    --primary-gradient: linear-gradient(135deg, #e63946 0%, #f4a261 100%);
    --primary-gradient-dark: linear-gradient(135deg, #c1121f 0%, #e76f51 100%);
    --secondary-color: #457b9d;
    --accent-color: #f4a261;
    --success-color: #2a9d8f;
    --danger-color: #e63946;
    --warning-color: #f4a261;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-light: #666;
    --bg-primary: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

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

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

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

/* ========== 文字颜色工具类 ========== */
.text-red { color: var(--danger-color) !important; }
.text-green { color: var(--success-color) !important; }
.text-gray { color: var(--text-secondary) !important; }

/* ============================================================
   顶部导航栏
   ============================================================ */
.header {
    background: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.unified-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}
.nav-left .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}
.nav-left .logo i { font-size: 20px; }
.region-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    cursor: pointer;
}
.region-selector i { font-size: 12px; }
.nav-center { flex: 1; max-width: 400px; margin: 0 20px; }
.nav-center .search-box { position: relative; }
.nav-center .search-box input {
    width: 100%; padding: 8px 40px 8px 14px; border: none;
    border-radius: 20px; font-size: 14px; background: rgba(255,255,255,0.95); outline: none;
}
.nav-center .search-box button {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    background: white; border: none; color: var(--primary-color);
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px;
}
.nav-right {
    display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}
.nav-home-btn {
    display: flex; align-items: center; color: white; font-size: 18px;
    padding: 0 8px; text-decoration: none; transition: opacity 0.2s;
}
.nav-home-btn:hover { opacity: 0.8; }
.nav-stats { display: flex; gap: 10px; font-size: 12px; color: rgba(255,255,255,0.9); }
.nav-stats .stat-item { display: flex; align-items: center; gap: 3px; }
.nav-stats .stat-item i { font-size: 11px; opacity: 0.8; }
.nav-stats .stat-item span { font-weight: 600; }
.nav-menu-btn {
    background: rgba(255,255,255,0.2); border: none; color: white;
    height: 36px; padding: 0 12px; border-radius: 8px; cursor: pointer;
    font-size: 14px; display: flex; align-items: center; gap: 6px;
}
.nav-menu-btn:hover { background: rgba(255,255,255,0.3); }
.notification-bell {
    color: white; font-size: 16px; position: relative; cursor: pointer;
    width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background 0.2s; flex-shrink: 0; margin-left: 8px;
}
.notification-bell:hover { background: rgba(255,255,255,0.2); }
.notification-bell .badge {
    position: absolute; top: 2px; right: 2px;
    background: #fff; color: var(--primary-color);
    border-radius: 50%; padding: 1px 4px; font-size: 10px;
    min-width: 16px; text-align: center;
}
.notification-bell i { font-size: 18px; color: #fff; }
.user-area .btn-login {
    color: white; text-decoration: none; font-size: 13px;
    display: flex; align-items: center; gap: 4px;
}

/* 下拉菜单 */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    background: white; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 12px; padding: 8px 0; min-width: 200px; z-index: 1000;
    max-height: 400px; overflow-y: auto;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.dropdown-title {
    padding: 8px 16px; font-size: 12px; color: #999;
    font-weight: 600; border-bottom: 1px solid #eee;
}
.nav-dropdown-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; color: #333; text-decoration: none;
    font-size: 13px; transition: background 0.15s;
}
.nav-dropdown-menu a:hover { background: #f5f5f5; }
.nav-dropdown-menu a i {
    width: 18px; text-align: center; color: var(--primary-color); font-size: 14px;
}
@media (max-width: 768px) {
    .nav-stats { display: none; }
    .nav-center { display: none; }
    .user-area .btn-login span { display: none; }
}

.header-top {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.logo i {
    font-size: 28px;
}

/* 地区选择标签 */
#regionSelector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    background: #fff0f0;
    color: #e63946;
    padding: 3px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
#regionSelector i {
    font-size: 12px;
}
#regionSelector select {
    border: none;
    background: transparent;
    color: #e63946;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding: 0;
    max-width: 80px;
}
#regionSelector:hover {
    background: #e63946;
    color: #fff;
}
#regionSelector #locationText {
    font-weight: 600;
    cursor: pointer;
}
#regionSelector select option {
    background: #fff;
    color: #333;
}

#locationTag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    background: #fff0f0;
    color: #e63946;
    padding: 3px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
#locationTag:hover {
    background: #e63946;
    color: #fff;
}

.search-box {
    flex: 1;
    max-width: 400px;
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    overflow: visible;
    transition: var(--transition);
    position: relative;
}

.search-box:focus-within {
    border-color: var(--primary-color);
}

.search-box input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 14px;
    border-radius: 25px 0 0 25px;
}

.search-box button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 0 25px 25px 0;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-results.active {
    display: block;
}

.search-result-group {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.search-result-group:last-child {
    border-bottom: none;
}

.search-result-group h4 {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-result-item {
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-result-item:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
}

.search-result-item .item-sub {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.search-no-result {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.search-no-result i {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--text-light);
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-report {
    padding: 6px 14px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-report:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-login {
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-login:hover {
    color: var(--primary-color);
}

/* 导航菜单 */
.main-nav {
    background: var(--primary-color);
    position: relative;
}

/* 汉堡菜单按钮 */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-list {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.nav-list li a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 14px;
    color: white;
    font-size: 13px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-list li a:hover,
.nav-list li.active a {
    background: rgba(255,255,255,0.15);
}

.nav-list li.active a {
    background: rgba(255,255,255,0.2);
    font-weight: 600;
}

/* 导航下拉菜单 */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
    z-index: 1000;
}
.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}
.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
}
.nav-dropdown-menu a:hover {
    background: #f5f5f5;
}

/* 导航统计信息 */
.nav-stats {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 12px;
    color: #666;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-item i {
    color: #e63946;
    font-size: 11px;
}
.stat-item span {
    font-weight: 600;
    color: #333;
}

/* 数据来源标签 */
.source-tag {
    display: inline-block;
    padding: 2px 6px;
    background: #f0f0f0;
    color: #666;
    font-size: 11px;
    border-radius: 4px;
}

/* ============================================================
   今日菜价指数滚动条
   ============================================================ */
.price-ticker {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 10px 0;
    overflow: hidden;
}

.price-ticker .container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 600;
    white-space: nowrap;
    padding-right: 15px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-scroll {
    display: flex;
    gap: 40px;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticker-item small {
    font-size: 12px;
    opacity: 0.8;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================
   今日特惠滚动横幅
   ============================================================ */
.promo-banner {
    background: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
    padding: 15px 0;
    overflow: hidden;
}

.promo-banner .container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.banner-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    white-space: nowrap;
    padding-right: 15px;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.banner-scroll {
    flex: 1;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.banner-scroll::-webkit-scrollbar {
    display: none;
}

.banner-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 280px;
    cursor: pointer;
    transition: var(--transition);
}

.banner-item:hover {
    background: rgba(255,255,255,0.25);
}

.banner-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.banner-info h4 {
    color: white;
    font-size: 14px;
    margin-bottom: 4px;
}

.banner-info p {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

/* ============================================================
   主体布局
   ============================================================ */
.main-content {
    padding: 20px 0;
}

.main-content .container {
    display: grid;
    grid-template-columns: minmax(260px, 280px) 1fr minmax(280px, 320px);
    gap: 20px;
}

/* ========== 通用板块样式 ========== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.section-header h2 {
    font-size: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h2 i {
    color: var(--primary-color);
}

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

.more-link:hover {
    color: var(--primary-color);
}

.sidebar-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
}

.tab {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tab:hover {
    background: rgba(230, 57, 70, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.35);
    font-weight: 600;
}

/* 移动端 Tab 滚动 */
.tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
    display: none;
}

/* ============================================================
   左侧栏 - 菜篮子专区
   ============================================================ */
.price-table table {
    width: 100%;
    border-collapse: collapse;
}

.price-table th,
.price-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.price-table th {
    color: var(--text-secondary);
    font-weight: 500;
}

.price-table tr:hover {
    background: var(--bg-primary);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   左侧栏 - 肉蛋禽价格卡片
   ============================================================ */
.price-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.price-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.price-card:hover {
    background: #fff3e6;
    border-left-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.card-icon {
    font-size: 28px;
}

.card-info h4 {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.card-info .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.card-info .price span {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
}

.card-info .trend {
    font-size: 11px;
}

/* ============================================================
   左侧栏 - 五金百货网格
   ============================================================ */
.hardware-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hardware-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.hardware-item:hover {
    background: #fff3e6;
    border-left-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.item-image {
    font-size: 24px;
}

.item-info h5 {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.item-info .price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.item-info .ref-tag {
    font-size: 10px;
    color: var(--success-color);
    background: #e6f7f5;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 3px;
}

/* ============================================================
   中间主体 - 商超特卖
   ============================================================ */
.center-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.compact-section {
    padding: 14px;
}

.news-feed-section {
    padding: 16px;
}

.news-feed {
    display: grid;
    gap: 12px;
}

.news-feed-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
}
.news-feed-item:hover {
    background: #fafafa;
    border-color: #e63946;
    box-shadow: 0 2px 8px rgba(230,57,70,0.08);
}
.news-feed-item .feed-icon {
    width: 48px; height: 48px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.news-feed-item .feed-body { flex: 1; min-width: 0; }
.news-feed-item .feed-title {
    font-size: 15px; font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 4px;
}
.news-feed-item .feed-summary {
    font-size: 13px; color: #636e72; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 6px;
}
.news-feed-item .feed-meta { display: flex; gap: 12px; font-size: 12px; color: #777; }
.news-feed-item .feed-meta span { display: flex; align-items: center; gap: 3px; }
.news-feed-item .feed-tag {
    display: inline-block; padding: 1px 6px; border-radius: 8px; font-size: 11px; font-weight: 500;
}
.news-feed-item.hot { border-left: 3px solid #e63946; }

.chart-container {
    position: relative;
    height: 250px;
    margin-top: 10px;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.promo-card {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

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

.promo-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.promo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: var(--accent-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.promo-badge.hot {
    background: var(--danger-color);
}

.promo-info {
    padding: 12px;
}

.store-name {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
}

.promo-info h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.promo-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 5px;
}

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

.promo-price .current span {
    font-size: 12px;
    font-weight: 400;
}

.promo-price .original {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
}

.promo-time {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   中间主体 - 比价排行榜
   ============================================================ */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.ranking-item:hover {
    background: #fff8f0;
    border-left-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text-light);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.rank-1 { background: #ffd700; }
.rank-2 { background: #c0c0c0; }
.rank-3 { background: #cd7f32; }

.item-name {
    flex: 1;
    font-weight: 500;
}

.item-store {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.item-diff {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
}

.item-diff.text-green {
    background: #e6f7f5;
}

/* ============================================================
   右侧栏 - 本地新鲜事
   ============================================================ */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    padding: 5px 8px;
    margin: -5px -8px;
    border-radius: 6px;
}

.news-item:hover {
    background: #fff8f0;
    border-bottom-color: transparent;
    padding-bottom: 10px;
}

.news-item:hover .news-info h4 a {
    color: var(--primary-color);
}

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

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

.news-info h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-info h4 a:hover {
    color: var(--primary-color);
}

.news-meta {
    font-size: 11px;
    color: var(--text-light);
    display: flex;
    gap: 12px;
}

.news-meta i {
    margin-right: 3px;
}

/* ============================================================
   右侧栏 - 便民服务
   ============================================================ */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.service-item:hover {
    background: #fff3e6;
    color: var(--primary-color);
}

.service-item i {
    font-size: 20px;
    color: var(--primary-color);
}

/* ============================================================
   右侧栏 - 贡献榜
   ============================================================ */
.contributor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contributor-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.contributor-item:hover {
    background: #fff8f0;
    transform: translateX(2px);
}

.contributor-rank {
    font-size: 16px;
}

.contributor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* 渐变头像（无图时自动使用） */
.contributor-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.contributor-item:nth-child(1) .contributor-avatar {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #5a3e00;
}

.contributor-item:nth-child(2) .contributor-avatar {
    background: linear-gradient(135deg, #c0c0c0 0%, #8a8a8a 100%);
    color: #2d2d2d;
}

.contributor-item:nth-child(3) .contributor-avatar {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    color: white;
}

.contributor-info {
    display: flex;
    flex-direction: column;
}

.contributor-info .name {
    font-size: 13px;
    font-weight: 500;
}

.contributor-info .score {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ============================================================
   底部
   ============================================================ */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.8);
    padding: 40px 0 20px;
    margin-top: 40px;
}

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

.footer-col h3 {
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
}

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

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.footer-col ul li a:hover {
    color: white;
}

.footer-col ul li i {
    margin-right: 8px;
    width: 16px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    font-size: 16px;
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* ============================================================
   悬浮报价按钮
   ============================================================ */
.float-report-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 999;
}

.float-report-btn button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 12px;
    transition: var(--transition);
}

.float-report-btn button:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.float-report-btn button i {
    font-size: 20px;
}

/* ============================================================
   全局浮动快捷按钮
   ============================================================ */
.floating-buttons {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}
.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.float-btn:hover { transform: scale(1.1); }
.float-btn i { font-size: 20px; margin-bottom: 2px; }
.float-btn-quote { background: #e63946; }
.float-btn-job { background: #457b9d; }

/* ============================================================
   用户区域
   ============================================================ */
.user-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.user-name {
    font-size: 14px;
    color: var(--text-primary);
}

.user-points {
    font-size: 12px;
    color: var(--accent-color);
    background: #fff3e6;
    padding: 2px 8px;
    border-radius: 10px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.user-dropdown-item:hover {
    background: var(--bg-primary);
}

.user-dropdown-item i {
    width: 16px;
    color: var(--text-secondary);
}

/* ============================================================
   附近门店
   ============================================================ */
.store-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.store-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.store-item:hover {
    background: #fff3e6;
    border-left-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.store-icon {
    font-size: 24px;
}

.store-info h5 {
    font-size: 13px;
    margin-bottom: 3px;
}

.store-info p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.store-distance {
    font-size: 10px;
    color: var(--primary-color);
    background: #fff0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

/* ============================================================
   热门话题
   ============================================================ */
.hot-topics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.topic-item:hover {
    background: var(--bg-primary);
    border-left-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.topic-rank {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text-light);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.topic-rank.hot {
    background: var(--primary-color);
}

.topic-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.topic-count {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ============================================================
   广告卡片
   ============================================================ */
.ad-card {
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e6 100%);
    border: 1px solid #ffe8b3;
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.ad-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.ad-card-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    color: var(--text-light);
    background: rgba(255,255,255,0.8);
    padding: 2px 6px;
    border-radius: 3px;
}

.ad-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.ad-card-info h5 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ad-card-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.ad-card-info span {
    font-size: 11px;
    color: var(--primary-color);
}

/* ============================================================
   模态框样式（原内联样式迁出）
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.btn-submit {
    padding: 10px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-submit:hover {
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35);
    transform: translateY(-1px);
}

.btn-cancel {
    padding: 10px 24px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

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

/* ============================================================
   响应式适配 - 由 mobile.css 统一管理
   此处仅保留桌面端基础断点
   ============================================================ */
@media (min-width: 1600px) {
    .main-content .container {
        grid-template-columns: minmax(280px, 300px) 1fr minmax(300px, 350px);
    }
}

/* ============================================================
   新增组件样式
   ============================================================ */

/* 登录标签切换 */
.login-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 15px;
}
.login-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #636e72;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.login-tab.active {
    color: #e63946;
    border-bottom-color: #e63946;
}
.login-tab:hover {
    color: #e63946;
}

/* 通知铃铛样式已统一在顶部定义 */

/* 用户信息区域 */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 20px;
    transition: background 0.2s;
}
.user-info:hover {
    background: #f8f9fa;
}

/* 用户下拉菜单 */
.user-area {
    position: relative;
}

/* 搜索结果增强 */
.search-result-group {
    padding: 8px 0;
}
.search-result-group h4 {
    font-size: 13px;
    color: #636e72;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
}
.search-result-group h4 i {
    color: #e63946;
    font-size: 12px;
}
.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-result-item:hover {
    background: #fff0f0;
}
.search-result-item .item-sub {
    font-size: 12px;
    color: #777;
}
.search-no-result {
    text-align: center;
    padding: 20px;
    color: #777;
}
.search-no-result i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    color: #ddd;
}

/* ========== 今日特惠地理定位 ========== */
.promo-location {
    font-size: 13px;
    color: #636e72;
    display: flex;
    align-items: center;
    gap: 6px;
}
.promo-location i {
    color: #e63946;
}
.promo-range-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.promo-range-tabs .tab {
    padding: 5px 14px;
    border: 1px solid #eee;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #636e72;
    transition: all 0.2s;
}
.promo-range-tabs .tab.active {
    background: #e63946;
    color: #fff;
    border-color: #e63946;
}
.promo-range-tabs .tab:hover {
    border-color: #e63946;
}

/* 数据来源标签 */
.price-source-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.price-source-tag.official {
    background: rgba(24, 144, 255, 0.1);
    color: #1890ff;
    border: 1px solid rgba(24, 144, 255, 0.2);
}
.price-source-tag.crawler {
    background: rgba(250, 140, 22, 0.1);
    color: #fa8c16;
    border: 1px solid rgba(250, 140, 22, 0.2);
}
.price-date-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    color: #777;
    background: #f5f5f5;
    border: 1px solid #eee;
}

/* ============================================================
   手机端适配 - 增强版
   由 mobile.css 统一管理，此处保留桌面端基础样式
   ============================================================ */

/* 平板端和手机端基础布局 - 由 mobile.css 管理 */

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    /* 可选：未来添加暗色模式 */
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .float-report-btn,
    .hamburger,
    .search-box {
        display: none !important;
    }
    
    .main-content .container {
        grid-template-columns: 1fr;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================================
   骨架屏加载效果
   ============================================================ */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 4px; }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 120px; margin-bottom: 12px; }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   统一加载动画
   ============================================================ */
.loading-spinner { text-align: center; padding: 40px 0; color: #777; font-size: 14px; }
.loading-spinner i { margin-right: 6px; }

/* 地区选择器样式 */
.region-picker-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
.region-picker-content {
    background: white; border-radius: 12px; width: 400px; max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    padding: 20px;
}
.region-picker-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.region-picker-header h3 { margin: 0; font-size: 18px; }
.region-picker-header .close-btn {
    background: none; border: none; font-size: 24px; cursor: pointer; color: #666;
}
.region-select-group {
    margin-bottom: 16px;
}
.region-select-group label {
    display: block; font-size: 13px; color: #666; margin-bottom: 6px;
}
.region-select-group select {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd;
    border-radius: 8px; font-size: 14px; background: white;
}
.region-select-group select:focus {
    border-color: #e63946; outline: none;
}
.region-picker-actions {
    display: flex; justify-content: space-between; margin-top: 20px; gap: 10px;
}
.region-picker-actions .btn-locate {
    flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 8px; background: #fff; cursor: pointer;
}
.region-picker-actions .btn-confirm {
    flex: 2; padding: 10px; border: none; border-radius: 8px; background: #e63946; color: white; cursor: pointer; font-weight: 600;
}
.region-picker-actions .btn-confirm:hover { background: #d62828; }

/* ============================================================
   触摸目标最小高度（手机端）
   ============================================================ */
@media (max-width: 768px) {
    .tab { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ============================================================
   无障碍辅助类
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.sr-only:focus,
.sr-only:active {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}