:root {
    --rojo: #D92318;
    --verde: #006341;
    --verde-texto: #1A5335;
    --blanco: #ffffff;
    --gris-bg: #f4f4f4;
    --gris-fila: #f7f7f7;
    --btn-puntos: #a93336;
    --texto-oscuro: #333333;
    --gris-borde: #cccccc;
    --gris-texto: #7a7a7a;
    --sombra: 0 10px 30px rgba(0, 0, 0, .10);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--blanco);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- ACCESIBILIDAD: FOCUS VISIBLE ---------- */
a:focus-visible,
button:focus-visible,
.producto-card:focus-visible,
input:focus-visible {
    outline: 3px solid var(--rojo);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ================= HEADER ================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: var(--blanco);
    border-bottom: 3px solid var(--verde);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: height .3s ease, box-shadow .3s ease;
}

header.scrolled {
    height: 64px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.logo-img {
    height: 45px;
    width: auto;
    transition: height .3s ease;
}

header.scrolled .logo-img {
    height: 36px;
}

.menu-toggle {
    display: none;
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    z-index: 1100;
    transition: transform .15s ease;
}

.menu-toggle:active {
    transform: scale(.88);
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--verde);
    border-radius: 9px;
    transition: .25s ease-in-out;
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 9px;
}

.menu-toggle span:nth-child(3) {
    top: 18px;
}

.menu-toggle.open span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
    left: -40px;
}

.menu-toggle.open span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 6px;
}

nav a {
    position: relative;
    text-decoration: none;
    color: var(--verde);
    font-weight: bold;
    font-size: 14px;
    padding: 10px;
    cursor: pointer;
    transition: color .3s;
}

nav a::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 4px;
    height: 2px;
    background: var(--rojo);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

nav a:hover {
    color: var(--rojo);
}

nav a:hover::after {
    transform: scaleX(1);
}

/* ================= MAIN / HERO ================= */
main {
    flex: 1;
    padding: 10px 5%;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 15px;
    overflow: hidden;
    background: #eee;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform .6s cubic-bezier(.65, 0, .35, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s, transform .3s;
}

.carousel-arrow:hover {
    background: var(--verde);
    transform: translateY(-50%) scale(1.08);
}

.carousel-arrow.prev {
    left: 16px;
}

.carousel-arrow.next {
    right: 16px;
}

.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    padding: 0;
    transition: background .3s, transform .3s;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.25);
}

.hero-btns-container {
    position: absolute;
    bottom: 46px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 20px;
    width: auto;
}

.extra-section {
    width: 100%;
    max-width: 1200px;
    margin: 10px auto 30px;
}

.extra-img-container {
    width: 100%;
    aspect-ratio: 16 / 4;
    border-radius: 15px;
    overflow: hidden;
}

/* ================= BOTONES ================= */
.btn-main {
    background: var(--rojo);
    color: white;
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
    min-width: 260px;
    position: relative;
    overflow: hidden;
}

.btn-main::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-main:hover::after {
    left: 100%;
}

.btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-secundario {
    background-color: var(--btn-puntos);
}

.btn-regresar {
    background: #444;
    color: white;
    border: none;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.4s;
    overflow: hidden;
    padding: 0 12px;
    margin-bottom: 15px;
}

.btn-regresar svg {
    min-width: 20px;
    width: 20px;
    height: 20px;
    fill: white;
}

.btn-regresar span {
    opacity: 0;
    margin-left: 10px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    transition: 0.2s;
}

.btn-regresar:hover {
    width: 140px;
    background: var(--verde);
}

.btn-regresar:hover span {
    opacity: 1;
}

/* ================= MODALES ================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .25s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
}

.modal-body {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    position: relative;
    border-top: 10px solid var(--rojo);
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    transform: scale(.94) translateY(10px);
    opacity: 0;
    transition: transform .32s cubic-bezier(.34, 1.4, .64, 1), opacity .28s ease;
}

.modal-overlay.active .modal-body {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 35px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color .2s, transform .2s;
}

.close:hover {
    color: var(--rojo);
    transform: rotate(90deg);
}

.img-header-modal {
    width: 100%;
    max-width: 400px;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin: 0 auto 20px;
    display: block;
    background: #eee;
}

/* ---- Catálogo (grid de productos) ---- */
.modal-catalogo-container {
    max-width: 1000px !important;
    padding: 35px 30px !important;
}

.modal-catalogo-titulo {
    color: var(--verde-texto);
    font-size: 30px;
    font-weight: bold;
}

.modal-catalogo-sub {
    color: var(--gris-texto);
    font-size: 14px;
    margin: 6px 0 22px;
}

.puntos-disponibles-badge {
    background: var(--verde-texto);
    color: #fff;
    font-weight: bold;
    font-size: 15px;
    padding: 8px 20px;
    border-radius: 20px;
    margin: 4px auto 18px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.colecciones-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.tab-coleccion {
    border: 2px solid var(--verde);
    background: transparent;
    color: var(--verde);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: .25s;
}

.tab-coleccion.active,
.tab-coleccion:hover {
    background: var(--verde);
    color: #fff;
}

.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    text-align: left;
}

.producto-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
}

.producto-card:hover,
.producto-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: var(--sombra);
}

.producto-img {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.producto-img .img-cover {
    transition: transform .5s ease;
}

.producto-card:hover .producto-img .img-cover {
    transform: scale(1.08);
}

.producto-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 14px;
    opacity: 0;
    transition: opacity .3s ease;
    background: linear-gradient(to top, rgba(0, 99, 65, .82), rgba(0, 99, 65, 0) 65%);
}

.producto-card:hover .producto-overlay,
.producto-card:focus-visible .producto-overlay {
    opacity: 1;
}

.producto-overlay span {
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.producto-info {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.producto-info h3 {
    font-size: 14.5px;
    color: var(--texto-oscuro);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

.producto-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.stats-principales {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 10px;
    color: var(--gris-texto);
    text-transform: uppercase;
    letter-spacing: .3px;
    min-width: 0;
    text-align: center;
}

.stat strong {
    font-size: 14.5px;
    color: var(--verde-texto);
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.2;
    word-break: break-word;
}

/* ---- Detalle de producto ---- */
.producto-detalle-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0 8px;
    padding: 18px;
    background: var(--gris-fila);
    border-radius: 12px;
}

.detalle-principales {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.stat-lg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.stat-lg strong {
    font-size: 20px;
    color: var(--verde-texto);
    font-weight: 800;
    line-height: 1.2;
    word-break: break-word;
}

.stat-lg span {
    font-size: 11px;
    color: var(--gris-texto);
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ---- Consulta de puntos ---- */
.modal-consulta-container {
    max-width: 580px !important;
    padding: 35px 40px !important;
}

.modal-consulta-titulo {
    color: var(--verde-texto);
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: center;
}

.form-consulta-dinamico {
    text-align: left;
    width: 100%;
}

.form-consulta-dinamico input[type="text"],
.form-consulta-dinamico input[type="date"] {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 15px;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    font-size: 18px;
    color: var(--texto-oscuro);
    outline: none;
    transition: border-color .2s;
}

.form-consulta-dinamico input:focus {
    border-color: var(--verde);
}

.form-consulta-dinamico label {
    display: block;
    font-size: 16px;
    color: #555555;
    margin-bottom: 8px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0 25px 0;
    font-size: 15px;
    color: #444444;
    line-height: 1.4;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-container a {
    color: var(--rojo);
    text-decoration: underline;
    cursor: pointer;
}

.btn-continuar-modal {
    width: 100%;
    background: var(--rojo);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 40px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-continuar-modal:hover {
    background: #b81d14;
}

/* ---- Términos ---- */
.modal-terminos-container {
    max-width: 800px !important;
    padding: 35px 40px !important;
}

.modal-terminos-titulo {
    color: var(--verde-texto);
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

.terminos-lista-wrapper {
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.terminos-fila {
    width: 100%;
    padding: 18px 20px;
    font-size: 16px;
    color: var(--texto-oscuro);
    line-height: 1.5;
    background: transparent;
}

.terminos-fila.gris {
    background-color: var(--gris-fila);
}

/* ================= FOOTER ================= */
footer {
    background: var(--gris-bg);
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid #ddd;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--rojo);
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .2s;
}

.footer-links a:hover {
    opacity: .7;
    text-decoration: underline;
}

.footer-disclaimer {
    font-size: 11px;
    color: #777;
    max-width: 820px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: 0.4s ease-in-out;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    nav ul.show {
        max-height: 500px;
        border-bottom: 3px solid var(--verde);
    }

    nav li {
        border-bottom: 1px solid #eee;
    }

    nav a {
        display: block;
        padding: 20px 5%;
    }

    nav a::after {
        display: none;
    }

    .carousel {
        aspect-ratio: 9 / 16;
    }

    .extra-img-container {
        aspect-ratio: 1 / 1;
    }

    .hero-btns-container {
        flex-direction: row;
        width: 95%;
        bottom: 30px;
        gap: 8px;
    }

    .btn-main {
        min-width: 0;
        flex: 1;
        border-radius: 50px;
        padding: 18px 5px;
        font-size: 11px;
    }

    .carousel-arrow {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .modal-consulta-container,
    .modal-terminos-container,
    .modal-catalogo-container {
        padding: 25px 15px !important;
    }

    .modal-terminos-titulo {
        font-size: 28px;
    }

    .modal-catalogo-titulo {
        font-size: 24px;
    }

    .terminos-fila {
        padding: 14px 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .catalogo-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 16px;
    }

    .producto-info h3 {
        font-size: 13.5px;
        min-height: auto;
        margin-bottom: 10px;
    }

    .stats-principales {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .stat {
        font-size: 9px;
    }

    .stat strong {
        font-size: 13px;
    }

    .producto-detalle-stats {
        gap: 10px;
        padding: 12px 8px;
    }

    .detalle-principales {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .stat-lg strong {
        font-size: 15px;
    }

    .stat-lg span {
        font-size: 9.5px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}