/**
 * Vehículos CR – Galería del catálogo
 * Frontend 1.1.1
 */

.vcrgc-gallery {
    position: relative;
    display: block;
    width: 100%;
    line-height: 0;
    isolation: isolate;
}

.vcrgc-gallery__media {
    position: relative;
    display: block;
    width: 100%;
    cursor: default;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.vcrgc-gallery .vcrgc-gallery__image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    transition: opacity 160ms ease;
    -webkit-user-drag: none;
}

.vcrgc-gallery.is-loading .vcrgc-gallery__image {
    opacity: 0.70;
}

.vcrgc-gallery.has-error {
    animation: vcrgc-error-pulse 420ms ease;
}

.vcrgc-gallery__loading {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid rgba(255, 255, 255, 0.48);
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: vcrgc-spin 750ms linear infinite;
    transition: opacity 120ms ease;
    z-index: 4;
}

.vcrgc-gallery.is-loading .vcrgc-gallery__loading {
    opacity: 1;
}

/* Flechas de cristal oscuro más discretas: se reducen apenas y dejan
 * pasar una mayor proporción de la fotografía. */
.vcrgc-gallery__arrow {
    position: absolute;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 7px;
    background: rgba(8, 25, 41, 0.30);
    color: rgba(255, 255, 255, 0.94);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.14);
    -webkit-backdrop-filter: blur(4px) saturate(108%);
    backdrop-filter: blur(4px) saturate(108%);
    cursor: pointer;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
    z-index: 6;
}

.vcrgc-gallery__arrow--prev { left: 5px; }
.vcrgc-gallery__arrow--next { right: 5px; }

.vcrgc-gallery__arrow:hover,
.vcrgc-gallery__arrow:focus-visible {
    background: rgba(8, 25, 41, 0.52);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.20);
    outline: none;
    transform: translateY(-50%) scale(1.035);
}

.vcrgc-gallery__arrow svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: currentColor;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.42));
}

.vcrgc-gallery__counter {
    position: absolute;
    left: 50%;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 40px;
    min-height: 23px;
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(7, 20, 33, 0.72);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0.01em;
    pointer-events: none;
    transform: translateX(-50%);
    z-index: 5;
}

/* Acceso directo desde el botón Fotos de la tarjeta. */
.vcrgc-single-gallery-anchor {
    position: relative;
    display: block;
    width: 0;
    height: 0;
    scroll-margin-top: 150px;
}

.vcrgc-photos-link {
    text-decoration: none !important;
}

.vcrgc-photos-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes vcrgc-spin {
    to { transform: rotate(360deg); }
}

@keyframes vcrgc-error-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.62; }
}

@media (max-width: 767px) {
    .vcrgc-gallery__arrow {
        width: 29px;
        height: 38px;
        background: rgba(8, 25, 41, 0.27);
    }

    .vcrgc-gallery__arrow--prev { left: 4px; }
    .vcrgc-gallery__arrow--next { right: 4px; }

    .vcrgc-gallery__counter {
        bottom: 7px;
        min-height: 22px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vcrgc-gallery .vcrgc-gallery__image,
    .vcrgc-gallery__arrow,
    .vcrgc-gallery__loading {
        transition: none;
    }

    .vcrgc-gallery__loading {
        animation-duration: 1.25s;
    }
}
