/* ==========================================================================
   Violetta Shoes · демонстраційна сторінка товару «Замшеві козаки»
   ========================================================================== */

.pdp { padding: 18px 0 clamp(40px, 6vw, 80px); }

.pdp__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(18px, 3vw, 34px);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8rem;
  color: var(--ink-2);
}
.crumbs a { border-bottom: 1px solid transparent; transition: border-color .3s; }
.crumbs a:hover { border-color: var(--line-strong); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; opacity: .5; }
.crumbs [aria-current] { color: var(--wine); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: .35rem 1.1rem .35rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--milk);
  color: var(--wine);
  font-weight: 500;
  font-size: .9rem;
  transition: background-color .3s, transform .3s var(--ease);
}
.back-link svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.back-link:hover { background: var(--powder); }
.back-link:hover svg { transform: translateX(-3px); }

.pdp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(32px, 5vw, 84px);
  align-items: start;
}

/* ---------- галерея ---------- */
.gallery {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.gallery__stage {
  grid-column: 2;
  grid-row: 1;
  position: relative;
}
.gallery__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 50% 50% 26px 26px / 40% 40% 26px 26px;
  background: var(--rose);
  box-shadow: 0 40px 80px -46px rgba(107, 46, 70, .6);
  isolation: isolate;
}
.gallery__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline-offset: -4px; }
.slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.slide__zoom {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}
.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.slide__label {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: .4rem .85rem;
  border-radius: 999px;
  background: rgba(255, 250, 253, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--wine);
  white-space: nowrap;
}
.slide--video .media-toggle { bottom: 14px; right: 14px; }

.gallery__nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 250, 253, .88);
  color: var(--wine);
  box-shadow: 0 12px 26px -16px rgba(65, 45, 55, .6);
  transition: transform .3s var(--ease), opacity .3s;
}
.gallery__nav svg { width: 20px; height: 20px; }
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__nav:hover { transform: scale(1.07); }
.gallery__nav:disabled { opacity: 0; pointer-events: none; }

.gallery__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: .8rem;
  color: var(--ink-2);
}
.gallery__count { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.gallery__count b { font-weight: 500; color: var(--wine); }
.gallery__hint { display: inline-flex; align-items: center; gap: .4rem; }
.gallery__hint svg { width: 15px; height: 15px; color: var(--berry); }
.gallery__dots { display: none; gap: 6px; }
.gallery__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); transition: width .4s var(--ease), background-color .3s; }
.gallery__dots i.is-on { width: 18px; border-radius: 3px; background: var(--wine); }

.gallery__thumbs {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 10px;
  align-content: start;
}
.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: var(--rose);
  opacity: .62;
  box-shadow: 0 0 0 1px var(--line);
  transition: opacity .3s, box-shadow .3s, transform .3s var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.thumb:hover { opacity: .9; }
.thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--wine); }
.thumb__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(65, 45, 55, .22);
  color: var(--bg);
}
.thumb__play svg { width: 20px; height: 20px; }

/* ---------- інформація ---------- */
.pdp__info {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  padding-top: 8px;
}
.pdp__title {
  margin: 16px 0 18px;
  font-size: clamp(3rem, 1.6rem + 3.8vw, 5.4rem);
  line-height: .9;
}
.pdp__title em { display: block; }
.pdp__desc {
  max-width: 32ch;
  font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-2);
}
.pdp__desc em { font-family: var(--f-display); font-style: italic; font-size: 1.2em; color: var(--wine); }
.pdp__price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 26px;
}
.pdp__amount { font-size: 1.75rem; font-weight: 500; letter-spacing: .01em; }
.pdp__badge {
  padding: .38rem .8rem;
  border-radius: 999px;
  background: var(--powder);
  color: var(--wine);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.pdp__price + .note { margin-top: 8px; max-width: 42ch; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts div { padding: 16px 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { font-size: .68rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.facts dd { display: flex; align-items: center; gap: .5rem; margin: 6px 0 0; font-size: 1rem; font-weight: 500; }
.swatch { width: 16px; height: 16px; border-radius: 50%; background: #CDB79B; box-shadow: inset 0 0 0 1px rgba(65, 45, 55, .25); }

.sizes { margin-top: 26px; }
.sizes__label {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.sizes__label small { font-weight: 400; letter-spacing: .06em; text-transform: none; color: var(--ink-2); font-size: .8rem; }
.sizes__label output { margin-left: auto; letter-spacing: .04em; text-transform: none; color: var(--wine); font-size: .86rem; }
.sizes__row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.size {
  min-width: 52px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--milk);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.size:hover { border-color: var(--wine); transform: translateY(-1px); }
.size[aria-checked="true"] { background: var(--wine); border-color: var(--wine); color: var(--bg); }
.sizes .note { margin-top: 10px; }

.pairs { margin-top: 26px; }
.pairs__title { font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.pairs__list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pairs__list li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: var(--rose);
  font-size: .9rem;
}
.pairs__list svg { width: 15px; height: 15px; color: var(--sage-deep); }
.pairs .note { margin-top: 8px; }

.demo-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  margin-top: 30px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px dashed var(--line-strong);
  background: rgba(252, 251, 249, .7);
}
.demo-card > svg { width: 26px; height: 26px; color: var(--berry); }
.demo-card p { font-size: .92rem; line-height: 1.5; }
.demo-card .link-arrow { margin-top: 8px; font-size: .88rem; }

.pdp__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.pdp__actions .btn svg { width: 18px; height: 18px; }

/* ---------- цитата бренду ---------- */
.pdp-quote {
  position: relative;
  padding: 0 0 clamp(64px, 8vw, 110px);
  text-align: center;
}
.pdp-quote blockquote {
  max-width: 20ch;
  margin: 0 auto;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 1.3rem + 3vw, 3.9rem);
  line-height: 1.02;
}
.pdp-quote blockquote em { font-style: italic; color: var(--wine); }
.pdp-quote figcaption { margin-top: 18px; font-size: .8rem; color: var(--ink-2); }

/* ---------- лайтбокс ---------- */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(46, 26, 37, .95);
  color: var(--bg);
  overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; animation: lb-in .35s ease; }
.lightbox::backdrop { background: rgba(46, 26, 37, .6); }
.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 16px 10px;
  font-size: .8rem;
  letter-spacing: .1em;
}
.lightbox__btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--bg);
  background: rgba(255, 250, 253, .1);
  transition: background-color .25s, transform .25s var(--ease);
}
.lightbox__btn:hover { background: rgba(255, 250, 253, .2); transform: scale(1.05); }
.lightbox__btn svg { width: 20px; height: 20px; }
.lightbox__view {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.lightbox__img {
  max-width: min(92vw, 820px);
  max-height: calc(100dvh - 150px);
  width: auto;
  height: auto;
  border-radius: 14px;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .45s var(--ease);
  transform-origin: var(--ox, 50%) var(--oy, 50%);
}
.lightbox__img.is-zoomed { transform: scale(2.1); cursor: zoom-out; transition: transform .45s var(--ease), transform-origin .12s linear; }
.lightbox__view.is-zoomed { touch-action: none; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  margin-top: -23px;
}
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }
.lightbox__foot { padding: 10px 16px max(18px, env(safe-area-inset-bottom)); text-align: center; font-size: .78rem; color: rgba(255, 250, 253, .72); }
@keyframes lb-in { from { opacity: 0; } }

/* ---------- адаптив ---------- */
@media (max-width: 1023px) {
  .pdp__grid { grid-template-columns: 1fr; }
  .pdp__info { position: static; }
}

@media (max-width: 760px) {
  .pdp { padding-top: 10px; }
  .pdp__top { margin-bottom: 14px; }
  .gallery { grid-template-columns: 1fr; margin-inline: calc(var(--pad) * -1); }
  .gallery__stage { grid-column: 1; }
  .gallery__frame { border-radius: 0 0 30px 30px; }
  .gallery__nav { display: none; }
  .gallery__meta { padding-inline: var(--pad); }
  .gallery__hint span { display: none; }
  .gallery__dots { display: flex; }
  .gallery__thumbs {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 var(--pad) 4px;
    scrollbar-width: none;
  }
  .gallery__thumbs::-webkit-scrollbar { display: none; }
  .thumb { flex: 0 0 64px; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .pdp__actions .btn { width: 100%; }
  .lightbox__nav { display: none; }
}
