/* pdp-gallery.css — mobile product media strip for the product pages
   (/party-ufo/ and /diy-kit/). Shared between soundglow.dk and soundglow.eu:
   this file MUST stay byte-identical in both docroots.

   Desktop keeps the existing .product-image-wrap column; the strip only
   appears at the <=900px breakpoint where that column is hidden. It renders
   as the first child of .product-info (order:-1 in the mobile flex column),
   so it sits above the eyebrow / product name / price.

   Full-bleed is the same negative-margin trick .rev-carousel-wrap uses, with
   the same -1.5rem / -1.25rem / -1rem steps as the page section gutter. */

.pdp-gallery { display: none; }

@media (max-width: 900px) {
  .pdp-gallery {
    display: block;
    order: -1;
    position: relative;
    margin: 0 -1.5rem 1.4rem;
  }

  /* Horizontal snap track. Slides are centre-snapped with symmetric padding so
     the neighbouring slide peeks in on both sides — that peek is the only
     affordance telling a thumb the strip scrolls. */
  .pdp-gallery-track {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding: 0 8%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pdp-gallery-track::-webkit-scrollbar { display: none; }
  .pdp-gallery-track:focus-visible { outline: 2px solid var(--purple); outline-offset: -2px; }

  /* 1:1 because every curated still in the repo is square. The gradient is a
     placeholder so posterless webm clips never flash black before decode. */
  .pdp-slide {
    flex: 0 0 84%;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    aspect-ratio: 1 / 1;
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
    border: 1px solid rgba(255,255,255,0.10);
    background: linear-gradient(135deg, #1a1530, #0d0b1e);
  }
  .pdp-slide img,
  .pdp-slide video {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
  }
  .pdp-slide:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }

  /* The dot row lives back inside the section gutter, so it cancels the
     wrapper's negative margin with matching padding. */
  .pdp-gallery-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .pdp-dot {
    appearance: none;
    width: 7px; height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
  }
  .pdp-dot.is-active { background: var(--purple); transform: scale(1.35); }
  .pdp-dot:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
}

@media (max-width: 550px) {
  .pdp-gallery { margin-left: -1.25rem; margin-right: -1.25rem; }
  .pdp-gallery-dots { padding-left: 1.25rem; padding-right: 1.25rem; }
}

@media (max-width: 380px) {
  .pdp-gallery { margin-left: -1rem; margin-right: -1rem; }
  .pdp-gallery-dots { padding-left: 1rem; padding-right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-dot { transition: none; }
}
