/* =====================================================================
   幻汇公寓 · 设计系统 (Design System)
   现代化蓝青品牌 · 令牌驱动 · 暗色模式 · WCAG AA 无障碍 · 响应式
   版本: 2026-08-04
   ===================================================================== */

/* ----------------------------- 设计令牌 ----------------------------- */
:root {
    /* 品牌色 (现代化蓝青, 提高层次与饱和度控制) */
    --brand-50:  #eff6ff;
    --brand-100: #dbeafe;
    --brand-200: #bfdbfe;
    --brand-300: #93c5fd;
    --brand-400: #60a5fa;
    --brand-500: #2563eb;   /* 主品牌蓝 */
    --brand-600: #1d4ed8;
    --brand-700: #1e40af;

    /* 青色强调 (品牌渐变另一端) */
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;

    /* 品牌渐变 */
    --gradient-brand: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --gradient-brand-soft: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);

    /* 中性色 (slate 系, 比纯灰更高级) */
    --gray-25:  #fcfdfe;
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* 语义色 */
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --error:   #dc2626;
    --error-bg: #fee2e2;
    --info:    #2563eb;

    /* 表面与文本 (浅色主题默认值) */
    --surface:        #ffffff;
    --surface-2:      #f8fafc;
    --surface-3:      #f1f5f9;
    --surface-inverse:#0f172a;
    --border:         #e2e8f0;
    --border-strong:  #cbd5e1;

    --text-primary:   #0f172a;
    --text-secondary: #475569;  /* 与白底对比度 7:1, 远超 AA */
    --text-muted:     #64748b;  /* 仅用于非关键信息 */
    --text-on-brand:  #ffffff;
    --text-inverse:   #f8fafc;

    /* 字体 */
    --font-sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;

    /* 字号比例 */
    --fs-xs:   0.75rem;   /* 12 */
    --fs-sm:   0.875rem;  /* 14 */
    --fs-base: 1rem;      /* 16 */
    --fs-md:   1.125rem;  /* 18 */
    --fs-lg:   1.25rem;   /* 20 */
    --fs-xl:   1.5rem;    /* 24 */
    --fs-2xl:  1.875rem;  /* 30 */
    --fs-3xl:  2.25rem;   /* 36 */
    --fs-4xl:  3rem;      /* 48 */

    /* 间距 (4px 基准) */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --sp-24: 6rem;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* 阴影 (柔和分层, 现代感) */
    --shadow-xs: 0 1px 2px rgba(15,23,42,.05);
    --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow-md: 0 4px 6px -1px rgba(15,23,42,.07), 0 2px 4px -2px rgba(15,23,42,.05);
    --shadow-lg: 0 10px 15px -3px rgba(15,23,42,.08), 0 4px 6px -4px rgba(15,23,42,.05);
    --shadow-xl: 0 20px 25px -5px rgba(15,23,42,.10), 0 8px 10px -6px rgba(15,23,42,.06);
    --ring: 0 0 0 3px rgba(37,99,235,.18);

    /* 过渡 */
    --t-fast: 150ms cubic-bezier(.4,0,.2,1);
    --t-base: 250ms cubic-bezier(.4,0,.2,1);
    --t-slow: 400ms cubic-bezier(.4,0,.2,1);

    /* 布局 */
    --container-max: 1200px;
    --nav-h: 68px;
    --z-nav: 1000;
    --z-modal: 9999;
}

/* 暗色主题 */
[data-theme="dark"] {
    --surface:        #0f172a;
    --surface-2:      #111c33;
    --surface-3:      #1e293b;
    --surface-inverse:#e2e8f0;
    --border:         #1e293b;
    --border-strong:  #334155;

    --text-primary:   #f8fafc;
    --text-secondary: #cbd5e1;  /* 暗底对比度 9:1 */
    --text-muted:     #94a3b8;
    --text-inverse:   #0f172a;

    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --gray-50: #0b1322;
    --gray-100: #111c33;
    --gray-200: #1e293b;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.45);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.5);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.55);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.6);
    --ring: 0 0 0 3px rgba(59,130,246,.35);
}

/* ----------------------------- 基础重置 ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--surface-2);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color var(--t-base), color var(--t-base);
}

/* 让 footer 紧贴底部 */
footer, .footer { margin-top: auto; }

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

/* 无障碍: 清晰的键盘焦点态 */
:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 仅屏幕阅读器可见 */
.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;
}

/* ----------------------------- 布局容器 ----------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--sp-4);
}
@media (min-width: 768px) { .container { padding-inline: var(--sp-6); } }
@media (min-width: 1280px) { .container { padding-inline: var(--sp-8); } }

.section { padding-block: var(--sp-16); }
@media (max-width: 768px) { .section { padding-block: var(--sp-12); } }

.section-head { text-align: center; max-width: 640px; margin-inline: auto; margin-bottom: var(--sp-10); }
.section-title {
    font-size: var(--fs-3xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: var(--sp-3);
}
.section-sub {
    font-size: var(--fs-md);
    color: var(--text-secondary);
}
@media (max-width: 768px) {
    .section-title { font-size: var(--fs-2xl); }
}

/* 区块标题左侧 accent 条 (详情页用) */
.heading-bar {
    display: flex; align-items: center; gap: var(--sp-3);
    font-size: var(--fs-lg); font-weight: 700; color: var(--text-primary);
    margin-bottom: var(--sp-5);
}
.heading-bar::before {
    content: ""; width: 4px; height: 22px; border-radius: var(--radius-full);
    background: var(--gradient-brand);
}

/* ----------------------------- 按钮 ----------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    font-size: var(--fs-base); font-weight: 600; line-height: 1;
    padding: 0 var(--sp-5); height: 44px;            /* 触摸目标 ≥44px */
    border: 1px solid transparent; border-radius: var(--radius-md);
    cursor: pointer; white-space: nowrap; user-select: none;
    transition: background-color var(--t-fast), box-shadow var(--t-fast),
                transform var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--sm { height: 38px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }
.btn--lg { height: 52px; padding: 0 var(--sp-8); font-size: var(--fs-md); }
.btn--block { width: 100%; }

.btn--primary { background: var(--gradient-brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--primary:active:not(:disabled) { transform: translateY(0); }

.btn--secondary {
    background: var(--surface); color: var(--brand-600);
    border-color: var(--brand-500);
}
.btn--secondary:hover:not(:disabled) { background: var(--brand-50); transform: translateY(-2px); }

.btn--ghost { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text-primary); border-color: var(--border-strong); }

.btn--light { background: #fff; color: var(--brand-600); box-shadow: var(--shadow-md); }
.btn--light:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ----------------------------- 卡片 ----------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.card--hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-200);
}

/* ----------------------------- 表单 ----------------------------- */
.field { margin-bottom: var(--sp-4); }
.field__label {
    display: block; font-size: var(--fs-sm); font-weight: 600;
    color: var(--text-secondary); margin-bottom: var(--sp-2);
}
.field__label .req { color: var(--error); margin-left: 2px; }

.input, .select {
    width: 100%; height: 46px;
    padding: 0 var(--sp-4);
    font-size: var(--fs-base); font-family: inherit; color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input::placeholder { color: var(--text-muted); }
.input:focus, .select:focus {
    outline: none; border-color: var(--brand-500); box-shadow: var(--ring);
}
textarea.input { height: auto; padding: var(--sp-3) var(--sp-4); resize: vertical; line-height: 1.6; }

/* 带图标输入框 (弹窗用) */
.input-icon { position: relative; }
.input-icon > i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 15px;
}
.input-icon .input { padding-left: 40px; }

/* ----------------------------- 标签 / 徽章 ----------------------------- */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; font-size: var(--fs-sm); font-weight: 500;
    color: var(--text-secondary); background: var(--surface-3);
    border: 1px solid var(--border); border-radius: var(--radius-full);
    cursor: pointer; transition: all var(--t-fast); user-select: none;
}
.chip:hover { border-color: var(--brand-300); color: var(--brand-600); }
.chip.is-active {
    background: var(--brand-500); color: #fff; border-color: var(--brand-500);
    box-shadow: var(--shadow-sm);
}

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; font-size: var(--fs-xs); font-weight: 600;
    border-radius: var(--radius-sm);
}
.badge--brand { background: rgba(37,99,235,.95); color: #fff; }
.badge--cyan  { background: rgba(6,182,212,.95); color: #fff; }
.badge--soft  { background: var(--brand-50); color: var(--brand-600); }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: #b45309; }

/* 价格徽章 (深色, 浮于图片上) */
.price-flag {
    background: rgba(15,23,42,.82); color: #fff;
    padding: 6px 14px; border-radius: var(--radius-md);
    font-weight: 700; font-size: var(--fs-md);
}
.price-flag small { font-size: var(--fs-xs); font-weight: 500; opacity: .85; }

/* ----------------------------- 导航栏 ----------------------------- */
.navbar {
    position: sticky; top: 0; z-index: var(--z-nav);
    height: var(--nav-h);
    background: var(--surface); /* 回退: 老浏览器不支持 color-mix 时仍不透明 */
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.navbar__logo { display: flex; align-items: center; gap: 10px; font-size: var(--fs-lg); font-weight: 800; color: var(--brand-600); }
.navbar__logo i { font-size: 24px; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; align-items: center; gap: var(--sp-8); }
.nav-links a {
    position: relative; font-size: var(--fs-base); font-weight: 500; color: var(--text-secondary);
    padding: 6px 2px; transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--brand-600); }
.nav-links a.is-active { color: var(--brand-600); }
.nav-links a.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
    border-radius: var(--radius-full); background: var(--gradient-brand);
}

.navbar__actions { display: flex; align-items: center; gap: var(--sp-3); }

/* 主题切换按钮 */
.theme-toggle {
    width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--radius-full);
    background: var(--surface); color: var(--text-secondary); cursor: pointer;
    transition: all var(--t-fast);
}
.theme-toggle:hover { color: var(--brand-600); border-color: var(--brand-300); transform: rotate(15deg); }

/* 汉堡按钮 */
.hamburger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px;
    align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; }
.hamburger span { width: 22px; height: 2.5px; background: var(--text-primary); border-radius: 2px; transition: all var(--t-fast); }
.hamburger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* 移动端抽屉 */
@media (max-width: 860px) {
    .nav-links {
        position: fixed; top: var(--nav-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--surface); border-bottom: 1px solid var(--border);
        padding: var(--sp-4);
        transform: translateY(-12px); opacity: 0; pointer-events: none;
        transition: opacity var(--t-fast), transform var(--t-fast);
        box-shadow: var(--shadow-lg);
    }
    .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .nav-links a { padding: var(--sp-3) var(--sp-2); border-radius: var(--radius-sm); }
    .nav-links a:hover { background: var(--surface-3); }
    .nav-links a.is-active::after { display: none; }
    .hamburger { display: flex; }
}

/* ----------------------------- 页脚 ----------------------------- */
.footer {
    background: var(--surface-inverse);
    color: var(--text-inverse);
    padding-top: var(--sp-16);
    margin-bottom: 0;
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: var(--sp-10); padding-bottom: var(--sp-10); }
.footer__brand .navbar__logo { color: #fff; }
.footer__brand p { color: #94a3b8; font-size: var(--fs-sm); line-height: 1.9; margin-top: var(--sp-3); }
.footer__col h4 { font-size: var(--fs-md); margin-bottom: var(--sp-4); color: #fff; }
.footer__col ul li { margin-bottom: var(--sp-3); }
.footer__col a, .footer__col p { color: #94a3b8; font-size: var(--fs-sm); transition: color var(--t-fast); line-height: 1.8; }
.footer__col a:hover { color: #fff; }

.footer__policies {
    border-top: 1px solid rgba(148,163,184,.18);
    padding-block: var(--sp-4);
}
.footer__policies-inner {
    display: flex; justify-content: center; gap: var(--sp-4); flex-wrap: wrap;
    font-size: var(--fs-sm); color: #94a3b8;
}
.footer__policies a { color: #cbd5e1; transition: color var(--t-fast); }
.footer__policies a:hover { color: #fff; }
.footer__policies span { color: #475569; }

.footer__bottom {
    border-top: 1px solid rgba(148,163,184,.18);
    padding-block: var(--sp-5);
}
.footer__bottom-inner {
    display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; align-items: center;
    color: #64748b; font-size: var(--fs-sm);
}
.footer__bottom a { color: #94a3b8; }
.footer__bottom a:hover { color: #fff; }

@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } }
@media (max-width: 560px) {
    .footer__grid { grid-template-columns: 1fr; }
    .footer__bottom-inner { flex-direction: column; align-items: flex-start; }
}

/* ----------------------------- Hero + 搜索 ----------------------------- */
.hero {
    position: relative; overflow: hidden;
    background: var(--gradient-brand);
    color: #fff; padding-block: var(--sp-20) var(--sp-16);
}
.hero::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.18), transparent 45%);
    pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; }
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--sp-4);
    padding: 6px 14px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius-full); font-size: var(--fs-sm); backdrop-filter: blur(4px);
}
.hero h1 { font-size: var(--fs-4xl); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: var(--sp-4); }
.hero__sub { font-size: var(--fs-md); opacity: .92; margin-bottom: var(--sp-8); max-width: 560px; }

/* 搜索栏 */
.search-bar {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: var(--sp-3);
    background: var(--surface); padding: var(--sp-4); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}
.search-bar .input, .search-bar .select { border-color: var(--border); height: 50px; }
.search-bar .btn { height: 50px; }

@media (max-width: 860px) {
    .hero { padding-block: var(--sp-16) var(--sp-12); }
    .hero h1 { font-size: var(--fs-3xl); }
    .search-bar { grid-template-columns: 1fr; }
}

/* ----------------------------- 统计条 ----------------------------- */
.stats {
    background: var(--surface);
    border-block: 1px solid var(--border);
}
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); padding-block: var(--sp-10); text-align: center; }
.stat__num { font-size: var(--fs-4xl); font-weight: 800; color: var(--brand-600); line-height: 1; letter-spacing: -0.02em; }
.stat__label { margin-top: var(--sp-2); color: var(--text-secondary); font-size: var(--fs-sm); }
[data-theme="dark"] .stat__num { color: var(--brand-400); }
@media (max-width: 640px) { .stats__grid { grid-template-columns: repeat(2,1fr); gap: var(--sp-8) var(--sp-4); } }

/* ----------------------------- 房源卡片 ----------------------------- */
.rental-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-6); }
.rental-card { position: relative; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; }
.rental-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.rental-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.rental-card:hover .rental-card__media img { transform: scale(1.06); }
.rental-card__badge { position: absolute; top: 12px; left: 12px; }
.rental-card__price { position: absolute; bottom: 12px; right: 12px; }
.rental-card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.rental-card__title {
    font-size: var(--fs-md); font-weight: 600; color: var(--text-primary); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em;
}
.rental-card__meta { display: flex; gap: var(--sp-4); color: var(--text-secondary); font-size: var(--fs-sm); }
.rental-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.rental-card__addr { color: var(--text-muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ----------------------------- 特性卡片 ----------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.feature-card { text-align: center; padding: var(--sp-8) var(--sp-5); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.feature-card__icon {
    width: 64px; height: 64px; margin: 0 auto var(--sp-4); border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff;
    background: var(--gradient-brand); box-shadow: var(--shadow-md);
}
.feature-card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); color: var(--text-primary); }
.feature-card p { color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.7; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .feature-grid { grid-template-columns: 1fr; } }

/* ----------------------------- 评价卡片 ----------------------------- */
.testi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.testi-card { padding: var(--sp-6); border-left: 4px solid var(--brand-500); background: var(--surface); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; box-shadow: var(--shadow-sm); }
.testi-card__quote { color: var(--brand-400); font-size: 22px; margin-bottom: var(--sp-3); }
.testi-card__text { color: var(--text-secondary); line-height: 1.8; margin-bottom: var(--sp-4); }
.testi-card__author { display: flex; flex-direction: column; padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.testi-card__author strong { color: var(--text-primary); font-size: var(--fs-base); }
.testi-card__author span { color: var(--text-muted); font-size: var(--fs-sm); }
@media (max-width: 720px) { .testi-grid { grid-template-columns: 1fr; } }

/* ----------------------------- 列表页布局 ----------------------------- */
.page-hero { background: var(--gradient-brand); color: #fff; padding-block: var(--sp-12); }
.page-hero h1 { font-size: var(--fs-3xl); font-weight: 800; margin-bottom: var(--sp-2); }
.page-hero p { opacity: .9; font-size: var(--fs-md); }

.list-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--sp-8); align-items: start; }
.filter-panel {
    position: sticky; top: calc(var(--nav-h) + var(--sp-4));
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: var(--sp-5); box-shadow: var(--shadow-sm);
}
.filter-panel h3 { font-size: var(--fs-md); margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 2px solid var(--brand-500); }
.filter-group { margin-bottom: var(--sp-5); }
.filter-group > label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); margin-bottom: var(--sp-3); }
.filter-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.filter-price { display: flex; align-items: center; gap: var(--sp-2); }
.filter-price .input { height: 42px; padding: 0 var(--sp-3); }

.list-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-6); gap: var(--sp-4); flex-wrap: wrap; }
.list-toolbar h2 { font-size: var(--fs-xl); font-weight: 700; }
.list-count { color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 500; }

@media (max-width: 860px) {
    .list-layout { grid-template-columns: 1fr; }
    .filter-panel { position: static; }
}

/* 分页 */
.pagination { display: flex; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-10); flex-wrap: wrap; }
.pagination button {
    min-width: 42px; height: 42px; padding: 0 var(--sp-3);
    border: 1px solid var(--border-strong); background: var(--surface);
    border-radius: var(--radius-md); cursor: pointer; color: var(--text-secondary);
    font-size: var(--fs-sm); transition: all var(--t-fast);
}
.pagination button:hover:not(:disabled) { border-color: var(--brand-400); color: var(--brand-600); }
.pagination button.is-active { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }

/* 空状态 */
.empty-state { grid-column: 1 / -1; text-align: center; padding: var(--sp-16) var(--sp-4); color: var(--text-muted); }
.empty-state i { font-size: 48px; color: var(--gray-300); margin-bottom: var(--sp-4); }
.empty-state p { font-size: var(--fs-md); }

/* 骨架屏 */
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--radius-md); }
.skeleton::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
    transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.sk-card .sk-media { aspect-ratio: 4/3; }
.sk-card .sk-line { height: 14px; margin: var(--sp-3) var(--sp-4); border-radius: 6px; }
.sk-card .sk-line.short { width: 60%; }

/* ----------------------------- 详情页 ----------------------------- */
.detail-layout { display: grid; grid-template-columns: 1fr 380px; gap: var(--sp-6); align-items: start; }
.gallery { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.gallery__main { aspect-ratio: 16 / 9; max-height: 520px; overflow: hidden; background: var(--surface-3); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: var(--sp-3); padding: var(--sp-3); overflow-x: auto; }
.gallery__thumbs img { width: 110px; height: 74px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; opacity: .55; border: 2px solid transparent; transition: all var(--t-fast); flex-shrink: 0; }
.gallery__thumbs img:hover { opacity: .85; }
.gallery__thumbs img.is-active { opacity: 1; border-color: var(--brand-500); }

.detail-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-6); }
.detail-title { font-size: var(--fs-2xl); font-weight: 800; line-height: 1.25; margin-bottom: var(--sp-3); }
.detail-meta { display: flex; flex-wrap: wrap; gap: var(--sp-5); color: var(--text-secondary); font-size: var(--fs-sm); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); }
.detail-meta span { display: inline-flex; align-items: center; gap: 6px; }

.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); padding: var(--sp-5); background: var(--surface-2); border-radius: var(--radius-md); margin-bottom: var(--sp-6); }
.info-item { text-align: center; }
.info-item .label { color: var(--text-muted); font-size: var(--fs-xs); margin-bottom: var(--sp-1); }
.info-item .value { color: var(--text-primary); font-size: var(--fs-md); font-weight: 700; }

.desc-text { color: var(--text-secondary); line-height: 1.9; font-size: var(--fs-base); white-space: pre-wrap; margin-bottom: var(--sp-6); }

.facilities { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-6); }
.facility { display: inline-flex; align-items: center; gap: 8px; padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: var(--fs-sm); }
.facility i { color: var(--brand-500); }

.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.related-card { cursor: pointer; }
.related-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-md); }
.related-card .t { font-size: var(--fs-sm); margin-top: var(--sp-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card .p { color: var(--error); font-weight: 700; font-size: var(--fs-md); margin-top: 4px; }

/* 预订卡 */
.booking-card { position: sticky; top: calc(var(--nav-h) + var(--sp-4)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-6); box-shadow: var(--shadow-md); }
.booking-price { color: var(--error); font-size: var(--fs-3xl); font-weight: 800; line-height: 1; }
.booking-price small { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 500; }
.booking-sub { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--sp-2); }
.booking-divider { height: 1px; background: var(--border); margin: var(--sp-4) 0; }
.booking-row { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-secondary); margin-bottom: var(--sp-2); }
.booking-total { padding: var(--sp-3) var(--sp-4); background: var(--warning-bg); border: 1px solid #ffe7ba; border-radius: var(--radius-md); color: #b45309; font-weight: 700; font-size: var(--fs-md); margin: var(--sp-4) 0; text-align: center; }

@media (max-width: 980px) { .detail-layout { grid-template-columns: 1fr; } .booking-card { position: static; } }
@media (max-width: 640px) {
    .info-grid, .facilities, .related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----------------------------- 弹窗 (预订) ----------------------------- */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: var(--z-modal);
    background: rgba(15,23,42,.55); backdrop-filter: blur(2px);
    align-items: center; justify-content: center; padding: var(--sp-4);
}
.modal-overlay.is-open { display: flex; animation: fadeIn var(--t-fast); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto;
    background: var(--surface); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl); animation: slideUp var(--t-base);
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal__head { background: var(--gradient-brand); color: #fff; padding: var(--sp-5); border-radius: var(--radius-xl) var(--radius-xl) 0 0; display: flex; justify-content: space-between; align-items: center; }
.modal__head h3 { font-size: var(--fs-md); display: flex; align-items: center; gap: var(--sp-2); }
.modal__close { width: 32px; height: 32px; border: 0; border-radius: var(--radius-full); background: rgba(255,255,255,.2); color: #fff; cursor: pointer; font-size: 18px; transition: background var(--t-fast); }
.modal__close:hover { background: rgba(255,255,255,.35); }
.modal__body { padding: var(--sp-5); }
.modal__title-box { padding: var(--sp-3) var(--sp-4); background: var(--surface-2); border-left: 3px solid var(--brand-500); border-radius: var(--radius-sm); color: var(--text-primary); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.modal__error { display: none; background: var(--error-bg); color: var(--error); border: 1px solid #fca5a5; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }

.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.pay-opt { display: flex; align-items: center; justify-content: center; gap: 8px; padding: var(--sp-3); border: 2px solid var(--border-strong); border-radius: var(--radius-md); cursor: pointer; transition: all var(--t-fast); font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); }
.pay-opt:hover { border-color: var(--brand-400); }
.pay-opt.is-active { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-600); }
.pay-opt input { display: none; }
.pay-opt i { font-size: 20px; }
.pay-opt .fa-alipay { color: #1677ff; }
.pay-opt .fa-weixin { color: #07c160; }

.modal__summary { background: var(--brand-50); border: 1px solid var(--brand-200); padding: var(--sp-4); border-radius: var(--radius-md); margin-top: var(--sp-4); }
.modal__summary .row { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-secondary); padding: 4px 0; }
.modal__summary .row.total { border-top: 1px dashed var(--brand-300); margin-top: var(--sp-2); padding-top: var(--sp-3); font-size: var(--fs-md); font-weight: 800; color: var(--error); }
.modal__actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.modal__actions .btn { flex: 1; }
.modal__loading { display: none; text-align: center; padding: var(--sp-8) var(--sp-4); }
.modal__loading i { font-size: 32px; color: var(--brand-500); margin-bottom: var(--sp-3); }
.modal__loading p { color: var(--text-secondary); font-size: var(--fs-sm); }

/* ----------------------------- 滚动出现动画 ----------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow), transform var(--t-slow); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ----------------------------- 二级页面通用 ----------------------------- */
.page-header {
    position: relative; overflow: hidden;
    background: var(--gradient-brand); color: #fff;
    padding-block: var(--sp-16) var(--sp-10);
    text-align: center;
}
.page-header::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,.14), transparent 45%);
    pointer-events: none;
}
.page-header__inner { position: relative; z-index: 1; }
.page-header h1 { font-size: var(--fs-3xl); font-weight: 800; margin-bottom: var(--sp-3); }
.page-header p { font-size: var(--fs-md); opacity: .92; }

.content-section { padding-block: var(--sp-16); }
@media (max-width: 768px) { .content-section { padding-block: var(--sp-12); } }

/* 营业执照/信息公示卡片 */
.license-card {
    display: grid; grid-template-columns: 1fr 1.25fr; gap: var(--sp-8);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
    padding: var(--sp-8); align-items: start;
}
.license-card h3 {
    font-size: var(--fs-xl); margin-bottom: var(--sp-5); padding-bottom: var(--sp-3);
    border-bottom: 2px solid var(--brand-500); display: inline-flex; align-items: center; gap: var(--sp-2);
}
.license-row {
    display: flex; padding: var(--sp-3) 0; border-bottom: 1px dashed var(--border);
    font-size: var(--fs-sm); line-height: 1.6;
}
.license-row:last-child { border-bottom: none; }
.license-row .label { width: 130px; color: var(--text-muted); flex-shrink: 0; }
.license-row .value { flex: 1; color: var(--text-primary); font-weight: 500; }
.license-row .value strong { color: var(--brand-600); font-family: var(--font-mono); }
.license-img {
    border: 2px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-2);
    background: var(--surface); cursor: pointer; transition: all var(--t-fast);
}
.license-img:hover { transform: scale(1.01); box-shadow: var(--shadow-md); }
.license-img img { width: 100%; height: auto; border-radius: var(--radius-sm); }
.license-img p { text-align: center; color: var(--text-muted); font-size: var(--fs-xs); margin-top: var(--sp-2); }
.license-verify {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    margin-top: var(--sp-4); padding: var(--sp-2) var(--sp-4);
    background: var(--gradient-brand); color: #fff; border-radius: var(--radius-md);
    font-size: var(--fs-sm); text-decoration: none;
}
.license-verify:hover { opacity: .92; }

/* 图片放大弹窗 */
.img-modal {
    display: none; position: fixed; inset: 0; z-index: var(--z-modal);
    background: rgba(15,23,42,.88); backdrop-filter: blur(2px);
    align-items: center; justify-content: center; cursor: zoom-out;
}
.img-modal.show { display: flex; }
.img-modal img { max-width: 90%; max-height: 90%; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); }

@media (max-width: 900px) {
    .license-card { grid-template-columns: 1fr; }
    .page-header h1 { font-size: var(--fs-2xl); }
}

/* 成交案例卡片 */
.case-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: var(--sp-6); box-shadow: var(--shadow-sm); transition: all var(--t-base);
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }
.case-card h3 { font-size: var(--fs-lg); color: var(--brand-600); margin-bottom: var(--sp-2); }
.case-card__meta { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.case-card p { color: var(--text-secondary); line-height: 1.8; }
.case-card__amount {
    margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--border);
    color: var(--text-muted); font-size: var(--fs-sm);
}

/* 联系我们 */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: start; }
.contact-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: var(--sp-6); box-shadow: var(--shadow-sm); height: 100%;
}
.contact-card h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-5); }
.contact-item { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-4); color: var(--text-secondary); }
.contact-item i { color: var(--brand-500); font-size: 18px; margin-top: 3px; }
.contact-item strong { display: block; color: var(--text-primary); margin-bottom: 2px; }

@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

/* 订单详情 */
.order-card {
    max-width: 680px; margin-inline: auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: var(--sp-8);
}
.order-status {
    text-align: center; padding: var(--sp-6); margin-bottom: var(--sp-6);
    border-radius: var(--radius-lg); border: 1px solid transparent;
}
.order-status.paid { background: var(--success-bg); color: var(--success); border-color: #86efac; }
.order-status.pending { background: var(--warning-bg); color: #b45309; border-color: #fde68a; }
.order-status i { font-size: 56px; display: block; margin-bottom: var(--sp-3); }
.order-status h2 { font-size: var(--fs-xl); margin-bottom: var(--sp-1); }
.order-status p { font-size: var(--fs-sm); opacity: .9; }
.order-row {
    display: flex; justify-content: space-between; gap: var(--sp-4);
    padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm);
}
.order-row:last-child { border-bottom: none; }
.order-row .label { color: var(--text-muted); }
.order-row .value { color: var(--text-primary); font-weight: 500; text-align: right; }
.order-row .value.amount { color: var(--error); font-size: var(--fs-lg); font-weight: 800; }
.order-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); flex-wrap: wrap; }
.order-actions .btn { flex: 1; min-width: 120px; }

/* 政策/协议文档 */
.doc-content {
    max-width: 800px; margin-inline: auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: var(--sp-8) var(--sp-10);
    box-shadow: var(--shadow-sm);
}
.doc-content h2 {
    font-size: var(--fs-xl); color: var(--text-primary);
    margin: var(--sp-6) 0 var(--sp-3); padding-left: var(--sp-3);
    border-left: 4px solid var(--brand-500);
}
.doc-content h2:first-child { margin-top: 0; }
.doc-content p { color: var(--text-secondary); line-height: 1.9; margin-bottom: var(--sp-3); }
.doc-content a { color: var(--brand-600); text-decoration: underline; text-underline-offset: 3px; }
.doc-content a:hover { color: var(--brand-500); }
.doc-content ul { list-style: disc; padding-left: var(--sp-6); color: var(--text-secondary); margin-bottom: var(--sp-3); }
.doc-content li { margin-bottom: var(--sp-2); line-height: 1.8; }
.doc-content .effective-date { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.doc-content .clause-title { font-weight: 600; color: var(--text-primary); }

.legal-note {
    display: flex; align-items: flex-start; gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5); border-radius: var(--radius-md);
    font-size: var(--fs-sm); line-height: 1.8; margin: var(--sp-5) 0;
}
.legal-note.info { background: var(--warning-bg); color: #b45309; border: 1px solid #fde68a; }
.legal-note.success { background: var(--success-bg); color: var(--success); border: 1px solid #86efac; }
.legal-note i { margin-top: 3px; flex-shrink: 0; }

.legal-meta { color: var(--text-muted); font-size: var(--fs-sm); text-align: center; margin-top: var(--sp-8); }

.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); margin: var(--sp-4) 0 var(--sp-5); }
.step-card {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--sp-5) var(--sp-4); text-align: center;
}
.step-num {
    width: 36px; height: 36px; line-height: 36px; border-radius: 50%;
    background: var(--gradient-brand); color: #fff; font-weight: 700;
    margin: 0 auto var(--sp-3);
}
.step-card h4 { font-size: var(--fs-base); color: var(--text-primary); margin-bottom: var(--sp-2); }
.step-card p { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }

@media (max-width: 768px) {
    .doc-content { padding: var(--sp-5); }
    .step-grid { grid-template-columns: repeat(2, 1fr); }
}
