/* ==========================================================================
   PCG — Product Card Gallery (standalone swipe gallery for promo/outlet cards)
   --------------------------------------------------------------------------
   Un-namespaced, self-contained port of the category_v2 (.scv2-*) card gallery
   for the LIVE promo/outlet/anniversary listing cards. No dependency on the
   .scv2 CSS variables — literal brand colors inline here.

   Scoping: every rule is gated by `.pcg-on`, a marker class added to the card's
   image frame (.product-img-container) ONLY when the product has a gallery
   (>1 photo). Single-photo cards keep `class="product-img-container"` unchanged
   and are byte-identical to before, so this stylesheet is inert for them.

   Interaction model (mirrors the proven v2 scheme):
   - The card's full-card tap overlay (.product-link, z-index:2) covers the
     image. The scroll track sits at the SAME z-index but LATER in the DOM, so
     horizontal swipes/taps reach the track; tap-to-PDP is re-provided by the JS
     reading the track's data-href.
   - touch-action: pan-x pan-y — a finger that lands on the gallery can still
     drag the PAGE vertically (only horizontal drags pan the gallery). This is
     the mobile vertical-scroll fix; never revert to bare pan-x.
   ========================================================================== */

/* horizontal scroll-snap track ------------------------------------------------ */
.pcg-on .pcg-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;              /* Firefox */
    overscroll-behavior-x: contain;
    position: relative;
    z-index: 2;                         /* == .product-link; later DOM wins for swipe/tap */
    touch-action: pan-x pan-y;          /* keep vertical page-scroll alive on mobile */
    border-radius: 15px;
}
.pcg-on .pcg-track::-webkit-scrollbar { display: none; }   /* Chrome/Safari */

.pcg-on .pcg-track img {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    width: 100%;
    height: 100%;
    object-fit: contain;                /* match the legacy single-image look */
    display: block;
    border-radius: 15px;
}

/* badges/strips overlay: keep them visible above the slides, but never let them
   swallow a swipe (they carry no interactive controls). ----------------------- */
.pcg-on .overlay-container {
    z-index: 2;
    pointer-events: none;
}

/* prev / next arrows — desktop hover only, hidden on touch --------------------- */
.pcg-on .pcg-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;                         /* above the track + overlay, clickable */
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e3e3e3;
    background: rgba(255, 255, 255, 0.95);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s;
    color: #201D33;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.pcg-on .pcg-prev { left: 8px; }
.pcg-on .pcg-next { right: 8px; }

.pcg-on:hover .pcg-nav,
.pcg-on:focus-within .pcg-nav { opacity: 1; }

@media (hover: none) {
    .pcg-on .pcg-nav { display: none; }
}

/* slide indicator dots -------------------------------------------------------- */
.pcg-on .pcg-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 2;
    pointer-events: none;
}
.pcg-on .pcg-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cfcfcf;
    transition: background .15s;
}
.pcg-on .pcg-dots i.on { background: #201D33; }
