html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* ===== MEN� M�VIL: que quepa en pantallas angostas ===== */
/* @media (max-width: 768px) {
    .top-row nav {
        gap: .15rem !important;
        min-width: 0;
    }

        .top-row nav a {
            font-size: .75rem !important;
            white-space: nowrap !important;
            padding-left: .3rem !important;
            padding-right: .3rem !important;
        }

        .top-row nav .btn {
            padding-left: .6rem !important;
            padding-right: .6rem !important;
        }

    #logoSticky {
        display: none !important;
    }
} */

/* @media (max-width: 359.98px) {
    .top-row {
        padding: 0 6px !important;
    }

        .top-row nav a {
            font-size: .68rem !important;
            padding-left: .2rem !important;
            padding-right: .2rem !important;
        }

        .top-row nav .btn {
            padding-left: .4rem !important;
            padding-right: .4rem !important;
        }

    .contador-cotizacion {
        gap: .2rem !important;
    }

    .insignia {
        min-width: 1.1rem !important;
        padding: 0 .25rem !important;
        font-size: .65rem !important;
    }
} */

/* Red de seguridad: clip no rompe los elementos sticky */
html, body {
    overflow-x: clip;
}

/* ===== VISOR DE IMAGEN (zoom) ===== */
.visor-img {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, .94);
}

.visor-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: zoom-in;
}

    .visor-stage.con-zoom {
        cursor: grab;
    }

        .visor-stage.con-zoom:active {
            cursor: grabbing;
        }

.visor-foto {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    transform-origin: center center;
    will-change: transform;
    -webkit-user-drag: none;
    pointer-events: none;
}

.visor-cerrar,
.visor-barra button {
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .visor-cerrar:hover,
    .visor-barra button:hover {
        background: rgba(255, 255, 255, .3);
    }

.visor-cerrar {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: 14px;
}

.visor-barra {
    position: absolute;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: flex;
    gap: .6rem;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* .page {
    flex: 1 0 auto;
} */

footer.footer {
    flex-shrink: 0;
}

/* El documento mide al menos pantalla + header, para poder dejar el header
   grande escondido aunque la pagina tenga poco contenido */
:root {
    --alto-header: 280px;
}

/* @media (max-width: 768px) {
    :root {
        --alto-header: 180px;
    }
} */

body {
    min-height: calc(100vh + var(--alto-header));
    min-height: calc(100dvh + var(--alto-header));
    display: flex;
    flex-direction: column;
}

.page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

    .page > main {
        flex: 1;
    }

/* ===== ICONOS DEL MENU ===== */
.top-row nav a .bi {
    font-size: 1.1rem;
    vertical-align: -0.12em;
}

/* ===== BARRA SUPERIOR ===== */
.top-row nav { display: flex; align-items: stretch; gap: .25rem; margin: 0; }
.nav-centro { justify-self: center; }
.nav-derecha { justify-self: end; align-items: center; gap: .5rem; }

.top-row nav a:not(.btn) {
    position: relative; display: inline-flex; align-items: center; gap: .4rem;
    padding: 0 .9rem; color: #6c757d; font-weight: 500;
    text-decoration: none; white-space: nowrap; transition: color .2s;
}
.top-row nav a:not(.btn):hover,
.top-row nav a:not(.btn).active { color: #212529; }

/* Indicador de pagina activa */
.top-row nav a:not(.btn).active::after {
    content: ""; position: absolute; left: .6rem; right: .6rem; bottom: 0;
    height: 3px; border-radius: 3px 3px 0 0; background: #f57c00;
}

.top-row nav a .bi { font-size: 1.1rem; }

.insignia {
    min-width: 1.3rem; padding: 0 .4rem; border-radius: 999px;
    background: #f57c00; color: #fff; font-size: .75rem; text-align: center;
}

@media (max-width: 991.98px) { #logoSticky span { display: none; } }

.top-row nav a.active {
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
}

/* Boton "Contactanos": texto siempre legible cuando la pestana esta activa */
.top-row nav a.btn.active {
    color: #fff;
}

/* ===== MENU MOVIL ESTILO FACEBOOK (pestanas distribuidas) ===== */
@media (max-width: 768px) {

    /* La barra pasa de grid a flex y los <nav> "desaparecen" como cajas,
       asi todas las opciones quedan como hermanas y se reparten el ancho */
    .top-row {
        display: flex !important;
        align-items: stretch;
        gap: .15rem;
        padding: 0 6px !important;
    }

    .top-row nav {
        display: contents !important;
    }

    /* Cada opcion = una pestana de ancho equitativo, icono centrado */
    .top-row nav a {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
        padding: 0 .25rem !important;
        font-size: .8rem;
        transition: flex-grow .3s ease, color .2s;
    }

    .top-row nav a .bi {
        font-size: 1.4rem;
    }

    /* Solo la pestana activa muestra el nombre y se ensancha */
    .top-row nav .nav-texto {
        display: none !important;
    }

    .top-row nav a.active {
        flex-grow: 2.4;
    }

    .top-row nav a.active .nav-texto {
        display: inline !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* El indicador naranja se ajusta al ancho de la pestana */
    .top-row nav a:not(.btn).active::after {
        left: .4rem;
        right: .4rem;
    }

    /* Contactanos: sigue siendo boton, pero ocupa su espacio como las demas */
    .top-row nav a.btn {
        align-self: center;
        padding: .5rem .25rem !important;
    }

    /* Contador de favoritos: sobre la esquina del icono */
    .insignia {
        position: absolute;
        top: .4rem;
        right: .3rem;
        min-width: 1.05rem;
        padding: 0 .25rem;
        font-size: .65rem;
    }
}

/* ===== ANIMACIONES LIGERAS ===== */

/* ----- Skeleton mientras carga el catalogo ----- */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #e9ecef;
}

    .skeleton::after {
        content: "";
        position: absolute;
        inset: 0;
        transform: translateX(-100%);
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
        animation: skeleton-brillo 1.3s ease-in-out infinite;
    }

@keyframes skeleton-brillo {
    to { transform: translateX(100%); }
}

.skeleton-tarjeta {
    width: 100%;
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
}

.skeleton-foto { height: 240px; }

.skeleton-cuerpo {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    padding: 1.1rem;
}

.skeleton-linea { height: .9rem; border-radius: .45rem; }
.skeleton-boton { height: 2.4rem; margin-top: .5rem; border-radius: 50px; }

/* ----- Tarjetas nuevas: suben y crecen en cascada ----- */
@keyframes entra-subir {
    from {
        opacity: 0;
        transform: translateY(40px) scale(.94);
    }
}

.entra {
    animation: entra-subir .6s cubic-bezier(.22, 1, .36, 1) backwards;
}

.entra:nth-child(2)  { animation-delay: .07s; }
.entra:nth-child(3)  { animation-delay: .14s; }
.entra:nth-child(4)  { animation-delay: .21s; }
.entra:nth-child(5)  { animation-delay: .28s; }
.entra:nth-child(6)  { animation-delay: .35s; }
.entra:nth-child(7)  { animation-delay: .42s; }
.entra:nth-child(8)  { animation-delay: .49s; }
.entra:nth-child(9)  { animation-delay: .56s; }
.entra:nth-child(10) { animation-delay: .63s; }
.entra:nth-child(11) { animation-delay: .70s; }
.entra:nth-child(12) { animation-delay: .77s; }

/* ----- Entrada de pagina al navegar (dos nombres para poder repetirla) ----- */
@keyframes entrada-a {
    from { opacity: 0; transform: translateY(18px); }
}

@keyframes entrada-b {
    from { opacity: 0; transform: translateY(18px); }
}

.entrada-a { animation: entrada-a .45s ease-out; }
.entrada-b { animation: entrada-b .45s ease-out; }

/* ----- Aparicion al hacer scroll (Chrome/Edge/Safari recientes) ----- */
@keyframes reveal-subir {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
}

@supports (animation-timeline: view()) {
    .reveal {
        animation: reveal-subir linear backwards;
        animation-timeline: view();
        animation-range: entry 0% entry 60%;
    }
}

/* ----- Efecto al presionar botones ----- */
.btn:active:not(:disabled):not(.disabled),
.chip:active {
    transform: scale(.95);
}

/* ----- Si el dispositivo pide "reducir movimiento": solo fundido, sin desplazamiento ----- */
@keyframes entra-fundido { from { opacity: 0; } }
@keyframes entrada-a-fundido { from { opacity: 0; } }
@keyframes entrada-b-fundido { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .entra { animation-name: entra-fundido; animation-delay: 0s !important; }
    .entrada-a { animation-name: entrada-a-fundido; }
    .entrada-b { animation-name: entrada-b-fundido; }
    .reveal { animation: none !important; }
    .skeleton::after { animation: none; }
}


/* ===== MAS ANIMACIONES ===== */

/* Corazon: latido al marcarlo */
@keyframes latido {
    0%   { scale: 1; }
    30%  { scale: 1.5; }
    60%  { scale: .9; }
    100% { scale: 1; }
}

.btn-favorito.activo i {
    animation: latido .5s ease;
}

/* Numeritos: rebotan al aparecer o cambiar */
@keyframes pop {
    0%   { scale: .4; }
    60%  { scale: 1.3; }
    100% { scale: 1; }
}

.insignia,
.cotizar-badge {
    animation: pop .4s ease;
}

/* Boton "En tu lista" */
@keyframes pop-suave {
    0%   { scale: .92; }
    60%  { scale: 1.04; }
    100% { scale: 1; }
}

.btn-cotizar.agregado {
    animation: pop-suave .4s ease;
}

/* WhatsApp flotante: saludo cada 4 segundos */
@keyframes saludo {
    0%, 60% { rotate: 0deg; }
    66%     { rotate: -14deg; }
    72%     { rotate: 12deg; }
    78%     { rotate: -10deg; }
    84%     { rotate: 8deg; }
    90%, 100% { rotate: 0deg; }
}

.btn-whatsapp-flotante i {
    animation: saludo 4s ease-in-out infinite;
}

/* Paginas vacias: el circulo flota */
@keyframes flotar {
    50% { translate: 0 -8px; }
}

.estado-circulo {
    animation: flotar 3.5s ease-in-out infinite;
}

/* Home: iconos rebotan al pasar el mouse */
@keyframes rebote {
    40% { translate: 0 -10px; }
    70% { translate: 0 2px; }
}

.feature-card:hover .bi::before {
    animation: rebote .5s ease;
}

/* Modal de producto */
@keyframes modal-zoom {
    from { opacity: 0; scale: 1.08; }
}

@keyframes modal-sube {
    from { opacity: 0; translate: 0 24px; }
}

.detalle-modal-contenedor.abierto .foto-principal {
    animation: modal-zoom .6s ease-out both;
}

.detalle-modal-contenedor.abierto .detalle-info-container {
    animation: modal-sube .5s .1s ease-out both;
}

/* Si el dispositivo pide reducir movimiento, se apagan */
@media (prefers-reduced-motion: reduce) {
    .btn-favorito.activo i,
    .insignia,
    .cotizar-badge,
    .btn-cotizar.agregado,
    .btn-whatsapp-flotante i,
    .estado-circulo,
    .feature-card:hover .bi::before,
    .detalle-modal-contenedor.abierto .foto-principal,
    .detalle-modal-contenedor.abierto .detalle-info-container {
        animation: none;
    }
}