/*! ISHOD — конструктор сайтів ishod.studio. Код і шаблони — лише для сайтів на платформі ISHOD; копіювання й використання поза нею заборонено: https://ishod.studio/umovy/#p6 */
/* Сторінка товару (агент C): 3 варіанти — gallery / editorial / compact (chrome.product).
   Лише змінні теми (--bg --surface --text --accent --muted --line --font-head --font-body --radius --btn-radius),
   тож у кожному з 15 шаблонів сторінка бере його кольори, шрифти, скруглення й форму кнопок. */

.main--pdp { padding-top: 18px; padding-bottom: 72px; min-height: 60vh; }
.pdp-page { --pdp-gut: max(16px, calc((100% - 1148px) / 2)); }

/* хлібні крихти */
.pdp-crumbs ol { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: .84rem; color: var(--muted); }
.pdp-crumbs li { min-width: 0; }
.pdp-crumbs li + li::before { content: "/"; margin: 0 9px; opacity: .55; }
.pdp-crumbs a { color: var(--muted); text-decoration: none; }
.pdp-crumbs a:hover { color: var(--text); text-decoration: underline; }
.pdp-crumbs [aria-current] span { color: var(--text); overflow-wrap: anywhere; }  /* довга назва переноситься, а не обрізається */

/* назва, наявність, артикул */
.pdp-head__kicker { display: inline-block; margin-bottom: 10px; font: 600 .8125rem/1.2 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink, var(--accent)); text-decoration: none; }
.pdp-head__kicker:hover { text-decoration: underline; }
.pdp-head__title { font-size: clamp(1.6rem, 3vw, 2.35rem); margin: 0 0 12px; overflow-wrap: anywhere; }
.pdp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: .88rem; color: var(--muted); }
.pdp-av { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.pdp-av::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
.pdp-av--in_stock { color: color-mix(in srgb, #16a34a 72%, var(--text)); }
.pdp-av--order { color: color-mix(in srgb, #d97706 72%, var(--text)); }
.pdp-av--expected, .pdp-av--out { color: var(--muted); }
.pdp-left { color: var(--accent-ink, var(--accent)); font-weight: 600; }
.pdp-sku [data-pdp-sku] { color: var(--text); font-variant-numeric: tabular-nums; }

/* ціна */
.pdp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 20px 0 4px; }
.pdp-price__now { font: 700 clamp(1.6rem, 2.6vw, 2.1rem)/1.1 var(--font-head); letter-spacing: -.01em; }
.pdp-price:has(.pdp-price__off:not([hidden])) .pdp-price__now { color: var(--accent); }
.pdp-price__old { color: var(--muted); font-size: 1.05rem; }
.pdp-price__off { background: var(--accent); color: #fff; font-weight: 700; font-size: .8125rem; padding: 4px 9px; border-radius: var(--btn-radius); align-self: center; }
.pdp-lead { margin: 14px 0 0; color: color-mix(in srgb, var(--text) 78%, var(--bg)); }
.pdp-lead a { color: var(--accent-ink, var(--accent)); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* покупка: форма та сама, що була (store.css), лише підлаштовуємо під сторінку */
.pdp-page .buy { margin: 22px 0 6px; gap: 18px; }
.pdp-page .buy__row { flex-wrap: wrap; align-items: stretch; }
.pdp-page .buy__row > .btn { min-height: 52px; }
.pdp-page .buy__main { flex: 1 1 190px; }
.pdp-page .buy__quick { flex: 1 1 170px; }
.pdp-page .qty input { height: 100%; min-height: 52px; border-radius: var(--btn-radius); }
/* .chip у store-catalog.css — плашка фільтра; тут це обгортка радіокнопки варіанта, плашку знімаємо */
.pdp-page .variants .chip, .pdp-page .variants .chip:hover { display: inline-block; padding: 0; gap: 0; background: none; border-radius: 0; font-size: inherit; }
.pdp-page .buy__quick { white-space: nowrap; }
.pdp-page .chip span { min-width: 52px; text-align: center; border-radius: var(--btn-radius); padding: 9px 16px; transition: border-color .15s, background .15s; }
.pdp-page .chip:not(.chip--off) span:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.pdp-page .chip input:checked + span { font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent); }
.pdp-soldout { margin: 22px 0 6px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); }
.pdp-soldout p { margin: 0; }
.pdp-soldout__ask { margin-top: 6px !important; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pdp-soldout a { color: var(--accent-ink, var(--accent)); font-weight: 600; }

/* блоки довіри */
.pdp-trust { list-style: none; margin: 24px 0 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.pdp-trust li { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.pdp-trust svg { flex: none; color: var(--accent); }
.pdp-trust b { display: block; font-size: .94rem; font-weight: 600; }
.pdp-trust span { display: block; color: var(--muted); font-size: .85rem; }

/* стікери на фото — кольори теми, без строкатості */
.pg .pdp-stk { position: absolute; left: 14px; top: 14px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.stk { font: 700 .8125rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: var(--btn-radius); background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.stk--sale, .stk--discount { background: var(--accent); color: #fff; }
.stk--new { background: var(--text); color: var(--bg); }
.stk--hit { box-shadow: inset 0 0 0 1.5px var(--accent), 0 1px 3px rgba(0, 0, 0, .12); }

/* галерея */
.pg { position: relative; min-width: 0; }
.pg__stage { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.pg__track { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pg__track::-webkit-scrollbar { display: none; }
.pg__track:focus-visible { outline-offset: -3px; }
.pg__slide { flex: 0 0 100%; scroll-snap-align: start; display: block; aspect-ratio: 4 / 5; cursor: zoom-in; }
.pg__slide img { width: 100%; height: 100%; object-fit: cover; }
.pg__slide--ph { cursor: default; }
.pg__slide--ph .ph--big { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.pg__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 90%, transparent); color: var(--text); cursor: pointer; box-shadow: 0 2px 12px rgba(0, 0, 0, .14); opacity: 0; transition: opacity .2s; }
.pg__arrow--prev { left: 12px; }
.pg__arrow--next { right: 12px; }
.pg__stage:hover .pg__arrow, .pg__arrow:focus-visible { opacity: 1; }
.pg__arrow:disabled { opacity: 0 !important; pointer-events: none; }
.pg__dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 2; display: none; justify-content: center; gap: 6px; pointer-events: none; }
.pg__dots span { width: 6px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--bg) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 25%, transparent); transition: width .2s, background .2s; }
.pg__dots span.is-on { width: 18px; background: var(--bg); }
.pg__count { position: absolute; right: 12px; bottom: 12px; z-index: 2; font-size: .78rem; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--text); }
.pg__zoomhint { position: absolute; right: 12px; top: 12px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--text); pointer-events: none; opacity: 0; transition: opacity .2s; }
.pg__stage:hover .pg__zoomhint { opacity: 1; }
.pg__thumbs { display: flex; gap: 10px; margin-top: 12px; padding: 3px; overflow-x: auto; scrollbar-width: thin; }
.pg__thumb { flex: 0 0 68px; aspect-ratio: 4 / 5; border-radius: calc(var(--radius) * .6); overflow: hidden; background: var(--surface); opacity: .55; transition: opacity .15s, box-shadow .15s; }
.pg__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pg__thumb:hover { opacity: .9; }
.pg__thumb[aria-current] { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* мініатюри ліворуч (gallery) */
@media (min-width: 861px) {
  .pg--side.pg--many { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .pg--side .pg__stage { grid-column: 2; grid-row: 1; }
  .pg--side .pg__thumbs { grid-column: 1; grid-row: 1; flex-direction: column; margin: 0; height: 0; min-height: 100%; overflow: hidden auto; scrollbar-width: none; }
  .pg--side .pg__thumb { flex: none; width: 100%; }
}

/* великі фото на всю ширину (editorial) */
.pg--strip .pg__stage { border-radius: 0; background: transparent; }
.pg--strip .pg__track { gap: 14px; padding: 0 var(--pdp-gut); scroll-padding-inline: var(--pdp-gut); }
.pg--strip .pg__slide { flex: 0 0 auto; height: min(78vh, 720px); aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.pg--strip:not(.pg--many) .pg__track { justify-content: center; }
.pg--strip .pdp-stk { left: calc(var(--pdp-gut) + 14px); }
.pg--strip .pg__count, .pg--strip .pg__zoomhint { display: none; }
.pg--strip .pg__arrow--prev { left: calc(var(--pdp-gut) - 22px); }
.pg--strip .pg__arrow--next { right: calc(var(--pdp-gut) - 22px); }
.pg--strip .pg__arrow { opacity: 1; }

/* вкладки */
.pdp-tabs { margin-top: 56px; }
.pdp-tabs__list { display: flex; gap: 30px; margin: 0 0 26px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pdp-tabs__list::-webkit-scrollbar { display: none; }
.pdp-tabs__list button { flex: none; margin-bottom: -1px; padding: 14px 0 13px; background: none; border: 0; border-bottom: 2px solid transparent;
  font: 600 1rem var(--font-head); color: var(--muted); cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s; }
.pdp-tabs__list button:hover { color: var(--text); }
.pdp-tabs__list button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.pdp-tabs__panel { max-width: 860px; }
.pdp-tabs__panel + .pdp-tabs__panel { margin-top: 36px; }
.pdp-tabs.is-tabs .pdp-tabs__panel { margin-top: 0; }
.pdp-tabs.is-tabs .pdp-tabs__h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pdp-tabs__panel:focus-visible { outline-offset: 6px; }
.pdp-prose { font-size: 1.02rem; line-height: 1.7; }
.pdp-specs { margin: 0; max-width: 720px; }
.pdp-specs div { display: grid; grid-template-columns: minmax(120px, 2fr) 3fr; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.pdp-specs dt { color: var(--muted); }
.pdp-specs dd { margin: 0; font-weight: 500; }
.pdp-dp { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 48px; }
.pdp-dp h3 { font-size: 1rem; margin: 0 0 12px; }
.pdp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pdp-list li { position: relative; padding-left: 20px; }
.pdp-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pdp-more { margin: 22px 0 0; }
.pdp-more a { color: var(--accent-ink, var(--accent)); font-weight: 600; text-decoration: none; }
.pdp-more a:hover { text-decoration: underline; }
.pdp-contacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.pdp-contacts a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 15px; border-radius: var(--btn-radius); background: var(--surface); color: var(--text); text-decoration: none; font-size: .92rem; }
.pdp-contacts a:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }

/* «Схожі товари» */
.pdp-related { margin-top: 80px; }
.pdp-related__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.pdp-related__head h2 { margin: 0; }
.pdp-related__head a { color: var(--accent-ink, var(--accent)); font-weight: 600; text-decoration: none; font-size: .95rem; }
.pdp-related__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* === gallery: галерея ліворуч, покупка праворуч ============================================ */
.pdp-g { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 52px; align-items: start; }
.pdp-g__info { padding-top: 4px; }

/* === compact: щільно, фото й покупка поруч, вкладки в картці ======================================= */

.pdp-c { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; align-items: start; }
.pdp-page--compact .pg__slide { aspect-ratio: 1; }
.pdp-page--compact .pg__thumb { flex-basis: 60px; aspect-ratio: 1; }
.pdp-page--compact .pdp-head__title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.pdp-c__box { margin-top: 16px; padding: 18px 20px 20px; border-radius: var(--radius); background: var(--surface); }
.pdp-c__box .pdp-price { margin-top: 0; }
.pdp-c__box .buy { margin-bottom: 0; }
.pdp-c__box .pdp-soldout { background: var(--bg); margin-bottom: 0; }
.pdp-page--compact .pdp-trust { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; border: 0; margin-top: 14px; }
.pdp-page--compact .pdp-trust li { align-items: flex-start; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.pdp-c__more { margin-top: 40px; padding: 4px 28px 28px; border-radius: var(--radius); background: var(--surface); }
.pdp-c__more .pdp-tabs { margin-top: 0; }
.pdp-c__more .pdp-contacts a { background: var(--bg); }

/* === editorial: як журнал ======================================================================= */
.pdp-page--editorial .pdp-crumbs ol { justify-content: center; }
.pdp-e__head { max-width: 860px; margin: 10px auto 30px; text-align: center; }
.pdp-e__head .pdp-head__title { font-size: clamp(2rem, 5.4vw, 3.9rem); line-height: 1.05; letter-spacing: -.025em; margin-bottom: 16px; }
.pdp-e__head .pdp-meta { justify-content: center; }
.pdp-e__media { margin-bottom: 56px; }
.pdp-e { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 72px; align-items: start; }
.pdp-e__text { grid-column: 1; grid-row: 1; max-width: 680px; }
.pdp-e__buy { grid-column: 2; grid-row: 1; }
.pdp-e__card { padding: 22px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.pdp-e__card .pdp-price { margin-top: 0; }
.pdp-e__card .buy { margin-bottom: 0; }
.pdp-e__lead { font-size: 1.18rem; line-height: 1.75; }
.pdp-e__lead p:first-child::first-letter { float: left; margin: .06em .12em 0 0; font: 600 3.7em/.8 var(--font-head); color: var(--accent); }
.pdp-page--editorial .pdp-tabs { margin-top: 44px; }
.pdp-page--editorial .pdp-tabs__list button { font: 600 .8125rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; padding: 16px 0 14px; }
.pdp-page--editorial .pdp-related__head { justify-content: center; flex-direction: column; align-items: center; text-align: center; }
@media (min-width: 861px) and (min-height: 820px) { .pdp-e__buy { position: sticky; top: var(--pdp-top, 110px); } }

/* збільшене фото */
.pdp-zoom { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--text); overflow: hidden; }
.pdp-zoom::backdrop { background: rgba(0, 0, 0, .55); }
.pdp-zoom__fig { margin: 0; width: 100%; height: 100%; display: grid; place-items: center; padding: 60px 16px; overflow: hidden; }
.pdp-zoom__fig img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; transition: transform .25s ease; }
.pdp-zoom.is-zoomed .pdp-zoom__fig img { transform: scale(2.2); cursor: zoom-out; }
.pdp-zoom__x, .pdp-zoom__nav { position: absolute; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; }
.pdp-zoom__x { top: 12px; right: 12px; }
.pdp-zoom__nav { top: 50%; transform: translateY(-50%); }
.pdp-zoom__nav--prev { left: 16px; }
.pdp-zoom__nav--next { right: 16px; }
.pdp-zoom__n { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* липка кнопка — лише на телефоні */
.pdp-sticky { display: none; }

@media (max-width: 860px) {
  .pdp-g, .pdp-c, .pdp-e { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .pdp-e__text, .pdp-e__buy { grid-column: auto; grid-row: auto; max-width: none; }
  .pdp-e { gap: 36px; }
  .pdp-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .pdp-tabs { margin-top: 40px; }
  .pdp-related { margin-top: 56px; }
}
@media (max-width: 760px) {
  .main--pdp { padding-top: 10px; padding-bottom: 104px; }
  .pdp-crumbs ol { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; margin-bottom: 14px; }
  .pdp-crumbs ol::-webkit-scrollbar { display: none; }
  .pdp-crumbs li { flex: none; }
  .pdp-page--editorial .pdp-crumbs ol { justify-content: flex-start; }
  .pdp-crumbs [aria-current] span { max-width: 60vw; }
  /* gallery на телефоні: фото від краю до краю, крапки замість мініатюр */
  .pdp-page--gallery .pg__stage { margin: 0 -16px; border-radius: 0; }
  /* фото не займає весь перший екран: ціна й «Додати в кошик» видно без гортання */
  .pdp-page--gallery .pg__slide, .pdp-page--compact .pg__slide { max-height: 44vh; width: 100%; }
  .pg--side .pg__thumbs { display: none; }
  .pg--many .pg__dots { display: flex; }
  .pg__count, .pg__arrow, .pg__zoomhint { display: none; }
  .pg--strip .pg__slide { height: auto; flex-basis: 84%; }
  .pdp-page--compact .pg__thumb { flex-basis: 52px; }
  .pdp-c__more { padding: 0 16px 20px; margin-left: -4px; margin-right: -4px; }
  .pdp-tabs__list { gap: 22px; }
  .pdp-specs div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; }
  .pdp-e__head { margin-bottom: 22px; }
  .pdp-e__media { margin-bottom: 28px; }
  .pdp-e__card { padding: 18px; }
  .pdp-e__lead { font-size: 1.08rem; }
  .pdp-zoom__nav { top: auto; bottom: 10px; transform: none; }

  .pdp-sticky { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(10px); border-top: 1px solid var(--line); transition: transform .25s ease, visibility .25s; }
  .pdp-sticky.is-js:not(.is-on) { transform: translateY(110%); visibility: hidden; }
  .pdp-sticky__img { flex: none; width: 44px; height: 52px; object-fit: cover; border-radius: calc(var(--radius) * .5); }
  .pdp-sticky__txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
  .pdp-sticky__txt span { font-size: .8125rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pdp-sticky__txt b { font-family: var(--font-head); }
  .pdp-sticky__btn { flex: none; min-height: 46px; padding: 12px 22px; }
}
@media (max-width: 560px) {
  .pdp-page--compact .pdp-trust { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pdp-page--compact .pdp-trust li { flex-direction: row; align-items: center; padding: 12px 14px; }
}
.pdp-sale { margin: 6px 0 0; font-size: .875rem; }
.pdp-sale b { font-variant-numeric: tabular-nums; color: var(--accent); }
.pdp-sale i { font-style: normal; }
@media (prefers-reduced-motion: reduce) {
  .pdp-sticky, .pg__dots span, .pdp-zoom__fig img { transition: none; }
}
