/* Hanvia 列表页改版：多维筛选 + 卡片 + AJAX。品牌色回退 #1a365d / #c0392b */
:root { --hv-p: var(--hv-primary, #1a365d); --hv-r: #c0392b; }

/* 布局 */
.hv-archive-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; margin: 18px 0 40px; }
.hv-archive-main { min-width: 0; }

/* 顶部结果条 */
.hv-archive-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.hv-result-count { font-weight: 700; color: var(--hv-p); }
.hv-sort { display: flex; align-items: center; gap: 8px; margin: 0; }
.hv-sort label { font-size: 13px; color: #64748b; }
.hv-sort select { padding: 7px 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }

/* 已选筛选 chip */
.hv-active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.hv-active-chips:empty { display: none; }
.hv-achip { border: 1px solid #cdd7e5; background: #eef2f7; color: #1a365d; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.hv-achip:hover { background: #e2e8f0; }
.hv-achip--clear { background: #fff; color: var(--hv-r); border-color: #f0c8c3; }

/* 筛选侧栏 */
.hv-filters { border: 1px solid #e6e9ef; border-radius: 12px; padding: 16px; background: #fff; position: sticky; top: 16px; }
.hv-filters__head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.hv-filters__title { margin: 0; font-size: 17px; }
.hv-filters__clear { background: none; border: 0; color: var(--hv-r); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.hv-fgroup { padding: 12px 0; border-top: 1px solid #eef2f7; }
.hv-fgroup:first-of-type { border-top: 0; padding-top: 0; }
.hv-fgroup__label, summary.hv-fgroup__label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin: 0 0 8px; cursor: default; }
summary.hv-fgroup__label { cursor: pointer; list-style: none; }
summary.hv-fgroup__label::-webkit-details-marker { display: none; }
summary.hv-fgroup__label::after { content: "▾"; float: right; color: #94a3b8; }
details[open] > summary.hv-fgroup__label::after { content: "▴"; }
.hv-fchk { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; cursor: pointer; }
.hv-fchk input { accent-color: var(--hv-p); }
.hv-fscroll { max-height: 180px; overflow: auto; padding-right: 4px; }
.hv-frange { display: flex; align-items: center; gap: 6px; }
.hv-frange input { width: 100%; padding: 7px 8px; border: 1px solid #e2e8f0; border-radius: 7px; font-size: 13px; }
.hv-frange span { color: #94a3b8; }
.hv-filters input[type=search] { width: 100%; padding: 9px 10px; border: 1px solid #e2e8f0; border-radius: 8px; }
.hv-filters__apply { width: 100%; margin-top: 14px; }

/* 卡片网格 */
.hv-vehicle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hv-card { border: 1px solid #e6e9ef; border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s; }
.hv-card:hover { box-shadow: 0 8px 22px rgba(16, 32, 64, .12); transform: translateY(-2px); }
.hv-card__link { display: block; text-decoration: none; color: inherit; }
.hv-card__thumb { position: relative; aspect-ratio: 4/3; background: #eef2f7; overflow: hidden; }
.hv-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hv-card__tags { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; z-index: 2; }
.hv-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 5px; color: #fff; }
.hv-tag--new { background: #0a7d34; }
.hv-tag--used { background: #8a5a00; }
.hv-tag--ev { background: #0a63c2; }
.hv-card__sold { position: absolute; top: 12px; left: -30px; transform: rotate(-45deg); z-index: 3; background: var(--hv-r); color: #fff; font-weight: 700; letter-spacing: 1px; font-size: 12px; padding: 4px 36px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.hv-card__thumb:has(.hv-card__sold) img { filter: grayscale(.55); }
.hv-card__body { padding: 12px 14px 14px; }
.hv-card__title { font-size: 15px; font-weight: 600; margin: 0 0 8px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hv-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.hv-card__chips span { font-size: 12px; color: #475569; background: #f1f5f9; padding: 3px 8px; border-radius: 5px; }
.hv-card__price { color: var(--hv-r); font-weight: 800; font-size: 18px; }

/* 分页 */
.hv-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; }
.hv-page { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #1a365d; text-decoration: none; font-weight: 600; cursor: pointer; }
.hv-page:hover { background: #eef2f7; }
.hv-page.is-current { background: var(--hv-p); color: #fff; border-color: var(--hv-p); }

/* 无结果 */
.hv-no-results { text-align: center; padding: 48px 20px; color: #64748b; }

/* 移动端抽屉 */
.hv-filter-toggle { display: none; }
.hv-drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 998; }

@media (max-width: 1024px) { .hv-vehicle-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
	.hv-archive-layout { grid-template-columns: 1fr; }
	.hv-filter-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 10px 16px; border: 1px solid var(--hv-p); background: #fff; color: var(--hv-p); border-radius: 8px; font-weight: 700; cursor: pointer; }
	.hv-filters { position: fixed; top: 0; left: 0; bottom: 0; width: 84%; max-width: 340px; z-index: 999; border-radius: 0; overflow: auto; transform: translateX(-100%); transition: transform .25s ease; }
	body.hv-drawer-open .hv-filters { transform: translateX(0); }
	body:not(.hv-drawer-open) .hv-drawer-backdrop { display: none; }
}
@media (max-width: 560px) { .hv-vehicle-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .hv-card__title { font-size: 14px; } .hv-card__price { font-size: 16px; } }

/* ===== P2：Hero / 信任 / 品牌墙 / FAQ ===== */
.hv-sec-title { font-size: 22px; color: var(--hv-p); margin: 0 0 20px; text-align: center; }
.hv-hero { background: linear-gradient(110deg, rgba(13,33,56,.94) 0%, rgba(13,33,56,.80) 48%, rgba(26,54,93,.55) 100%), url('../assets/img/hero.jpg') center/cover no-repeat; color: #fff; border-radius: 14px; padding: 54px 44px; margin: 18px 0 8px; box-shadow: 0 10px 30px rgba(13,33,56,.18); }
.hv-hero__in { max-width: 640px; }
.hv-hero__title { margin: 0 0 10px; font-size: clamp(22px, 3vw, 34px); line-height: 1.2; color: #fff; }
.hv-hero__sub { margin: 0; font-size: 15px; line-height: 1.6; opacity: .92; }

.hv-why { margin: 48px 0; }
.hv-why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hv-why__item { border: 1px solid #e6e9ef; border-radius: 12px; padding: 22px 18px; background: #fff; text-align: center; }
.hv-why__ico { font-size: 30px; display: block; margin: 0 0 10px; }
.hv-why__item h3 { font-size: 16px; margin: 0 0 8px; color: var(--hv-p); }
.hv-why__item p { font-size: 13.5px; line-height: 1.6; color: #475569; margin: 0; }

.hv-brands { margin: 48px 0; }
.hv-brands__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.hv-brand { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 64px; padding: 10px; border: 1px solid #e6e9ef; border-radius: 10px; background: #fff; color: #1a365d; text-decoration: none; font-weight: 700; font-size: 14px; transition: box-shadow .15s, border-color .15s; }
.hv-brand:hover { box-shadow: 0 4px 12px rgba(16, 32, 64, .1); border-color: var(--hv-p); }

.hv-faq { margin: 48px 0 8px; max-width: 820px; margin-left: auto; margin-right: auto; }
.hv-faq__item { border: 1px solid #e6e9ef; border-radius: 10px; margin: 0 0 10px; background: #fff; overflow: hidden; }
.hv-faq__item summary { padding: 15px 18px; font-weight: 600; cursor: pointer; list-style: none; color: var(--hv-p); }
.hv-faq__item summary::-webkit-details-marker { display: none; }
.hv-faq__item summary::after { content: "+"; float: right; font-size: 20px; color: #94a3b8; line-height: 1; }
.hv-faq__item[open] summary::after { content: "–"; }
.hv-faq__a { padding: 0 18px 16px; font-size: 14px; line-height: 1.65; color: #475569; }

@media (max-width: 900px) { .hv-why__grid { grid-template-columns: repeat(2, 1fr); } .hv-brands__grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .hv-why__grid { grid-template-columns: 1fr; } .hv-brands__grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== RTL（阿拉伯语）镜像 ===== */
[dir="rtl"] .hv-fchk { flex-direction: row-reverse; justify-content: flex-end; }
[dir="rtl"] .hv-frange { flex-direction: row-reverse; }
[dir="rtl"] summary.hv-fgroup__label::after { float: left; }
[dir="rtl"] .hv-card__tags { right: auto; left: 10px; }
[dir="rtl"] .hv-card__sold { left: auto; right: -30px; transform: rotate(45deg); }
[dir="rtl"] .hv-faq__item summary::after { float: left; }
[dir="rtl"] .hv-hero__in { text-align: right; }
[dir="rtl"] .hv-filters { text-align: right; }
@media (max-width: 900px) {
	[dir="rtl"] .hv-filters { left: auto; right: 0; transform: translateX(100%); }
	body.hv-drawer-open[dir="rtl"] .hv-filters, [dir="rtl"] body.hv-drawer-open .hv-filters { transform: translateX(0); }
}
