/* Product page photo gallery — every App\Support\PdpGalleryStyles design.
   Markup: resources/views/storefront/pdp-gallery/render.blade.php
   Script: public/vendor/js/ec-pdp-gallery.js (adds .is-slider while the photos scroll sideways). */

.ec-pdpg {
    --pg-gap: 12px;
    --pg-radius: 14px;
    --pg-accent: var(--ec-style-primary, #111827);
    --pg-bg: #f3f4f6;
    --pg-ratio: 1 / 1;
    --pg-thumb: 76px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "stage" "dots" "progress" "thumbs" "more";
    gap: 0;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.ec-pdpg *,
.ec-pdpg *::before,
.ec-pdpg *::after { box-sizing: border-box; }

/* Templates style every <button> (pill shapes, minimum heights, capital letters); the gallery's
   buttons keep their own look. */
.ec-pdpg button.ec-pdpg-frame,
.ec-pdpg .ec-pdpg-play,
.ec-pdpg .ec-pdpg-thumb,
.ec-pdpg .ec-pdpg-arrow,
.ec-pdpg .ec-pdpg-dot,
.ec-pdpg .ec-pdpg-more,
.ec-pdpg-viewer button {
    min-width: 0 !important;
    min-height: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    transform: none;
}
.ec-pdpg button.ec-pdpg-frame { border-radius: var(--pg-radius) !important; }
.ec-pdpg .ec-pdpg-play { border-radius: 0 !important; }
.ec-pdpg .ec-pdpg-arrow,
.ec-pdpg-viewer button { border-radius: 50% !important; }
.ec-pdpg .ec-pdpg-dot,
.ec-pdpg .ec-pdpg-more { border-radius: 999px !important; }
.ec-pdpg .ec-pdpg-thumb { border-radius: var(--pg-thumb-radius, 10px) !important; }

/* ── Stage and slides ─────────────────────────────────────────────── */
.ec-pdpg-stage { grid-area: stage; position: relative; min-width: 0; }
.ec-pdpg-track {
    position: relative;
    display: flex;
    gap: var(--pg-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    outline: none;
    border-radius: var(--pg-radius);
}
.ec-pdpg-track::-webkit-scrollbar { display: none; }
.ec-pdpg-track:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 3px; }
.ec-pdpg-slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.ec-pdpg .ec-pdpg-frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--pg-ratio);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--pg-radius);
    background: var(--pg-bg);
    overflow: hidden;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: default;
    -webkit-tap-highlight-color: transparent;
}
.ec-pdpg button.ec-pdpg-frame { cursor: zoom-in; }
.ec-pdpg button.ec-pdpg-frame:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: -2px; }
.ec-pdpg .ec-pdpg-frame picture { display: contents; }
.ec-pdpg .ec-pdpg-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    object-fit: cover;
    transition: none;
}
.ec-pdpg--contain .ec-pdpg-frame:not(.ec-pdpg-video) .ec-pdpg-img { object-fit: contain; }
.ec-pdpg--natural .ec-pdpg-slide { display: flex; align-items: center; }
.ec-pdpg--natural .ec-pdpg-frame:not(.ec-pdpg-video) { aspect-ratio: auto; }
.ec-pdpg--natural .ec-pdpg-frame:not(.ec-pdpg-video) .ec-pdpg-img { position: static; height: auto; }

/* Zoom on hover: a magnified copy of the full photo follows the cursor. */
.ec-pdpg-lens {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-repeat: no-repeat;
    background-size: 230%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.ec-pdpg-frame.is-zooming .ec-pdpg-lens { opacity: 1; }

/* Video slide */
.ec-pdpg .ec-pdpg-video { background: #0b0b0f; }
.ec-pdpg-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.ec-pdpg-play-icon { position: relative; z-index: 2; display: flex; filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.45)); transition: transform 0.2s ease; }
.ec-pdpg-play:hover .ec-pdpg-play-icon { transform: scale(1.08); }
.ec-pdpg-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Badges, discount pills and wishlist buttons passed in by the template. */
.ec-pdpg-overlay { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.ec-pdpg-overlay > *,
.ec-pdpg-overlay button,
.ec-pdpg-overlay a { pointer-events: auto; }
.ec-pdpg-overlay .ec-pdp-image-badges { pointer-events: none; }
.ec-pdpg-overlay .ec-price-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

/* Template gallery columns that stick while the page scrolls would hide the lower photos of a
   stack or grid, so they scroll normally around those styles. */
.ms-gallery-wrap:has(.ec-pdpg--tall),
.jf-pdp-gallery:has(.ec-pdpg--tall),
.org-pdp-gallery:has(.ec-pdpg--tall) { position: static !important; }

/* ── Arrows, dots, counter, progress ─────────────────────────────── */
.ec-pdpg .ec-pdpg-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: -21px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.28);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.ec-pdpg .ec-pdpg-arrow:hover { background: var(--pg-accent); color: #fff; }
.ec-pdpg .ec-pdpg-arrow--prev { left: 12px; }
.ec-pdpg .ec-pdpg-arrow--next { right: 12px; }
.ec-pdpg.is-slider .ec-pdpg-arrow { display: flex; }
.ec-pdpg-stage:hover .ec-pdpg-arrow,
.ec-pdpg .ec-pdpg-arrow:focus-visible { opacity: 1; }
.ec-pdpg .ec-pdpg-arrow[disabled] { opacity: 0 !important; pointer-events: none; }
@media (hover: none) {
    .ec-pdpg.is-slider .ec-pdpg-arrow { display: none; }
}

.ec-pdpg-dots { grid-area: dots; display: none; justify-content: center; gap: 6px; padding-top: 12px; }
.ec-pdpg .ec-pdpg-dot {
    width: 7px;
    height: 7px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.22);
    cursor: pointer;
    transition: width 0.25s ease, background-color 0.25s ease;
}
.ec-pdpg .ec-pdpg-dot.is-active { width: 22px; background: var(--pg-accent); }

.ec-pdpg-counter { display: none; }
.ec-pdpg-progress { grid-area: progress; display: none; }

/* ── Thumbnails ──────────────────────────────────────────────────── */
.ec-pdpg-thumbs { grid-area: thumbs; position: relative; min-width: 0; padding-top: 12px; }
.ec-pdpg-thumbs-inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 2px;
}
.ec-pdpg-thumbs-inner::-webkit-scrollbar { display: none; }
.ec-pdpg .ec-pdpg-thumb {
    position: relative;
    flex: 0 0 var(--pg-thumb);
    width: var(--pg-thumb);
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    border: 2px solid transparent;
    background: var(--pg-bg);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}
.ec-pdpg .ec-pdpg-thumb:hover { opacity: 1; }
.ec-pdpg .ec-pdpg-thumb.is-active { opacity: 1; border-color: var(--pg-accent); }
.ec-pdpg .ec-pdpg-thumb:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 2px; }
.ec-pdpg .ec-pdpg-thumb picture { display: contents; }
.ec-pdpg .ec-pdpg-thumb img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; }
.ec-pdpg--contain .ec-pdpg-thumb:not(.ec-pdpg-thumb--video) img { object-fit: contain; }
.ec-pdpg-thumb--video { background: #0b0b0f !important; }
.ec-pdpg-thumb-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ec-pdpg-thumb-play svg { width: 42%; height: auto; filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.5)); }

.ec-pdpg .ec-pdpg-more {
    grid-area: more;
    display: none;
    justify-self: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 14px;
    padding: 0.7rem 1.4rem;
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.ec-pdpg .ec-pdpg-more:hover { border-color: var(--pg-accent); background: var(--pg-accent); color: #fff; }

/* Photos that scroll sideways show dots unless the style has thumbnails or its own indicator. */
.ec-pdpg.is-slider:not(.ec-pdpg--has-thumbs):not(.ec-pdpg--counter):not(.ec-pdpg--filmstrip) .ec-pdpg-dots { display: flex; }

/* ── Stacked photos (Aura, Glowing) ──────────────────────────────── */
@media (min-width: 992px) {
    .ec-pdpg--stacked .ec-pdpg-track,
    .ec-pdpg--sticky_rail .ec-pdpg-track {
        flex-direction: column;
        overflow: visible;
        scroll-snap-type: none;
        border-radius: 0;
    }
}

/* ── Slider with thumbnails (Studio) ─────────────────────────────── */
.ec-pdpg--slider_thumbs .ec-pdpg-thumbs { padding-top: 12px; }
.ec-pdpg--slider_thumbs { --pg-thumb: 68px; }
.ec-pdpg--slider_thumbs { --pg-thumb-radius: 8px; }

/* ── Thumbnails on the left (Bazaar, Console, Marketa, Volt) and on the right ── */
@media (min-width: 992px) {
    .ec-pdpg--side_thumbs,
    .ec-pdpg--right_thumbs,
    .ec-pdpg--sticky_rail {
        grid-template-columns: var(--pg-thumb) minmax(0, 1fr);
        grid-template-areas: "thumbs stage";
        column-gap: 14px;
        align-items: start;
    }
    .ec-pdpg--right_thumbs {
        grid-template-columns: minmax(0, 1fr) var(--pg-thumb);
        grid-template-areas: "stage thumbs";
    }
    .ec-pdpg--side_thumbs .ec-pdpg-thumbs,
    .ec-pdpg--right_thumbs .ec-pdpg-thumbs {
        align-self: stretch;
        padding-top: 0;
    }
    .ec-pdpg--side_thumbs .ec-pdpg-thumbs-inner,
    .ec-pdpg--right_thumbs .ec-pdpg-thumbs-inner {
        position: absolute;
        inset: 0;
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .ec-pdpg--side_thumbs .ec-pdpg-thumb,
    .ec-pdpg--right_thumbs .ec-pdpg-thumb,
    .ec-pdpg--sticky_rail .ec-pdpg-thumb {
        flex: 0 0 auto;
        width: 100%;
    }
    .ec-pdpg--single.ec-pdpg--side_thumbs,
    .ec-pdpg--single.ec-pdpg--right_thumbs,
    .ec-pdpg--single.ec-pdpg--sticky_rail {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "stage";
    }
}

/* ── Thumbnails below (Joyfest, Shuddo, Organica, Porua) ─────────── */
.ec-pdpg--bottom_thumbs { --pg-radius: 20px; }
.ec-pdpg--bottom_thumbs .ec-pdpg-frame { border: 1px solid rgba(15, 23, 42, 0.08); }
.ec-pdpg--bottom_thumbs { --pg-thumb-radius: 14px; }
.ec-pdpg--bottom_thumbs .ec-pdpg-thumb { opacity: 1; border-color: rgba(15, 23, 42, 0.08); }
.ec-pdpg--bottom_thumbs .ec-pdpg-thumb.is-active { border-color: var(--pg-accent); box-shadow: 0 0 0 1px var(--pg-accent); }
@media (hover: none) {
    .ec-pdpg--bottom_thumbs.is-slider .ec-pdpg-arrow { display: flex; opacity: 1; width: 36px; height: 36px; margin-top: -18px; }
}
@media (min-width: 992px) {
    .ec-pdpg--bottom_thumbs .ec-pdpg-thumbs { padding-top: 14px; }
    .ec-pdpg--bottom_thumbs .ec-pdpg-thumbs-inner {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        overflow: visible;
    }
    .ec-pdpg--bottom_thumbs .ec-pdpg-thumb { width: 100%; }
}

/* ── Two-column grid ─────────────────────────────────────────────── */
@media (min-width: 992px) {
    .ec-pdpg--grid .ec-pdpg-track,
    .ec-pdpg--expand_grid .ec-pdpg-track,
    .ec-pdpg--collage .ec-pdpg-track {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        scroll-snap-type: none;
        border-radius: 0;
    }
    .ec-pdpg--grid .ec-pdpg-slide:first-child { grid-column: 1 / -1; }
    .ec-pdpg--grid .ec-pdpg-slide:nth-child(2):last-child { grid-column: 1 / -1; }
}

/* ── Grid with show more ─────────────────────────────────────────── */
@media (min-width: 992px) {
    .ec-pdpg--expand_grid:not(.is-expanded) .ec-pdpg-slide:nth-child(n+5) { display: none; }
    .ec-pdpg--expand_grid:not(.is-expanded) .ec-pdpg-more { display: inline-flex; }
}

/* ── Collage: one big photo, two beside it, the rest in rows of three ── */
@media (min-width: 992px) {
    .ec-pdpg--collage .ec-pdpg-track { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .ec-pdpg--collage .ec-pdpg-slide { grid-column: span 2; }
    .ec-pdpg--collage .ec-pdpg-slide:first-child { grid-column: span 4; grid-row: span 2; }
    .ec-pdpg--collage .ec-pdpg-slide:first-child .ec-pdpg-frame { height: 100%; aspect-ratio: auto; }
    .ec-pdpg--collage .ec-pdpg-slide:first-child:nth-last-child(2),
    .ec-pdpg--collage .ec-pdpg-slide:nth-child(2):last-child { grid-column: span 3; grid-row: auto; }
    .ec-pdpg--collage .ec-pdpg-slide:first-child:nth-last-child(2) .ec-pdpg-frame { aspect-ratio: var(--pg-ratio); height: auto; }
    .ec-pdpg--collage .ec-pdpg-slide:nth-child(3n+4):last-child { grid-column: span 6; }
    .ec-pdpg--collage .ec-pdpg-slide:nth-child(3n+4):nth-last-child(2),
    .ec-pdpg--collage .ec-pdpg-slide:nth-child(3n+5):last-child { grid-column: span 3; }
    .ec-pdpg--collage.ec-pdpg--natural .ec-pdpg-frame:not(.ec-pdpg-video) .ec-pdpg-img { position: absolute; height: 100%; object-fit: cover; }
    .ec-pdpg--collage.ec-pdpg--natural .ec-pdpg-frame { aspect-ratio: 1 / 1; }
    .ec-pdpg--collage.ec-pdpg--natural .ec-pdpg-slide:first-child .ec-pdpg-frame { aspect-ratio: auto; }
}

/* ── Minimal counter ─────────────────────────────────────────────── */
.ec-pdpg--counter .ec-pdpg-counter {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.74);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}
.ec-pdpg--counter.is-slider .ec-pdpg-arrow {
    top: auto;
    bottom: 12px;
    display: flex;
    width: 38px;
    height: 38px;
    margin: 0;
    opacity: 1;
}
.ec-pdpg--counter .ec-pdpg-arrow--prev { left: auto; right: 58px; }
.ec-pdpg--counter .ec-pdpg-arrow--next { right: 12px; }
.ec-pdpg--counter .ec-pdpg-arrow[disabled] { opacity: 0.45 !important; }

/* ── Filmstrip ───────────────────────────────────────────────────── */
.ec-pdpg--filmstrip .ec-pdpg-track { border-radius: 0; }
.ec-pdpg--filmstrip .ec-pdpg-slide { flex-basis: 82%; }
@media (min-width: 992px) {
    .ec-pdpg--filmstrip .ec-pdpg-slide { flex-basis: 66%; }
}
.ec-pdpg--filmstrip .ec-pdpg-progress {
    display: block;
    height: 3px;
    margin-top: 14px;
    border-radius: 3px;
    background: rgba(15, 23, 42, 0.12);
    overflow: hidden;
}
.ec-pdpg--filmstrip .ec-pdpg-progress span { display: block; height: 100%; border-radius: inherit; background: var(--pg-accent); transition: width 0.25s ease; }
.ec-pdpg--single.ec-pdpg--filmstrip .ec-pdpg-slide { flex-basis: 100%; }
/* Badges sit on the first photo, not on the one peeking in beside it. */
.ec-pdpg--filmstrip:not(.ec-pdpg--single) .ec-pdpg-overlay { right: 18%; }
@media (min-width: 992px) {
    .ec-pdpg--filmstrip:not(.ec-pdpg--single) .ec-pdpg-overlay { right: 34%; }
}

/* ── Thumbnails on the photo ─────────────────────────────────────── */
.ec-pdpg--overlay_thumbs { grid-template-areas: "stage" "dots"; --pg-thumb: 54px; }
.ec-pdpg--overlay_thumbs .ec-pdpg-thumbs {
    grid-area: stage;
    align-self: end;
    justify-self: center;
    z-index: 7;
    max-width: calc(100% - 28px);
    margin-bottom: 14px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.45);
}
.ec-pdpg--overlay_thumbs .ec-pdpg-thumbs-inner { gap: 6px; padding: 0; }
.ec-pdpg--overlay_thumbs .ec-pdpg-thumb { opacity: 0.8; }
@media (max-width: 575px) {
    .ec-pdpg--overlay_thumbs { --pg-thumb: 44px; }
}

/* ── Scroll with sticky thumbnails ───────────────────────────────── */
@media (min-width: 992px) {
    .ec-pdpg--sticky_rail { --pg-thumb: 68px; }
    .ec-pdpg--sticky_rail .ec-pdpg-thumbs { align-self: stretch; padding-top: 0; }
    .ec-pdpg--sticky_rail .ec-pdpg-thumbs-inner {
        position: relative;
        will-change: transform;
        flex-direction: column;
        max-height: calc(100vh - 120px);
        overflow-x: hidden;
        overflow-y: auto;
    }
}

/* ── Center stage ────────────────────────────────────────────────── */
.ec-pdpg--center .ec-pdpg-track { padding-inline: 9%; scroll-padding-inline: 9%; border-radius: 0; }
.ec-pdpg--center .ec-pdpg-slide {
    flex-basis: 82%;
    scroll-snap-align: center;
    opacity: 0.5;
    transform: scale(0.93);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.ec-pdpg--center .ec-pdpg-slide.is-active { opacity: 1; transform: none; }
.ec-pdpg--center .ec-pdpg-arrow--prev { left: 2px; }
.ec-pdpg--center .ec-pdpg-arrow--next { right: 2px; }
.ec-pdpg--single.ec-pdpg--center .ec-pdpg-track { padding-inline: 0; }
.ec-pdpg--single.ec-pdpg--center .ec-pdpg-slide { flex-basis: 100%; opacity: 1; transform: none; }
.ec-pdpg--center:not(.ec-pdpg--single) .ec-pdpg-overlay { left: 9%; right: 9%; }

/* ── Full-screen viewer (appended to <body>) ─────────────────────── */
.ec-pdpg-viewer {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    flex-direction: column;
    background: rgba(9, 9, 11, 0.96);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.ec-pdpg-viewer[hidden] { display: none; }
.ec-pdpg-viewer.is-open { opacity: 1; }
.ec-pdpg-viewer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: max(12px, env(safe-area-inset-top)) 16px 12px;
}
.ec-pdpg-viewer-count { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; opacity: 0.85; }
.ec-pdpg-viewer button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.ec-pdpg-viewer button:hover { background: rgba(255, 255, 255, 0.24); }
.ec-pdpg-viewer button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ec-pdpg-viewer-track {
    flex: 1;
    min-height: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior: contain;
}
.ec-pdpg-viewer-track::-webkit-scrollbar { display: none; }
.ec-pdpg-viewer-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px max(24px, env(safe-area-inset-bottom));
    scroll-snap-align: center;
    scroll-snap-stop: always;
}
.ec-pdpg-viewer-slide img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}
.ec-pdpg-viewer .ec-pdpg-viewer-arrow { position: absolute; top: 50%; margin-top: -22px; }
.ec-pdpg-viewer .ec-pdpg-viewer-arrow--prev { left: 16px; }
.ec-pdpg-viewer .ec-pdpg-viewer-arrow--next { right: 16px; }
.ec-pdpg-viewer .ec-pdpg-viewer-arrow[disabled] { opacity: 0; pointer-events: none; }
@media (hover: none) {
    .ec-pdpg-viewer .ec-pdpg-viewer-arrow { display: none; }
}
html.ec-pdpg-viewer-open,
html.ec-pdpg-viewer-open body { overflow: hidden !important; }

@media (prefers-reduced-motion: reduce) {
    .ec-pdpg-track,
    .ec-pdpg-thumbs-inner { scroll-behavior: auto; }
    .ec-pdpg--center .ec-pdpg-slide,
    .ec-pdpg-viewer { transition: none; }
}
