/* ── Variables ──────────────────────────────────────────── */
:root {
    --color-texto:      #1a1c2c;
    --color-rojo:       #e31b23;
    --color-rojo-hover: #b3141a;
    --max-width:        1200px;
    --gap-lateral:      clamp(1rem, 5vw, 5rem);
}

/* ── Base ───────────────────────────────────────────────── */
body {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: #f7f7f8;
    color: var(--color-texto);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Carrusel ───────────────────────────────────────────── */
.envoltura {
    position: relative;
    margin: 28px var(--gap-lateral) 64px;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 16px 56px rgba(0, 0, 0, .24);
}

/* Vignette lateral + gradiente inferior */
.envoltura::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0,0,0,.08) 0%, transparent 30%),
        linear-gradient(to top,    rgba(0,0,0,.55) 0%, transparent 45%);
    z-index: 4;
    pointer-events: none;
    border-radius: inherit;
}

.pista {
    display: flex;
    transition: transform .7s cubic-bezier(0.25, 1, 0.5, 1);
    list-style: none;
    margin: 0;
    padding: 0;
    will-change: transform;
}

/* El ancho de cada diapositiva lo asigna el JS en px */
.diapositiva {
    flex-shrink: 0;
    position: relative;
    transition: opacity .5s ease;
}

.diapositiva.saliendo {
    opacity: .55;
}

.diapositiva.entrando {
    opacity: 1;
}

.diapositiva img {
    width: 100%;
    height: clamp(220px, 36vw, 500px);
    object-fit: cover;
    display: block;
}

/* Contenido superpuesto sobre la imagen */
.diapositiva-contenido {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 620px;
    max-width: 100%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem) clamp(3rem, 7vw, 7rem);
    box-sizing: border-box;
}

.etiqueta {
    display: inline-block;
    background: var(--color-rojo);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 16px;
    width: fit-content;
}

.diapositiva-titulo {
    font-size: clamp(1.6rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 14px;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.diapositiva-subtitulo {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: rgba(255,255,255,.88);
    margin: 0 0 28px;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.diapositiva-boton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e31b23 0%, #ff5c38 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 14px 36px;
    min-height: 44px;
    border-radius: 50px;
    text-decoration: none;
    width: fit-content;
    letter-spacing: .03em;
    transition: background .25s, color .25s, transform .2s, box-shadow .25s;
    box-shadow: 0 6px 24px rgba(227,27,35,.45), inset 0 1px 0 rgba(255,255,255,.25);
}
.diapositiva-boton::after {
    content: '→';
    font-size: 1.05em;
    transition: transform .2s;
}
.diapositiva-boton:hover {
    background: linear-gradient(135deg, #ff5c38 0%, #e31b23 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(227,27,35,.6);
}
.diapositiva-boton:hover::after {
    transform: translateX(4px);
}

/* Botones estilo cristal mejorados */
.boton {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, .45);
    color: #fff;
    width: 54px;
    height: 54px;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.boton:hover {
    background: rgba(255, 255, 255, .28);
    border-color: rgba(255, 255, 255, .75);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.anterior { left: 20px; }
.siguiente { right: 20px; }

/* Indicadores: puntos que se expanden */
.indicadores {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0;
    z-index: 10;
}

/* Área táctil 44×44 px (WCAG 2.5.5 AA) */
.indicador {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* margen negativo para mantener la separación visual de 8 px entre puntos */
    margin: 0 -13.5px;
    transition: none;
}

/* Punto visual */
.indicador::before {
    content: '';
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    flex-shrink: 0;
    transition: background .25s, width .35s ease, border-radius .35s ease;
}

.indicador.activo::before {
    width: 34px;
    border-radius: 5px;
    background: #fff;
}

/* ── Carrusel responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .envoltura {
        margin: 16px 0 48px;
        border-radius: 0;
    }

    .boton {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .anterior { left: 12px; }
    .siguiente { right: 12px; }

    .diapositiva {
        height: clamp(220px, 52vw, 360px);
    }

    .diapositiva img {
        height: 100%;
    }

    .diapositiva-contenido {
        padding: 1.2rem 1.5rem;
    }

    .diapositiva-subtitulo {
        display: none;
    }
}

@media (max-width: 480px) {
    .boton {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .anterior { left: 8px; }
    .siguiente { right: 8px; }

    .diapositiva {
        height: clamp(200px, 60vw, 300px);
    }

    .diapositiva img {
        height: 100%;
    }

    .diapositiva-contenido {
        padding: 1rem 1.2rem;
    }

    .diapositiva-titulo {
        font-size: 1.3rem;
    }

    .diapositiva-boton {
        padding: 14px 22px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    /* Puntos más pequeños en móvil pero misma área táctil */
    .indicador {
        margin: 0 -15.5px; /* mantiene ~6 px de gap visual entre puntos de 7 px */
    }

    .indicador::before {
        width: 7px;
        height: 7px;
    }

    .indicador.activo::before {
        width: 26px;
    }
}

/* ── Títulos de sección ─────────────────────────────────── */
h1,
h2 {
    text-align: center;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: .04em;
    color: #1a1a1a;
    margin-bottom: 6px;
}
h1::after,
h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-rojo);
    border-radius: 2px;
    margin: 10px auto 40px;
}

/* ── Productos ──────────────────────────────────────────── */
.productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: var(--max-width);
    margin: 0 auto 80px;
    padding: 0 var(--gap-lateral);
}

.producto {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .13);
}

.producto > img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #ebebeb;
    display: block;
}

.info-producto {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.producto .nombre {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--color-texto);
    margin-bottom: 8px;
}

.descuento {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.producto .sin_descuento {
    font-size: 0.9rem;
    color: #767676;
    text-decoration: line-through;
}

.producto .precio {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-rojo);
    margin: 8px 0 16px;
}

.producto .reservar {
    width: 100%;
    padding: 12px;
    background: var(--color-rojo);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background .2s;
    margin-top: auto;
}
.producto .reservar:hover { background: var(--color-rojo-hover); }

.vacio {
    font-size: 1.3rem;
    color: #767676;
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

/* ── Secciones de historia ──────────────────────────────── */
section,
.seccion-invertida {
    max-width: var(--max-width);
    margin: 0 auto 64px;
    padding: 0 var(--gap-lateral);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.texto h3 {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 700;
    letter-spacing: .03em;
    margin-bottom: 16px;
    color: #1a1a1a;
}
.texto p {
    font-size: 1rem;
    line-height: 1.85;
    color: #444;
    margin-bottom: 12px;
    font-weight: 400;
}

.imagen-contenedor {
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
}
.imagen-contenedor img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contenedor-video {
    display: flex;
    align-items: center;
}

.video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
}
.video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Responsive: tablet ─────────────────────────────────── */
@media (max-width: 900px) {
    section,
    .seccion-invertida {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .seccion-invertida > .contenedor-video { order: -1; }
}

/* ── Responsive: móvil ──────────────────────────────────── */
@media (max-width: 480px) {

    .productos {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}
/* ── Contenedor de la Cuadrícula ── */
.cuadricula-productos {
    display: grid;
    /* Define cuántas columnas caben según el ancho de pantalla */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1200px; /* Ajusta según el ancho de tu web */
    margin: 0 auto 60px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ── Tarjeta de Producto Individual ── */
.producto {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid #eee;
    min-height: 400px; /* Altura compacta */
    box-sizing: border-box;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ── Imagen del Producto ── */
.contenedor-img {
    width: 100%;
    height: 140px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contenedor-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Evita que la imagen se deforme */
}

/* ── Bloque de Información ── */
.info-producto {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.nombre {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1c2c;
    margin: 5px 0;
}

/* Píldora de Stock */
.stock {
    background-color: #f4f4f4;
    color: #666;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ── Precios y Descuentos ── */
.descuento {
    margin-top: auto; /* Empuja el precio al final de la tarjeta */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sin_descuento {
    color: #767676;
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-bottom: -2px;
}

.precio {
    color: #e31b23; /* Rojo corporativo */
    font-size: 1.4rem;
    font-weight: 800;
}

/* ── Responsive para Móviles ── */
@media (max-width: 480px) {
    .cuadricula-productos {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        padding: 0 10px;
    }

    .producto {
        min-height: 350px;
        padding: 15px;
    }

    .precio {
        font-size: 1.2rem;
    }
}
/* Botón Reservar (El de la imagen roja) */
.btn-reservar {
    display: block;
    width: 100%; /* Ocupa todo el ancho de la tarjeta */
    background-color: #e31b23; /* Rojo intenso de la imagen */
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 8px; /* Redondeado suave como en la foto */
    margin-top: 15px;
    transition: background-color 0.2s ease;
    border: none;
}

.btn-reservar:hover {
    background-color: #b3141a; /* Un rojo un poco más oscuro al pasar el ratón */
}

/* Ajuste para que el botón de catálogo coincida en estilo */
.contenedor-boton-catalogo {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.btn-ir-catalogo {
    display: inline-block;
    padding: 12px 35px;
    background-color: #e31b23;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.btn-ir-catalogo:hover {
    transform: scale(1.05);
    background-color: #b3141a;
}

/* Ajuste extra para la info del producto y que el botón quede abajo */
.info-producto {
    flex-grow: 1; /* Empuja el botón hacia abajo si hay poco texto */
    margin-bottom: 10px;
}

