/* BYD dealer site — follows "BYD AUTO Website Specification Standards" (overseas BYD websites):
   one font (Montserrat), headings SemiBold 600, square corners, dark #252728 header (38px utility bar + 64px
   navigation) and footer, outline buttons 48px high, square 48px text fields, 12/8/4-column grid
   (margins 40/24/16px, gutters 24/16/16px). Brand red #D70C19 is used for the logo accents only. */

@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* Standard colours */
  --red: #d70c19;          /* brand red (logo, small accents) */
  --gray: #686d71;         /* brand gray */
  /* Primary colours */
  --p1: #4e5356;
  --p2: #7a8080;
  --p3: #d4d8db;
  --p4: #efefef;
  /* Text & lines */
  --ink: #252728;          /* Background Dark / primary text */
  --ink-2: #4e5356;
  --muted: #6f6d6f;        /* secondary text, icons on light background */
  --line: #d4d8db;
  --field-line: #bfbfc1;
  --icon-disabled: #c7ccce;
  /* Backgrounds */
  --bg: #ffffff;
  --bg-soft: #efefef;      /* Background Grey */
  --bg-soft-2: #e7e7e7;    /* Background Grey Dark */
  --card: #ffffff;
  --dark: #252728;         /* Background Dark */
  /* Action states */
  --ok: #28811f;
  --warn: #ce5a3e;
  --err: #bb0a0a;
  --err-bg: #faecea;
  --ok-bg: #f1fbf0;
  --warn-bg: #fcf5eb;
  --info-bg: #eaf1fb;
  --focus: #1566d8;
  /* Shape — the standard uses square corners everywhere */
  --radius: 0;
  --radius-sm: 0;
  --shadow: none;
  /* Grid: 12 columns, margin 40 / gutter 24 (desktop); 8 columns 24/16 (tablet); 4 columns 16/16 (mobile) */
  --gutter: 40px;
  --gap: 24px;
  --max: 1840px;
  --header-h: 96px;        /* floating 64px bar + 16px above and below */
}
@media (max-width: 1279px) { :root { --gutter: 24px; --gap: 16px; } }
@media (max-width: 767px) { :root { --gutter: 16px; --gap: 16px; --header-h: 72px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;          /* Text 1 */
  line-height: 24px;
  font-weight: 400;
}

/* ---------- Temporary public holding page ---------- */
.under-development {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--ink) 0%, #3b4144 100%);
}
.under-development-card {
  width: min(100%, 440px);
  padding: 40px;
  background: var(--card);
  border-top: 4px solid var(--red);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
}
.under-development-logo { display: block; width: 112px; margin-bottom: 40px; color: var(--ink); }
.under-development-kicker { margin-bottom: 12px; color: var(--red); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.under-development h1 { font-size: 32px; line-height: 42px; }
.under-development-copy { margin-top: 12px; color: var(--ink-2); }
.under-development-form { display: grid; gap: 16px; margin-top: 32px; }
.under-development-field { display: grid; gap: 8px; font-size: 14px; font-weight: 600; line-height: 22px; }
.under-development-field input {
  height: 48px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 0;
  background: var(--bg-soft);
  color: var(--muted);
  font: 400 16px/24px "Montserrat", sans-serif;
}
.under-development-field input:disabled { opacity: 1; cursor: not-allowed; }
.under-development-error { margin-top: 20px; padding: 12px 14px; border-left: 3px solid var(--err); background: var(--err-bg); color: var(--err); font-size: 14px; line-height: 22px; }
.under-development-note { margin-top: 24px; color: var(--muted); font-size: 12px; line-height: 18px; }
@media (max-width: 767px) {
  .under-development { padding: 16px; }
  .under-development-card { padding: 28px 24px; }
  .under-development-logo { margin-bottom: 28px; }
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Typography scale (Heading 1–8 SemiBold 600; Text 1–3 Regular 400) */
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: 0; }
h1 { font-size: 56px; line-height: 77px; }
h2 { font-size: 40px; line-height: 52px; }
h3 { font-size: 24px; line-height: 32px; }
h4 { font-size: 20px; line-height: 28px; }
h5 { font-size: 16px; line-height: 24px; }
h6 { font-size: 14px; line-height: 22px; }
@media (max-width: 1279px) { h1 { font-size: 48px; line-height: 60px; } h2 { font-size: 32px; line-height: 42px; } }
@media (max-width: 767px) { h1 { font-size: 32px; line-height: 42px; } h2 { font-size: 26px; line-height: 34px; } h3 { font-size: 20px; line-height: 28px; } }
small, .text-3 { font-size: 12px; line-height: 15px; }
.text-2 { font-size: 14px; line-height: 22px; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Icons (line icons, 16 / 24 px) ---------- */
.icon-16 { width: 16px; height: 16px; flex-shrink: 0; }
.icon-24 { width: 24px; height: 24px; flex-shrink: 0; }

/* ---------- Buttons ----------
   Primary Button - Light (light background): 1px #252728 outline, dark label; hover/focus = filled dark.
   Primary Button - Dark (dark background / photos): 1px white outline, white label; hover/focus = filled white.
   Secondary Button - Light: text + arrow, underline on hover.  Size: height 48, padding 0 24, min width 64. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; min-width: 64px; padding: 0 24px; border-radius: 0;
  font: 600 16px/24px "Montserrat", sans-serif; text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn:focus-visible { outline: none; background: var(--ink); color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { border-color: var(--p3); color: var(--p3); background: transparent; cursor: default; }
/* Legacy names, all mapped to the standard: */
.btn-dark, .btn-red, .btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-dark:hover, .btn-red:hover, .btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light, .btn-outline-light, .btn-on-dark { border-color: #fff; color: #fff; background: transparent; }
.btn-light:hover, .btn-outline-light:hover, .btn-on-dark:hover,
.btn-light:focus-visible, .btn-outline-light:focus-visible, .btn-on-dark:focus-visible { background: #fff; color: var(--ink); box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px #fff; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; line-height: 22px; }
.btn { max-width: 100%; }
@media (max-width: 767px) { .btn { white-space: normal; text-align: center; padding-top: 8px; padding-bottom: 8px; } }
.btn-block { width: 100%; }
.btn-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 0 2px; border: 0; background: none; cursor: pointer;
  font: 400 16px/24px "Montserrat", sans-serif; color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent;
}
.btn-link::after { content: "→"; }
.btn-link:hover { border-bottom-color: currentColor; }

/* ---------- Header: floating bar across the full width (layout of byd.com/bg), navigation per the BYD spec:
   64px, Montserrat 16/24, inactive links 80% white, active SemiBold + underline, Background Dark #252728 ---------- */
.site-header { position: fixed; inset: 16px var(--gutter) auto; z-index: 50; color: #fff; }
.header-bar {
  height: 64px; display: flex; align-items: center; gap: 40px; padding: 0 12px 0 28px;
  background: rgba(37, 39, 40, .94); border: 1px solid rgba(255,255,255,.12); border-radius: 32px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: background .25s, border-color .25s;
}
/* Over the home hero the bar is see-through until the page scrolls. */
.site-header.is-overlay:not(.is-scrolled):not(.nav-open) .header-bar { background: rgba(37, 39, 40, .32); border-color: rgba(255,255,255,.22); }
.brand { display: inline-flex; align-items: center; color: #fff; text-decoration: none; flex-shrink: 0; }
.brand svg { width: 104px; height: auto; }
.brand-dealer { margin-left: 16px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.3); font-size: 12px; line-height: 15px; font-weight: 400; color: rgba(255,255,255,.8); }
.main-nav { display: flex; gap: 32px; height: 100%; }
.main-nav a {
  display: inline-flex; align-items: center; height: 100%; text-decoration: none;
  font-size: 16px; line-height: 24px; font-weight: 400; color: rgba(255,255,255,.8);
  border-bottom: 2px solid transparent; padding-top: 2px;
}
.main-nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.8); }
.main-nav a[aria-current="page"] { color: #fff; font-weight: 600; border-bottom-color: #fff; }
.main-nav a.mobile-only { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-action { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; text-decoration: none; }
.icon-action svg { width: 22px; height: 22px; }
.icon-action:hover { background: rgba(255,255,255,.12); }
.mybyd-action {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px 0 14px; margin-left: 4px;
  border-radius: 20px; background: #fff; color: var(--ink); text-decoration: none;
  font-size: 14px; line-height: 22px; font-weight: 600; white-space: nowrap;
}
.mybyd-action svg { width: 20px; height: 20px; }
.mybyd-action:hover { background: rgba(255,255,255,.88); }
.mybyd-action[aria-current="page"] { box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.pill-action {
  display: inline-flex; align-items: center; height: 40px; padding: 0 22px; border: 1px solid rgba(255,255,255,.8);
  border-radius: 20px; color: #fff; text-decoration: none; font-size: 14px; line-height: 22px; font-weight: 600; white-space: nowrap;
}
.pill-action:hover { background: #fff; color: var(--ink); }
.nav-toggle { display: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: #fff; }
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: currentColor; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1439px) {
  .header-bar { gap: 28px; }
  .main-nav { gap: 24px; }
}
/* Tablets and phones: logo, Моят BYD and the menu button; the menu opens as a panel under the bar. */
@media (max-width: 1279px) {
  .nav-toggle { display: block; }
  .desktop-only { display: none !important; }
  .main-nav {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; height: auto; flex-direction: column; gap: 0;
    padding: 8px 24px 16px; background: var(--dark); border-radius: 24px; border: 1px solid rgba(255,255,255,.12);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .18s, transform .18s;
  }
  .nav-open .main-nav { opacity: 1; transform: none; pointer-events: auto; }
  .main-nav a { height: 48px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .main-nav a:last-child { border-bottom: 0; }
  .main-nav a[aria-current="page"] { border-bottom-color: rgba(255,255,255,.1); }
  .main-nav a.mobile-only { display: flex; }
}
@media (max-width: 767px) {
  .site-header { inset: 8px 8px auto; }
  .header-bar { height: 56px; padding: 0 6px 0 18px; border-radius: 28px; gap: 12px; }
  .brand svg { width: 88px; }
  .brand-dealer { display: none; }
  .mybyd-action { padding: 0 14px 0 12px; }
}
@media (max-width: 339px) { .mybyd-action span { display: none; } .mybyd-action { padding: 0 10px; } }

/* ---------- Home hero: full bleed; title 56/77 SemiBold, subtitle 24/32 Regular, outline buttons 200x48 ---------- */
.hero { position: relative; height: calc(100svh - var(--header-h)); min-height: 560px; max-height: 1080px; color: #fff; overflow: hidden; background: var(--dark); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; display: flex; flex-direction: column; align-items: center; }
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide img, .hero-slide video, .page-hero.has-image video,
.hero-slide picture img, .page-hero.has-image picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide picture, .page-hero.has-image picture { position: absolute; inset: 0; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 65%, rgba(0,0,0,.45) 100%); }
.hero-copy { position: relative; z-index: 2; margin-top: 130px; text-align: center; padding: 0 var(--gutter); }
.hero-copy h1, .hero-copy h2 { font-size: 56px; line-height: 77px; font-weight: 600; }
.hero-copy p { margin-top: 0; font-size: 24px; line-height: 32px; font-weight: 400; }
.hero-buttons { position: absolute; z-index: 2; left: 0; right: 0; bottom: 64px; display: flex; gap: 66px; justify-content: center; padding: 0 var(--gutter); }
.hero-buttons .btn { width: 200px; }
.hero-arrow {
  position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -24px; border: 1px solid #fff; border-radius: 0;
  background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center;
}
.hero-arrow:hover { background: #fff; color: var(--ink); }
.hero-arrow.prev { left: var(--gutter); }
.hero-arrow.next { right: var(--gutter); }
.hero-dots { position: absolute; z-index: 3; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots button { width: 24px; height: 2px; padding: 0; border: 0; border-radius: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.hero-dots button.is-active { background: #fff; }
@media (max-width: 1023px) { .hero-buttons { gap: 24px; } }
@media (max-width: 767px) {
  .hero-arrow { display: none; }
  .hero-copy { margin-top: 64px; }
  .hero-copy h1, .hero-copy h2 { font-size: 32px; line-height: 42px; }
  .hero-copy p { font-size: 16px; line-height: 24px; }
  .hero-buttons { flex-direction: column; align-items: center; gap: 8px; bottom: 48px; }
  .hero-buttons .btn { width: min(100%, 240px); }
}

/* Page hero (inner pages) */
.page-hero { position: relative; padding: 56px 0; background: var(--bg-soft); }
.page-hero.has-image { color: #fff; min-height: 62vh; display: flex; align-items: flex-end; background: var(--dark); }
.page-hero.has-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.05) 40%, rgba(0,0,0,.6)); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: 48px; line-height: 60px; }
@media (max-width: 767px) { .page-hero h1 { font-size: 32px; line-height: 42px; } }
/* News / promotion article: the banner image as it is (it carries its own text), no overlay. */
.post-banner { background: var(--dark); }
.post-banner img { display: block; width: 100%; max-height: 72vh; object-fit: contain; margin: 0 auto; }
.page-hero .lead { margin-top: 12px; font-size: 16px; line-height: 24px; max-width: 60ch; color: inherit; }
.eyebrow { display: inline-block; margin-bottom: 8px; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--muted); }
.page-hero.has-image .eyebrow { color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
@media (max-width: 767px) { .section { padding: 56px 0; } }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: 40px; line-height: 52px; }
@media (max-width: 767px) { .section-head h2 { font-size: 26px; line-height: 34px; } }
.section-head p { color: var(--muted); margin-top: 8px; max-width: 60ch; }

/* Tabs: square segmented control */
.tabs { display: inline-flex; gap: 0; padding: 0; background: transparent; border: 1px solid var(--ink); }
.tabs a, .tabs button {
  border: 0; background: transparent; min-height: 40px; padding: 0 20px; border-radius: 0; font: 400 14px/22px "Montserrat", sans-serif;
  color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center;
}
.tabs .is-active { background: var(--ink); color: #fff; font-weight: 600; }

/* ---------- Model cards ---------- */
.model-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.model-rail > * { scroll-snap-align: start; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--gap); }
.model-card { display: flex; flex-direction: column; background: var(--card); border-radius: 0; overflow: hidden; }
.model-card .text { padding: 24px 24px 0; }
.model-card .tagline { font-size: 14px; line-height: 22px; color: var(--muted); }
.model-card h3 { font-size: 24px; line-height: 32px; margin-top: 4px; }
.model-card .media { aspect-ratio: 16/10; margin: 16px 0 0; overflow: hidden; background: var(--bg-soft); }
.model-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.model-card:hover .media img { transform: scale(1.03); }
.model-card .chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.model-card .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px; margin-top: auto; }
/* The home rail starts at a narrower card width than the full models grid.
   Keep both CTAs inside their cells instead of letting the long Bulgarian label overflow. */
.model-rail .model-card .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 16px; }
.model-rail .model-card .actions .btn { min-width: 0; padding-inline: 8px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 0; background: var(--bg-soft); font-size: 12px; line-height: 15px; font-weight: 600; color: var(--ink-2); }
.chip-ev { background: var(--info-bg); color: #1566d8; }
.chip-phev { background: var(--ok-bg); color: var(--ok); }
.price { font-weight: 600; font-size: 16px; margin-top: 12px; }
.price small { font-weight: 400; color: var(--muted); }

/* ---------- Technology ---------- */
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.tech-card { position: relative; border-radius: 0; overflow: hidden; min-height: 380px; color: #fff; display: flex; align-items: flex-end; background: var(--dark); }
.tech-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.tech-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.8)); }
.tech-card .body { position: relative; z-index: 1; padding: 24px; }
.tech-card h3 { font-size: 24px; line-height: 32px; }
.tech-card p { margin-top: 8px; font-size: 14px; line-height: 22px; }
.tech-card a { display: inline-flex; gap: 8px; margin-top: 16px; color: #fff; font-weight: 400; text-decoration: none; border-bottom: 1px solid transparent; }
.tech-card a:hover { border-bottom-color: #fff; }
@media (max-width: 1023px) { .tech-grid { grid-template-columns: 1fr; } .tech-card { min-height: 300px; } }

/* ---------- Posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--gap); }
.post-card { display: flex; flex-direction: column; background: var(--card); border-radius: 0; overflow: hidden; text-decoration: none; }
.section:not(.section-soft) .post-card, .section:not(.section-soft) .model-card { border: 1px solid var(--line); }
.post-card .media { aspect-ratio: 16/9; background: var(--bg-soft); overflow: hidden; }
.post-card .media img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .meta { font-size: 12px; line-height: 15px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.post-card h3 { font-size: 20px; line-height: 28px; }
.post-card p { color: var(--muted); font-size: 14px; line-height: 22px; }
.post-card .more { margin-top: auto; padding-top: 8px; font-weight: 400; }
.post-card .more::after { content: " →"; }
.badge-promo { background: var(--err); color: #fff; }
.article { max-width: 760px; }
.article p { margin: 0 0 1.1em; font-size: 16px; line-height: 24px; color: var(--ink-2); }

/* ---------- Dealer block ---------- */
.dealer { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--gap); }
.dealer-card { background: var(--card); border-radius: 0; padding: 40px; }
@media (max-width: 767px) { .dealer-card { padding: 24px; } }
.dealer-card h2 { font-size: 32px; line-height: 42px; }
.info-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.info-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.info-list .label { display: block; font-size: 12px; line-height: 15px; color: var(--muted); font-weight: 600; }
.info-list a { text-decoration: none; font-weight: 600; }
.info-list a:hover { text-decoration: underline; }
.map { border-radius: 0; overflow: hidden; min-height: 360px; background: var(--bg-soft); }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.map-placeholder { height: 100%; min-height: 360px; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; }
@media (max-width: 1023px) { .dealer { grid-template-columns: 1fr; } }

.cta-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.cta-tile { display: flex; flex-direction: column; gap: 8px; padding: 32px; border-radius: 0; background: var(--card); text-decoration: none; border: 1px solid transparent; transition: border-color .15s; }
.cta-tile:hover { border-color: var(--ink); }
.cta-tile .icon { width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); }
.cta-tile h3 { font-size: 20px; line-height: 28px; }
.cta-tile p { color: var(--muted); font-size: 14px; line-height: 22px; }
.cta-tile .more { margin-top: auto; font-weight: 400; }
.cta-tile .more::after { content: " →"; }
@media (max-width: 1023px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Model details ---------- */
.spec-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border-radius: 0; overflow: hidden; margin-top: -48px; position: relative; z-index: 2; }
.spec-bar div { background: #fff; padding: 24px; }
.spec-bar strong { display: block; font-size: 24px; line-height: 32px; font-weight: 600; }
.spec-bar span { font-size: 12px; line-height: 15px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.gallery button { padding: 0; border: 0; border-radius: 0; overflow: hidden; cursor: zoom-in; aspect-ratio: 3/2; background: var(--bg-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.03); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(37,39,40,.95); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 0; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 0; border: 1px solid #fff; background: transparent; color: #fff; cursor: pointer; font-size: 24px; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 1023px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }
.sticky-card { position: sticky; top: calc(var(--header-h) + 24px); }

/* ---------- Forms: Text Field — height 48, padding 8px 16px, square, 16px text ---------- */
.form-card { background: var(--card); border-radius: 0; padding: 40px; }
@media (max-width: 767px) { .form-card { padding: 24px 16px; } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 767px) { .form-grid { grid-template-columns: 1fr; gap: 16px; } }
.field label { display: block; font-size: 12px; line-height: 15px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.field .req { color: inherit; }
.field input, .field select, .field textarea {
  width: 100%; height: 48px; padding: 8px 16px; border: 1px solid var(--field-line); border-radius: 0;
  font: 400 16px/24px "Montserrat", sans-serif; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  padding-right: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236F6D6F' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.field textarea { height: auto; min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: var(--bg-soft); border-color: var(--bg-soft); color: var(--icon-disabled); }
.field .hint { font-size: 12px; line-height: 15px; color: var(--muted); margin-top: 8px; }
.field-validation-error, .validation-summary-errors { color: var(--err); font-size: 12px; line-height: 15px; margin-top: 8px; display: block; }
.validation-summary-errors ul { margin: 0 0 16px; padding-left: 18px; }
.input-validation-error { border-color: var(--err) !important; background: var(--err-bg) !important; color: var(--err) !important; box-shadow: none !important; }
.field:has(.input-validation-error) label { color: var(--err); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 22px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--ink); flex-shrink: 0; border-radius: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 16px; border-radius: 0; font-size: 14px; line-height: 22px; margin-bottom: 24px; border-left: 4px solid currentColor; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-info { background: var(--info-bg); color: var(--ink); }
.alert-err { background: var(--err-bg); color: var(--err); }
.model-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.model-picker label { display: block; cursor: pointer; border: 1px solid var(--line); border-radius: 0; background: #fff; overflow: hidden; transition: border-color .15s; }
.model-picker label:hover { border-color: var(--ink); }
.model-picker input { position: absolute; opacity: 0; }
.model-picker input:checked + label { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.model-picker input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.model-picker img { aspect-ratio: 16/10; width: 100%; object-fit: cover; }
.model-picker span { display: block; padding: 8px 12px; font-size: 14px; line-height: 22px; font-weight: 600; }

/* ---------- Footer: Background Dark; links 16/24 + "Follow us on" icons; divider; centred operator line 12/15 ---------- */
.site-footer { background: var(--dark); color: #fff; padding: 0; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; padding: 16px 0; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.3); }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 0; }
.footer-links a { color: #fff; text-decoration: none; font-size: 16px; line-height: 24px; font-weight: 400; }
.footer-links a:hover { text-decoration: underline; }
.footer-links .sep { width: 1px; height: 10px; background: rgba(255,255,255,.4); margin: 0 24px; }
.socials { display: flex; align-items: center; gap: 16px; font-size: 16px; line-height: 24px; }
.socials a { display: inline-grid; place-items: center; color: #fff; text-decoration: none; }
.socials a:hover { opacity: .8; }
.footer-bottom { padding: 16px 0 24px; text-align: center; font-size: 12px; line-height: 15px; color: #fff; }
.footer-bottom a { color: #fff; }
@media (max-width: 767px) {
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-links .sep { margin: 0 12px; }
}

/* ---------- Cookie & privacy notice (bottom panel, square, standard buttons) ---------- */
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: #000; border-color: #000; }
.consent { position: fixed; inset: auto 0 0; z-index: 90; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(37,39,40,.12); }
.consent[hidden] { display: none; }
.consent-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 24px 0; }
.consent h2 { font-size: 20px; line-height: 28px; margin-bottom: 8px; }
.consent-text { max-width: 860px; }
.consent-text p { font-size: 14px; line-height: 22px; color: var(--ink-2); }
.consent-text a { color: var(--ink); text-decoration: underline; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 16px; flex-shrink: 0; justify-content: flex-end; }
.consent-settings { display: grid; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.consent-option { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 22px; cursor: pointer; }
.consent-option input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--ink); flex-shrink: 0; }
@media (max-width: 1023px) {
  .consent-inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 16px 0; }
  .consent-actions { justify-content: stretch; }
  .consent-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 767px) {
  .consent { max-height: 85vh; overflow-y: auto; }
  .consent-actions { flex-direction: column; gap: 8px; }
}

.empty { padding: 48px; text-align: center; color: var(--muted); background: var(--bg-soft); border-radius: 0; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 32px; }
.muted { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Моят BYD ---------- */
.mybyd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.step { background: var(--card); border-radius: 0; padding: 32px; }
.step span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 0; border: 1px solid var(--ink); color: var(--ink); font-weight: 600; margin-bottom: 16px; }
.step h3 { font-size: 20px; line-height: 28px; }
.step p { color: var(--muted); margin-top: 8px; font-size: 14px; line-height: 22px; }
@media (max-width: 1023px) { .steps { grid-template-columns: 1fr; } }
.notice { background: var(--card); border-radius: 0; padding: 32px; border-left: 4px solid var(--ink); }
.notice h2 { font-size: 24px; line-height: 32px; margin-bottom: 8px; }
.notice p, .notice li { color: var(--ink-2); }
.notice ul { margin: 12px 0; padding-left: 20px; }
.vehicle-card .media { aspect-ratio: 16/10; }
.no-photo { height: 100%; display: grid; place-items: center; padding: 24px; text-align: center; font-weight: 600; color: var(--muted); background: var(--bg-soft); }
.facts { display: grid; gap: 8px; margin: 16px 0 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.facts dt { color: var(--muted); font-size: 14px; line-height: 22px; }
.facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.facts-lg div { padding: 8px 0 12px; }
.chip.w-valid { background: var(--ok-bg); color: var(--ok); }
.chip.w-soon { background: var(--warn-bg); color: var(--warn); }
.chip.w-expired { background: var(--err-bg); color: var(--err); }
.chip.w-unknown { background: var(--bg-soft); color: var(--muted); }
.warranty-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 16px; }
.warranty-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.timeline { list-style: none; padding: 0; margin: 24px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 96px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 84px 1fr; gap: 26px; padding: 0 0 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 92px; top: 6px; width: 9px; height: 9px; border-radius: 0; background: var(--ink); }
.t-date { font-weight: 600; font-size: 14px; line-height: 22px; color: var(--ink-2); }
.t-body .muted { font-size: 14px; line-height: 22px; margin-top: 2px; }
@media (max-width: 767px) {
  .timeline::before, .timeline li::before { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; border-left: 1px solid var(--line); padding-left: 16px; }
}
/* "Powered by UCSM" attribution at the bottom of Моят BYD */
.powered-ucsm { margin: 48px 0; display: flex; justify-content: center; }
.powered-ucsm a { display: grid; justify-items: center; gap: 6px; padding: 20px 32px; border: 1px solid var(--line); background: var(--card); color: var(--muted); text-decoration: none; text-align: center; }
.powered-ucsm a:hover { border-color: var(--p2); }
.powered-ucsm .line { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 15px; }
.powered-ucsm strong { color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.powered-ucsm .name { font-size: 14px; }
@media (max-width: 767px) { .powered-ucsm a { padding: 16px; } }

/* Моят BYD — wide vehicle cards and expandable history */
.vehicle-list { display: grid; gap: var(--gap); }
.mybyd-status .alert { margin-bottom: 0; }
.vehicle-wide { display: grid; grid-template-columns: minmax(280px, 460px) minmax(0, 1fr); background: var(--card); border-radius: 0; overflow: hidden; text-decoration: none; border: 1px solid transparent; transition: border-color .15s; }
.vehicle-wide:hover { border-color: var(--ink); }
.vehicle-wide .media { min-height: 0; aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.vehicle-wide .media img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s; }
.vehicle-wide:hover .media img { transform: scale(1.02); }
.vehicle-wide .text { padding: 32px; display: flex; flex-direction: column; }
.vehicle-wide h3 { font-size: 32px; line-height: 42px; margin-top: 4px; }
@media (max-width: 767px) { .vehicle-wide h3 { font-size: 24px; line-height: 32px; } .vehicle-wide .text { padding: 24px 16px; } }
.vehicle-wide .facts { margin-top: 24px; }
.vehicle-wide .facts dd { font-size: 16px; }
.vehicle-wide .more { margin-top: auto; padding-top: 24px; font-weight: 400; }
.vehicle-wide .more::after { content: " →"; }
@media (max-width: 1023px) { .vehicle-wide { grid-template-columns: 1fr; } .vehicle-wide .media { min-height: 0; aspect-ratio: 16/10; } }

.timeline li { display: block; padding-left: 0; }
.h-entry summary { list-style: none; display: grid; grid-template-columns: 84px 1fr 24px; gap: 26px; align-items: start; cursor: pointer; padding: 4px 0; border-radius: 0; }
.h-entry summary::-webkit-details-marker { display: none; }
.h-entry summary:hover strong { text-decoration: underline; }
.h-entry .t-body { display: flex; flex-direction: column; }
.h-entry .chev { margin-top: 2px; color: var(--muted); transition: transform .2s; }
.h-entry[open] .chev { transform: rotate(180deg); }
.h-body { margin: 12px 0 8px 110px; padding: 16px; background: var(--bg-soft); border-radius: 0; }
.h-details h4 { margin: 16px 0 8px; font-size: 14px; line-height: 22px; color: var(--muted); }
.h-details .facts { margin-top: 0; }
.h-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.h-table { overflow-x: auto; }
.h-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 22px; }
.h-table th, .h-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.h-table th { font-size: 12px; line-height: 15px; color: var(--muted); font-weight: 600; }
@media (max-width: 767px) {
  .h-entry summary { grid-template-columns: 1fr 24px; gap: 4px 12px; }
  .h-entry .t-date { grid-column: 1 / -1; }
  .h-body { margin-left: 0; }
}

/* Моят BYD — orders */
.mybyd-h2 { font-size: 32px; line-height: 42px; margin: 0 0 24px; }
@media (max-width: 767px) { .mybyd-h2 { font-size: 24px; line-height: 32px; } }
.order-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--gap); }
.order-card { background: var(--card); border-radius: 0; padding: 32px; border-top: 4px solid var(--ink); }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.order-head .muted { display: block; font-size: 12px; line-height: 15px; font-weight: 600; }
.order-no { font-size: 26px; line-height: 34px; }
.order-card h3 { font-size: 24px; line-height: 32px; margin-top: 16px; }
.order-next { margin-top: 16px; padding: 12px 16px; border-radius: 0; background: var(--warn-bg); color: var(--warn); font-size: 14px; line-height: 22px; }
.order-next a { font-weight: 600; }
.chip.o-active { background: var(--info-bg); color: #1566d8; }
.notice h3 { font-size: 20px; line-height: 28px; margin-bottom: 8px; }

/* Моят BYD — trade-in: equipment ticks grouped by section */
.equipment-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px 24px; }
.equipment-groups fieldset { border: 1px solid var(--line); padding: 12px 16px; margin: 0; }
.equipment-groups legend { font-weight: 600; padding: 0 6px; }
.equipment-groups .check { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: .92rem; }

/* ---------- The floating header sits over the top of the page: content starts below it, and a page's first
   hero / banner runs up under it (as on byd.com/bg) so no empty strip shows above the page. ---------- */
main { padding-top: var(--header-h); }
main > .hero:first-child { margin-top: calc(-1 * var(--header-h)); height: 100svh; }
main > .page-hero:first-child { margin-top: calc(-1 * var(--header-h)); padding-top: calc(var(--header-h) + 56px); }
main > .post-banner:first-child { margin-top: calc(-1 * var(--header-h)); padding-top: var(--header-h); }
@media (max-width: 767px) { main > .page-hero:first-child { padding-top: calc(var(--header-h) + 32px); } }

/* ---------- "Налични автомобили": stock cards drawn with the studio renders of the car's colour ---------- */
.stock-card .media { position: relative; margin: 0; }
.stock-card .media.is-studio { background: #fff; }
.stock-card .media.is-studio img { object-fit: contain; padding: 8px 12px; }
.stock-card.is-reserved .media img { opacity: .55; }
.stock-badge {
  position: absolute; top: 12px; left: 12px; display: inline-block; padding: 4px 12px; font-size: 12px; line-height: 18px;
  font-weight: 600; background: var(--ink); color: #fff;
}
.stock-badge.stock-instock { background: var(--ok); }
.stock-badge.stock-incoming { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.stock-badge.stock-reserved { background: var(--warn); }
.stock-colour { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); background-size: cover; background-position: center; vertical-align: -4px; }
.stock-gallery { display: grid; gap: var(--gap); }
.stock-gallery img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; background: #fff; }

/* Model page: version and colour picker */
.cfg { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.cfg-stage { background: #fff; padding: 16px; }
.cfg-stage img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.cfg-panel { background: #fff; padding: 24px; }
.cfg-group { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.cfg-group legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.cfg-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); cursor: pointer; margin-bottom: 8px; }
.cfg-opt span { font-weight: 600; flex: 1; }
.cfg-opt small { color: var(--ink-2); font-size: 14px; }
.cfg-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cfg-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.cfg-swatch { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); background-size: cover; background-position: center; cursor: pointer; padding: 0; }
.cfg-swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 3px; }
.cfg-sum { margin: 0 0 12px; border-top: 1px solid var(--line); }
.cfg-sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cfg-sum dt { color: var(--ink-2); }
.cfg-sum dd { margin: 0; font-weight: 600; white-space: nowrap; }
.cfg-sum .total dt { color: var(--ink); font-weight: 600; }
.cfg-sum .total dd { font-size: 24px; }
@media (max-width: 860px) { .cfg { grid-template-columns: minmax(0, 1fr); } }

/* Real price first, promotion under it */
.price-promo { margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--red); }
.cfg-opt .opt-promo { display: block; color: var(--red); font-weight: 600; font-size: 12px; }
.cfg-sum .promo dt { color: var(--red); font-weight: 600; }
.cfg-sum .promo dd { color: var(--red); font-size: 20px; }
.cfg-sum .promo[hidden] { display: none; }
