@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   1. ESTILOS GLOBALES Y VARIABLES
   ========================================================================== */

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

:root {
    --color-principal: #1fb546;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    /* tipo de letra unificado para toda la pagina */
    background-color: #f8f9fa;
    color: #212529;
}

h1,
h2,
h3,
h4,
.negrita-cerrado-horario {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    /* peso extra-negrita para encabezados modernos */
    letter-spacing: -0.5px;
}


/* ==========================================================================
   2. CABECERA Y FONDO (HERO SECTION)
   ========================================================================== */

.cabecera-contenedor-fondo {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-bottom: 50px;
    /* espaciado final antes del navbar */
}

.contenido-bienvenida {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px 20px;
    text-align: center;
}

.fondo-bienvenida {
    /* imagen del fondo */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(45%);
    /* aplicamos un filtro de brillo para oscuercer la imagen y hacer que el texto sea más legible  */
}

.titulo-bienvenida {
    /* titulo completo de bienvenida */
    font-size: 2.2rem;
    /* tamaño del título */
    max-width: 800px;
    margin: 0;
    /* centrado */
    color: rgb(0, 0, 0);
    /* color del texto "bienvenido al catalogo de" */
    background-color: rgba(255, 255, 255, 0.95);
    /* color del fondo de la tarjeta en el titulo con ligera opacidad */
    border-radius: 20px;
    /* le damos un borde a las esquinas para mayor estetica */
    padding: 30px 40px;
    /* espacio entre el texto y los bordes de la tarjeta */
    border: 2px solid #000000;
    /* borde alrededor de la tarjeta junto con el color  */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    /* sombra más moderna y suave */
}

.texto-negrita-bienvenida {
    font-weight: bold;
    /* hacemos que el texto "ferromarket" sea en negrita para que resalte mas */
    color: var(--color-principal);
    /* le damos un color al texto "ferromarket" */
}

/* --- Responsividad Cabecera y Fondo --- */
@media (max-width: 768px) {
    .cabecera-contenedor-fondo {
        padding-bottom: 30px;
    }

    .contenido-bienvenida {
        padding: 40px 15px 15px 15px;
    }

    .titulo-bienvenida {
        font-size: 1.5rem;
        padding: 20px 15px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }
}


/* ==========================================================================
   3. SECCIÓN QUIÉNES SOMOS
   ========================================================================== */

.contenedor-quienes-somos {
    display: flex;
    /* utilizamos flexbox para organizar el contenido */
    flex-direction: row;
    /* en PC se muestra en fila de dos columnas */
    justify-content: space-between;
    align-items: stretch;
    gap: 40px;
    margin: 40px auto 0 auto;
    /* espaciado centrado y responsivo, sin margen inferior para fundirse con la cabecera */
    width: 90%;
    max-width: 950px;
    border-radius: 20px;
    /* le damos un borde a las esquina para mayor estetica */
    background: rgb(255, 255, 255);
    border: 2px solid #000000;
    /* borde alrededor del texto junto con el color  */
    padding: 60px 40px 40px 40px;
    /* padding para no depender de márgenes internos */
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.logo-central-quienes-somos {
    display: flex;
    /* utilizamos flexbox para organizar el contenido */
    justify-content: center;
    /* centramos el contenido horizontalmente */
    align-items: center;
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    height: 90px;
    width: auto;
    min-width: 180px;
    padding: 10px 25px;
    background: rgb(255, 255, 255);
    /* color del fondo del logo ferromarket */
    border-radius: 45px;
    /* forma de cápsula para logos horizontales */
    border: 2px solid transparent;
    /* colocamos el borde transparante */
    background-image: linear-gradient(white, white),
        /* Fondo interno blanco */
        linear-gradient(to bottom, black 50%, white 50%);
    /* El borde (negro arriba, blanco abajo) */
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.logo-quienes-somos {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.contenido-texto-quienes-somos {
    flex: 1 1 55%;
    display: flex;
    /* utilizamos flexbox para organizar el contenido */
    flex-direction: column;
    /* organizamos el contenido en una columna */
    align-items: start;
    /* centramos el contenido horizontalmente */
    justify-content: center;
}

.contenido-texto-quienes-somos h2 {
    font-size: 2em;
    /* tamaño del subtitulo "Ferromarket" */
    margin: 0 0 10px 0;
    color: var(--color-principal);
    /* color del texto ferromarket */
    -webkit-text-stroke: 0.001em #000000;
    /* borde del texto */
}

.contenido-texto-quienes-somos h3 {
    font-size: 1.15em;
    /* tamaño del subtitulo "Ferromarket" */
    margin: 0 0 10px 0;
    color: rgb(0, 0, 0);
    /* color del texto "todo lo que necesitas..." */
    font-weight: normal;
    line-height: 1.6;
}

.horarios-atencion {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 2px dashed #e0e0e0;
    /* línea divisoria estética en PC */
    padding-left: 40px;
    align-items: start;
    /* colocamos el texto de los horarios alineado a al inicio osea izquierda */
    margin-top: 0;
}

.horarios-atencion h3 {
    font-size: 1.6em;
    /* tamaño del subtitulo "horarios de atención" */
    color: #cc9900;
    /* dorado oscuro más accesible y legible */
    -webkit-text-stroke: 0.001em #000000;
    /* borde del texto */
    margin: 0 0 15px 0;
    /* espaciado de horarios de atencion */
}

.horarios-atencion p {
    margin: 8px 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.icono-reloj {
    font-size: 20px;
    /* tamaño del icono del reloj */
    margin-right: 10px;
    /* margen a la derecha del icono del reloj */
    color: var(--color-principal);
    /* le damos un color al reloj */
}

.icono-reloj-cerrado {
    font-size: 20px;
    /* tamaño del icono del reloj */
    margin-right: 10px;
    /* margen a la derecha del icono del reloj */
    color: rgb(255, 0, 0);
    /* le damos un color al reloj */
}

.negrita-cerrado-horario {
    font-size: 1.1rem;
    /* tamano del texto "cerrado" */
    font-weight: bold;
    /* hacemos que el texto "cerrado" sea en negrita para que resalte mas */
    color: rgb(255, 0, 0);
    /* le damos un color al texto "cerrado" */
}

/* --- Responsividad Quiénes Somos --- */
@media (max-width: 768px) {
    .contenedor-quienes-somos {
        flex-direction: column;
        /* apilado en móvil */
        padding: 60px 20px 20px 20px;
        margin-top: 60px;
        gap: 25px;
    }

    .contenido-texto-quienes-somos {
        flex: none;
    }

    .contenido-texto-quienes-somos h2 {
        font-size: 1.6em;
    }

    .contenido-texto-quienes-somos h3 {
        font-size: 1rem;
    }

    .horarios-atencion {
        flex: none;
        border-left: none;
        padding-left: 0;
        margin-top: 0;
    }

    .horarios-atencion h3 {
        font-size: 1.3em;
    }

    .logo-quienes-somos {
        height: 100%;
        width: auto;
        max-width: 240px;
        object-fit: contain;
    }
}


/* ==========================================================================
   4. BARRA DE NAVEGACIÓN Y FILTROS
   ========================================================================== */

.barra-navegacion {
    position: sticky;
    top: 0;
    background-color: #ffffff;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    flex-wrap: wrap; /* Permite que colapse en pantallas pequeñas */
}

.barra-navegacion-superior {
    display: contents;
}

.barra-navegacion .contenedor-logo {
    display: flex;
    align-items: center;
    padding: 0;
    order: 1;
}

.logo-barra-navegacion {
    height: 45px;
    width: auto;
}

.contenedor-filtros {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* Ocupa el espacio central */
    gap: 10px;
    margin-top: 0;
    flex-wrap: wrap;
    order: 2;
}

.filtros {
    background-color: var(--color-principal);
    color: #000000;
    border-radius: 20px;
    border: 1px solid #000000;
    padding: 8px 16px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filtros:hover,
.filtros.active {
    background-color: yellow;
    color: #000000;
    border-color: #000000;
}

.boton-hamburguesa {
    display: none;
    /* oculto por defecto en escritorio */
}

.usuario-menu-contenedor {
    position: relative;
    margin-left: auto;
    order: 3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-carrito {
    background-color: transparent;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-principal);
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
    white-space: nowrap;
}

.btn-carrito:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px var(--color-principal);
}

.btn-carrito:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 1);
}

.carrito-badge {
    display: none;
    background-color: #dc3545;
    color: #ffffff;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 900;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #000;
    line-height: 1;
    animation: badgePulse 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes badgePulse {
    0% { transform: scale(0.5); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.btn-login {
    background-color: transparent;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background-color: var(--color-principal);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
}

/* --- Buscador Expandible (Nav) --- */
.buscador-expandible-contenedor {
    display: flex;
    align-items: center;
    margin-right: 5px;
}

.buscador-expandible-form {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 20px;
    height: 38px;
    transition: all 0.3s ease;
}

.buscador-expandible-form.activo {
    background: #fff;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
}

.input-buscador-oculto {
    width: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.buscador-expandible-form.activo .input-buscador-oculto {
    width: 200px;
    padding: 0 10px 0 16px;
}

.btn-buscar-expandible {
    background: transparent;
    color: #000;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.btn-buscar-expandible:hover {
    color: var(--color-principal);
}

.buscador-expandible-form.activo .btn-buscar-expandible {
    background: #111;
    color: #fff;
    border-left: 2px solid #000;
    border-radius: 0 16px 16px 0;
}

.buscador-expandible-form.activo .btn-buscar-expandible:hover {
    background: var(--color-principal);
}

/* --- Responsividad Barra de Navegación --- */
@media (max-width: 900px) {
    .barra-navegacion {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        gap: 0;
    }

    .barra-navegacion-superior {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 10px;
    }

    .buscador-principal-contenedor {
        order: 4;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .logo-barra-navegacion {
        height: 35px;
    }

    .barra-navegacion .contenedor-logo {
        justify-content: flex-start;
        order: 1;
        /* logo a la izquierda en móvil */
    }

    .btn-login-texto {
        display: none;
        /* ocultar texto en celular */
    }

    .usuario-menu-contenedor {
        margin-left: auto;
        margin-right: 15px;
        /* espaciado respecto a la hamburguesa */
        order: 2;
        /* login al medio a la derecha (izquierda de la hamburguesa) */
        position: relative;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .btn-login {
        padding: 0;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        /* botón circular */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-login i {
        font-size: 1.4rem;
        /* icono de usuario grande y centrado */
        margin: 0;
    }



    .boton-hamburguesa {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--color-principal);
        font-size: 1.8rem;
        cursor: pointer;
        padding: 5px;
        transition: color 0.2s ease;
        order: 3;
        /* hamburguesa en el extremo derecho */
    }

    .boton-hamburguesa:hover {
        color: var(--color-principal);
    }

    .contenedor-filtros {
        order: 4;
        /* filtros debajo del top bar */
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow-y: auto;
        /* habilitar desplazamiento vertical */
        opacity: 0;
        gap: 12px;
        margin-top: 0;
        padding: 0;
        border-top: none;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .contenedor-filtros.mostrar {
        max-height: 25vh;
        /* limitar la altura para permitir scroll interno */
        opacity: 1;
        padding: 15px 0 10px 0;
        margin-top: 10px;
        border-top: 1px solid #eee;
    }

    .contenedor-filtros .filtros {
        text-align: center;
        width: 100%;
        padding: 10px 16px;
    }
}


/* ==========================================================================
   5. GRILLA Y TARJETAS DE PRODUCTOS
   ========================================================================== */

.cabecera-catalogo-principal {
    max-width: 1160px; /* Alineado al carrusel y grilla (1200px - 40px padding) */
    width: calc(100% - 40px); /* Margen para pantallas pequeñas */
    margin: 40px auto 30px auto;
    padding: 24px 30px;
    background: #fff;
    border: 3px solid #000;
    border-radius: 16px;
    box-shadow: 6px 6px 0 #000;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

/* Patrón de fondo decorativo */
.cabecera-catalogo-principal::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        var(--color-principal),
        var(--color-principal) 10px,
        transparent 10px,
        transparent 20px
    );
    opacity: 0.15;
}

.ccp-icono {
    background: var(--color-principal);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    z-index: 1;
}

.ccp-texto {
    flex-grow: 1;
    z-index: 1;
}

.titulo-catalogo-principal {
    font-size: 1.85rem;
    font-weight: 900;
    color: #111;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.ccp-texto p {
    font-size: 1.05rem;
    color: #555;
    margin: 0;
    font-weight: 600;
}

.ccp-badge {
    background: #111;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 30px;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 var(--color-principal);
    white-space: nowrap;
    z-index: 1;
    position: relative;
}

@media (max-width: 768px) {
    .cabecera-catalogo-principal {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 16px;
        gap: 12px;
        margin: 24px 10px 16px 10px;
    }
    
    .ccp-icono {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
    
    .titulo-catalogo-principal {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }
    
    .ccp-texto p {
        font-size: 0.9rem;
    }

    .ccp-decoracion {
        width: 100%;
        margin-top: 10px;
        text-align: left;
    }
    
    .ccp-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

.contenido-tarjeta-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    justify-content: center;
}

.tarjeta-producto {
    display: flex;
    flex-direction: column;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 15px;
    background-color: #ffffff;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.tarjeta-producto:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px var(--color-principal);
}

.tarjeta-producto img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #eee;
}

.tarjeta-producto h3 {
    font-size: 1.2rem;
    margin: 12px 0 6px 0;
    color: #222;
}

.descripcion-producto {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.precio-producto {
    font-size: 1.4em;
    color: var(--color-principal);
    font-weight: bold;
    margin: 10px 0 0 0;
}

.cantidad-producto {
    font-size: 0.85rem;
    color: #888;
    margin: 5px 0 0 0;
}

/* --- Responsividad Grilla de Productos --- */
@media (max-width: 480px) {
    .contenido-tarjeta-productos {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
        padding: 10px;
    }

    .tarjeta-producto {
        padding: 10px;
        border-radius: 12px;
        box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
    }

    .tarjeta-producto:hover {
        transform: none;
        box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
    }

    .tarjeta-producto img {
        height: 120px;
        border-radius: 8px;
    }

    .tarjeta-producto h3 {
        font-size: 0.95rem;
        margin: 8px 0 4px 0;
    }

    .precio-producto {
        font-size: 1.1rem;
    }

    .descripcion-producto {
        font-size: 0.8rem;
    }

    .cantidad-producto {
        font-size: 0.75rem;
    }
}


/* ==========================================================================
   6. MODAL Y DETALLES DE PRODUCTO
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top of everything, including navbar */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.6);
    /* Black w/ opacity */
    animation: fadeIn 0.25s ease-out forwards;
}

.contenido-modal {
    background-color: #fefefe;
    margin: 5% auto;
    /* 5% from the top and centered */
    padding: 30px;
    border: 2px solid #000000;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    position: relative;
    /* Crucial para la posición absoluta de la X */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.contenido-modal-producto {
    display: flex;
    flex-direction: column;
    align-items: end;
}

.imagen-modal-producto {
    width: 100%;
    height: auto;
    border-radius: 20px;
}

.modal-producto-avanzado {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px 30px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.modal-producto-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.modal-producto-imagenes {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-img-principal {
    width: 100%;
    max-width: 280px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    margin-bottom: 10px;
}

.modal-producto-info {
    flex: 2 1 350px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-titulo {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #222;
}

.modal-descripcion-corta {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 0;
}

.modal-ver-mas {
    background: #eee;
    border: none;
    color: #333;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 8px;
    align-self: flex-start;
    font-weight: bold;
    transition: background 0.2s;
}

.modal-ver-mas:hover {
    background: #ddd;
}

.modal-precio {
    font-size: 2rem;
    color: var(--color-principal);
    font-weight: bold;
    margin: 10px 0 16px 0;
}

.modal-cantidad-carrito {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.modal-cantidad-menos,
.modal-cantidad-mas {
    background: #eee;
    border: none;
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-cantidad-menos:hover,
.modal-cantidad-mas:hover {
    background: #d4d4d4;
}

/* Estilos adicionales para carrito */
.carrito-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #000;
}
.carrito-btn-eliminar {
    background: var(--color-peligro);
    color: #fff;
    border: 2px solid #000;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px 10px;
    box-shadow: 2px 2px 0px #000;
    transition: all 0.2s;
}
.carrito-btn-eliminar:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px #000;
}

/* Estilos de Calificaciones */
.estrella-btn {
    transition: all 0.2s;
}
.estrella-btn:hover, .estrella-btn.hover {
    color: #f39c12 !important;
    transform: scale(1.1);
}
.estrella-btn.activa {
    color: #f39c12 !important;
}

.comentario-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 0;
    height: 120px;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow-y: auto;
}
.comentario-item:last-child {
    margin-bottom: 0;
}
.comentario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.comentario-usuario {
    font-weight: bold;
    font-size: 0.9rem;
    color: #333;
}
.comentario-fecha {
    font-size: 0.8rem;
    color: #888;
}
.comentario-estrellas {
    color: #f39c12;
    font-size: 0.85rem;
    margin-bottom: 5px;
}
.comentario-texto {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

.modal-cantidad-input {
    width: 48px;
    height: 36px;
    text-align: center;
    font-size: 1.1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 4px;
}

.modal-agregar-carrito {
    background: var(--color-principal);
    color: #fff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-grow: 1;
}

.modal-agregar-carrito:hover {
    background: yellow;
    color: #000000;
}

.modal-calificar {
    background: #fff;
    color: var(--color-principal);
    border: 2px solid var(--color-principal);
    border-radius: 8px;
    padding: 10px 16px;
    width: 100%;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.modal-calificar:hover {
    background: yellow;
    color: #000;
    border-color: #000;
}

.cerrar-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    color: #888;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
    line-height: 1;
}

.cerrar-modal:hover {
    color: var(--color-principal);
}

/* --- Responsividad Modal --- */
@media (max-width: 768px) {
    .contenido-modal {
        margin: 10% auto;
        padding: 30px 15px 20px 15px;
    }

    .modal-producto-avanzado {
        padding: 30px 15px 15px 15px;
    }

    .modal-producto-flex {
        gap: 16px;
    }

    .modal-titulo {
        font-size: 1.6rem;
    }

    .modal-precio {
        font-size: 1.6rem;
        margin: 5px 0 10px 0;
    }

    .modal-agregar-carrito {
        width: 100%;
    }
}

/* --- MODAL LOGIN --- */
.modal-login-avanzado {
    max-width: 420px;
    /* modal más angosto para el formulario */
    padding: 40px 30px;
    border-radius: 20px;
    background: #ffffff;
    border: 2px solid #000000;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 1);
    /* estilo neubrutalista */
}

.modal-login-contenedor {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-login-titulo {
    font-size: 1.8rem;
    text-align: center;
    margin: 0;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.formulario-login {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.campo-formulario {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campo-formulario label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

.campo-formulario input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid #000;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.campo-formulario input:focus {
    border-color: var(--color-principal);
}

.btn-login-ingresar {
    background-color: var(--color-principal);
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
    margin-top: 10px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
}

.btn-login-ingresar:hover {
    background-color: yellow;
    color: #000000;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 1);
}

.btn-login-ingresar:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
}

.modal-login-pie {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

.modal-login-pie a {
    color: var(--color-principal);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s;
}

.modal-login-pie a:hover {
    text-decoration: underline;
    color: #cc9900;
}

/* --- Responsividad Modal Login --- */
@media (max-width: 768px) {
    .modal-login-avanzado {
        max-width: 95%;
        padding: 35px 20px;
    }
}

/* --- DIVISOR Y BOTÓN GOOGLE --- */
.modal-divisor {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 10px 0;
    color: #888;
}

.modal-divisor::before,
.modal-divisor::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.modal-divisor:not(:empty)::before {
    margin-right: .5em;
}

.modal-divisor:not(:empty)::after {
    margin-left: .5em;
}

.modal-divisor span {
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-login-google {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
}

.btn-login-google i {
    color: #db4437;
    /* Google Red */
    font-size: 1.25rem;
}

.btn-login-google:hover {
    background-color: #f1f3f4;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 1);
}

.btn-login-google:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
}

/* --- MENÚ DESPLEGABLE USUARIO --- */
.badge-stock {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--color-principal);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  border: 2px solid #000;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
  z-index: 2;
}

/* =========================================
   Botón Flotante WhatsApp
========================================= */
.btn-whatsapp-flotante {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #fff;
  border: 3px solid #000;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  box-shadow: 4px 4px 0px #000;
  z-index: 9999;
  text-decoration: none;
  transition: all 0.2s ease;
  animation: pulse-whatsapp 2s infinite;
}

.btn-whatsapp-flotante:hover {
  background-color: #128C7E;
  transform: translateY(-5px);
  box-shadow: 6px 6px 0px #000;
  animation: none;
}

@keyframes pulse-whatsapp {
  0% { transform: scale(1); box-shadow: 4px 4px 0px #000; }
  50% { transform: scale(1.05); box-shadow: 6px 6px 0px #000; }
  100% { transform: scale(1); box-shadow: 4px 4px 0px #000; }
}

@media (max-width: 768px) {
  .btn-whatsapp-flotante {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
  }
}

.menu-desplegable-usuario {
    display: none;
    /* oculto por defecto */
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 12px;
    min-width: 190px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
    z-index: 200;
    overflow: hidden;
    padding: 6px 0;
    animation: fadeInDropdown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-desplegable-usuario.mostrar {
    display: block;
}

.opcion-menu-usuario {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #212529;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
}

.opcion-menu-usuario i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
    color: #555;
    transition: color 0.2s;
}

.opcion-menu-usuario:hover {
    background-color: var(--color-principal);
    color: #ffffff;
}

.opcion-menu-usuario:hover i {
    color: #ffffff;
}

.opcion-menu-usuario.cerrar-sesion {
    color: #212529;
}

.opcion-menu-usuario.cerrar-sesion i {
    color: #db4437;
    /* Icono rojo por defecto */
}

.opcion-menu-usuario.cerrar-sesion:hover {
    background-color: #db4437;
    /* Fondo rojo en hover */
    color: #ffffff;
}

.opcion-menu-usuario.cerrar-sesion:hover i {
    color: #ffffff;
}

.divisor-menu-usuario {
    height: 1px;
    background-color: #e0e0e0;
    margin: 6px 0;
}

/* --- ESTILOS DE ADMINISTRACIÓN --- */
.modal-admin-acciones {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
}

.btn-admin-editar {
    background-color: #ffc107;
    /* Yellow warning/edit */
    color: #000000;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
    font-family: 'Outfit', sans-serif;
}

.btn-admin-editar:hover {
    background-color: yellow;
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 1);
}

.btn-admin-eliminar {
    background-color: #dc3545;
    /* Red delete */
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
    font-family: 'Outfit', sans-serif;
}

.btn-admin-eliminar:hover {
    background-color: #db4437;
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 1);
}

/* Add Product action button in filters */
.btn-admin-agregar-producto {
    background-color: #28a745;
    color: #ffffff !important;
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
    font-family: 'Outfit', sans-serif;
    margin-left: 10px;
}

.btn-admin-agregar-producto:hover {
    background-color: yellow;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
}

/* User management dashboard styles */
.modal-admin-dashboard {
    max-width: 750px;
    padding: 30px;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 20px;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 1);
}

.modal-admin-dashboard-titulo {
    font-size: 1.8rem;
    color: #222;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tabla-contenedor {
    border: 2px solid #000000;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
}

.tabla-admin th,
.tabla-admin td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.tabla-admin tr:last-child td {
    border-bottom: none;
}

.tabla-admin th {
    background-color: #f1f3f4;
}

.tabla-admin td {
    font-size: 0.95rem;
}

.badge-rol {
    background-color: #007bff;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-rol.admin {
    background-color: #ffc107;
    color: black;
    border: 1px solid #000000;
}

.badge-estado {
    background-color: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Additional fields formatting */
.campo-formulario textarea {
    font-family: inherit;
    padding: 10px;
    border: 2px solid #000;
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: border-color 0.2s;
}

.campo-formulario textarea:focus {
    border-color: var(--color-principal);
}

.modal-gestion-avanzado {
    max-width: 480px;
}


/* ==========================================================================
   CARRITO DRAWER (PANEL LATERAL)
   ========================================================================== */

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to   { transform: translateX(100%); }
}

.carrito-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 900;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.25s ease forwards;
}

.carrito-overlay.activo {
    display: block;
}

.carrito-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 100vw;
    height: 100dvh;
    background: #ffffff;
    border-left: 3px solid #000000;
    box-shadow: -8px 0 0px rgba(0, 0, 0, 1);
    z-index: 950;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.carrito-drawer.abierto {
    transform: translateX(0);
}

/* --- Cabecera del Drawer --- */
.carrito-drawer-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 3px solid #000000;
    background: #000000;
    color: #ffffff;
    flex-shrink: 0;
}

.carrito-drawer-cabecera h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.carrito-drawer-cabecera h2 i {
    color: var(--color-principal);
    font-size: 1.5rem;
}

.cerrar-carrito {
    font-size: 2rem;
    font-weight: 900;
    cursor: pointer;
    color: #ffffff;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.2s ease;
}

.cerrar-carrito:hover {
    background: var(--color-principal);
    border-color: var(--color-principal);
    transform: rotate(90deg);
}

/* --- Área de Productos --- */
.carrito-drawer-productos {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.carrito-drawer-productos::-webkit-scrollbar {
    width: 5px;
}
.carrito-drawer-productos::-webkit-scrollbar-track {
    background: transparent;
}
.carrito-drawer-productos::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    border-radius: 10px;
}

/* --- Ítem del Carrito --- */
.carrito-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #000000;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    animation: slideUp 0.25s ease forwards;
}

.carrito-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 1);
}

.carrito-item-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #000;
    flex-shrink: 0;
}

.carrito-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.carrito-item-nombre {
    font-size: 0.92rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carrito-item-precio {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-principal);
    margin: 0;
}

.carrito-item-cantidad {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.carrito-btn-cantidad {
    background: #f1f3f4;
    border: 2px solid #000;
    border-radius: 8px;
    width: 26px;
    height: 26px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.carrito-btn-cantidad:hover {
    background: var(--color-principal);
    color: #fff;
    border-color: #000;
}

.carrito-item-cantidad span {
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.carrito-btn-eliminar {
    background: #fff;
    border: 2px solid #dc3545;
    border-radius: 8px;
    color: #dc3545;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.carrito-btn-eliminar:hover {
    background: #dc3545;
    color: #fff;
    transform: scale(1.1);
}

/* --- Pie del Drawer (Total + Botón) --- */
.carrito-drawer-pie {
    padding: 16px 22px 20px 22px;
    border-top: 3px solid #000000;
    background: #f8f9fa;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.carrito-total-contenedor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
}

.carrito-total-contenedor span:first-child {
    font-size: 1rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#carrito-total-monto {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-principal);
}

.btn-finalizar-compra {
    width: 100%;
    background: var(--color-principal);
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 14px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
    letter-spacing: 0.3px;
}

.btn-finalizar-compra::before {
    content: '🛒';
    font-size: 1.2rem;
}

.btn-finalizar-compra:hover {
    background: #000000;
    color: #ffffff;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--color-principal);
}

.btn-finalizar-compra:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
}

/* --- Responsividad drawer en móvil --- */
@media (max-width: 480px) {
    .carrito-drawer {
        width: 100vw;
        border-left: none;
        box-shadow: none;
    }

    .carrito-btn-cantidad {
        width: 30px;
        height: 30px;
    }
}

/* Mobile: carrito button circular */
@media (max-width: 900px) {
    .btn-carrito {
        padding: 0;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
        justify-content: center;
    }

    .btn-carrito-texto {
        display: none;
    }

    .btn-carrito i {
        font-size: 1.1rem;
        margin: 0;
    }

    .carrito-badge {
        position: absolute;
        top: -7px;
        right: -7px;
    }
}


/* ==========================================================================
   PAGINADOR DE PRODUCTOS
   ========================================================================== */

.paginador-contenedor {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px 20px 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.paginador-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    background-color: #ffffff;
    color: #212529;
    border: 2px solid #000000;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    user-select: none;
}

.paginador-btn:hover:not(:disabled) {
    background-color: #f0f0f0;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 1);
}

.paginador-btn:active:not(:disabled) {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 1);
}

.paginador-btn.activo {
    background-color: var(--color-principal);
    color: #ffffff;
    border-color: #000000;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
    cursor: default;
    transform: none;
}

.paginador-btn.activo:hover {
    background-color: var(--color-principal);
    transform: none;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
}

.paginador-btn.deshabilitado,
.paginador-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.4);
    transform: none;
}

.paginador-nav {
    font-size: 1rem;
}

.paginador-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 42px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #888;
    user-select: none;
}

.sin-productos-msg {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* --- Responsividad Paginador --- */
@media (max-width: 480px) {
    .paginador-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
        border-radius: 8px;
        padding: 0 10px;
    }

    .paginador-contenedor {
        gap: 6px;
        padding: 16px 12px 30px 12px;
    }
}

/* ==========================================================================
   TOAST NOTIFICATIONS (GLOBALES)
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: #fff;
    color: #000;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 4px 4px 0px #000;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    max-width: 350px;
    line-height: 1.4;
}

.toast.mostrar {
    transform: translateX(0);
}

.toast.error {
    background-color: #ff4d4d;
    color: white;
}

.toast.exito {
    background-color: var(--color-principal, #1fb546);
    color: white;
}

.toast.info {
    background-color: #0d6efd;
    color: white;
}

.toast.cargando {
    background-color: #f39c12;
    color: white;
}


/* ==========================================================================
   CARRUSEL DE MÁS VENDIDOS
   ========================================================================== */

.seccion-mas-vendidos {
    max-width: 1200px;
    margin: 24px auto 0 auto;
    padding: 0 20px;
}

.mas-vendidos-cabecera {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.mas-vendidos-titulo {
    font-size: 1.35rem;
    margin: 0;
    color: #111;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mas-vendidos-titulo i {
    color: #ffc107;
}

.mas-vendidos-badge {
    background: #ffc107;
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
}

.carrusel-contenedor-principal {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-carrusel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.btn-carrusel:hover {
    background: #ffc107;
    transform: translateY(-50%) scale(1.1);
}

.btn-carrusel:active {
    box-shadow: 0 0 0 #000;
    transform: translateY(-50%) translate(2px, 2px) scale(1.1);
}

.btn-carrusel-prev {
    left: -22px;
}

.btn-carrusel-next {
    right: -22px;
}

.mas-vendidos-track-wrap {
    width: 100%;
    overflow: hidden;
    border: 2px solid #000;
    border-radius: 16px;
    box-shadow: 5px 5px 0 #000;
    background: #fff;
    /* Evitar selección de texto al arrastrar */
    user-select: none;
}

.mas-vendidos-track {
    display: flex;
    gap: 0;
    width: max-content;
    /* La transición se agregará dinámicamente en JS */
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.mv-card {
    flex-shrink: 0;
    width: 193px; /* Aprox 6 items en contenedor de 1160px */
    padding: 14px 12px;
    cursor: pointer;
    position: relative;
    border-right: 2px solid #f0f0f0;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mv-card:hover {
    background: #f9fff9;
}

.mv-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #eee;
    margin-bottom: 8px;
    transition: transform 0.25s ease;
}

.mv-info {
    text-align: center;
    width: 100%;
}

.mv-nombre {
    font-size: 0.78rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 155px;
}

.mv-precio {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--color-principal);
    margin: 0;
}

/* Responsivo carrusel */
@media (max-width: 1200px) {
    .mv-card {
        width: calc(100vw / 5); /* 5 items */
    }
}
@media (max-width: 900px) {
    .mv-card {
        width: calc(100vw / 4); /* 4 items */
    }
}
@media (max-width: 768px) {
    .seccion-mas-vendidos {
        padding: 0 10px;
        margin-top: 16px;
    }

    .mv-card {
        width: calc(100vw / 3); /* 3 items en tablet/mobile */
        padding: 10px 8px;
    }

    .mv-img {
        width: 85px;
        height: 85px;
    }

    .mv-nombre {
        max-width: 120px;
        justify-content: center;
    }

    /* Mostrar botones en móvil, pero hacerlos más pequeños y moverlos hacia adentro */
    .btn-carrusel {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        /* Un poco de opacidad para que no tapen tanto el producto */
        background: rgba(255, 255, 255, 0.9);
    }
    .btn-carrusel-prev {
        left: 5px;
    }
    .btn-carrusel-next {
        right: 5px;
    }
}