.store-gallery {
    --gallery-navy: #001f3f;
    --gallery-gold: #caa532;
    --gallery-ink: #182638;
    --gallery-surface: #ffffff;
    --gallery-tint: #f5f6f7;
    width: 100%;
    overflow: hidden;
    background: var(--gallery-surface);
    color: var(--gallery-ink);
    font-family: futurabkbtmedium, Arial, sans-serif;
}

.gallery-page .mainBan {
    --gallery-banner-left: clamp(28px, 7vw, 108px);
    position: relative;
    height: 280px;
    margin: 0;
    overflow: hidden;
    background: #111820;
}

.gallery-page .mainBan::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 20, 40, 0.16);
    pointer-events: none;
}

.gallery-page .mainBan>img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
}

.gallery-page .mainBan h1 {
    position: absolute;
    z-index: 1;
    left: var(--gallery-banner-left);
    bottom: 52px;
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: clamp(34px, 3.2vw, 46px);
    line-height: 1;
    letter-spacing: 0;
}

.gallery-page .mainBan>a {
    position: absolute;
    z-index: 1;
    left: var(--gallery-banner-left);
    bottom: 24px;
    padding: 0;
    line-height: 1;
}

.gallery-page .mainBan .about {
    position: absolute;
    z-index: 1;
    left: calc(var(--gallery-banner-left) + 38px);
    bottom: 24px;
    margin: 0;
    line-height: 1;
}

.gallery-page .mainBan .about a {
    position: static;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.store-gallery *,
.store-gallery *::before,
.store-gallery *::after {
    box-sizing: border-box;
}

.store-gallery__intro {
    padding: 30px 24px 14px;
    text-align: center;
}

.store-gallery__eyebrow,
.branch-gallery__heading p {
    margin: 0 0 8px;
    color: var(--gallery-gold);
    font-family: futurabkbtmedium, Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.store-gallery__intro h2 {
    margin: 0;
    color: var(--gallery-navy);
    font-family: futurabkbtmedium, Arial, sans-serif;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0;
}

.store-gallery__description {
    max-width: 560px;
    margin: 14px auto 0;
    color: #5a6472;
    font-family: futurabkbtmedium, Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0.2px;
    text-align: center;
}

.store-gallery__rule {
    display: block;
    width: 46px;
    height: 2px;
    margin: 20px auto 0;
    background: var(--gallery-gold);
}

.branch-gallery {
    width: 100%;
    padding: 28px 0 64px;
    background: var(--gallery-surface);
}

.branch-gallery--tinted {
    background: var(--gallery-tint);
}

.branch-gallery__heading {
    padding: 0 24px;
    text-align: center;
}

.branch-gallery__heading h3 {
    margin: 0;
    color: var(--gallery-navy);
    font-family: futurabkbtmedium, Arial, sans-serif;
    font-size: clamp(22px, 2.2vw, 32px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
}

.branch-carousel {
    --active-width: clamp(340px, 34vw, 460px);
    --side-shift: clamp(230px, 27vw, 380px);
    --far-shift: clamp(390px, 44vw, 620px);
    width: min(100%, 1320px);
    margin: 18px auto 0;
    outline: none;
}

.branch-carousel__stage {
    position: relative;
    height: clamp(300px, 26vw, 360px);
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
}

.branch-carousel__stage:active {
    cursor: grabbing;
}

.branch-carousel__slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--active-width);
    aspect-ratio: 4 / 3;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    overflow: hidden;
    background: #dfe3e7;
    box-shadow: 0 18px 38px rgba(0, 31, 63, 0.2);
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.58);
    transition: transform 520ms cubic-bezier(0.22, 0.72, 0.2, 1), opacity 420ms ease, filter 420ms ease, box-shadow 420ms ease;
    will-change: transform, opacity;
    cursor: pointer;
}

.branch-carousel__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 31, 63, 0.23);
    opacity: 1;
    transition: opacity 420ms ease;
    pointer-events: none;
}

.branch-carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: translate3d(var(--magnetic-x, 0), var(--magnetic-y, 0), 0) rotateX(var(--magnetic-rotate-x, 0deg)) rotateY(var(--magnetic-rotate-y, 0deg)) scale(var(--magnetic-scale, 1));
    transition: transform 260ms cubic-bezier(0.22, 0.72, 0.2, 1);
    will-change: transform;
}

.branch-carousel__slide::before {
    content: "";
    position: absolute;
    z-index: 3;
    left: var(--cursor-x, 50%);
    top: var(--cursor-y, 50%);
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: rgba(0, 31, 63, 0.78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat center / 18px 18px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.72);
    transition: left 90ms linear, top 90ms linear, opacity 180ms ease, transform 180ms ease;
}

.branch-carousel__slide[data-position="0"] {
    z-index: 5;
    opacity: 1;
    filter: none;
    transform: translate3d(-50%, -50%, 0) scale(1);
    box-shadow: 0 24px 52px rgba(0, 31, 63, 0.25);
}

.branch-carousel__slide[data-position="0"]::after {
    opacity: 0;
}

.branch-carousel__slide[data-position="-1"] {
    z-index: 4;
    opacity: 0.88;
    filter: saturate(0.82);
    transform: translate3d(calc(-50% - var(--side-shift)), -50%, 0) scale(0.76);
}

.branch-carousel__slide[data-position="1"] {
    z-index: 4;
    opacity: 0.88;
    filter: saturate(0.82);
    transform: translate3d(calc(-50% + var(--side-shift)), -50%, 0) scale(0.76);
}

.branch-carousel__slide[data-position="-2"] {
    z-index: 2;
    opacity: 0.42;
    filter: saturate(0.7);
    transform: translate3d(calc(-50% - var(--far-shift)), -50%, 0) scale(0.58);
}

.branch-carousel__slide[data-position="2"] {
    z-index: 2;
    opacity: 0.42;
    filter: saturate(0.7);
    transform: translate3d(calc(-50% + var(--far-shift)), -50%, 0) scale(0.58);
}

.branch-carousel__slide:focus-visible {
    outline: 3px solid var(--gallery-gold);
    outline-offset: 5px;
}

.branch-carousel__controls {
    min-height: 50px;
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: center;
    align-items: center;
    gap: 10px 18px;
}

.branch-carousel__arrow,
.branch-carousel__view-toggle {
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 31, 63, 0.38);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--gallery-navy);
    font-family: Arial, sans-serif;
    font-size: 21px;
    line-height: 1;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
    cursor: pointer;
}

.branch-carousel__arrow span {
    display: block;
    transform: translateY(-1px);
}

.branch-carousel__arrow:hover,
.branch-carousel__view-toggle:hover,
.branch-carousel__view-toggle[aria-pressed="true"] {
    border-color: var(--gallery-navy);
    background: var(--gallery-navy);
    color: #fff;
    transform: translateY(-2px);
}

.branch-carousel__arrow:focus-visible,
.branch-carousel__view-toggle:focus-visible,
.branch-carousel:focus-visible {
    outline: 3px solid var(--gallery-gold);
    outline-offset: 4px;
}

.branch-carousel__view-toggle {
    position: relative;
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 6px;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
}

.branch-carousel__view-toggle::before,
.branch-carousel__view-toggle::after,
.branch-carousel__view-icon::before,
.branch-carousel__view-icon::after,
.branch-carousel__view-icon > span::before,
.branch-carousel__view-icon > span::after {
    content: none !important;
    display: none !important;
}

.branch-carousel__view-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 0;
    transition: opacity 180ms ease, transform 180ms ease;
}

.branch-carousel__view-icon--grid {
    display: grid;
    grid-template-columns: repeat(2, 6px);
    grid-template-rows: repeat(2, 6px);
    gap: 3px;
    place-content: center;
}

.branch-carousel__view-icon--grid > span {
    display: block;
    width: 6px;
    height: 6px;
    border: 0;
    border-radius: 1px;
    background: currentColor;
}

.branch-carousel__view-icon--carousel {
    gap: 2px;
    opacity: 0;
    transform: scale(0.75);
}

.branch-carousel__view-icon--carousel > span {
    display: block;
    width: 5px;
    height: 11px;
    border: 0;
    border-radius: 1px;
    background: currentColor;
    opacity: 0.72;
}

.branch-carousel__view-icon--carousel > span:nth-child(2) {
    z-index: 1;
    width: 9px;
    height: 19px;
    opacity: 1;
}

.branch-carousel__view-toggle[aria-pressed="true"] .branch-carousel__view-icon--grid {
    opacity: 0;
    transform: scale(0.75);
}

.branch-carousel__view-toggle[aria-pressed="true"] .branch-carousel__view-icon--carousel {
    opacity: 1;
    transform: scale(1);
}

.branch-carousel.is-grid .branch-carousel__stage {
    width: min(calc(100% - 48px), 940px);
    height: auto;
    margin: 28px auto 6px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    overflow: visible;
    cursor: default;
    touch-action: auto;
}

.branch-carousel.is-grid .branch-carousel__slide,
.branch-carousel.is-grid .branch-carousel__slide[data-position] {
    position: relative;
    inset: auto;
    z-index: 1;
    width: 100%;
    opacity: 1;
    filter: none;
    transform: none;
    box-shadow: 0 10px 28px rgba(0, 31, 63, 0.14);
}

.branch-carousel.is-grid .branch-carousel__slide:last-child:nth-child(3n+2) {
    grid-column: span 1;
}

.branch-carousel.is-grid .branch-carousel__slide::after {

    opacity: 0;
}

.branch-carousel.is-grid .branch-carousel__arrow,
.branch-carousel.is-grid .branch-carousel__status {
    display: none;
}

.branch-carousel.is-grid .branch-carousel__controls {
    margin-top: 18px;
}

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

body.gallery-lightbox-open {
    overflow: hidden;
    padding-right: var(--gallery-scrollbar-width, 0px);
}

.gallery-lightbox {
    position: fixed;
    z-index: 10000;
    inset: 0;
    color: #fff;
    font-family: futurabkbtmedium, Arial, sans-serif;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 11, 15, 0.96);
}

.gallery-lightbox__dialog {
    position: relative;
    width: 100%;
    height: 100%;
    padding: max(20px, env(safe-area-inset-top)) max(72px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(72px, env(safe-area-inset-left));
    display: grid;
    grid-template-rows: 56px minmax(0, 1fr);
    gap: 12px;
    pointer-events: none;
}

.gallery-lightbox__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    pointer-events: auto;
}

.gallery-lightbox__caption h2,
.gallery-lightbox__caption p {
    margin: 0;
    color: #fff;
    letter-spacing: 0;
}

.gallery-lightbox__caption h2 {
    font-size: clamp(17px, 2vw, 22px);
    font-weight: 700;
    line-height: 1.25;
}

.gallery-lightbox__caption p {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 700;
}

.gallery-lightbox__media {
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
    pointer-events: auto;
}

.gallery-lightbox__media img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.gallery-lightbox__button {
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 11, 15, 0.64);
    color: #fff;
    font: 400 22px/1 Arial, sans-serif;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
    pointer-events: auto;
}

.gallery-lightbox__button:hover {
    border-color: var(--gallery-gold, #caa532);
    background: #caa532;
    color: #001f3f;
}

.gallery-lightbox__button:focus-visible {
    outline: 3px solid #caa532;
    outline-offset: 3px;
}

.gallery-lightbox__close {
    flex: 0 0 48px;
    font-size: 28px;
}

.gallery-lightbox__previous,
.gallery-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox__previous {
    left: 16px;
}

.gallery-lightbox__next {
    right: 16px;
}

@media (hover: hover) and (pointer: fine) {
    .branch-carousel__slide:hover::before {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.branch-carousel__status {
    width: 48px;
    margin: 0;
    color: var(--gallery-navy);
    font-family: futurabkbtmedium, Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1px;
    text-align: center;
}

.store-gallery .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media only screen and (max-width: 1024px) {
    .store-gallery__intro {
        padding-top: 36px;
    }

    .branch-carousel {
        --active-width: min(54vw, 460px);
        --side-shift: min(34vw, 310px);
        --far-shift: min(52vw, 480px);
    }

    .branch-carousel__stage {
        height: clamp(300px, 47vw, 390px);
    }
}

@media only screen and (max-width: 767px) {
    .gallery-page .mainBan {
        --gallery-banner-left: 20px;
        height: 124px;
    }

    .gallery-page .mainBan h1 {
        bottom: 48px;
        font-size: 30px;
    }

    .gallery-page .mainBan>a,
    .gallery-page .mainBan .about {
        bottom: 22px;
        font-size: 12px;
    }

    .gallery-page .mainBan .about {
        left: calc(var(--gallery-banner-left) + 34px);
    }

    .store-gallery__intro {
        padding: 30px 18px 16px;
    }

    .store-gallery__eyebrow,
    .branch-gallery__heading p {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .branch-gallery {
        padding: 28px 0 50px;
    }

    .branch-gallery__heading {
        padding: 0 16px;
    }

    .branch-carousel {
        --active-width: min(76vw, 330px);
        --side-shift: 43vw;
        --far-shift: 67vw;
        margin-top: 12px;
    }

    .branch-carousel__stage {
        height: clamp(238px, 68vw, 290px);
    }

    .branch-carousel__slide {
        border-radius: 5px;
        box-shadow: 0 12px 26px rgba(0, 31, 63, 0.2);
    }

    .branch-carousel__slide[data-position="-1"],
    .branch-carousel__slide[data-position="1"] {
        opacity: 0.78;
        transform: translate3d(calc(-50% - var(--side-shift)), -50%, 0) scale(0.7);
    }

    .branch-carousel__slide[data-position="1"] {
        transform: translate3d(calc(-50% + var(--side-shift)), -50%, 0) scale(0.7);
    }

    .branch-carousel__slide[data-position="-2"],
    .branch-carousel__slide[data-position="2"] {
        opacity: 0.28;
    }

    .branch-carousel__controls {
        gap: 14px;
    }

    .branch-carousel__arrow {
        width: 46px;
        height: 46px;
    }

    .branch-carousel.is-grid .branch-carousel__stage {
        width: min(calc(100% - 32px), 560px);
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 22px;
    }

    .branch-carousel.is-grid .branch-carousel__slide:last-child:nth-child(odd) {
        width: 100%;
        grid-column: auto;
    }

    .gallery-lightbox__dialog {
        padding: max(12px, env(safe-area-inset-top)) 12px max(76px, calc(env(safe-area-inset-bottom) + 64px));
        grid-template-rows: 52px minmax(0, 1fr);
        gap: 8px;
    }

    .gallery-lightbox__button {
        width: 46px;
        height: 46px;
    }

    .gallery-lightbox__previous,
    .gallery-lightbox__next {
        top: auto;
        bottom: max(12px, env(safe-area-inset-bottom));
        transform: none;
    }

    .gallery-lightbox__previous {
        left: calc(50% - 56px);
    }

    .gallery-lightbox__next {
        right: calc(50% - 56px);
    }
}

@media only screen and (max-width: 360px) {
    .store-gallery__intro h2 {
        font-size: 26px;
    }

    .branch-gallery__heading h3 {
        font-size: 20px;
    }

    .branch-carousel {
        --active-width: 76vw;
    }

    .branch-carousel__stage {
        height: 224px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .branch-carousel__slide,
    .branch-carousel__slide::after,
    .branch-carousel__slide::before,
    .branch-carousel__slide img,
    .branch-carousel__arrow,
    .branch-carousel__view-toggle,
    .gallery-lightbox__button {
        transition: none;
    }
}

/* ── Placeholder for empty gallery sections ── */
.branch-gallery__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    margin: 0 auto;
    max-width: 900px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    background: rgba(0,0,0,.02);
}

.branch-gallery__coming-soon {
    font-family: inherit;
    font-size: 1.1rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #999;
    margin: 0;
}
