/* Galería sucursales Los Ángeles / Osorno — cargar solo en esas páginas (evita caché del CSS global). */

.sucursal-gallery-outer {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(28px, 5vw, 52px) max(0px, env(safe-area-inset-left, 0px)) clamp(32px, 5vw, 56px)
        max(0px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    clear: both;
    background: linear-gradient(180deg, #ebe2d0 0%, #e4d8c4 45%, #ddd0b8 100%);
    border-top: 1px solid rgba(79, 59, 45, 0.12);
    border-bottom: 1px solid rgba(79, 59, 45, 0.1);
}

.sucursal-gallery {
    --sg-accent: #4a62b0;
    --sg-accent-rgb: 74, 98, 176;
    --sg-ink: #2f2720;
    --sg-ink-soft: #5c4f42;
    --sg-panel: rgba(255, 253, 248, 0.92);
    --sg-shadow: 0 20px 48px rgba(29, 22, 16, 0.14);
    width: 100%;
    max-width: none;
    margin: 0;
    font-family: colaborate-thinregular, "Source Sans Pro", sans-serif;
    outline: none;
}

.sucursal-gallery--os {
    --sg-accent: #6d2834;
    --sg-accent-rgb: 109, 40, 52;
}

.sucursal-gallery__head {
    text-align: center;
    margin-bottom: clamp(18px, 3vw, 28px);
    padding: 0 clamp(16px, 4vw, 40px);
    box-sizing: border-box;
}

.sucursal-gallery__eyebrow {
    margin: 0 0 8px 0;
    font-size: clamp(11px, 2vw, 13px);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sg-ink-soft);
    font-family: colaborate-regularregular, "Source Sans Pro", sans-serif;
}

.sucursal-gallery__title {
    margin: 0;
    font-family: colaborate-regularregular, "Source Sans Pro", sans-serif;
    font-size: clamp(26px, 4.2vw, 36px);
    line-height: 1.15;
    color: var(--sg-ink);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.sucursal-gallery__title span {
    color: var(--sg-accent);
}

.sucursal-gallery__lead {
    margin: 12px auto 0;
    max-width: 42em;
    font-size: clamp(15px, 2.2vw, 18px);
    line-height: 1.55;
    color: var(--sg-ink-soft);
}

.sucursal-gallery__shell {
    position: relative;
    width: 100%;
    max-width: none;
    background: var(--sg-panel);
    border-radius: 0;
    box-shadow: var(--sg-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    border: none;
    border-top: 1px solid rgba(var(--sg-accent-rgb), 0.12);
    border-bottom: 1px solid rgba(var(--sg-accent-rgb), 0.12);
    overflow: hidden;
    padding: clamp(10px, 1.8vw, 14px) max(12px, env(safe-area-inset-left, 0px)) clamp(10px, 1.8vw, 16px)
        max(12px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
}

.sucursal-gallery__stage-wrap {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: stretch;
    gap: clamp(6px, 1.2vw, 10px);
    margin-bottom: clamp(12px, 2vw, 18px);
    min-width: 0;
    min-height: 0;
}

.sucursal-gallery__arrow {
    align-self: center;
    width: clamp(40px, 8vw, 48px);
    height: clamp(40px, 8vw, 48px);
    padding: 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(236, 228, 216, 0.9));
    color: var(--sg-accent);
    font-size: clamp(22px, 5vw, 28px);
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(29, 22, 16, 0.1);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
    flex-shrink: 0;
}

.sucursal-gallery__arrow:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(var(--sg-accent-rgb), 0.18);
}

.sucursal-gallery__arrow:focus-visible {
    outline: 2px solid var(--sg-accent);
    outline-offset: 2px;
}

.sucursal-gallery__stage {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #2a2420;
    min-height: min(52vh, 520px);
    aspect-ratio: 16 / 10;
    max-height: min(72vh, 680px);
}

.sucursal-gallery__main {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center center;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sucursal-gallery__badge {
    position: absolute;
    top: clamp(10px, 2vw, 14px);
    right: clamp(10px, 2vw, 14px);
    z-index: 2;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: clamp(11px, 2.4vw, 13px);
    letter-spacing: 0.06em;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    font-family: colaborate-regularregular, "Source Sans Pro", sans-serif;
}

.sucursal-gallery__caption {
    margin: 0 0 clamp(14px, 2.2vw, 20px);
    padding: clamp(12px, 2vw, 16px) clamp(14px, 2.5vw, 22px);
    font-size: clamp(15px, 2.3vw, 18px);
    line-height: 1.45;
    color: var(--sg-ink);
    text-align: center;
    font-family: colaborate-regularregular, "Source Sans Pro", sans-serif;
    border-left: 4px solid var(--sg-accent);
    background: linear-gradient(90deg, rgba(var(--sg-accent-rgb), 0.06), transparent 72%);
    border-radius: 0 8px 8px 0;
    min-height: 2.75em;
    box-sizing: border-box;
}

.sucursal-gallery__thumbs {
    position: relative;
    margin: 0 -4px;
    padding: 4px 0 2px;
}

.sucursal-gallery__thumbs-track {
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(8px, 1.5vw, 12px);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 6px 4px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--sg-accent-rgb), 0.35) transparent;
}

.sucursal-gallery__thumbs-track::-webkit-scrollbar {
    height: 6px;
}

.sucursal-gallery__thumbs-track::-webkit-scrollbar-thumb {
    background: rgba(var(--sg-accent-rgb), 0.35);
    border-radius: 999px;
}

.sucursal-gallery__thumb {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: clamp(72px, 16vw, 104px);
    height: clamp(72px, 16vw, 104px);
    padding: 0;
    border: 3px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #d8cbb8;
    box-shadow: 0 4px 12px rgba(29, 22, 16, 0.12);
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
    opacity: 0.72;
}

.sucursal-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sucursal-gallery__thumb:hover,
.sucursal-gallery__thumb:focus-visible {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(var(--sg-accent-rgb), 0.2);
}

.sucursal-gallery__thumb:focus-visible {
    outline: none;
    border-color: var(--sg-accent);
}

.sucursal-gallery__thumb.is-active {
    opacity: 1;
    border-color: var(--sg-accent);
    box-shadow: 0 6px 20px rgba(var(--sg-accent-rgb), 0.28);
}

@media (max-width: 640px) {
    .sucursal-gallery__stage-wrap {
        display: block;
        position: relative;
    }

    .sucursal-gallery__arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 3;
        width: 42px;
        height: 42px;
        opacity: 0.94;
    }

    .sucursal-gallery__arrow--prev {
        left: clamp(8px, 2vw, 12px);
    }

    .sucursal-gallery__arrow--next {
        right: clamp(8px, 2vw, 12px);
    }

    .sucursal-gallery__arrow:hover {
        transform: translateY(-50%);
    }

    .sucursal-gallery__stage {
        min-height: min(48vh, 420px);
        aspect-ratio: 4 / 3;
        max-height: min(68vh, 560px);
    }
}

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

    .sucursal-gallery__thumb,
    .sucursal-gallery__arrow {
        transition: none;
    }

    .sucursal-gallery__thumb:hover,
    .sucursal-gallery__thumb:focus-visible {
        transform: none;
    }
}
