/* =========================================================
   /styles/productcard.css — PDP (повна версія, blur + desktop close-size)
   ========================================================= */

/* ===================== 0) CSS variables ===================== */
:root {
  /* Base */
  --container: 37.5rem;
  --header-h: 6.4rem;
  --text: #22272a;
  --muted: #8c8f96;
  --line: rgba(0, 0, 0, 0.12);

  /* Gallery */
  --slider-bg: #f3f3f3;
  --slider-progress-bg: #8d8787;
  --slider-progress-thumb: #afafaf;

  /* Buttons / accents */
  --btn-bg: #595a5c;
  --btn-fg: #fff;
  --chip-bg: #595a5c;
  --chip-fg: #fff;
  --chip-border: #d9d9d9;

  /* Desktop tuning vars */
  --desk-title-fs: 3rem;
  --desk-price-fs: 2rem;
  --desk-title-price-gap: 2.6rem;

  --desk-sizes-title-fs: 2rem;
  --desk-size-btn: 4rem;
  --desk-size-btn-fs: 2rem;

  --desk-sizechart-fs: 1.5rem;
  --desk-sizechart-mt: 2rem;

  --desk-cta-h: 5rem;
  --desk-cta-fs: 2.4rem;
  --desk-cta-radius: 4rem;

  --desk-acc-header-fs: 1.4rem;
  --desk-acc-header-pad: 1rem;
  --desk-acc-panel-fs: 1.4rem;
  --desk-acc-panel-pad-l: 1rem;

  /* PDP grid */
  --desk-grid-left: 64rem; /* ліва колонка (галерея) */
  --desk-grid-right: 44rem; /* права колонка (інфо) */
  --desk-grid-gap: 4rem;

  --desk-thumbs-col: 8rem;
  --desk-thumb-size: 8rem;
  --desk-media-h: 66rem;

  --desk-scene-aspect: 4/5;
  --desk-scene-h-min: 52rem;
  --desk-scene-h-viewport: 53.5vh;
  --desk-scene-h-max: 82rem;

  /* Mobile ≤425px — full-bleed */
  --mobile-page-pad: 1.2rem;

  /* PDP related (mobile slider) */
  --peek-guard: 0.2rem;

  /* === нове === */
  --overlay-blur: 2px; /* сила блюру бекграунду (моб + десктоп) */
  --desk-close-size: 4.8rem; /* РОЗМІР кнопки “закрити” на десктопі */
  --desk-scene-h-fixed: 56rem;
}

/* ===================== 1) Base layout / container / header ===================== */
html,
body {
  color: var(--text);
}
.container {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: 1.6rem;
}
main.pdp {
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0rem));
}
.header1 {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: #fff;
  padding-top: env(safe-area-inset-top);
  transition: transform 0.25s ease;
}

/* ===================== 2) Gallery (slider 1:1) ===================== */
.pdp-gallery {
  margin-top: 0;
}
.pdp-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--slider-bg);
  border-radius: 0;
}
.pdp-media .pdp-track {
  display: flex;
  height: 100%;
  will-change: transform;
  user-select: none;
  touch-action: pan-y;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.pdp-media .pdp-track > img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Прогрес-лінія */
.pdp-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.28rem;
  background: var(--slider-progress-bg);
  border-radius: 99rem;
  overflow: hidden;
}
.pdp-bar__thumb {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% / var(--slides, 1));
  transform: translate3d(0, 0, 0);
  transition: transform 0.35s ease;
  background: var(--slider-progress-thumb);
}

/* ===================== 3) Head (title + price + ВІН/ВОНА) ===================== */
.pdp-head {
  margin: 1.6rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.2rem;
}
.pdp-head__left {
  flex: 1 1 auto;
}
.pdp-head__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  margin: -0.2rem 0;
}
.pdp-title {
  margin: 0 0 0.4rem;
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 2.2rem;
}
.pdp-price {
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.7rem;
}

/* Перемикач ВІН / ВОНА — як у макеті */
.gender-toggle {
  display: inline-flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0; /* всередині без зазору — одна суцільна пілля */
  min-width: 10.4rem;
  background: linear-gradient(90deg, #b0d0ff 0%, #facbfd 100%);
  border-radius: 999px;
  border: 1px solid #c2c5d0;
  font-family: 'Gilroy', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
}
.gender-toggle__btn {
  flex: 1 1 0;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: transparent;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  color: #2b2b2b;
  text-decoration: none; /* щоб <a> виглядав як кнопка */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gender-toggle__btn.is-active {
  box-shadow: 0 0 0 1px #58565d inset; /* темніша рамка як на макеті */
}

/* ===================== 4) Sizes ===================== */
.pdp-sizes {
  margin: 1.6rem 0 -1rem;
}
.pdp-sizes-colors {
  margin: -1.4rem 0 -1rem;
}

.pdp-sizes__title {
  font-weight: 600;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  line-height: 1.7rem;
}
.size-list {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.size-btn {
  min-width: 3.8rem;
  padding: 0.9rem;
  border: 0.1rem solid var(--chip-border);
  border-radius: 6.8rem;
  background: var(--chip-bg);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.7rem;
  color: var(--chip-fg);
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  position: relative;
}
.size-btn[aria-pressed='true'] {
  background: none;
  border: 0.1rem solid var(--chip-bg);
  color: var(--chip-bg);
}
.size-btn.is-oos,
.size-btn:disabled {
  color: #9aa0a6;
  border-color: #e0e0e0;
  background: #f6f7f8;
  cursor: not-allowed;
  pointer-events: none;
}
.size-btn.is-oos::after,
.size-btn:disabled::after {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  top: 50%;
  height: 0.2rem;
  background: currentColor;
  transform: translateY(-50%) rotate(-135deg);
  opacity: 0.65;
  pointer-events: none;
}

/* Посилання на сітку розмірів */
.size-chart {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.7rem;
}

.size-chart-colors {
  display: inline-block;
  margin-top: 2.2rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.7rem;
}

/* ===================== 5) CTA (add-to-cart) ===================== */
.pdp-cta {
  margin: 2rem 0 3rem;
}
.btn-add-to-cart {
  width: 100%;
  height: 4.8rem;
  border: none;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 1.7rem;
  border-radius: 6.8rem;
}

/* ===================== 6) Accordions ===================== */
.pdp-accord {
  margin: 2rem 0 3rem;
  display: grid;
  gap: 0.5rem;
}
.acc,
.acc2 {
  border-bottom: 0.1rem solid var(--line);
  background: #fff;
}
.acc2 {
  border-top: 0.1rem solid var(--line);
  padding-top: 0.3rem;
}
.acc__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 1.4rem;
  background: transparent;
  border: 0;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: left;
  margin: 0 0 0.3rem 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.acc__chev {
  transition: transform 0.28s ease;
}
.acc__header[aria-expanded='true'] .acc__chev {
  transform: rotate(180deg);
}
.acc__panel {
  padding: 0 1.4rem 1.2rem;
  color: var(--text);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pdp-media .pdp-track,
  .pdp-bar__thumb,
  .acc__chev {
    transition: none;
  }
}

/* ===================== 7) Modal (size chart) ===================== */
html.no-scroll,
html.no-scroll body {
  overflow: hidden;
  height: 100%;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
}
.modal.is-open {
  display: block;
}

/* === Бекграунд-оверлей з BLUR (моб + десктоп) === */
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: auto; /* клік по фону закриває */
  -webkit-backdrop-filter: blur(var(--overlay-blur));
  backdrop-filter: blur(var(--overlay-blur)); /* ← блюр бекграунду всюди */
}
.modal.is-open .modal__overlay {
  opacity: 1;
}

.modal__dialog {
  position: relative;
  margin: 6vh auto;
  width: min(92vw, 82rem);
  background: #fff;
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.25);
  transform: translateY(2.4rem);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.modal.is-open .modal__dialog {
  transform: none;
  opacity: 1;
  margin: 30rem auto;
} /* твоя позиція — не чіпаю */

.modal__image {
  display: block;
  width: 100%;
  height: auto;
}

/* === Кнопка “закрити”: внизу по центру, з blur, адаптивний розмір === */
/* важливо: щоб її не обрізало, для size-chart дозволяємо видимий overflow */
.sc-modal .modal__dialog {
  z-index: 2;
  overflow: visible;
}

.modal__close,
.sc-modal .modal__close {
  position: absolute;
  top: auto;
  right: auto;
  left: 50%;
  bottom: -4.2rem; /* ВНИЗУ ПО ЦЕНТРУ */
  transform: translateX(-50%);
  /* Адаптивний розмір: мобільний мінімум → росте до --desk-close-size */
  width: clamp(3.2rem, 2.4vw + 2rem, var(--desk-close-size));
  height: clamp(3.2rem, 2.4vw + 2rem, var(--desk-close-size));
  border: 0;
  border-radius: 999rem;
  background: rgba(17, 17, 17, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px); /* легкий скляний ефект самої кнопки */
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  z-index: 4;
}
.modal__close::before,
.modal__close::after,
.sc-modal .modal__close::before,
.sc-modal .modal__close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 0.22rem;
  background: #fff;
  border-radius: 0.22rem;
  transform-origin: center;
  pointer-events: none;
}
.modal__close::before,
.sc-modal .modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.modal__close::after,
.sc-modal .modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.modal__close:active,
.sc-modal .modal__close:active {
  transform: translateX(-50%) scale(0.96);
}

/* ===================== 8) Mobile polish (≤425px) ===================== */
@media (max-width: 425px) {
  .container {
    width: 100%;
    padding-inline: max(var(--mobile-page-pad), env(safe-area-inset-left));
  }
  .pdp-gallery,
  .pdp-media {
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
  }
  /* якщо захочеш внутрішні відступи на мобілі – раскоментуєш
  .pdp-head,
  .pdp-sizes,
  .pdp-cta,
  .pdp-accord {
    padding-left: var(--mobile-page-pad);
    padding-right: var(--mobile-page-pad);
  } */
  .pdp-cta .btn-add-to-cart {
    width: 100%;
  }
}

/* ===== Mob/tablet: ховаємо превʼю та стрілки ===== */
@media (max-width: 1023.98px) {
  .pdp-shell {
    display: block;
  }
  .pdp-thumbs,
  .pdp-thumb,
  .pdp-thumb img {
    display: none !important;
  }
  .pdp-gallery .thumbs,
  .pdp-gallery [data-thumbs],
  .pdp-gallery .thumbs-list,
  .pdp-gallery .thumbs-wrap,
  .pdp-shell > .thumbs,
  .pdp-shell .thumbs,
  .thumbs,
  .thumbs-list,
  .thumbs-wrap {
    display: none !important;
  }
  .pdp-media {
    aspect-ratio: 3/4;
    height: auto;
    margin: 0;
    border-radius: 0;
  }
}

/* ===================== 9) Desktop (≥1024px) ===================== */
@media (min-width: 1024px) {
  :root {
    --container: 120rem;
  }
  .container {
    padding-inline: 2rem;
  }

  /* Дві колонки */
  main.pdp {
    display: grid;
    grid-template-columns: var(--desk-grid-left) var(--desk-grid-right);
    gap: var(--desk-grid-gap);
    align-items: start;
    margin-top: 2rem;
  }

  .pdp-shell {
    display: grid;
    grid-template-columns: var(--desk-thumbs-col) 1fr;
    gap: 1.6rem;
    align-items: start;
  }
  .pdp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .pdp-thumbs,
  .pdp-thumbs * {
    scrollbar-width: none;
  }
  .pdp-thumbs::-webkit-scrollbar,
  .pdp-thumbs *::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
  .pdp-thumb {
    width: var(--desk-thumb-size);
    aspect-ratio: 1/1;
    border: 0.1rem solid #e3e3e3;
    border-radius: 0.6rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    cursor: pointer;
    overflow: visible;
  }
  .pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }
  .pdp-thumb.is-active {
    box-shadow: 0 0 0 0.2rem #595a5c inset;
  }
  .pdp-thumb:hover:not(.is-active) {
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.15) inset;
  }

  .pdp-media {
    aspect-ratio: 3/4;
    background: var(--slider-bg);
    height: 66rem;
  }

  .pdp-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
  }
  .pdp-nav--prev {
    left: 0.8rem;
  }
  .pdp-nav--next {
    right: 0.8rem;
  }
  .pdp-nav::before {
    content: '';
    width: 1rem;
    height: 1rem;
    border-right: 0.2rem solid #fff;
    border-bottom: 0.2rem solid #fff;
    transform: rotate(135deg);
  }
  .pdp-nav--next::before {
    transform: rotate(-45deg);
  }

  .pdp-info,
  .pdp-sizes,
  .pdp-cta,
  .pdp-accord {
    max-width: var(--desk-grid-right);
  }

  /* Desktop шапка з ВІН/ВОНА справа */
  .pdp-head {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2.6rem;
    margin: 0 0 1.2rem;
  }
  .pdp-title {
    font-size: var(--desk-title-fs);
    margin: 0 0 2.6rem;
  }
  .pdp-price {
    font-size: var(--desk-price-fs);
  }

  .gender-toggle {
    min-width: 12rem;
  }
  .gender-toggle__btn {
    font-size: 1.3rem;
    padding-inline: 1rem 1rem;
    padding: 1rem 1.2rem;
  }

  .pdp-sizes {
    margin: 2rem 0 2.4rem;
  }

  .pdp-sizes-colors {
    margin: -1.4rem 0 1rem;
  }

  .pdp-sizes__title {
    font-size: var(--desk-sizes-title-fs);
  }
  .size-btn {
    width: var(--desk-size-btn);
    height: var(--desk-size-btn);
    min-width: var(--desk-size-btn);
    font-size: var(--desk-size-btn-fs);
  }
  .size-chart {
    margin-top: var(--desk-sizechart-mt);
    font-size: var(--desk-sizechart-fs);
  }

  .pdp-cta {
    margin-top: 0;
    margin-bottom: 1rem;
  }
  .btn-add-to-cart {
    height: var(--desk-cta-h);
    font-size: var(--desk-cta-fs);
    border-radius: var(--desk-cta-radius);
  }

  .pdp-accord {
    gap: 0;
    margin-bottom: 2.4rem;
  }
  .acc__header {
    padding: var(--desk-acc-header-pad);
    font-size: var(--desk-acc-header-fs);
    line-height: 1.7rem;
    font-size: 1.5rem;
  }
  .acc__chev {
    width: 2rem;
    height: 100%;
  }
  .acc__chev path {
    stroke-width: 0.1rem;
  }
  .acc__panel {
    padding: 0 0 0 var(--desk-acc-panel-pad-l);
    font-size: var(--desk-acc-panel-fs);
  }

  .pdp-info {
    min-height: clamp(var(--desk-scene-h-min), 70vh, var(--desk-scene-h-max));
    display: flex;
    flex-direction: column;
    padding-bottom: 3.2rem;
    padding-top: 1rem;
  }

  /* ---------- Desktop модалка: позиціювання як у тебе ---------- */
  .modal.is-open.sc-modal .modal__dialog {
    margin: 20rem auto; /* не чіпаю розташування */
    width: min(110rem, calc(100vw - 6rem));
    max-height: clamp(56rem, 78vh, 92rem);
    border-radius: 5rem;
    box-shadow: 0 2.4rem 6.4rem rgba(0, 0, 0, 0.28);
    overflow: visible; /* щоб нижній центр-ікс не різало */
    display: grid;
    grid-template-rows: 1fr;
  }
  .sc-modal .modal__dialog > * {
    min-height: 0;
    bottom: -6.2rem;
  }
}

/* ===================== 10) PDP: Вам може сподобатись ===================== */
.pdp-related {
  margin: 3.2rem 0 4rem;
}
.pdp-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-inline: 1.2rem;
}
.pdp-related__title {
  font-family: gilroy, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  line-height: 1.2;
  margin: 0;
}
.pdp-related__nav {
  display: none;
  gap: 0.6rem;
}
.rel-btn {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: 0;
  background: #595a5c;
  cursor: pointer;
  position: relative;
}
.rel-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1rem;
  height: 1rem;
  border-right: 0.2rem solid #fff;
  border-bottom: 0.2rem solid #fff;
  transform: rotate(135deg);
}
.rel-btn--next::before {
  transform: rotate(-45deg);
}
.rel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* MOBILE viewport: 2 картки */
.pdp-related__viewport {
  --rel-gap: 1rem;
  --rel-pad: 0rem;
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 0 var(--rel-pad);
  scrollbar-width: none;
  touch-action: pan-x;
}
.pdp-related__viewport::-webkit-scrollbar {
  display: none;
}
.pdp-related__viewport::before,
.pdp-related__viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  background: #fff;
  z-index: 1;
  width: var(--rel-pad);
}
.pdp-related__viewport::before {
  left: 0;
}
.pdp-related__viewport::after {
  right: 0;
}

.pdp-related__track {
  display: flex;
  gap: var(--rel-gap);
  list-style: none;
  margin: 0;
  padding: 0 var(--peek-guard) 0 0;
  will-change: transform;
  touch-action: pan-x;
}
.rel-card {
  box-sizing: border-box;
  flex: 0 0
    calc((100% - (2 * var(--rel-pad)) - var(--rel-gap) - var(--peek-guard)) / 2);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #fff;
  border: 0;
  box-shadow: inset 0 0 0 0.1rem #e9e9e9;
  border-radius: 0.8rem;
  overflow: hidden;
}
.rel-card__link {
  display: grid;
  grid-template-rows: auto auto auto;
  text-decoration: none;
  color: inherit;
}
.rel-card__img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  background: #f3f3f3;
}
.rel-card__title {
  font-weight: 700;
  padding: 0.8rem 0.8rem 0;
  font-size: 1.4rem;
  line-height: 1.3;
}
.rel-card__price {
  padding: 0 0.8rem 1rem;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
}

/* Tablet */
@media (min-width: 768px) {
  .pdp-related__title {
    font-size: 2.2rem;
  }
}

/* Desktop: 4 у ряд */
@media (min-width: 1024px) {
  main.pdp {
    grid-template-rows: 60rem auto;
  }
  .pdp-related {
    grid-column: 1 / -1;
    margin: 9rem 0 5rem;
  }
  .pdp-related__head {
    padding-inline: 0;
  }
  .pdp-related__title {
    font-size: 2.4rem;
  }
  .pdp-related__nav {
    display: flex;
  }
  .pdp-related__viewport {
    padding: 0;
    overflow: hidden;
  }
  .pdp-related__track {
    gap: 1.2rem;
    padding: 0;
  }
  .rel-card {
    flex: 0 0 calc((100% - 3 * 1.2rem) / 4);
  }
  .pdp-related__bar {
    display: none;
  }
}

/* backstop */
@media (min-width: 1024px) {
  body > .pdp-related {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* polish */
.pdp-related__track .rel-card {
  will-change: transform, box-shadow, opacity;
  transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
}
.pdp-related.is-animating .rel-card.is-focus {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #e9e9e9;
}
@media (max-width: 420px) {
  .pdp-related__track .rel-card {
    transition-duration: 0.28s;
  }
}

/* ===================== 12) PDP fullscreen gallery ===================== */

/* сама модалка поверх всего и по центру */
.gallery-modal.is-open {
  display: flex; /* перекрывает display:block из .modal.is-open */
  align-items: center;
  justify-content: center;
}

/* диалог для галереи: прозрачный фон, без рамок, по центру */
.gallery-modal .modal__dialog {
  margin: 0 auto !important;
  padding: 0;
  width: min(96vw, 96rem);
  max-height: 90vh;

  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* картинка строго одна, по центру */
.gallery-modal__figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-modal__img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 6rem);
  object-fit: contain;

  /* плавний фейд */
  opacity: 1;
  transition: opacity 0.25s ease;
}

.gallery-modal__img.is-changing {
  opacity: 0;
}

/* крестик под фоткой по центру */
.gallery-modal .modal__close {
  bottom: -4.2rem; /* под картинкой */
  left: 50%;
  transform: translateX(-50%);
}

/* стрелки навигации (desktop only) */
.gallery-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gallery-modal__nav::before {
  content: '';
  width: 1.2rem;
  height: 1.2rem;
  border-right: 0.2rem solid #fff;
  border-bottom: 0.2rem solid #fff;
  transform: rotate(135deg);
}

.gallery-modal__nav--next::before {
  transform: rotate(-45deg);
}

.gallery-modal__nav:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (min-width: 1024px) {
  .gallery-modal__nav {
    display: flex; /* стрелки видны только на десктопе */
  }
  .gallery-modal__nav--prev {
    left: 1.6rem;
  }
  .gallery-modal__nav--next {
    right: 1.6rem;
  }

  .gallery-modal .modal__close {
    bottom: -5.5rem; /* под картинкой */
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Мобилка — можно чуть ближе к краю и поменьше */
@media (max-width: 1023.98px) {
  .gallery-modal__nav--prev {
    left: 0.8rem;
  }
  .gallery-modal__nav--next {
    right: 0.8rem;
  }
  .gallery-modal__nav {
    width: 2.8rem;
    height: 2.8rem;
  }
}

/* ====== PDP: блок вибору кольору ====== */

.pdp-colors {
  margin: 1.8rem 0 2.4rem;
}

.color-list {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* кружечки */
.color-dot {
  width: 3.8rem;
  height: 3.8rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #7e7e7e;
  cursor: pointer;
  text-decoration: none;
}

/* кольори */
.color-dot--red {
  background-color: #d21921;
}

.color-dot--black {
  background-color: #000;
}

.color-dot--blue {
  background-color: #2b13fd;
}

.color-dot--white {
  background-color: #ffffff;
}

/* половина біла, половина червона */
.color-dot--white-red {
  background-image: linear-gradient(135deg, #ffffff 0 50%, #d21921 50% 100%);
  background-color: transparent;
}

/* активний колір (поточна сторінка) */
.color-dot.is-active {
  border-color: #22272a;
}

@media (min-width: 1024px) {
  .color-dot {
    width: 4rem;
    height: 4rem;
  }
}

@media (min-width: 1024px) {
  .pdp-media {
    height: var(--desk-media-h);
  }

  .pdp-thumbs {
    max-height: var(--desk-media-h); /* = висоті великого фото */
    overflow-y: auto; /* скрол якщо не влазить */
    overflow-x: hidden;
    padding-right: 0.4rem; /* щоб контент не лип до краю */
  }

  .pdp-thumb {
    flex: 0 0 auto; /* щоб мініатюри не стискались */
  }

  /* (опціонально) щоб скрол-колесо не “прокручувало” всю сторінку */
  .pdp-thumbs {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

.price-old {
  text-decoration: line-through;
  opacity: 0.5;
  margin-right: 0.6rem;
}

.price-new {
  font-weight: 700;
}

/* .price-old {
  position: relative;
  color: #8c8f96;
  margin-right: 0.8rem;
}

.price-old::after {
  content: '';
  position: absolute;
  left: -2%;
  top: 50%;
  width: 104%;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%);
} */
