/* Сторінка моделі: блоки поверх style.css. Лише змінні сайту, тож світла й темна теми працюють самі. */

.proto-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; background: var(--fg); color: var(--bg); font-size: .8rem; font-weight: 600; text-align: center; padding: 6px 16px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding-top: 18px; font-size: .9rem; color: var(--fg-3); }
.crumbs a { color: var(--fg-2); text-decoration: none; display: inline-block; padding-block: 6px; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--fg); font-weight: 600; }

/* Перший екран */
.mhero { padding-block: clamp(20px, 3vw, 36px) clamp(40px, 6vw, 72px); background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.mhero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.mhero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin: 10px 0 16px; }
.mhero__years { display: block; font-size: .5em; font-weight: 700; color: var(--fg-2); letter-spacing: -.02em; margin-top: 8px; }
.mhero .lead { margin: 0 0 22px; }
.mhero__price { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px 28px; margin-bottom: 22px; }
.mhero__price small { display: block; color: var(--fg-2); font-size: .82rem; font-weight: 600; }
.mhero__price b { font-size: 1.35rem; letter-spacing: -.02em; }
.mhero__price div:first-child b { color: var(--accent); }
.mhero__actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.mhero__actions .link { padding-block: 10px; }
.mhero__facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 28px; margin: 0 0 22px; padding: 16px 0; border-block: 1px solid var(--line); }
.mhero__facts dt { color: var(--fg-3); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.mhero__facts dd { margin: 2px 0 0; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.mhero__media { display: grid; gap: 10px; }
.mhero__main { margin: 0; position: relative; }
.mhero__zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--bg-3); border-radius: var(--r-xl); overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow-1); }
.mhero__zoom img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.mhero__zoom:hover img { transform: scale(1.02); }
.mhero__main figcaption { position: absolute; left: 12px; bottom: 12px; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(8px); border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 600; pointer-events: none; }
.mhero__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mhero__thumbs button { padding: 0; border: 2px solid transparent; border-radius: var(--r-s); overflow: hidden; background: var(--bg-3); cursor: pointer; }
.mhero__thumbs button.is-on { border-color: var(--accent); }
.mhero__thumbs img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }


/* Секції сторінки моделі */
.msec { padding-block: clamp(48px, 7vw, 88px); }
.msec--alt { background: var(--bg-2); }

.ptable-wrap { overflow-x: auto; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow-1); }
.ptable { width: 100%; border-collapse: collapse; min-width: 640px; font-variant-numeric: tabular-nums; }
.ptable th, .ptable td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable thead th { font-size: .9rem; color: var(--fg-2); font-weight: 700; }
.ptable small { display: block; font-weight: 500; color: var(--fg-3); font-size: .8rem; margin-top: 2px; }
.ptable tbody th { font-weight: 700; }
.ptable td { font-weight: 700; white-space: nowrap; }
.ptable tbody tr:last-child th, .ptable tbody tr:last-child td { border-bottom: 0; }
.ptable tr.is-pop { background: var(--accent-soft); }
.ptable tr.is-pop td:nth-child(2) { color: var(--accent); }
.ptable-note { color: var(--fg-2); font-size: .9rem; margin: 14px 0 0; max-width: 52em; }

.fit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fit-card { background: var(--card); border-radius: var(--r-l); padding: 22px 22px 20px; box-shadow: var(--shadow-1); }
.fit-card h3 { font-size: 1.15rem; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fit-card p { margin: 0; color: var(--fg-2); }
.verify { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8a5a00; background: #ffe9b3; border-radius: 999px; padding: 3px 8px; }
body.notes-off .verify { display: none; }

.choose-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.choose-card { display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-l); padding: 22px; }
.choose-card__tag { margin: 0 0 8px; color: var(--accent); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.choose-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.choose-card p:not(.choose-card__tag) { color: var(--fg-2); margin: 0 0 16px; font-size: .95rem; }
.choose-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.choose-card__foot b { font-size: 1.2rem; }
.choose-card .btn--sm { background: var(--bg-2); color: var(--fg); }
.choose-card .btn--sm:hover { background: var(--accent); color: var(--accent-fg); }

.faq__list.mfaq { max-width: 820px; grid-template-columns: 1fr; }

.gens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gen { display: grid; gap: 2px; padding: 18px 20px; border-radius: var(--r-m); background: var(--card); color: var(--fg); text-decoration: none; box-shadow: var(--shadow-1); }
.gen span { color: var(--fg-2); font-size: .9rem; }
.gen:hover b { color: var(--accent); }
.gen--all { background: var(--accent-soft); box-shadow: none; }

.service { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service li { display: grid; gap: 4px; padding: 18px 0 0; border-top: 2px solid var(--accent); }
.service span { color: var(--fg-2); }

/* Ціни з акцією */
.pv { display: inline-flex; flex-direction: column; line-height: 1.2; }
.pv .price-old { margin: 0 0 2px; font-size: .78rem; }
.mhero__price b { line-height: 1.15; }
.mhero__promo { margin: -8px 0 22px; font-size: .9rem; color: var(--fg-2); }
.mhero__promo b { color: var(--accent); }
.promo-banner { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-m); background: var(--accent-soft); font-size: .95rem; }
.promo-banner b { color: var(--accent); }
.ptable td .pv { font-weight: 700; }
.mcta .pv { flex-direction: row; align-items: baseline; gap: 6px; white-space: nowrap; }
.mcta .pv .price-old { margin: 0; }
.mcta .btn { white-space: nowrap; flex-shrink: 0; }

/* SEO-примітки для команди (у продакшені не потрібні) */
.seo-note { margin: 16px 0 0; padding: 10px 14px; border: 1.5px dashed var(--accent); border-radius: var(--r-s); background: color-mix(in srgb, var(--accent) 6%, var(--bg)); color: var(--fg); font-size: .86rem; line-height: 1.45; max-width: 60em; }
.seo-note b { display: inline-block; margin-right: 6px; color: var(--accent); text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }
body.notes-off .seo-note { display: none; }
.notes-toggle { border: 1px solid color-mix(in srgb, var(--bg) 40%, transparent); background: transparent; color: inherit; border-radius: 999px; padding: 2px 10px; font: 600 .76rem var(--font); cursor: pointer; }
.notes-toggle:hover { background: color-mix(in srgb, var(--bg) 15%, transparent); }

.mcta { display: none; }
@media (max-width: 900px) {
  .mcta { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 55; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 999px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(16px); box-shadow: var(--shadow-2); transform: translateY(140%); transition: transform .25s; }
  .mcta.is-on { transform: none; }
  .mcta small { display: block; color: var(--fg-2); font-size: .75rem; font-weight: 600; }
  .mcta b { font-size: 1.05rem; }
}

@media (max-width: 1100px) {
  .choose-grid { grid-template-columns: repeat(2, 1fr); }
  .mhero__facts { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 900px) {
  .mhero__inner { grid-template-columns: 1fr; }
  .fit-grid { grid-template-columns: repeat(2, 1fr); }
  .gens, .service { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .mhero__price { grid-template-columns: 1fr 1fr; }
  .mhero__facts { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .fit-grid, .choose-grid, .gens, .service { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ptable-wrap { overflow: visible; background: none; box-shadow: none; }
  .ptable, .ptable tbody, .ptable tr, .ptable th, .ptable td { display: block; min-width: 0; }
  .ptable thead { display: none; }
  .ptable tbody { display: grid; gap: 10px; }
  .ptable tbody tr { background: var(--card); border-radius: var(--r-l); box-shadow: var(--shadow-1); padding: 14px 16px; }
  .ptable tbody th { padding: 0 0 8px; border: 0; }
  .ptable td { display: flex; align-items: center; gap: 12px; padding: 6px 0; border: 0; border-top: 1px solid var(--line); }
  .ptable td::before { content: attr(data-label); color: var(--fg-2); font-weight: 500; margin-right: auto; }
  .ptable td .pv { align-items: flex-end; }
  .ptable tr.is-pop { background: var(--accent-soft); }
}

/* Сторінки марок і збірні: групи моделей за назвою */
.cat-group { font-size: 1.15rem; margin: 28px 0 12px; }
.cat-group:first-child { margin-top: 0; }
#catalog .gens { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* ---------- Телефон: заголовок → ціна → кнопка → фото → опис і факти ---------- */
@media (max-width: 900px) {
  .mhero__inner { display: flex; flex-direction: column; gap: 0; }
  .mhero__text { display: contents; }
  .mhero .eyebrow { order: 1; }
  .mhero h1 { order: 2; margin-bottom: 14px; }
  .mhero__price { order: 3; margin-bottom: 12px; }
  .mhero__promo { order: 4; margin: 0 0 14px; }
  .mhero__actions { order: 5; margin-bottom: 22px; }
  .mhero__actions .btn { flex: 1 1 100%; }
  .mhero__actions .link { padding-block: 12px; }
  .mhero__media { order: 6; }
  .mhero .lead { order: 7; margin: 22px 0 18px; }
  .mhero__facts { order: 8; margin-bottom: 0; }
  .mhero__text > .seo-note { order: 9; }
  .crumbs a { padding-block: 12px; }
}
.mhero__facts dt { font-size: .75rem; }

/* Ціни в героях: дві колонки з цінами на одній лінії, менша комплектація — рядком під ними */
.mhero__price { grid-template-columns: repeat(2, auto); gap: 12px 36px; }
.mhero__price > div { display: flex; flex-direction: column; }
.mhero__price > div > .pv { margin-top: auto; }
.mhero__also { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--fg-2); font-size: .9rem; font-weight: 600; }
.mhero__also .pv { flex-direction: row; align-items: baseline; gap: 6px; }
.mhero__also .pv b { font-size: 1rem; color: var(--fg); }
.mhero__also .price-old { margin: 0; font-size: .8rem; }

/* Кольори для моделі: плитки ставлять матеріал і колір у конструкторі */
.mcolors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mcolors button { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow-1); color: var(--fg); font: inherit; text-align: left; cursor: pointer; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.mcolors button:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.mcolors img, .mcolors__swatch { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: contain; background: #fff; }
.mcolors__swatch { display: grid; place-items: center; }
.mcolors__swatch i { width: 42%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.mcolors__name { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 14px; font-weight: 700; font-size: .95rem; }
.mcolors__name i { flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.mcolors__note { margin: 14px 0 0; color: var(--fg-3); font-size: .86rem; }
@media (max-width: 1000px) { .mcolors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mcolors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.mcolors img.mcolors__tex { object-fit: cover; }

/* Історія моделі: живий текст для популярних моделей (_src/stories) */
.mstory { padding-block: clamp(28px, 4vw, 48px) clamp(36px, 5vw, 60px); }
.mstory__wrap > * { max-width: none; }  /* на всю ширину секції; на комп’ютері — дві колонки, щоб рядки не були задовгими */
.mstory h2 { margin: 0 0 18px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.mstory__text p { margin: 0 0 14px; font-size: 1.08rem; line-height: 1.68; color: var(--fg); }
.mstory__text p:first-child { font-size: 1.2rem; line-height: 1.6; }
.mstory__text ul { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; gap: 10px; }
.mstory__text li { position: relative; padding-left: 28px; font-size: 1.04rem; line-height: 1.55; }
.mstory__text li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.mstory + .msec, .mstory + #choose { padding-top: 0; }
@media (max-width: 560px) { .mstory__text p:first-child { font-size: 1.1rem; } }
@media (min-width: 900px) {
  .mstory h2 { margin-bottom: 22px; }
  .mstory__text { columns: 2; column-gap: clamp(40px, 5vw, 72px); column-rule: 1px solid var(--line); }
  .mstory__text > p:first-child { column-span: all; margin-bottom: 24px; font-size: 1.3rem; line-height: 1.55; }
  .mstory__text p { orphans: 3; widows: 3; }
  .mstory__text ul { break-inside: avoid; }
}
#prices + .mstory { padding-top: 0; }

/* Фото й відгуки покупців DD Tuning */
#colors + .mphotos { padding-top: 0; }
.mphotos__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mphotos__item { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-l); overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.mphotos__item img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform .25s; }
.mphotos__item:hover img { transform: scale(1.03); }
.mphotos__quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 18px; }
.section-head + .mphotos__quotes { margin-top: 0; }
.model-page .reviews .section-head p { max-width: none; }  /* підпис «Відгуків власників» — в один рядок на комп’ютері */
.mfaq__more { margin: 18px 0 0; color: var(--fg-2); font-size: .95rem; }
.mphotos__note { margin: clamp(28px, 4vw, 40px) 0 0; font-size: .7rem; line-height: 1.45; color: var(--fg-3); }
.mphotos__quote { margin: 0; padding: 16px 18px; border-radius: var(--r-l); background: var(--bg-2); }
.mphotos__quote p { margin: 0 0 8px; line-height: 1.55; }
.mphotos__quote footer { color: var(--fg-3); font-size: .88rem; font-weight: 600; }
.mphotos__grid[data-n="1"] { grid-template-columns: minmax(0, 520px); }
.mphotos__grid[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mphotos__grid[data-n="3"], .mphotos__grid[data-n="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mphotos__grid[data-n="1"] img, .mphotos__grid[data-n="2"] img, .mphotos__grid[data-n="3"] img { aspect-ratio: 4 / 3; }
.mphotos__grid[data-n="5"] li:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 760px) {
  .mphotos__grid, .mphotos__grid[data-n] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mphotos__grid[data-n="1"] { grid-template-columns: minmax(0, 1fr); }
  .mphotos__grid[data-n="3"] li:first-child, .mphotos__grid[data-n="5"] li:first-child { grid-column: span 2; grid-row: auto; }
  .mphotos__grid[data-n="2"] img, .mphotos__grid[data-n="3"] img { aspect-ratio: 1; }
}

/* Поради: схеми, відео з YouTube (плеєр вантажиться після кліку), відео покупців і місця під фото в прототипі */
.guide__fig--scheme img { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.guide__video { margin: 24px 0 28px; }
.guide__yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--r-l); overflow: hidden; background: #000; cursor: pointer; }
.guide__yt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guide__yt::after { content: ""; position: absolute; top: 50%; left: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px;
  background: rgba(0, 0, 0, .72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 26px no-repeat; transition: background-color .2s; }
.guide__yt:hover::after, .guide__yt:focus-visible::after { background-color: #e00; }
.guide__video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-l); background: #000; }
.guide__video figcaption { margin-top: 10px; color: var(--fg-3); font-size: .9rem; line-height: 1.5; }
.guide__video figcaption b { color: var(--fg); }
.guide__chapters { display: grid; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.guide__chapters button { min-height: 32px; margin-right: 6px; padding: 0 8px; border: 0; border-radius: 6px; background: var(--bg-2); color: var(--accent); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.guide__fig--clips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide__fig--clips > div { display: grid; align-content: start; gap: 8px; }
.guide__fig--clips video { display: block; width: 100%; height: auto; aspect-ratio: 480 / 878; max-height: 560px; object-fit: cover; border-radius: var(--r-l); background: #000; }
.guide__fig--clips span { font-weight: 700; font-size: .95rem; }
.guide__todo { margin: 20px 0 24px; padding: 14px 16px; border: 2px dashed var(--accent); border-radius: var(--r-m); color: var(--fg-2); font-size: .95rem; line-height: 1.5; }
.guide__todo b { color: var(--fg); }
.guide__quote { margin: 20px 0 24px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); }
.guide__quote p { margin: 0 0 6px; font-style: italic; }
.guide__quote cite { color: var(--fg-3); font-size: .9rem; font-style: normal; }
