* { box-sizing: border-box; }

:root {
  color: #14201b;
  background: #f7f9f8;
  font: 16px/1.5 system-ui, sans-serif;
  --stock-green: #086549;
  --stock-line: #d9e4df;
  --stock-muted: #4d6158;
}

body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--stock-green); text-underline-offset: .2em; }
a:hover { color: #043d2c; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; line-height: 1.16; }
h2 { font-size: 23px; line-height: 1.25; }
h3 { font-size: 19px; line-height: 1.3; }

.stock-wrap { width: min(100% - 40px, 1100px); margin-inline: auto; }
.stock-header { background: #111513; color: #f4faf6; }
.stock-header-inner, .stock-footer .stock-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.stock-header-inner { justify-content: space-between; min-height: 68px; padding-block: 7px; }
.stock-header nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.stock-header a { color: inherit; }
.stock-header nav a { padding-block: 6px; font-weight: 650; }
.stock-header [aria-current] { color: #a9e9ce; }
.stock-main { padding-block: 34px 46px; flex: 1; }
.stock-intro, .stock-muted { color: var(--stock-muted); }
.stock-intro { margin-top: 10px; }
.stock-group { margin-top: 28px; }
.stock-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 16px 18px;
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: #fff;
}
.stock-row > div:first-of-type { flex: 1 1 260px; min-width: 0; }
.stock-thumb { width: 148px; max-width: 100%; object-fit: contain; }
.stock-row h3 { margin-block: 4px; }
.stock-row-price { display: grid; justify-items: end; gap: 5px; }
.stock-row-price strong { font-size: 20px; }
.stock-code { font-family: ui-monospace, monospace; font-weight: 700; color: #273a32; overflow-wrap: anywhere; }
.stock-code span { color: var(--stock-muted); font-weight: 500; }
.stock-badge {
  display: inline-block;
  background: #e5f6ec;
  color: var(--stock-green);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 8px;
}
.stock-badge--unavailable { background: #f0f1f1; color: var(--stock-muted); }
.stock-more { margin-top: 22px; }
.stock-crumb { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-bottom: 13px; font-size: 14px; }
.stock-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  grid-template-areas: "specs order";
  align-items: start;
  gap: 20px 32px;
  margin-top: 16px;
}
.stock-detail--media { grid-template-areas: "media order" "specs order"; }
.stock-gallery { grid-area: media; min-width: 0; }
.stock-stage {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: #fff;
}
.stock-stage > a { display: block; padding-block: 6px; }
.stock-image { width: 100%; aspect-ratio: 3 / 1; object-fit: contain; }
.stock-specs { grid-area: specs; display: grid; gap: 16px; }
.stock-order { grid-area: order; padding: 17px; border: 1px solid var(--stock-line); border-radius: 8px; background: #fff; }
.stock-checkout summary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--stock-green);
  color: #fff;
  list-style: none;
  font-weight: 750;
  cursor: pointer;
}
.stock-checkout summary::-webkit-details-marker { display: none; }
.stock-checkout summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
}
.stock-checkout[open] summary::after { transform: translateY(2px) rotate(225deg); }
.stock-form { display: grid; gap: 10px; margin-top: 12px; }
.stock-form label { font-size: 14px; font-weight: 650; }
.stock-form input:not([type=hidden]), .stock-form button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #aabdb4;
  border-radius: 6px;
  font: inherit;
  font-size: 16px;
}
.stock-form input:not([type=hidden]) { margin-top: 4px; }
.stock-form button { background: var(--stock-green); border-color: var(--stock-green); color: #fff; font-weight: 750; cursor: pointer; }
.stock-form button:disabled { opacity: .7; cursor: wait; }
.stock-form .form__note { font-size: 14px; overflow-wrap: anywhere; }
.stock-form .form__note:empty { display: none; }
.stock-order .stock-muted { font-size: 14px; }
/* Product card */
.stock-icon { flex: none; }
.stock-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.stock-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.3;
}
.stock-tile span, .stock-tile strong { display: block; }
.stock-tile span { color: var(--stock-muted); }
.stock-tile strong { font-size: 15px; }
.stock-vehicle { grid-column: 1 / -1; display: grid; gap: 8px; padding: 10px 12px; }
.stock-vehicle-title { font-size: 13px; color: var(--stock-muted); }
.stock-vehicle-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.stock-vehicle-list li > a, .stock-vehicle-list li.is-main { display: grid; justify-items: center; gap: 2px; height: 100%; padding: 6px 6px 8px; border-radius: 8px; background: #f3f8f5; color: inherit; text-decoration: none; text-align: center; }
.stock-vehicle-list li.is-main { background: #e5f6ec; box-shadow: inset 0 0 0 1px #9cd3b5; }
.stock-vehicle-list li > a { border: 1px dashed #c2d3cb; transition: border-color .15s, background .15s; }
.stock-vehicle-list li > a:hover { border-color: var(--stock-green); background: #ecf6f0; }
.stock-vehicle-list img { width: 100%; max-width: 132px; aspect-ratio: 16 / 9; object-fit: contain; }
.stock-vehicle-list strong { font-size: 14px; line-height: 1.25; }
.stock-vehicle-list small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--stock-muted); }
.stock-vehicle-list .is-main small { color: #128a52; font-weight: 650; }
/* Real photo of the marking, pinned to the corner of the main photo. */
.stock-stage > a.stock-marking {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--stock-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 10px rgba(16, 32, 24, .14);
  color: #14201b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  transition: border-color .15s, box-shadow .15s;
}
.stock-marking:hover { border-color: var(--stock-green); box-shadow: 0 3px 14px rgba(16, 32, 24, .2); color: inherit; }
.stock-marking img { width: 52px; height: 52px; object-fit: cover; border-radius: 7px; }
.stock-marking-crop img { object-position: 50% 45%; }
/* Pinned to whichever bottom corner of the photo is empty (`marking.corner`). */
.stock-stage > a.stock-marking-right { left: auto; right: 10px; }
.stock-marking span { display: inline-flex; align-items: center; gap: 5px; }
.stock-marking .stock-icon { color: var(--stock-green); }
a.stock-tile:hover { border-color: var(--stock-green); color: inherit; }

.stock-placement {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--stock-line);
}
.stock-placement span { display: block; font-size: 13px; color: var(--stock-muted); }
.stock-placement strong { display: block; font-size: 18px; line-height: 1.3; }
.stock-placement p { margin-top: 2px; color: var(--stock-muted); font-size: 14px; }
.stock-placement-car { flex: none; }
.stock-placement-car .car-body { fill: #eef3f0; stroke: #b9c9c1; stroke-width: 1.5; }
.stock-placement-car .car-glass { fill: #d9e4df; }
.stock-placement-car .car-wheel { fill: #9fb2a9; }
.stock-placement-car .car-wheel.is-active { fill: #f08a24; animation: stock-pulse 1.8s ease-in-out infinite; }
@keyframes stock-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .stock-placement-car .car-wheel.is-active { animation: none; } }

.stock-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.stock-numbers > div { padding: 10px 12px; border: 1px solid var(--stock-line); border-radius: 8px; background: #fff; min-width: 0; }
.stock-numbers dt { font-size: 13px; color: var(--stock-muted); }
.stock-numbers dd { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 2px 0 0; }
.stock-numbers strong { font-family: ui-monospace, monospace; font-size: 15px; overflow-wrap: anywhere; }
.stock-copy {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: #f1f5f3;
  color: var(--stock-muted);
  cursor: pointer;
}
.stock-copy:hover { background: #e5f6ec; color: var(--stock-green); }
.stock-copy.is-copied { background: var(--stock-green); color: #fff; }

.stock-fit { display: grid; gap: 10px; }
.stock-fit ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.stock-fit li { display: flex; align-items: flex-start; gap: 10px; }
.stock-fit li .stock-icon { margin-top: 2px; }
.stock-fit .is-yes .stock-icon { color: #128a52; }
.stock-fit .is-check .stock-icon { color: #b8711f; }
.stock-fit .is-check span { color: var(--stock-muted); }
.stock-fit .is-check strong { color: #14201b; }
.stock-fit > .stock-muted { font-size: 14px; }
.stock-vin-link { display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-weight: 700; }
.stock-about { display: grid; gap: 6px; }
.stock-aliases { font-size: 13px !important; }
.stock-h1-code { margin-top: 6px; font-family: ui-monospace, monospace; font-weight: 700; color: #273a32; }
.stock-h1-code span { color: var(--stock-muted); font-weight: 500; }
.stock-about h2 { font-size: 18px; }
.stock-about p { color: var(--stock-muted); font-size: 15px; }

.stock-price-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; }
.stock-total { font-size: 28px; font-weight: 800; line-height: 1.2; }
.stock-price-row .stock-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; }
.stock-price-row .stock-badge:not(.stock-badge--unavailable)::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #18a463;
  box-shadow: 0 0 0 3px rgba(24, 164, 99, .2);
}
.stock-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.stock-fact { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; background: #f3f8f5; }
.stock-fact .stock-icon { color: var(--stock-green); }
.stock-fact span { display: grid; line-height: 1.2; }
.stock-fact small { color: var(--stock-muted); font-size: 12px; }
.stock-badge--attribute { padding: 0; background: none; border-radius: 0; color: #14201b; font-size: 15px; font-weight: 750; }

.stock-terms {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: start;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--stock-line);
  font-size: 14px;
}
.stock-terms ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.stock-terms li { display: flex; align-items: center; gap: 9px; }
.stock-terms li .stock-icon { color: var(--stock-green); }
.stock-call {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--stock-line);
  border-radius: 6px;
  background: #f7f9f8;
}
.stock-call:hover { background: #e5f6ec; }

.stock-sticky { display: none; }

/* Maker wordmark next to "Оригінал" */
.stock-brand-logo { display: inline-block; width: auto; vertical-align: middle; }
.stock-fact .stock-brand-logo { height: 13px; margin-top: 4px; }
.stock-card-fact .stock-brand-logo { height: 10px; margin-left: 2px; }
.stock-brand-text { font-size: 13px; letter-spacing: .04em; }

/* Photo lightbox */
.stock-lightbox { width: min(96vw, 1100px); max-height: 92vh; padding: 0; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
.stock-lightbox::backdrop { background: rgba(10, 16, 13, .78); }
.stock-lightbox img { width: 100%; max-height: calc(92vh - 56px); object-fit: contain; background: #fff; }
.stock-lightbox figcaption { padding: 10px 56px 12px 16px; font-size: 14px; color: var(--stock-muted); }
.stock-lightbox-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(17, 21, 19, .75); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.stock-lightbox-close:hover { background: #111513; }
[data-lightbox] { cursor: zoom-in; }

/* Catalog showcase */
.stock-hero { padding: 22px; border-radius: 12px; background: linear-gradient(135deg, #0f1a15, #17382a); color: #f4faf6; }
.stock-hero .stock-intro { color: #c6dccf; }
.stock-perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.stock-perks li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, .07); font-size: 14px; line-height: 1.3; }
.stock-perks .stock-icon { color: #8ee2b0; }
.stock-perks strong { font-weight: 650; }
.stock-perks-link { display: inline-block; margin-top: 12px; color: #a9e9ce; font-size: 14px; }
.stock-perks-link:hover { color: #fff; }
.stock-search { position: relative; margin-top: 18px; max-width: 520px; }
.stock-search .stock-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--stock-muted); }
.stock-search input { width: 100%; min-height: 46px; padding: 8px 12px 8px 40px; border: 1px solid #aabdb4; border-radius: 8px; font: inherit; font-size: 16px; background: #fff; }
.stock-search-empty { margin-top: 14px; }
.stock-group h2 span { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: #e5f6ec; color: var(--stock-green); font-size: 14px; vertical-align: middle; }
.stock-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.stock-card { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 10px; padding: 0; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.stock-card:hover { border-color: #9cc9b2; box-shadow: 0 10px 26px rgba(20, 60, 40, .1); }
.stock-card-media { display: grid; place-items: center; aspect-ratio: 16 / 7; padding: 14px; background: #f3f8f5; }
.stock-card-media .stock-thumb { width: 100%; height: 100%; object-fit: contain; }
.stock-card > div.stock-card-body { flex: 0 0 auto; padding: 0 16px; display: grid; gap: 6px; }
.stock-card h3 { margin: 0; font-size: 18px; }
.stock-card h3 a { color: #14201b; text-decoration: none; }
.stock-card h3 a:hover { color: var(--stock-green); text-decoration: underline; }
.stock-card-place { display: flex; align-items: center; gap: 7px; color: var(--stock-muted); font-size: 14px; }
.stock-card-place .stock-placement-car { flex: none; }
.stock-card-place .car-wheel.is-active { animation: none; }
.stock-card-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.stock-card-fact { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: #f3f8f5; font-size: 13px; font-weight: 650; }
.stock-card-fact .stock-icon { color: var(--stock-green); }
.stock-card > .stock-row-price { flex: 0 0 auto; }
.stock-card .stock-row-price { grid-auto-flow: row; grid-template-columns: 1fr auto; justify-items: start; align-items: center; margin-top: auto; padding: 12px 16px 16px; border-top: 1px solid var(--stock-line); }
.stock-card .stock-row-price .stock-badge { grid-column: 1 / -1; }
.stock-card .stock-row-price strong { font-size: 22px; white-space: nowrap; }
.stock-card-buy { display: grid; place-items: center; min-height: 42px; padding: 0 18px; border-radius: 6px; background: var(--stock-green); color: #fff; font-weight: 750; text-decoration: none; }
.stock-card-buy:hover { background: #043d2c; color: #fff; }
.stock-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; margin-top: 32px; padding: 20px 22px; border-radius: 12px; border: 1px solid var(--stock-line); background: #fff; }
.stock-cta h2 { font-size: 21px; }
.stock-cta p { margin-top: 4px; color: var(--stock-muted); max-width: 560px; }
.stock-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stock-cta-actions a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 6px; font-weight: 750; text-decoration: none; }
.stock-cta-main { background: var(--stock-green); color: #fff; }
.stock-cta-main:hover { background: #043d2c; color: #fff; }
.stock-cta-tg { border: 1px solid var(--stock-line); background: #f7f9f8; }
@media (max-width: 900px) { .stock-perks { grid-template-columns: 1fr 1fr; } }
.stock-terms-link a { font-size: 13px; }
.stock-policy { display: grid; gap: 14px; margin-top: 20px; max-width: 760px; }
.stock-policy section { padding: 16px 18px; border: 1px solid var(--stock-line); border-radius: 8px; background: #fff; }
.stock-policy h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.stock-policy h2 .stock-icon { color: var(--stock-green); }
.stock-policy ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
@media (min-width: 671px) { .stock-order { position: sticky; top: 16px; } }
.stock-footer { border-top: 1px solid var(--stock-line); padding-block: 17px; font-size: 14px; }
:focus-visible { outline: 2px solid #2078bd; outline-offset: 3px; }

@media (max-width: 670px) {
  .stock-wrap { width: calc(100% - 28px); }
  .stock-main { padding-block: 22px 32px; }
  h1 { font-size: 27px; }
  .stock-detail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "order" "specs"; }
  .stock-detail--media { grid-template-areas: "media" "order" "specs"; }
  .stock-hero { padding: 18px 16px; }
  .stock-perks { gap: 8px; }
  .stock-perks li { padding: 8px 10px; font-size: 13px; }
  .stock-cta-actions, .stock-cta-actions a { width: 100%; justify-content: center; }
  .stock-sticky {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--stock-line);
    box-shadow: 0 -6px 20px rgba(20, 32, 27, .1);
  }
  body:has(.stock-sticky) { padding-bottom: 76px; }
  .stock-numbers { grid-template-columns: 1fr; }
  .stock-stage > a.stock-marking { left: 6px; bottom: 6px; gap: 6px; padding: 2px 8px 2px 2px; font-size: 12px; }
  .stock-stage > a.stock-marking-right { left: auto; right: 6px; }
  .stock-marking img { width: 34px; height: 34px; border-radius: 6px; }
  .stock-sticky > div { flex: 1; min-width: 0; }
  .stock-sticky strong { display: block; font-size: 19px; white-space: nowrap; }
  .stock-sticky span { font-size: 13px; color: #128a52; }
  .stock-sticky a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 999px; font-weight: 750; text-decoration: none; }
  .stock-sticky-buy { min-width: 128px; padding: 0 20px; background: var(--stock-green); color: #fff; }
  .stock-sticky-call { width: 46px; flex: none; background: #e5f6ec; color: #0b5a3f; }
  .stock-sticky--contact a { flex: 1; width: auto; font-size: 15px; }
  .stock-sticky-tg { background: var(--stock-green); color: #fff; }
  .stock-row-price { justify-items: start; grid-auto-flow: column; align-items: center; gap: 10px; }
}

@media (max-width: 340px) {
  .stock-row-price { grid-auto-flow: row; }
}
