/* ============================================================
   Honda — Trang Bảng giá (/bang-gia-xe-honda/)
   Enqueue: functions/performance.php khi honda_is_pricing_page()

   Thiết kế lại theo mockup 22/10/2026, áp DESIGN_SYSTEM.md:
     hero navy + panel sáng xiên chứa ảnh xe
     → nền xám nhạt (--color-surface-alt): tiêu đề mục, thanh lọc nhanh (chip + 2 ô chọn),
       sidebar "Lọc theo nhu cầu" (≥1024px) + lưới thẻ xe trắng
     → CTA banner nền ink (khối có nút đỏ dùng --color-surface-ink)
   Chỉ khai báo bố cục + chi tiết riêng của trang; cỡ chữ H1/lead/CTA hero do .vf-hero-* ở components.css.
   Không đổ bóng (DS §4); mọi màu qua token. Mobile-first: chỉ dùng min-width
   (trừ container query ở thẻ xe).
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.vf-price-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, var(--color-brand-deep) 0%, var(--color-brand-deep-soft) 62%, var(--color-brand-deep-mid) 100%);
}
.vf-price-hero__inner {
  position: relative; /* không đặt z-index: ảnh xe cần hoà (multiply) với panel sáng nằm dưới */
  display: grid; gap: var(--space-6);
  padding-top: var(--space-12); padding-bottom: var(--space-12);
}

/* Panel sáng chứa ảnh xe: khối bo tròn trên mobile, dải xiên chạy sát mép phải màn hình trên desktop. */
.vf-price-hero__visual { position: relative; display: grid; place-items: center; padding: var(--space-4); }
.vf-price-hero__visual::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--color-hybrid-soft), var(--color-border-strong));
}
.vf-price-hero__car { position: relative; display: block; width: 100%; max-width: 520px; height: auto; mix-blend-mode: multiply; } /* ảnh nền trắng hoà vào panel sáng */
@media (min-width: 1024px) {
  .vf-price-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    padding-bottom: var(--space-16);
  }
  .vf-price-hero__content { align-self: start; }
  .vf-price-hero__visual { padding: 0; }
  .vf-price-hero__visual::before { display: none; }
  .vf-price-hero__car { max-width: 600px; } /* nằm trọn trong panel: xe trắng mà lọt ra nền navy thì multiply làm tối thân xe */
  .vf-price-hero::before {
    content: '';
    position: absolute; top: 0; bottom: 0; left: 46%; right: 0;
    background: linear-gradient(160deg, var(--color-hybrid-soft), var(--color-border-strong));
    clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* ── Khu vực chọn xe ──────────────────────────────────────── */
.vf-price-main { padding-block: var(--block-py); background: var(--color-surface-alt); }

.vf-price-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); }
.vf-price-head__title {
  margin: 0;
  font-size: var(--font-size-title); font-weight: var(--font-weight-display);
  line-height: var(--leading-tight);
  color: var(--color-text-display);
  text-wrap: balance;
}
.vf-price-head__lead { margin: var(--space-2) 0 0; max-width: 720px; color: var(--color-text-secondary); text-wrap: pretty; }
/* Thanh mobile đã có "Tải bảng giá" (functions/cro.php) nên liên kết này chỉ hiện từ tablet. */
.vf-price-head__download { display: none; flex: none; gap: var(--space-2); }
@media (min-width: 768px) { .vf-price-head__download { display: inline-flex; } }

/* Thanh lọc nhanh: chip kiểu dáng + khoảng giá + sắp xếp. Mobile: chip cuộn ngang, hai ô chọn chia đôi hàng. */
.vf-price-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
.vf-price-bar__group { display: flex; flex-direction: column; gap: var(--space-1); flex: 1 1 calc(50% - var(--space-3)); min-width: 0; }
.vf-price-bar__group--types { flex-basis: 100%; }
.vf-price-bar__label { font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--color-text-primary); white-space: nowrap; }
.vf-price-bar .vf-select { min-height: 40px; padding: var(--space-2) 2rem var(--space-2) var(--space-3); font-size: var(--text-sm); }
.vf-price-chips { display: flex; gap: var(--space-2); padding: 3px; margin: -3px; overflow-x: auto; scrollbar-width: none; }
.vf-price-chips::-webkit-scrollbar { display: none; }
.vf-price-chip {
  position: relative; flex: none;
  display: inline-flex; align-items: center;
  min-height: 40px; padding-inline: var(--space-5);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--color-text-primary);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.vf-price-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.vf-price-chip:hover { border-color: var(--color-brand-primary); }
.vf-price-chip:has(input:checked) { background: var(--color-brand-primary); border-color: var(--color-brand-primary); color: var(--color-text-inverse); }
.vf-price-chip:has(input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 2px; }
@media (min-width: 768px) {
  .vf-price-bar { column-gap: var(--space-8); padding: var(--space-4) var(--space-6); }
  .vf-price-bar__group { flex: 0 0 auto; flex-direction: row; align-items: center; gap: var(--space-3); }
  .vf-price-bar__group--types { flex: 1 1 auto; }
  .vf-price-bar .vf-select-wrap { min-width: 11.5rem; }
  .vf-price-chips { overflow: visible; flex-wrap: wrap; }
}

/* ── Bố cục: sidebar lọc + lưới thẻ ───────────────────────── */
.vf-price-layout { display: grid; gap: var(--space-6); }
.vf-price-aside { display: none; }
@media (min-width: 1024px) {
  .vf-price-layout { grid-template-columns: 16.25rem minmax(0, 1fr); align-items: start; }
  .vf-price-aside {
    display: block;
    position: sticky; top: calc(var(--space-16) + 24px);
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
  }
}
.vf-price-aside__head {
  display: flex; align-items: center; gap: var(--space-3);
  margin: 0 0 var(--space-4);
  font-size: var(--text-base); font-weight: var(--font-semibold); line-height: var(--leading-snug);
  color: var(--color-text-primary);
}
.vf-price-aside__head svg { flex: none; }
.vf-price-aside__group { min-width: 0; margin: 0; padding: var(--space-4) 0 var(--space-4); border: 0; border-top: 1px solid var(--color-border); }
.vf-price-aside__group legend { float: left; width: 100%; margin: 0 0 var(--space-2); padding: 0; font-size: var(--text-base); font-weight: var(--font-semibold); color: var(--color-text-primary); }
.vf-price-aside__group legend + * { clear: both; }
.vf-price-aside__option {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 2.5rem;
  font-size: var(--text-sm); color: var(--color-text-secondary);
  cursor: pointer;
}
.vf-price-aside__option:has(input:checked) { color: var(--color-text-primary); font-weight: var(--font-semibold); }
.vf-price-aside .vf-btn { margin-top: var(--space-2); }

/* ── Lưới thẻ xe ──────────────────────────────────────────── */
.vf-price-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 1280px) { .vf-price-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vf-price-row[hidden] { display: none; } /* dòng bị ẩn bởi bộ lọc */

/* <li> là container, lưới nằm ở phần tử con (container query không tác động lên chính container):
   bố cục đổi theo bề rộng thẻ (không theo viewport) vì cùng một thẻ nằm cả ở 1 cột lẫn 2 cột.
   Hẹp: một cột. ≥24rem: [ảnh + tên | giá] / [thông số | nút] / [giá theo phiên bản]. */
.vf-price-row {
  container: price-row / inline-size;
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: border-color var(--transition-fast);
}
.vf-price-row:hover { border-color: var(--color-brand-primary); }
.vf-price-row__grid {
  --thumb: 6.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "id" "price" "specs" "actions" "promo" "more";
  gap: var(--space-4) var(--space-5);
}

.vf-price-row__id { grid-area: id; display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.vf-price-row__thumb { flex: none; width: var(--thumb); }
.vf-price-row__thumb img { display: block; width: 100%; height: auto; object-fit: contain; }
.vf-price-row__name { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.vf-price-row__title { margin: 0; font-size: var(--text-lg); font-weight: var(--font-semibold); line-height: var(--leading-tight); color: var(--color-text-display); }
.vf-price-row__title a { color: inherit; text-decoration: none; }
.vf-price-row__title a:hover { color: var(--color-brand-primary); }
/* Chip kiểu dáng/trạng thái: chữ thường ≥14px (DS §3), không IN HOA như .vf-badge mặc định. */
.vf-price-row .vf-badge { padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: var(--font-semibold); text-transform: none; letter-spacing: 0; }

.vf-price-row__price-box { grid-area: price; display: flex; flex-direction: column; gap: var(--space-1); }
.vf-price-row__price-label { max-width: 9.5rem; font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--color-text-secondary); }
.vf-price-row__price { font-size: var(--text-lg); font-weight: var(--font-bold); line-height: var(--leading-tight); color: var(--color-brand-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vf-price-row__price small { font-size: var(--text-sm); font-weight: var(--font-normal); color: var(--color-text-secondary); }

.vf-price-row__specs { grid-area: specs; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-4); }
.vf-price-row__specs .vf-spec { display: flex; flex-direction: column; gap: var(--space-0-5); min-width: 0; }
.vf-price-row__specs .vf-spec:last-child:nth-child(odd) { grid-column: 1 / -1; }
.vf-price-row__specs .vf-spec__label { font-size: var(--text-sm); color: var(--color-text-secondary); }
.vf-price-row__specs .vf-spec__value { font-size: var(--text-base); font-weight: var(--font-semibold); color: var(--color-text-primary); }

.vf-price-row__actions { grid-area: actions; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); align-content: center; }
.vf-price-row__actions .vf-btn { width: 100%; padding-inline: var(--space-2); text-align: center; }

.vf-price-row__promo {
  grid-area: promo;
  display: flex; align-items: flex-start; gap: var(--space-2);
  margin: 0; padding: var(--space-2) var(--space-3);
  background: var(--color-brand-light); border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: var(--font-bold); color: var(--color-error-text);
  overflow-wrap: anywhere;
}
.vf-price-row__promo svg { flex: none; margin-top: 2px; }

@container price-row (min-width: 24rem) {
  .vf-price-row__grid {
    grid-template-columns: minmax(0, 1fr) 10.5rem;
    grid-template-areas: "id price" "specs actions" "promo promo" "more more";
  }
  .vf-price-row__price-box { align-self: center; }
  .vf-price-row__specs { grid-template-columns: var(--thumb) minmax(0, 1fr); } /* cột 1 thẳng hàng với ảnh, cột 2 với tên xe */
  .vf-price-row__actions { grid-template-columns: minmax(0, 1fr); padding-left: var(--space-5); border-left: 1px solid var(--color-border); }
}

/* ── Giá theo phiên bản (progressive disclosure: <details> native, không cần JS) ── */
.vf-price-row__more { grid-area: more; min-width: 0; padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.vf-price-row__more > summary {
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 2rem;
  cursor: pointer; list-style: none;
  font-size: var(--text-sm); font-weight: var(--font-semibold);
  color: var(--color-text-primary);
}
.vf-price-row__more > summary::-webkit-details-marker { display: none; }
.vf-price-row__more > summary:hover { color: var(--color-hybrid-strong); }
.vf-price-row__more > summary::after {
  content: '';
  width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--transition-fast);
}
.vf-price-row__more[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.vf-price-row__more > summary:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.vf-price-row__more-body { margin-top: var(--space-4); display: grid; gap: var(--space-4); }
.vf-price-row__note { margin: 0; font-size: var(--text-sm); color: var(--color-text-secondary); }

/* Giá theo màu là dòng phụ dưới giá phiên bản. */
.vf-price-row .vf-pricing-table__highlight { display: block; font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--font-normal); white-space: normal; }
/* Thẻ không đủ rộng cho bảng 4 cột: mỗi phiên bản thành một khối có nhãn thay vì cuộn ngang. */
@container price-row (max-width: 44rem) {
  .vf-price-row .vf-table-wrap { border: 0; overflow: visible; }
  .vf-price-row .vf-pricing-table, .vf-price-row .vf-pricing-table tbody, .vf-price-row .vf-pricing-table tr, .vf-price-row .vf-pricing-table td, .vf-price-row .vf-pricing-table th[scope="row"] { display: block; width: 100%; box-sizing: border-box; }
  .vf-price-row .vf-pricing-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .vf-price-row .vf-pricing-table tr { margin-bottom: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
  .vf-price-row .vf-pricing-table td, .vf-price-row .vf-pricing-table th[scope="row"] { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); padding: var(--space-3) var(--space-4); border-width: 0 0 1px; /* bỏ viền phải đỏ do Astra gán cho td */ text-align: right; white-space: normal; font-size: var(--text-base); }
  .vf-price-row .vf-pricing-table td::before, .vf-price-row .vf-pricing-table th[scope="row"]::before { content: attr(data-label); flex: none; font-family: var(--font-body); color: var(--color-text-secondary); font-size: var(--text-sm); font-weight: var(--font-bold); text-align: left; }
  .vf-price-row .vf-pricing-table td:first-child, .vf-price-row .vf-pricing-table th[scope="row"] { font-weight: var(--font-bold); }
  .vf-price-row .vf-pricing-table .vf-pricing-table__price { font-size: var(--text-base); }
}

.vf-price-note { margin: var(--space-4) 0 0; font-size: var(--text-sm); color: var(--color-text-secondary); }

/* ── Công cụ tiện ích: 4 thẻ, cả thẻ là vùng bấm (liên kết ở h3) ── */
.vf-price-tools { margin-top: var(--space-12); }
.vf-price-tools__grid { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .vf-price-tools__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .vf-price-tools__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.vf-price-tool {
  position: relative; display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  transition: border-color .15s;
}
.vf-price-tool:hover, .vf-price-tool:focus-within { border-color: var(--color-cta-primary); }
.vf-price-tool__icon { color: var(--color-cta-primary); }
.vf-price-tool__title { margin: 0; font-size: var(--text-xl); line-height: 1.3; font-weight: var(--font-semibold); }
.vf-price-tool__title a { color: var(--color-text-display); text-decoration: none; }
.vf-price-tool__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-xl); }
.vf-price-tool__title a:focus-visible { outline: none; }
.vf-price-tool:has(a:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.vf-price-tool__desc { margin: 0; font-size: var(--text-sm); line-height: 1.6; color: var(--color-text-secondary); }
.vf-price-tool__more { margin-top: auto; padding-top: var(--space-2); font-size: var(--text-sm); font-weight: var(--font-bold); color: var(--color-cta-primary); }

/* ── CTA banner (nền ink, dùng .vf-cta-banner--dark ở components.css) ── */
.vf-price-cta { margin-top: var(--space-10); }
.vf-price-cta .vf-cta-banner__inner { flex-direction: column; align-items: flex-start; }
.vf-price-cta__icon { display: none; flex: none; color: var(--color-text-inverse); }
.vf-price-cta .vf-cta-banner__title { font-size: var(--text-2xl); }
.vf-price-cta .vf-cta-banner__features svg { color: var(--color-text-inverse); }
@media (min-width: 1024px) {
  .vf-price-cta { padding-block: var(--block-py); }
  .vf-price-cta .vf-cta-banner__inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-6); }
  .vf-price-cta__icon { display: block; }
  .vf-price-cta .vf-cta-banner__features { padding-left: var(--space-8); border-left: 1px solid color-mix(in srgb, var(--color-text-inverse) 24%, transparent); }
  .vf-price-cta .vf-cta-banner__features li { align-items: center; }
}
