/* ============================================================
   YETI³ · PRODUCT GALLERY LIGHTBOX
   ============================================================ */

html.y3-lightbox-open,
html.y3-lightbox-open body {
    overflow: hidden !important;
}

.product-gallery .gallery-item {
    cursor: zoom-in;
}


/* OVERLAY */

.y3-lightbox {
    position: fixed;
    inset: 0;

    z-index: 100000;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .24s ease,
        visibility .24s ease;
}

.y3-lightbox[hidden] {
    display: none;
}

.y3-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}


.y3-lightbox__backdrop {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(47, 44, 37, .74),
            rgba(12, 13, 12, .94) 72%
        );

    backdrop-filter:
        blur(18px) saturate(.72);

    cursor: zoom-out;
}


/* STAGE */

.y3-lightbox__stage {
    position: absolute;
    inset: 0;

    display: grid;

    grid-template-columns:
        90px minmax(0, 1fr) 90px;

    grid-template-rows:
        84px minmax(0, 1fr) 62px;

    padding:
        0 clamp(16px, 3vw, 50px) 18px;

    color: #fff;

    pointer-events: none;
}


/* TOP */

.y3-lightbox__top {
    grid-column: 1 / -1;

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    min-width: 0;

    border-bottom:
        1px solid rgba(255,255,255,.10);

    pointer-events: auto;
}


.y3-lightbox__brand {
    display: flex;
    align-items: baseline;

    gap: 11px;
}


.y3-lightbox__brand span {
    color: #d0ae6b;

    font:
        700 13px/1
        Inter,
        system-ui,
        sans-serif;

    letter-spacing: .16em;
}


.y3-lightbox__brand small {
    color: rgba(255,255,255,.48);

    font:
        500 9px/1
        Inter,
        system-ui,
        sans-serif;

    letter-spacing: .13em;

    text-transform: uppercase;
}


.y3-lightbox__counter {
    display: flex;
    align-items: center;

    gap: 10px;

    color: rgba(255,255,255,.56);

    font:
        500 10px/1
        Inter,
        system-ui,
        sans-serif;

    letter-spacing: .12em;
}


.y3-lightbox__counter strong {
    color: #e1c687;
}


.y3-lightbox__counter i {
    width: 34px;
    height: 1px;

    background:
        rgba(255,255,255,.18);
}


.y3-lightbox__close {
    justify-self: end;

    display: grid;
    place-items: center;

    width: 46px;
    height: 46px;

    padding: 0;

    border:
        1px solid rgba(255,255,255,.16);

    border-radius: 50%;

    background:
        rgba(255,255,255,.055);

    color: #fff;

    cursor: pointer;

    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}


.y3-lightbox__close:hover {
    border-color:
        rgba(218,188,126,.55);

    background:
        rgba(218,188,126,.12);

    transform:
        rotate(4deg);
}


.y3-lightbox__close svg {
    width: 18px;
    height: 18px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.35;
}


/* IMAGE */

.y3-lightbox__figure {
    grid-column: 2;
    grid-row: 2;

    position: relative;

    display: grid;

    grid-template-rows:
        minmax(0, 1fr) auto;

    place-items: center;

    min-width: 0;
    min-height: 0;

    margin: 0;

    padding:
        clamp(20px, 3vw, 42px)
        clamp(8px, 2vw, 30px)
        10px;

    pointer-events: auto;
}


.y3-lightbox__image-shell {
    display: grid;
    place-items: center;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;
}


.y3-lightbox__image {
    display: block;

    max-width: 100%;
    max-height: calc(100vh - 190px);

    width: auto;
    height: auto;

    object-fit: contain;

    user-select: none;

    filter:
        drop-shadow(
            0 36px 70px rgba(0,0,0,.48)
        );
}


.y3-lightbox__image.is-entering-next {
    animation:
        y3LightboxNext .32s
        cubic-bezier(.2,.7,.2,1);
}


.y3-lightbox__image.is-entering-prev {
    animation:
        y3LightboxPrev .32s
        cubic-bezier(.2,.7,.2,1);
}


@keyframes y3LightboxNext {
    from {
        opacity: 0;
        transform:
            translateX(24px)
            scale(.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}


@keyframes y3LightboxPrev {
    from {
        opacity: 0;
        transform:
            translateX(-24px)
            scale(.985);
    }

    to {
        opacity: 1;
        transform: none;
    }
}


/* CAPTION */

.y3-lightbox__caption {
    max-width: 760px;

    margin-top: 15px;

    color: rgba(255,255,255,.52);

    text-align: center;

    font:
        400 10px/1.55
        Inter,
        system-ui,
        sans-serif;

    letter-spacing: .07em;
}


/* NAV */

.y3-lightbox__nav {
    grid-row: 2;

    align-self: center;

    display: grid;
    place-items: center;

    width: 54px;
    height: 54px;

    margin: auto;

    padding: 0;

    border:
        1px solid rgba(255,255,255,.15);

    border-radius: 50%;

    background:
        rgba(255,255,255,.05);

    color:
        rgba(255,255,255,.88);

    cursor: pointer;

    pointer-events: auto;

    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}


.y3-lightbox__nav:hover {
    border-color:
        rgba(216,184,119,.56);

    background:
        rgba(216,184,119,.13);

    transform:
        scale(1.06);
}


.y3-lightbox__nav--prev {
    grid-column: 1;
}


.y3-lightbox__nav--next {
    grid-column: 3;
}


.y3-lightbox__nav svg {
    width: 23px;
    height: 23px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.3;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* HINT */

.y3-lightbox__hint {
    grid-column: 1 / -1;
    grid-row: 3;

    align-self: center;

    justify-self: center;

    display: flex;
    align-items: center;

    gap: 11px;

    color:
        rgba(255,255,255,.34);

    pointer-events: none;
}


.y3-lightbox__hint span {
    color: #bc9a5e;

    font:
        500 11px/1
        Inter,
        system-ui,
        sans-serif;

    letter-spacing: .18em;
}


.y3-lightbox__hint small {
    font:
        400 9px/1
        Inter,
        system-ui,
        sans-serif;

    letter-spacing: .08em;
}


/* MOBILE */

@media (max-width: 760px) {

    .y3-lightbox__stage {
        grid-template-columns:
            48px minmax(0, 1fr) 48px;

        grid-template-rows:
            68px minmax(0, 1fr) 46px;

        padding-inline: 8px;
    }

    .y3-lightbox__brand small {
        display: none;
    }

    .y3-lightbox__counter i {
        width: 18px;
    }

    .y3-lightbox__close {
        width: 40px;
        height: 40px;
    }

    .y3-lightbox__figure {
        padding:
            12px 2px 4px;
    }

    .y3-lightbox__image {
        max-height:
            calc(100svh - 150px);
    }

    .y3-lightbox__nav {
        width: 40px;
        height: 40px;
    }

    .y3-lightbox__nav svg {
        width: 19px;
        height: 19px;
    }

    .y3-lightbox__caption {
        font-size: 9px;
    }

    .y3-lightbox__hint small {
        display: none;
    }
}


@media (prefers-reduced-motion: reduce) {

    .y3-lightbox,
    .y3-lightbox *,
    .y3-lightbox__image {
        animation: none !important;
        transition: none !important;
    }
}


/* ============================================================
   YETI³ PRODUCT LIGHTBOX · ARROW OPTICAL CENTERING
   ============================================================ */

.y3-lightbox__nav {
    display: grid !important;
    place-items: center !important;
}

.y3-lightbox__nav svg {
    display: block !important;

    width: 22px !important;
    height: 22px !important;

    margin: 0 !important;

    overflow: visible !important;
}


/* Оптическая центровка стрелок внутри окружностей */

.y3-lightbox__nav--prev svg {
    transform: translateX(-1px) !important;
}

.y3-lightbox__nav--next svg {
    transform: translateX(1px) !important;
}


/* Сам path без внутренних смещений */

.y3-lightbox__nav svg path {
    transform: none !important;
    transform-origin: center !important;
    vector-effect: non-scaling-stroke;
}

