/* Visor ampliado compartido: mismo lenguaje visual que la ficha de coche. */
body.bsr-lightbox-open {
    overflow: hidden;
}

.bsr-lightbox,
.bsr-lightbox *,
.bsr-lightbox *::before,
.bsr-lightbox *::after {
    box-sizing: border-box;
}

.bsr-lightbox {
    --bsr-lb-paper: #fcfaf5;
    --bsr-lb-gold: #f0d79b;
    --bsr-lb-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    position: fixed;
    inset: 0;
    z-index: 99999;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(7, 8, 9, 0.97);
    color: var(--bsr-lb-paper);
    overflow: hidden;
}

.bsr-lightbox:not([open]) {
    display: none;
}

.bsr-lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bsrLightboxIn 0.25s ease;
}

.bsr-lightbox::backdrop {
    background: rgba(7, 8, 9, 0.82);
    backdrop-filter: blur(6px);
}

.bsr-lightbox__figure {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: clamp(72px, 9vh, 110px) clamp(70px, 7vw, 110px) clamp(76px, 10vh, 120px);
    pointer-events: none;
}

.bsr-lightbox__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    pointer-events: auto;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
}

.bsr-lightbox__caption {
    position: absolute;
    left: 50%;
    bottom: clamp(18px, 4vh, 34px);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    max-width: calc(100% - 32px);
    margin: 0;
    transform: translateX(-50%);
    color: rgba(243, 239, 231, 0.72);
    font: 10px/1.4 var(--bsr-lb-mono);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: center;
    pointer-events: none;
}

.bsr-lightbox__counter {
    flex: 0 0 auto;
    color: var(--bsr-lb-gold);
}

.bsr-lightbox__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsr-lightbox__close,
.bsr-lightbox__nav {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(243, 239, 231, 0.24);
    border-radius: 50%;
    background: rgba(11, 12, 13, 0.72);
    color: var(--bsr-lb-gold);
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.bsr-lightbox__close {
    top: clamp(16px, 3vw, 30px);
    right: clamp(16px, 3vw, 30px);
    width: 46px;
    height: 46px;
}

.bsr-lightbox__nav {
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translateY(-50%);
}

.bsr-lightbox__nav--prev {
    left: clamp(14px, 3vw, 32px);
}

.bsr-lightbox__nav--next {
    right: clamp(14px, 3vw, 32px);
}

.bsr-lightbox__close:hover,
.bsr-lightbox__close:focus-visible,
.bsr-lightbox__nav:hover,
.bsr-lightbox__nav:focus-visible {
    border-color: var(--bsr-lb-gold);
    background: rgba(240, 215, 155, 0.12);
}

.bsr-lightbox__close:focus-visible,
.bsr-lightbox__nav:focus-visible {
    outline: 2px solid var(--bsr-lb-gold);
    outline-offset: 3px;
}

.bsr-lightbox__close svg,
.bsr-lightbox__nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bsr-lightbox--single .bsr-lightbox__nav {
    display: none;
}

@keyframes bsrLightboxIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .bsr-lightbox__figure {
        padding: 66px 14px 78px;
    }

    .bsr-lightbox__close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .bsr-lightbox__nav {
        width: 42px;
        height: 42px;
    }

    .bsr-lightbox__nav--prev {
        left: 8px;
    }

    .bsr-lightbox__nav--next {
        right: 8px;
    }

    .bsr-lightbox__close svg,
    .bsr-lightbox__nav svg {
        width: 16px;
        height: 16px;
    }

    .bsr-lightbox__caption {
        bottom: 16px;
        gap: 7px;
        font-size: 8px;
    }
}
