/* CONFIGURACIÓN GENERAL */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    color: #222;
}


/* ENCABEZADO */

header {
    background: white;
    padding: 12px 2%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);

    position: sticky;
    top: 0;
    z-index: 100;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

nav {
    display: flex;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

nav a:hover {
    color: #16a34a;
}


/* BOTÓN WHATSAPP */

.boton-whatsapp {
    display: inline-block;
    background: #16a34a;
    color: white;
    padding: 14px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.boton-whatsapp:hover {
    background: #12813a;
    transform: scale(1.03);
}


/* INICIO - BANNER SENSUS */
.banner-sensus {
    position: relative;
    width: 100%;
    min-height: 580px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #e8d8e0;
}
/* Imagen de fondo a todo el ancho */
.banner-sensus > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Rellena todo el espacio disponible */
    object-position: center center;

    display: block;
}

/* Texto encima de la imagen */
.banner-texto {
    position: relative;
    z-index: 1;
    width: 32%;           /* Reducimos el ancho para que la caja quede contenida a la derecha */
    min-height: 580px;
    margin-left: 70%;     /* Movemos el inicio del texto al 67% del ancho total */
    padding: 30px 2%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #16324f;
    background: transparent;
}

/* Configuración para el título principal (h2) */
.banner-texto h2 {
    font-size: 60px;
    letter-spacing: 4px;
    margin-bottom: 15px;
    color: #1B3B2B;              /* Cambia este color (ej. #16324f, #D81B60, #3D1A47) */
    font-family: 'Arial', sans-serif; /* Cambia el tipo de letra aquí si deseas otra */
}

/* Configuración para el subtítulo (h3) */
.banner-texto h3 {
    font-size: 50px;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #FFFFFF;              /* Color diferente para el h3 */
    font-family: 'Georgia', serif; /* Tipografía distinta para darle variedad */
}

/* Configuración para el párrafo descriptivo (p) */
.banner-texto p {
    font-size: 26px;
    margin-bottom: 25px;
    color: #2C2223;              /* Color para el texto del párrafo */
    font-family: 'Verdana', sans-serif;
}

/* DESCUENTOS */

.descuentos {
    padding: 10px 0 24px;
    overflow: hidden;
    background: #f5f7fa;
}

.descuentos h2 {
    text-align: center;
    margin-bottom: 12px;
    color: #3D1A47;
}

.marquee {
    width: 100%;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
}

/* La animación se activa desde script.js (clase "listo") */
.marquee-track.listo {
    animation: desplazar 20s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}



.marquee-track img {
    height: 250px;
    width: 450px;
    object-fit: cover;        /* Estira la imagen para cubrir el 100% del contenedor */
    object-position: center;  /* Centra el contenido */
    border-radius: 12px;
    margin-right: 10px;
    padding: 0 !important;    /* Elimina cualquier relleno interno de la imagen */
    border: none !important;  /* Quita bordes transparentes/blancos */
    flex-shrink: 0;
    cursor: pointer;
}



@keyframes desplazar {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-1 * var(--ancho-set))); }
}


/* PRODUCTOS */

.productos {
    padding: 0 2% 10px;
}

.productos h2,
.nosotros h2,
.contacto h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 16px;
}

.contenedor-productos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}


/* TARJETA */

.producto {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    padding-bottom: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.producto:hover {
    transform: translateY(-5px);
}


/* IMAGEN */

.producto img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: white;
    padding: 10px;
}


/* INFORMACIÓN */

.producto h3 {
    font-size: 21px;
    margin: 18px 15px 8px;
}

.producto p {
    color: #666;
    padding: 0 20px;
    margin-bottom: 15px;
}

.producto details {
    padding: 0 20px;
    margin-bottom: 15px;
    text-align: left;
}

.producto summary {
    cursor: pointer;
    color: #D81B60;
    font-weight: bold;
    text-align: center;
}

.producto details p {
    padding: 10px 0 0;
    font-size: 14px;
}

.producto details ul {
    margin: 8px 0 0 18px;
    font-size: 14px;
    color: #666;
}

.precio {
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 18px;
}


/* BOTÓN PRODUCTO */

.producto button {
    border: none;
    background: #16a34a;
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.producto button:hover {
    background: #12813a;
}

/* POR QUÉ ELEGIRNOS */

.sellos {
    padding: 40px 6%;
    background: white;
    text-align: center;
}

.sellos h2 {
    font-size: 32px;
    margin-bottom: 45px;
    color: #3D1A47;
}

.contenedor-sellos {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 25px;
}

.sello img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.sello h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #222;
}

.sello p {
    color: #666;
    font-size: 15px;
    line-height: 1.4;
}


/* NOSOTROS */

.nosotros {
   padding: 40px 10%;
   background: white;
   text-align: center;
}

.nosotros p {
    max-width: 700px;
    margin: auto;
    color: #666;
    font-size: 18px;
}


/* CONTACTO */

.contacto {
    padding: 7px 10%;
    text-align: center;
}

.contacto p {
    margin-bottom: 10px;
}

.contacto .boton-whatsapp {
    margin-top: 20px;
}


/* FOOTER */

footer {
    background: #111827;
    color: white;
    text-align: center;
    padding: 25px;
}


/* CELULARES */

@media (max-width: 800px) {

  header {
        flex-direction: column;
        gap: 12px;
    }

    .contenedor-sellos {
    grid-template-columns: repeat(3, 1fr);
    }

    .logo img {
        height: 42px;
    }

    nav {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

   .banner-sensus {
    min-height: 650px;
    }

    .banner-sensus > img {
    object-fit: cover;
    object-position: center;
    }

    .banner-texto {
    width: 100%;
    min-height: 650px;
    margin-left: 0;
    padding: 30px 20px;
    background: rgba(232, 216, 224, 0.72);
    }

    .banner-texto h2 {
    font-size: 36px;
    }

    .banner-texto h3 {
    font-size: 24px;
    }

    .banner-texto h2 { font-size: 36px; }
    .banner-texto h3 { font-size: 24px; }

    .contenedor-productos {
        grid-template-columns: 1fr 1fr;
    }

    
}


@media (max-width: 550px) {

    .contenedor-productos {
        grid-template-columns: 1fr;
    }

    .contenedor-sellos {
    grid-template-columns: repeat(2, 1fr);
     }
    .wsp-flotante {
    width: 52px;
    height: 52px;
    font-size: 26px;
    right: 14px;
    bottom: 14px;
}
}

/* BOTÓN FLOTANTE DE WHATSAPP */

.wsp-flotante {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    z-index: 200;
    transition: 0.3s;
}

.wsp-flotante img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.wsp-flotante:hover {
    transform: scale(1.08);
}

.icono-wsp {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 6px;
}


/* TARJETA CLICABLE */
.producto { cursor: pointer; }

.ver-detalles {
    display: block;
    color: #D81B60;
    font-weight: bold;
    margin-bottom: 15px;
}

/* VENTANA DE DETALLES */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.modal.abierto { display: flex; }

.modal-caja {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 25px;
}

.modal-caja img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h3 { font-size: 24px; margin-bottom: 12px; }

.modal-descripcion {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.modal-descripcion ul { margin: 8px 0 0 18px; }

.modal-info .boton-whatsapp {
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.modal-cerrar {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    font-size: 18px;
    cursor: pointer;
    z-index: 1;
}

@media (max-width: 700px) {
    .modal-caja { grid-template-columns: 1fr; }
    .modal-caja img { max-height: 40vh; }
}

.modal-descripcion .info {
    border-top: 1px solid #e5e5e5;
}

.modal-descripcion .info:last-of-type {
    border-bottom: 1px solid #e5e5e5;
}

.modal-descripcion .info summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    font-size: 15px;
    font-weight: bold;
    color: #222;
}

.modal-descripcion .info summary::-webkit-details-marker { display: none; }

.modal-descripcion .info summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(45deg);
    transition: 0.2s;
}

.modal-descripcion .info[open] summary::after {
    transform: rotate(-135deg);
}

.modal-descripcion .info p {
    padding-bottom: 14px;
}


/* La ventana ya no se desliza */
.modal-caja {
    overflow: hidden;
}

.modal-caja img {
    align-self: center;
}

/* Solo se desliza el texto */
.modal-descripcion {
    max-height: 45vh;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
}

/* En celular: la foto arriba queda fija y el texto se desliza abajo */
@media (max-width: 700px) {
    .modal-info {
        max-height: calc(50vh - 70px);
    }
}

/* ===== MENSAJES QUE SE DESPLAZAN DENTRO DEL MENÚ ===== */
.mensajes {
    flex: 1;                      /* ocupa todo el espacio blanco entre el logo y los enlaces */
    min-width: 0;
    margin: 0 30px;
    overflow: hidden;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

.mensajes-pista {
    display: flex;
    width: max-content;
    animation: mensajes 25s linear infinite  ;   /* "reverse" = de izquierda a derecha. Quita la palabra reverse para que vaya de derecha a izquierda */
}

.mensajes:hover .mensajes-pista {
    animation-play-state: paused;
}

.mensajes-grupo {
    display: flex;
    flex-shrink: 0;
}

.mensajes-grupo span {
    font-size: 15px;
    font-weight: bold;
    color: #3D1A47;
    letter-spacing: 0.5px;
}

.mensajes-grupo span::after {
    content: "✿";
    margin: 0 34px;
    color: #D81B60;
}

@keyframes mensajes {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* En celular el menú queda en columna: el mensaje va debajo de los enlaces */
@media (max-width: 800px) {
    .mensajes {
        order: 3;
        flex: none;
        width: 100%;
        margin: 0;
    }
    .mensajes-grupo span { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .mensajes-pista { animation: none; }
}

/* ===== BANNER: se ve IGUAL en computadora y celular (imagen y letras se achican juntas) ===== */
.banner-sensus {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    container-type: inline-size;      /* las letras se miden con el ancho del banner */
}

.banner-sensus > img {
    position: static;
    display: block;
    width: 100%;
    height: auto;                     /* el alto sigue la proporción de tu imagen: no se recorta */
    object-fit: initial;
}

.banner-texto {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 72%;
    width: 27%;
    margin: 0;
    padding: 0;
    min-height: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.banner-texto h2 { font-size: max(3.8cqw, 15px); margin-bottom: 0.8cqw; }
.banner-texto h3 { font-size: max(3.5cqw, 13px); line-height: 1.1; margin-bottom: 1cqw; }
.banner-texto p  { font-size: max(1.75cqw, 8px); line-height: 1.2; margin-bottom: 1.6cqw; }
.banner-texto .boton-whatsapp {
    font-size: max(1.1cqw, 7.5px);
    padding: 0.75em 1.3em;
    border-radius: 0.5em;
}

/* Celular: se ensancha un poco el bloque de texto para que quepa el botón */
@media (max-width: 700px) {
    .banner-texto { left: 66%; width: 33%; }
}


/* ========================================================= */
/* TARJETAS DE PRODUCTOS (todo en uno)                       */
/* 4 por fila en PC, 3 en laptop chica, 2 en tablet y celular */
/* ========================================================= */

/* --- Número de tarjetas por fila --- */
@media (min-width: 1200px) {
    .contenedor-productos { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 801px) and (max-width: 1199px) {
    .contenedor-productos { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 551px) and (max-width: 800px) {
    .contenedor-productos { grid-template-columns: 1fr 1fr; }
}

/* --- Títulos: siempre ocupan 2 líneas, así las descripciones empiezan a la misma altura --- */
.producto h3 {
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- "Ver detalles", precio y botón siempre alineados al fondo --- */
.producto {
    display: flex;
    flex-direction: column;
}

.producto .ver-detalles {
    margin-top: auto;
}

.producto button {
    align-self: center;
}

/* --- Celular: 2 tarjetas por fila, más compactas --- */
@media (max-width: 550px) {

    .productos { padding: 0 4% 40px; }
    .productos h2 { font-size: 26px; margin-bottom: 16px; }

    .contenedor-productos {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .producto {
        align-items: center;
        padding-bottom: 14px;
        border-radius: 12px;
    }

    .producto img { height: 150px; padding: 6px; }

    .producto h3 { font-size: 15px; margin: 10px 8px 6px; }

    .producto p {
        font-size: 12.5px;
        line-height: 1.3;
        padding: 0 8px;
        margin-bottom: 10px;
    }

    .ver-detalles { font-size: 13px; margin-bottom: 10px; }

    .producto .precio {
        font-size: 19px;
        margin: 0 0 10px;
    }

    .producto button {
        font-size: 12px;
        padding: 10px 8px;
        width: calc(100% - 20px);
    }
}

/* ===== ÍCONO DE WHATSAPP EN LOS BOTONES ===== */
.producto button img,
.modal-caja .boton-whatsapp img,
.banner-texto .boton-whatsapp img {
    width: 2.2em;           /* tamaño del ícono (antes 1.35em): súbelo o bájalo a tu gusto */
    height: 2.2em;
    max-height: none;
    padding: 0;
    background: none;
    object-fit: contain;
    vertical-align: middle;
    margin: -0.5em 0.45em -0.5em 0;   /* los márgenes negativos evitan que el botón crezca */
}

/* Carrusel solamente para celulares */
@media (max-width: 800px) {

    .marquee {
        width: 100%;
        overflow: hidden;
    }

    #marqueeTrack.carrusel-celular {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: stretch;
        width: max-content !important;
        max-width: none !important;
        gap: 0 !important;
        margin: 0 !important;
        animation-name: desplazarCelular !important;
        animation-duration: 30s !important;
        animation-timing-function: linear !important;
        animation-iteration-count: infinite !important;
        animation-fill-mode: none !important;
        }

    
    #marqueeTrack.carrusel-celular .marquee-set {
        display: flex;
        flex: 0 0 auto;
        width: max-content;
        gap: var(--espacio-celular, 0px);
    }

    #marqueeTrack.carrusel-celular .marquee-set > * {
        flex: 0 0 auto;
    }
/* Cada imagen se pinta como su propia capa pequeña (evita el parpadeo) */
/* Reduce toda la tarjeta manteniendo la proporción */
#marqueeTrack.carrusel-celular img {
    transform: scale(0.99) translateZ(0);
    transform-origin: center center;

    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

    @keyframes desplazarCelular {
        from {
            transform: translate3d(0, 0, 0);
        }

        to {
            transform: translate3d(-50%, 0, 0);
        }
    }

    .marquee:hover #marqueeTrack.carrusel-celular {
        animation-play-state: paused;
    }
}