/* ==================== 基础样式 ==================== */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
    font-size: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.hidden {
    display: none !important;
}

/* 需要登录/管理员 才可见的导航项 —— 同步 body class 控制，无闪烁 */
.login-required,
.admin-only { display: none; }

body.logged-in .login-required { display: inline; }
body.is-admin   .admin-only     { display: inline; }

/* 移动端菜单 —— flex column 下用 block */
.mobile-nav-links .login-required,
.mobile-nav-links .admin-only { display: none; }
body.logged-in .mobile-nav-links .login-required,
body.is-admin   .mobile-nav-links .admin-only { display: block; }

/* ==================== 导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.logo svg {
    color: var(--primary);
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.logo-icon {
    height: 1.25em;
    width: auto;
    flex-shrink: 0;
    display: block;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 0;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    padding: 8px;
    color: var(--text-primary);
    transition: transform 0.3s ease;
    cursor: pointer;
    background: none;
    border: none;
}

.mobile-menu-btn.active {
    transform: rotate(90deg);
}

.mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s;
    z-index: 99;
}

.mobile-menu.show {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-links .nav-link {
    font-size: 18px;
    padding: 12px 0;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .logo-text {
        font-size: 19px;
        gap: 6px;
    }
}

/* ==================== Hero 区域 ==================== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #c7d2fe 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-search {
    margin-bottom: 48px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.search-box svg {
    margin-left: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 12px;
    font-size: 16px;
    background: transparent;
}

.search-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .hero {
        padding: 120px 0 60px;
    }
    .hero h1 {
        font-size: 32px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .hero-stats {
        gap: 32px;
    }
    .stat-number {
        font-size: 28px;
    }
    .hero-search .search-box {
        padding: 6px;
        gap: 0;
    }
    .hero-search .search-box svg {
        margin-left: 12px;
    }
    .hero-search .search-box input {
        padding: 12px 8px;
        font-size: 14px;
    }
    .hero-search .search-btn {
        padding: 12px 16px;
        font-size: 14px;
        margin-right: 0;
    }
}

/* ==================== 通用区块 ==================== */
.section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.section-header.center {
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.view-more {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 500;
    transition: gap 0.2s;
}

.view-more:hover {
    gap: 12px;
}

@media (max-width: 768px) {
    .section {
        padding: 48px 0;
    }
    .section-header h2 {
        font-size: 24px;
    }
}

/* ==================== 厂房卡片 ==================== */
.factory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.factory-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.factory-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-secondary);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, filter 0.5s ease;
    opacity: 0;
    filter: blur(10px);
}

.card-image img.loaded {
    opacity: 1;
    filter: blur(0);
}

.card-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 14px;
}

.factory-card:hover .card-image img {
    transform: scale(1.05);
}

.card-price {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.card-images-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.meta-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.meta-location svg {
    color: var(--primary);
}

.meta-area {
    padding: 2px 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-contact {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
}

.card-contact svg {
    color: var(--primary);
}

@media (max-width: 768px) {
    .factory-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 功能特点 ==================== */
.features {
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: var(--radius);
    color: white;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 地区分类 ==================== */
.regions {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.regions-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.region-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.region-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.region-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.region-count {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .regions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .regions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== 页面标题 ==================== */
.page-header {
    position: relative;
    padding: 140px 0 60px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    text-align: center;
}

.page-header h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ==================== 筛选区域 ==================== */
.filter-section {
    padding: 16px 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 第一行：搜索框 + 全部按钮 + 地区切换按钮 */
.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-bar .search-box {
    flex: 1;
    min-width: 0;
    max-width: 400px;
    box-shadow: var(--shadow-sm);
    margin: 0;
}

.quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.region-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    white-space: nowrap;
}

.region-toggle-btn:hover {
    background: var(--primary-light);
    color: #fff;
    border-color: var(--primary-light);
}

.region-toggle-btn.open {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.region-toggle-btn .toggle-arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 12px;
}

.region-toggle-btn.open .toggle-arrow {
    transform: rotate(180deg);
}

/* 当前筛选标签（折叠时显示） */
.filter-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 16px;
    border: 1px solid #c7d2fe;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-active-tag .tag-close {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.filter-active-tag .tag-close:hover {
    opacity: 1;
}

/* 折叠的地区面板 */
.region-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.region-panel.open {
    max-height: 500px;
    overflow-y: auto;
    padding-top: 12px;
}

.filter-chip {
    padding: 8px 16px;
    background: #fff;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.filter-chip:hover {
    background: var(--primary-light);
    color: #fff;
    border-color: var(--primary-light);
}

.filter-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 关键修复：选中后悬停不冲突 */
.filter-chip.active:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== 地区二级选择器 ===== */
.city-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.district-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    min-height: 0;
}

.district-filters:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
}

.city-chip {
    font-size: 14px;
    padding: 8px 16px;
}

.district-chip {
    font-size: 13px;
    padding: 6px 14px;
}

@media (max-width: 768px) {
    .filter-row {
        flex-wrap: wrap;
    }
    .filter-bar .search-box {
        display: none;
    }
    .city-chip {
        font-size: 13px;
        padding: 6px 12px;
    }
    .district-chip {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* ==================== 列表页 ==================== */
.factory-list-section {
    min-height: 60vh;
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.result-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.sort-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 8px;
    color: var(--text-muted);
}

/* ==================== 加载和空状态 ==================== */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner.large {
    padding: 80px 0;
}

.loading-spinner p {
    margin-top: 16px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state,
.error-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state svg,
.error-state svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state p,
.error-state p {
    font-size: 16px;
    margin-bottom: 16px;
}

.retry-btn {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.retry-btn:hover {
    background: var(--primary-dark);
}

/* ==================== 详情页 ==================== */
.detail-main {
    padding-top: 96px;
    min-height: 100vh;
}

.detail-container {
    padding: 40px 0 80px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--primary);
}

.back-btn.white {
    color: rgba(255, 255, 255, 0.8);
}

.back-btn.white:hover {
    color: white;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 48px;
}

/* 图片展示 */
.detail-gallery {
    position: sticky;
    top: 96px;
    align-self: start;
}

.main-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    aspect-ratio: 4/3;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-list {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: var(--primary);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 详情信息 */
.detail-info {
    padding-top: 8px;
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.detail-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.meta-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

.meta-tag svg {
    color: var(--primary);
}

/* 价格卡片 */
.price-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.price-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.price-value {
    font-size: 36px;
    font-weight: 700;
    color: #92400e;
}

.price-unit {
    font-size: 14px;
    color: #92400e;
}

.price-details {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(146, 64, 14, 0.2);
}

.price-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-item span:first-child {
    font-size: 12px;
    color: #92400e;
    opacity: 0.8;
}

.price-item span:last-child {
    font-size: 16px;
    font-weight: 600;
    color: #92400e;
}

/* 联系卡片 */
.contact-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
}

.contact-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.contact-value {
    font-weight: 500;
}

.no-contact {
    color: var(--text-muted);
    font-size: 14px;
}

.contact-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--primary);
    color: white;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.contact-btn:hover {
    background: var(--primary-dark);
}

/* 发布者卡片 */
.publisher-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.publisher-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: white;
    border-radius: 50%;
}

.publisher-info {
    display: flex;
    flex-direction: column;
}

.publisher-label {
    font-size: 12px;
    color: var(--text-muted);
}

.publisher-name {
    font-weight: 500;
}

/* 描述区域 */
.detail-description {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.detail-description h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.description-content {
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* 额外信息 */
.detail-extra {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.detail-extra h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.extra-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.extra-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.extra-label {
    font-size: 12px;
    color: var(--text-muted);
}

.extra-value {
    font-weight: 500;
}

@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .detail-gallery {
        position: static;
    }
    .extra-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .detail-title {
        font-size: 22px;
    }
    .price-value {
        font-size: 28px;
    }
    .extra-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 合集页 ==================== */
.collection-header {
    position: relative;
    padding: 160px 0 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    overflow: hidden;
}

.header-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.collection-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.collection-header h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
}

.collection-desc {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}

.collection-meta {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.collection-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.creator-avatar {
    width: 28px; height: 28px;
    border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.2); flex-shrink: 0;
}
.creator-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}

.collection-content {
    padding-top: 48px;
}

.share-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.share-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.share-info svg {
    color: var(--primary);
}

.share-info strong {
    display: block;
    margin-bottom: 4px;
}

.share-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.share-btn:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .collection-header {
        padding: 120px 0 60px;
    }
    .collection-header h1 {
        font-size: 28px;
    }
    .collection-meta {
        flex-direction: column;
        gap: 12px;
    }
    .share-card {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .share-info {
        flex-direction: column;
    }
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--bg-dark);
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s;
    z-index: 200;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast svg {
    color: var(--secondary);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 64px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 0;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 0;
    font-size: 14px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
}

/* ==================== 关于页面 ==================== */
.about-section {
    padding-top: 48px;
}

.about-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.about-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.about-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: white;
}

.about-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.about-tagline {
    font-size: 16px;
    color: var(--text-secondary);
}

.about-intro {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* 优势 */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.advantage-item {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.advantage-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.advantage-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 50%;
    color: var(--primary);
}

.advantage-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.advantage-item p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 联系我们 */
.contact-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.contact-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.contact-item-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    transition: transform 0.2s;
}

.contact-item-card:hover {
    transform: translateX(4px);
}

.contact-item-card .contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-info .contact-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contact-info .contact-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

@media (max-width: 1024px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .about-card {
        padding: 24px;
    }
    .about-header {
        flex-direction: column;
        text-align: center;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    .contact-section {
        padding: 24px;
    }
    .contact-cards {
        grid-template-columns: 1fr;
    }
    .contact-item-card {
        padding: 16px;
    }
}
