/* ==========================================================================
   Motoricks Price v2.0 - public UI
   (admin pages keep using style.css)
   ========================================================================== */
:root {
  --brand: #DC143C;          /* crimson - primary (client palette) */
  --brand-600: #c01034;
  --brand-700: #9e0d2b;
  --brand-50: #fff1f3;
  --brand-100: #ffe0e6;
  --indigo: #483D8B;         /* dark slate blue - secondary (client palette) */
  --indigo-50: #f0eefb;
  --teal: #3E6363;           /* footer (client palette) */

  --ink: #14161f;
  --ink-2: #3d4254;
  --ink-3: #6a7085;
  --line: #e5e6ec;
  --line-2: #eff0f4;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ok: #0f9d74;
  --warn: #b86e00;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font);
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --sh-1: 0 1px 2px rgba(20, 22, 31, .05), 0 1px 3px rgba(20, 22, 31, .04);
  --sh-2: 0 4px 24px -6px rgba(20, 22, 31, .12);
  --sh-3: 0 18px 50px -12px rgba(20, 22, 31, .22);
  --ring: 0 0 0 4px rgba(220, 20, 60, .16);
  --header-h: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--ink); letter-spacing: -.01em; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
button { font: inherit; }
:focus-visible { outline: 3px solid rgba(220, 20, 60, .45); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: .82rem; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 2000; }
.skip-link:focus { left: 8px; color: #fff; }
.container { max-width: 1200px; }

/* ---------------- header ---------------- */
.site-header { position: sticky; top: 0; z-index: 1020; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -14px rgba(20, 22, 31, .3); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); flex-shrink: 0; }
.brand-logo img { height: 40px; width: auto; display: block; }
.brand-fallback { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; display: inline-flex; gap: 6px; align-items: center; }
.brand-fallback i { color: var(--brand); }
.brand-tag { font-family: var(--font-display); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--brand); padding: 3px 8px; border-radius: 999px; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; transition: background .15s, color .15s; }
@media (min-width: 992px) and (max-width: 1199.98px) {
  .header-inner { gap: 12px; }
  .main-nav { margin-left: 0; }
  .main-nav a { padding: 8px 10px; font-size: .84rem; gap: 5px; }
  .main-nav a i:not(.small-ext) { display: none; }
}
.main-nav a i { font-size: 1rem; opacity: .8; }
.main-nav a .small-ext { font-size: .7rem; }
.main-nav a:hover { background: var(--line-2); color: var(--ink); }
.main-nav a.active { background: var(--brand-50); color: var(--brand-700); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.city-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .88rem; padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: border-color .15s, box-shadow .15s; max-width: 220px; }
.city-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-pill i:first-child { color: var(--brand); }
.city-pill:hover { border-color: var(--brand); box-shadow: var(--ring); }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--ink); cursor: pointer; }
@media (max-width: 991.98px) {
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 10px 16px 18px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--sh-3); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
  .main-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .main-nav a { padding: 13px 14px; border-radius: 12px; font-size: 1rem; }
}
@media (max-width: 575.98px) {
  :root { --header-h: 60px; }
  .brand-logo img { height: 32px; }
  .city-pill { padding: 7px 11px; font-size: .82rem; max-width: 150px; }
  .city-pill .bi-chevron-down { display: none; }
}

/* ---------------- buttons ---------------- */
.btn-primary-x { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s; box-shadow: 0 6px 18px -8px rgba(220, 20, 60, .6); white-space: nowrap; }
.btn-primary-x:hover { background: var(--brand-600); color: #fff; }
.btn-primary-x:active { transform: translateY(1px); }
.btn-ghost-x { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.btn-ghost-x:hover { border-color: var(--ink-3); color: var(--ink); background: var(--line-2); }
.btn-link-x { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--brand-600); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-600); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(220, 20, 60, .3); text-underline-offset: 3px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 14px; font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--ink-3); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- hero ---------------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 56px; background:
  radial-gradient(900px 400px at 85% -10%, rgba(72, 61, 139, .14), transparent 60%),
  radial-gradient(700px 380px at 0% 0%, rgba(220, 20, 60, .12), transparent 60%),
  linear-gradient(180deg, #fff 0%, var(--bg) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 600; color: var(--ink-2); box-shadow: var(--sh-1); }
.eyebrow i { color: var(--brand); }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; margin: 18px 0 14px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.lead-x { font-size: 1.08rem; color: var(--ink-2); max-width: 560px; margin-bottom: 26px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; font-size: .86rem; color: var(--ink-2); font-weight: 500; }
.hero-trust i { color: var(--ok); margin-right: 4px; }
.hero-card { background: var(--surface); border-radius: var(--r-xl); padding: 26px; box-shadow: var(--sh-3); border: 1px solid var(--line); transform: rotate(1.2deg); }
.hc-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; color: var(--ink-2); }
.hc-row b { color: var(--ink); font-weight: 600; }
.hc-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding: 16px 18px; border-radius: var(--r); background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff; font-weight: 600; }
.hc-total b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }
@media (max-width: 991.98px) { .hero { padding: 40px 0 36px; } .hero-grid { grid-template-columns: 1fr; } }

/* search */
.car-search { position: relative; max-width: 580px; }
.car-search > i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 1.15rem; pointer-events: none; }
.car-search input { width: 100%; height: 62px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); padding: 0 56px 0 52px; font-size: 1.05rem; color: var(--ink); box-shadow: var(--sh-2); transition: border-color .15s, box-shadow .15s; }
.car-search input:focus { outline: none; border-color: var(--brand); box-shadow: var(--sh-2), var(--ring); }
.car-search kbd { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); background: var(--line-2); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; font-size: .75rem; padding: 2px 8px; box-shadow: none; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-3); padding: 6px; z-index: 50; max-height: 420px; overflow: auto; }
.sr-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: var(--ink); }
.sr-item:hover, .sr-item.is-active { background: var(--brand-50); }
.sr-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.sr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-txt b { font-weight: 600; }
.sr-txt small { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-kind { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.sr-empty { padding: 16px; color: var(--ink-3); font-size: .9rem; }

/* ---------------- sections ---------------- */
.section { padding-top: 36px; padding-bottom: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 1.35rem; font-weight: 800; margin: 0; }

.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.brand-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; cursor: pointer; text-align: left; transition: transform .15s, box-shadow .15s, border-color .15s; }
.brand-tile:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: transparent; }
.brand-logo-emoji { font-size: 1.8rem; line-height: 1; margin-bottom: 10px; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--line-2); }
.brand-tile-name { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.brand-tile-sub { font-size: .8rem; color: var(--ink-3); }

.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.model-card { display: flex; align-items: center; gap: 14px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; cursor: pointer; text-align: left; transition: transform .15s, box-shadow .15s, border-color .15s; color: var(--ink); }
.model-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: transparent; }
.model-card:hover .mc-go { color: var(--brand); transform: translateX(3px); }
.mc-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-50); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; }
.mc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mc-brand { font-size: .74rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.mc-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.mc-price { font-weight: 600; font-size: .9rem; color: var(--ink); }
.mc-price small { display: block; color: var(--ink-3); font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.mc-meta { font-size: .78rem; color: var(--ink-3); }
.mc-go { color: var(--ink-3); transition: transform .15s, color .15s; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.how { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.how span { display: inline-flex; width: 32px; height: 32px; border-radius: 10px; align-items: center; justify-content: center; background: var(--indigo-50); color: var(--indigo); font-weight: 800; font-family: var(--font-display); }
.how h3 { font-size: 1.02rem; font-weight: 700; margin: 12px 0 4px; }
.how p { margin: 0; font-size: .9rem; color: var(--ink-3); }
@media (max-width: 767.98px) { .how-grid { grid-template-columns: 1fr; } }

/* ---------------- crumbs & pick ---------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .86rem; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); font-weight: 500; }
.crumbs a:hover { color: var(--brand); }
.crumbs i { font-size: .65rem; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.pick-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.pick-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin: 0 0 4px; letter-spacing: -.02em; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.variant-list { display: flex; flex-direction: column; gap: 8px; }
.variant-row { display: grid; grid-template-columns: 1fr 130px 150px 20px; align-items: center; gap: 16px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; cursor: pointer; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.variant-row:hover { border-color: var(--brand); box-shadow: var(--ring); }
.vr-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vr-name { font-weight: 700; font-size: 1rem; }
.vr-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vr-engine { font-size: .8rem; color: var(--ink-3); }
.vr-price { display: flex; flex-direction: column; text-align: right; }
.vr-price small { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.vr-price b { font-weight: 700; }
.vr-onroad b { color: var(--brand-700); font-size: 1.05rem; }
.vr-go { color: var(--ink-3); }
@media (max-width: 575.98px) {
  .variant-row { grid-template-columns: 1fr 1fr; row-gap: 10px; }
  .vr-info { grid-column: 1 / -1; }
  .vr-price { text-align: left; }
  .vr-go { display: none; }
}

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.tag-ghost { background: transparent; border: 1px solid var(--line); }
.fuel-petrol { background: #fff4e0; color: #9a5b00; }
.fuel-diesel { background: #e9ecf5; color: #36405e; }
.fuel-electric { background: #e3f7ef; color: #0b7a5a; }
.fuel-hybrid { background: #eaf6e4; color: #3b7a1a; }
.fuel-cng { background: #e6f3fa; color: #0d6687; }

/* ---------------- result ---------------- */
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.result-side { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.result-main { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 991.98px) { .result-grid { grid-template-columns: 1fr; } .result-side { position: static; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-1); }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 12px; }
.panel-head h2 { font-size: 1.05rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }
.panel-head h2 i { color: var(--brand); }

.price-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); }
.price-hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--indigo)); }
.ph-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: 26px 26px 20px; }
.ph-brand { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.ph-car h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; margin: 2px 0 14px; letter-spacing: -.025em; }
.ph-car h1 span { font-weight: 600; color: var(--ink-3); font-size: .6em; letter-spacing: 0; }
.ph-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.field-x { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; background: var(--surface); min-width: 0; margin: 0; cursor: pointer; transition: border-color .15s, box-shadow .15s; text-align: left; position: relative; }
.field-x:hover, .field-x:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.field-x > span { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.field-x select { border: 0; padding: 0 22px 0 0; font-weight: 600; font-size: .95rem; color: var(--ink); background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236a7085' d='M1.6 5.2 8 11.6l6.4-6.4-1.1-1.1L8 9.4 2.7 4.1z'/%3E%3C/svg%3E") no-repeat right center; appearance: none; -webkit-appearance: none; max-width: 340px; cursor: pointer; }
.field-x select:focus { outline: none; }
.field-city { flex-direction: column; padding-right: 36px; }
.field-city b { font-weight: 600; font-size: .95rem; color: var(--ink); }
.field-city b i { color: var(--brand); }
.field-city > i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.ph-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-price { text-align: right; align-self: center; }
.ph-price small { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.ph-amount { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.05; letter-spacing: -.03em; color: var(--brand); font-variant-numeric: tabular-nums; }
.ph-exact { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ph-emi { margin-top: 8px; font-size: .86rem; color: var(--ink-3); }
.ph-emi b { color: var(--ink); }
.ph-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: #fafafb; }
.ph-stat { padding: 14px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.ph-stat:first-child { border-left: 0; }
.ph-stat small { font-size: .74rem; color: var(--ink-3); font-weight: 600; }
.ph-stat b { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 767.98px) {
  .ph-top { grid-template-columns: 1fr; padding: 20px; }
  .ph-price { text-align: left; order: -1; }
  .ph-stats { grid-template-columns: repeat(2, 1fr); }
  .ph-stat:nth-child(3) { border-left: 0; }
  .ph-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .field-x, .field-x select { width: 100%; max-width: none; }
  .ph-controls { flex-direction: column; }
}

/* breakdown */
.bd { display: flex; flex-direction: column; }
.bd-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.bd-label { display: flex; flex-direction: column; align-items: flex-start; font-weight: 600; color: var(--ink); }
.bd-title { display: block; }
.bd-label small { font-weight: 400; color: var(--ink-3); font-size: .8rem; margin-top: 2px; max-width: 460px; }
.bd-label .pct { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--indigo); background: var(--indigo-50); padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.bd-label .pct.is-ev { color: #0b7a5a; background: #e3f7ef; }
.bd-val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.bd-details > summary { list-style: none; cursor: pointer; }
.bd-details > summary::-webkit-details-marker { display: none; }
.bd-details .bi-chevron-down { font-size: .7rem; color: var(--ink-3); transition: transform .2s; margin-left: 4px; }
.bd-details[open] .bi-chevron-down { transform: rotate(180deg); }
.bd-details > summary .bd-label { display: block; }
.bd-details > summary .bd-label small { display: block; }
.bd-sub { display: flex; justify-content: space-between; padding: 8px 0 8px 14px; font-size: .88rem; color: var(--ink-2); border-left: 2px solid var(--line); margin-left: 2px; font-variant-numeric: tabular-nums; }
.bd-details[open] { padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.bd-details[open] > summary { border-bottom: 0; }
.money-input { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fafafb; transition: border-color .15s, box-shadow .15s; }
.money-input:focus-within { border-color: var(--brand); box-shadow: var(--ring); background: #fff; }
.money-input span { color: var(--ink-3); font-weight: 600; }
.money-input input { width: 110px; border: 0; background: transparent; padding: 8px 0 8px 4px; font-weight: 700; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.money-input input::-webkit-outer-spin-button, .money-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.money-input input:focus { outline: none; }
.plus-log { font-size: .78rem; font-weight: 500; color: var(--ink-3); }
.bd-toggle { display: flex; align-items: center; gap: 12px; padding: 16px 0 6px; cursor: pointer; font-weight: 600; margin: 0; }
.bd-toggle small { display: block; font-weight: 400; color: var(--ink-3); font-size: .8rem; }
.bd-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: #d4d6de; position: relative; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.bd-toggle input:checked + .switch { background: var(--brand); }
.bd-toggle input:checked + .switch::after { transform: translateX(18px); }
.bd-toggle input:focus-visible + .switch { box-shadow: var(--ring); }
.bd-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 18px 20px; border-radius: var(--r); background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff; font-weight: 600; }
.bd-total b { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) {
  .bd-row { align-items: flex-start; }
  .money-input input { width: 88px; }
}

/* accessories */
.acc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.acc-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s; margin: 0; }
.acc-item:hover { border-color: var(--ink-3); }
.acc-item:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.acc-item input { accent-color: var(--brand); width: 18px; height: 18px; }
.acc-name { flex: 1; font-weight: 600; font-size: .9rem; }
.acc-price { font-weight: 700; font-size: .88rem; color: var(--ink-2); }

/* chart */
.chart-box { position: relative; height: 200px; }
.legend { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 6px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-2); }
.legend li i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend li span { flex: 1; }
.legend li b { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

/* emi */
.emi-out { background: var(--indigo-50); border-radius: var(--r); padding: 14px 16px; margin-bottom: 16px; }
.emi-out small { display: block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--indigo); }
.emi-out b { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.emi-out span { font-size: .8rem; color: var(--ink-2); }
.field-label { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field-label b { color: var(--ink); font-variant-numeric: tabular-nums; }
.range-x { margin-bottom: 14px; }
input[type=range] { width: 100%; accent-color: var(--brand); height: 22px; cursor: pointer; }
.tenure-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tenure-chips .chip { padding: 6px 11px; font-size: .8rem; }

.actions-panel { display: flex; flex-direction: column; gap: 10px; }
.actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions-row > :only-child { grid-column: 1 / -1; }
.disclaimer { font-size: .8rem; color: var(--ink-3); margin: 22px 0 0; max-width: 820px; }

.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: .92rem; }
.note i { font-size: 1.1rem; margin-top: 1px; }
.note-info { background: var(--indigo-50); color: #2d2566; border: 1px solid #dcd8f5; }
.note-info i { color: var(--indigo); }
.empty-note { color: var(--ink-3); padding: 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }

/* sticky mobile bar */
.sticky-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1010; display: none; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink); color: #fff; padding: 10px 10px 10px 18px; border-radius: 18px; box-shadow: var(--sh-3); }
.sticky-bar small { display: block; font-size: .74rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58vw; }
.sticky-bar b { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
@media (max-width: 991.98px) {
  .sticky-bar:not([hidden]) { display: flex; }
  body[data-view=result] .site-footer { padding-bottom: 90px; }
}

/* ---------------- modals ---------------- */
.sheet { border: 0; border-radius: var(--r-xl); box-shadow: var(--sh-3); }
.sheet .modal-header { border: 0; padding: 22px 24px 8px; align-items: flex-start; }
.sheet .modal-title { font-weight: 800; font-size: 1.25rem; }
.modal-sub { margin: 2px 0 0; font-size: .86rem; color: var(--ink-3); }
.sheet .modal-body { padding: 8px 24px 24px; }
.search-field { position: relative; }
.search-field i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search-field input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 14px; padding: 0 16px 0 44px; font-size: 1rem; background: #fafafb; }
.search-field input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); background: #fff; }
.city-group { margin-bottom: 18px; }
.city-group-title { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: 8px; }
.city-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.city-chip { display: flex; align-items: center; text-align: left; font-weight: 600; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 14px; cursor: pointer; transition: border-color .15s, background .15s; color: var(--ink); }
.city-chip:hover { border-color: var(--brand); }
.city-chip.is-active { border-color: var(--brand); background: var(--brand-50); }
@media (max-width: 575.98px) {
  #cityModal .modal-dialog { margin: 0; max-width: none; min-height: 100%; align-items: flex-end; }
  #cityModal .sheet { border-radius: 24px 24px 0 0; max-height: 88vh; }
  .city-chips { grid-template-columns: 1fr 1fr; }
}
.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fafafb; font-size: .88rem; color: var(--ink-2); }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px 8px; font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--ink); }
.share-btn i { font-size: 1.4rem; }
.share-btn.wa i { color: #1fa855; }
.share-btn.tg i { color: #229ed9; }
.share-btn:hover { border-color: var(--ink-3); }

.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000; pointer-events: none; }
.toast-x { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; box-shadow: var(--sh-3); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.toast-x.show { opacity: 1; transform: none; }
body[data-view=result] .toast-wrap { bottom: 96px; }

/* ---------------- forms (compare / emi pages) ---------------- */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; margin: 0 0 6px; }
.page-head p { color: var(--ink-2); margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 991.98px) { .form-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575.98px) { .form-grid { grid-template-columns: 1fr; } }
.lbl { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.input-x, .select-x { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: .95rem; background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.select-x { appearance: none; -webkit-appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236a7085' d='M1.6 5.2 8 11.6l6.4-6.4-1.1-1.1L8 9.4 2.7 4.1z'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.input-x:focus, .select-x:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.check-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; margin: 0; }
.check-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.check-card input { accent-color: var(--brand); width: 18px; height: 18px; flex-shrink: 0; }
.check-card span { flex: 1; font-weight: 600; font-size: .9rem; }
.check-card small { color: var(--ink-3); font-weight: 600; }

.table-x { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.table-x th, .table-x td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; }
.table-x th:first-child, .table-x td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.table-x thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; vertical-align: bottom; }
.table-x thead th b { display: block; text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--ink); white-space: normal; min-width: 140px; }
.table-x tbody td:first-child { font-weight: 600; color: var(--ink-2); }
.table-x tr.total td { font-weight: 800; color: var(--brand-700); font-size: 1.05rem; border-bottom: 0; background: var(--brand-50); }
.table-x tr.total td:first-child { background: var(--brand-50); }
.table-x .best { color: var(--ok); }
.table-scroll { overflow-x: auto; }

/* ---------------- footer ---------------- */
.site-footer { background: #1d2a2a; background: linear-gradient(180deg, var(--teal), #2c4848); color: #cfdcdc; margin-top: 40px; padding-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 36px; }
.footer-about p { font-size: .9rem; margin: 14px 0 16px; max-width: 360px; }
.brand-logo--light img { filter: brightness(0) invert(1); }
.brand-logo--light .brand-fallback { color: #fff; }
.site-footer h6 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 14px; font-family: var(--font); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: .9rem; }
.site-footer a { color: #e6efef; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .1); display: inline-flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--brand); text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 18px 0 22px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .8rem; color: #aebfbf; }
@media (max-width: 767.98px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------------- motion & print ---------------- */
.view:not([hidden]) { animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

@media print {
  .site-header, .site-footer, .sticky-bar, .actions-panel, #emiPanel, .crumbs, .toast-wrap, .ph-emi, .bd-toggle, .field-city > i, .modal { display: none !important; }
  body { background: #fff; }
  .result-grid { grid-template-columns: 1fr; }
  .panel, .price-hero { box-shadow: none; break-inside: avoid; }
  .bd-details { display: block; }
  .bd-details > .bd-sub { display: flex; }
  .money-input { border: 0; background: none; padding: 0; }
  .field-x select { background: none; }
  .bd-total { background: #fff !important; color: var(--ink); border: 2px solid var(--ink); }
}

/* Motobo Finder entry point (module in /motobo/; styles kept here so the header stays one file) */
.motobo-btn { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; border: 1px solid var(--line); background: linear-gradient(135deg, #fff, #fff7ef); color: var(--ink); font-weight: 700; font-size: .86rem; white-space: nowrap; transition: border-color .15s, box-shadow .15s, transform .15s; }
.motobo-btn img { width: 30px; height: 30px; object-fit: contain; display: block; }
.motobo-btn:hover { color: var(--ink); border-color: #F57C00; box-shadow: 0 0 0 4px rgba(245,124,0,.15); transform: translateY(-1px); }
.motobo-btn:hover img { animation: motobo-wave .5s ease; }
@keyframes motobo-wave { 0%,100% { transform: rotate(0) } 30% { transform: rotate(-9deg) } 65% { transform: rotate(7deg) } }
@media (max-width: 991.98px) { .motobo-btn span { display: none; } .motobo-btn { padding: 5px; } }
