/* ---------- Картка товару ---------- */
/* Колонки сітки — minmax(0, 1fr), не 1fr: трек 1fr не вужчий за min-content вмісту (елемент сітки має min-width:auto),
   тож стрічка мініатюр (flex без переносу) чи широка таблиця розтягує колонку за ширину екрана. */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 6px; }
.gallery-main { position: relative; background: #fff; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .card-badges { left: 10px; top: 10px; pointer-events: none; }
.gallery-zoom { position: absolute; inset: 0; display: block; cursor: zoom-in; }
.gallery-zoom:focus-visible { outline-offset: -3px; }
/* Фото на весь екран. */
.lightbox { width: 100vw; height: 100vh; width: 100dvw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10,14,20,.96); color: #fff; overflow: hidden; }
.lightbox:not([open]) { display: none; }
.lightbox::backdrop { background: rgba(10,14,20,.96); }
/* Жести на фото обробляє gallery.js (щипок, подвійний тап, рух), тому браузерні вимкнено. */
.lightbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 0 0; will-change: transform; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; cursor: zoom-in; }
.lightbox img.lb-side { pointer-events: none; }
.lightbox.is-zoomed img { cursor: grab; }
.lightbox.is-zoomed img:active { cursor: grabbing; }
.lightbox button { position: absolute; z-index: 1; min-width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.3); }
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); }
.lb-nav { top: 50%; margin-top: -22px; display: none; }
.lb-prev { left: calc(12px + env(safe-area-inset-left)); }
.lb-next { right: calc(12px + env(safe-area-inset-right)); }
.lb-count { position: absolute; z-index: 1; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,.5); font-size: .9rem; }
/* Стрілки — для миші за будь-якої ширини вікна; на сенсорних екранах свайп. */
@media (hover: hover) and (pointer: fine) { .lb-nav { display: block; } }
@media (prefers-reduced-motion: no-preference) { .lightbox[open] { animation: lbIn .15s ease-out; } @keyframes lbIn { from { opacity: 0; } } .lightbox img.lb-anim { transition: transform .2s ease-out; } .lightbox.lb-slide img { transition: transform .26s cubic-bezier(.2,.8,.3,1); } }
html.lb-open { overflow: hidden; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; }
.thumbs button[aria-current="true"] { border-color: var(--teal); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-title { font-size: 1.35rem; margin: 0 0 6px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .88rem; color: var(--muted); }
.panel { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.panel h2, .panel h3 { margin-top: 0; }
.buybox .price-set { font-size: 2rem; }
.buybox .price-set small { font-size: .85rem; }
.buybox .price-was { font-size: 1rem; }
.buybox .sale-until { font-size: .9rem; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.stock-line { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 10px 0; flex-wrap: wrap; }
.stock-line.in { color: var(--green); }
.stock-line.pre { color: var(--amber-text); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.buy-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.inst { border: 2px solid var(--yellow); background: #fffbeb; border-radius: 10px; padding: 12px; margin-top: 12px; }
.inst-tabs { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.inst-tabs button { min-height: 40px; padding: 6px 12px; border-radius: 8px; border: 1.5px solid #e5c76b; background: #fff; font-weight: 600; cursor: pointer; font-size: .9rem; }
.inst-tabs button[aria-pressed="true"] { background: #1f2937; color: #fff; border-color: #1f2937; }
.inst .monthly-big { font-size: 1.3rem; font-weight: 800; }
.delivery-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.delivery-list li { display: flex; gap: 10px; align-items: flex-start; }
.delivery-list svg { width: 24px; height: 24px; flex: none; color: var(--teal-dark); margin-top: 1px; }
.dl-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dl-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dl-note { font-size: .9rem; color: var(--muted); }
.delivery-panel h2, .warranty-panel h2 { margin-bottom: 10px; }
.warranty-panel .delivery-list { gap: 22px; }
/* Картка «Доставка і оплата» двічі в розмітці: на мобільному після характеристик, на десктопі під купівлею. */
.delivery-panel--desktop { display: none; }
.trust-list li { background: var(--bg); border-radius: 8px; padding: 10px; font-size: .85rem; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.trust-list svg { width: 20px; height: 20px; flex: none; color: var(--teal-dark); }
.fit-panel { border: 2px solid var(--line); }
.fit-panel.s-fits, .fit-panel.s-fits_rings { border-color: #86c99c; background: #f6fcf8; }
.fit-panel.s-check, .fit-panel.s-fits_bolts { border-color: #f0cf73; background: #fffcf2; }
.fit-panel.s-no { border-color: #f1a7a7; background: #fff8f8; }
.fit-status { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; margin: 8px 0; padding: 12px 14px; border-radius: 10px; }
.fit-status .big-ico { font-size: 1.3rem; line-height: 1; }
.tyre b { display: block; }
.spec-table, .cmp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.cmp-table td.current, .cmp-table th.current { background: var(--teal-soft); }
.cmp-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.note { font-size: .78rem; color: var(--muted); }

.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16,24,40,.1); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; transform: translateY(110%); transition: transform .2s; }
.sticky-buy.show { transform: none; }
.sticky-buy .p { font-weight: 800; font-size: 1.1rem; line-height: 1.1; }
.sticky-buy .p small { display: block; font-size: .75rem; font-weight: 500; color: var(--muted); }

.fit-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
/* Лічильник кількості: − 4 + і підсумок «Разом» (як на макеті). */
.qty-row { gap: 10px 14px; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.stepper input { width: 64px; min-height: var(--tap); border: 0; text-align: center; font: inherit; font-weight: 800; font-size: 1.1rem; padding: 0; -moz-appearance: textfield; appearance: textfield; background: transparent; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-btn { width: 44px; min-height: var(--tap); border: 0; background: transparent; font-size: 1.3rem; font-weight: 700; color: var(--teal-dark); cursor: pointer; }
.step-btn:hover { background: var(--bg); }
.qty-total { font-size: .95rem; }
.qty-total b { font-weight: 800; }
.buy-actions .btn-ghost { border-color: var(--teal); color: var(--teal-dark); }
.pdp-lower { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 4px; }
.entry { font-size: .95rem; }
.sticky-buy[hidden] { display: none; }
@media (min-width: 1024px) {
  .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .pdp-gallery { position: sticky; top: 150px; }
  .thumbs button { width: 80px; height: 80px; }
  .pdp-title { font-size: 1.7rem; }
  .sticky-buy { display: none; }
  .pdp-lower { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .delivery-panel--desktop { display: block; }
  .delivery-panel--mobile { display: none; }
  .pdp-lower .panel-wide { grid-column: 1 / -1; }
}
@media (min-width: 640px) { .buy-actions { grid-template-columns: 1fr 1fr; } }
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.included { background: var(--green-soft); border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: .92rem; }
.included ul { margin: 4px 0 0; padding-left: 18px; }
.included .note { display: block; margin-top: 4px; }

/* Швидке замовлення (заявка на передзвін) */
.quick-dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 24px); box-shadow: var(--shadow-lg); color: var(--text); }
html:not(.js) .quick-dialog:target:not([open]) { display: block; position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 100; } /* без JS: перехід за #quick показує форму */
.quick-dialog:focus, .quick-dialog:focus-visible { outline: none; } /* глобальне жовте кільце не потрібне на самому вікні */
.quick-dialog::backdrop { background: rgba(17, 24, 39, .5); }
.quick-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.quick-head h2 { margin: 0; font-size: 1.3rem; }
.quick-body { padding: 18px 22px 22px; }
.quick-body form { display: grid; gap: 6px; }
.quick-body label { font-weight: 600; margin-top: 8px; }
.quick-ctx { margin: 0 0 6px; }
.quick-body input[type=text], .quick-body input[type=tel] { width: 100%; min-height: 52px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.quick-body input[type=text]:focus, .quick-body input[type=tel]:focus, .quick-body input[type=text]:focus-visible, .quick-body input[type=tel]:focus-visible { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(14,124,134,.18); }
.quick-body input[aria-invalid=true] { border-color: var(--red); }
.quick-body .btn-cta { margin-top: 10px; }
.axes-table thead th { font-size: .82rem; color: var(--muted); font-weight: 700; }
.axes-table td, .axes-table tbody th { white-space: nowrap; }

/* Орієнтовна дата отримання */
.eta { margin: 0 0 12px; }
.eta p { margin: 0; }
.eta-ship { margin-top: 2px; }
.eta-city { margin-top: 6px; color: var(--muted, #5b6470); }
.eta-link { background: none; border: 0; padding: 0; min-height: 0; font: inherit; color: var(--teal, #0f766e); text-decoration: underline; cursor: pointer; }
.eta-pick { position: relative; margin-top: 8px; }
.eta-pick[hidden], .eta-suggest[hidden] { display: none; }
.eta-input { width: 100%; min-height: var(--tap, 44px); padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.eta-input:focus, .eta-input:focus-visible { outline: none; box-shadow: none; border-color: var(--teal, #0f766e); }
.eta-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); list-style: none; margin: 4px 0 0; padding: 6px; max-height: 260px; overflow: auto; }
.eta-suggest li { min-height: var(--tap, 44px); display: flex; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.eta-suggest li:hover, .eta-suggest li:focus { background: var(--teal-soft); outline: none; }
.axes-table tr.diff th, .axes-table tr.diff td { font-weight: 700; }
.fit-axes { list-style: none; padding-left: 0 !important; }
.fit-axes li { display: flex; gap: 6px; }
.fit-axes .ax-mark { flex: none; width: 1.2em; text-align: center; }
.fit-axes .ax-fits .ax-mark, .fit-axes .ax-fits_rings .ax-mark { color: var(--green); }
.fit-axes .ax-check .ax-mark { color: var(--amber-text); }
.fit-axes .ax-no .ax-mark { color: var(--red); }
