:root {
    --rojo: #b3202a;
    --rojo-oscuro: #7f141c;
    --verde: #14532d;
    --verde-oscuro: #0b3a1f;
    --oro: #d4a72c;
    --oro-claro: #f3d77a;
    --crema: #fff8ef;
    --texto: #2b1d14;
    --gris: #6b5e55;
    --radio: 18px;
    --sombra: 0 10px 30px rgba(60, 20, 10, .15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Poppins", system-ui, sans-serif;
    color: var(--texto);
    background:
        radial-gradient(circle at 10% 20%, rgba(212, 167, 44, .08) 0 2px, transparent 3px) 0 0 / 40px 40px,
        var(--crema);
    line-height: 1.5;
}
img { max-width: 100%; display: block; }
.contenedor { width: min(1180px, 100% - 2rem); margin-inline: auto; }

#nieve { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- barra superior ---------- */
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: var(--verde-oscuro);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
}
.luces {
    display: flex; justify-content: space-around;
    height: 14px; padding: 0 .5rem;
    background: linear-gradient(var(--verde-oscuro), var(--verde-oscuro)) 0 3px / 100% 2px no-repeat;
}
.luces span {
    width: 9px; height: 13px; margin-top: 3px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    background: var(--rojo); box-shadow: 0 0 10px var(--rojo);
    animation: parpadeo 1.6s infinite alternate;
}
.luces span:nth-child(3n+2) { background: var(--oro-claro); box-shadow: 0 0 10px var(--oro); animation-delay: .5s; }
.luces span:nth-child(3n) { background: #4ade80; box-shadow: 0 0 10px #22c55e; animation-delay: 1s; }
@keyframes parpadeo { to { opacity: .35; } }

.nav { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; gap: 1rem; }
.marca { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; }
.marca img { width: 38px; height: auto; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .35)); }
.marca span { font-family: "Mountains of Christmas", cursive; font-size: 1.6rem; line-height: 1; }
.marca b { color: var(--oro-claro); }
.nav-links { display: flex; gap: 1.2rem; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--oro-claro); }

/* ---------- portada ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(ellipse at top, rgba(255, 255, 255, .12), transparent 60%),
        linear-gradient(160deg, var(--rojo) 0%, var(--rojo-oscuro) 100%);
    color: #fff; text-align: center;
    padding: 4.5rem 0 6.5rem;
}
.hero-inner { position: relative; z-index: 2; }
.hero-pre { color: var(--oro-claro); letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; margin: 0 0 .5rem; }
.hero h1 {
    font-family: "Mountains of Christmas", cursive;
    font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; margin: 0 0 1rem;
    text-shadow: 0 3px 0 rgba(0, 0, 0, .2);
}
.hero-sub { max-width: 560px; margin: 0 auto 1.8rem; opacity: .92; }
.hero-pinos {
    position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; z-index: 1;
    background:
        linear-gradient(to top, var(--crema) 12px, transparent 12px),
        conic-gradient(from -30deg at 50% 0, var(--verde) 60deg, transparent 0) 0 100% / 56px 58px repeat-x,
        conic-gradient(from -30deg at 50% 0, var(--verde-oscuro) 60deg, transparent 0) 28px 100% / 56px 40px repeat-x;
}

/* ---------- botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .65rem 1.2rem; border-radius: 999px; border: 2px solid transparent;
    font: 600 .92rem "Poppins", sans-serif; text-decoration: none; cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
.btn-oro { background: linear-gradient(var(--oro-claro), var(--oro)); color: var(--rojo-oscuro); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); padding: .85rem 1.8rem; }
.btn-rojo { background: var(--rojo); color: #fff; }
.btn-rojo:hover { background: var(--rojo-oscuro); }
.btn-linea { background: transparent; color: var(--verde); border-color: var(--verde); }
.btn-linea:hover { background: var(--verde); color: #fff; }
.btn-deshabilitado { background: #d8d2cc; color: #7b716a; cursor: not-allowed; }
.btn-deshabilitado:hover { transform: none; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; }
.btn-instagram { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); color: #fff; }
.icono { width: 1.15em; height: 1.15em; }

/* ---------- productos ---------- */
.seccion { padding: 3.5rem 0 4rem; }
.titulo {
    font-family: "Mountains of Christmas", cursive; font-size: clamp(2rem, 4vw, 2.8rem);
    text-align: center; color: var(--rojo); margin: 0 0 2.5rem;
}
.titulo.claro { color: #fff; }
.titulo span { font-size: .8em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2rem; }

.tarjeta {
    position: relative; display: flex; flex-direction: column;
    background: #fff; border-radius: var(--radio);
    border: 3px solid var(--oro);
    outline: 2px dashed var(--rojo); outline-offset: -10px;
    box-shadow: var(--sombra);
    padding: 1rem; transition: transform .2s, box-shadow .2s;
}
.tarjeta:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(60, 20, 10, .22); }
.moño {
    position: absolute; top: -16px; left: 50%; translate: -50% 0; z-index: 3;
    width: 46px; height: 26px;
}
.moño::before, .moño::after {
    content: ""; position: absolute; top: 0; width: 24px; height: 24px;
    background: var(--rojo); border: 2px solid var(--rojo-oscuro);
    border-radius: 50% 0 50% 50%;
}
.moño::before { left: 0; rotate: -20deg; }
.moño::after { right: 0; rotate: 20deg; border-radius: 0 50% 50% 50%; }

.foto {
    position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; margin: 0;
    border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #f4ece2;
}
.foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.tarjeta:hover .foto img { transform: scale(1.04); }
.tarjeta.vendido .foto img { filter: grayscale(.55) brightness(.92); }
.sello {
    position: absolute; top: 50%; left: 50%; translate: -50% -50%; rotate: -18deg;
    padding: .35rem 1.3rem; border: 4px double #fff; border-radius: 8px;
    background: rgba(179, 32, 42, .9); color: #fff;
    font: 700 1.5rem/1 "Poppins", sans-serif; letter-spacing: .18em; text-transform: uppercase;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.info { text-align: center; padding: .9rem .3rem .4rem; flex: 1; }
.info h3 { font-size: 1.02rem; font-weight: 600; margin: 0 0 .3rem; }
.precio { color: var(--verde); font-weight: 700; font-size: 1.2rem; margin: 0; }
.acciones { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding-top: .6rem; }
.acciones .btn { padding-inline: .5rem; white-space: nowrap; }
#productos, #contacto { scroll-margin-top: 80px; }
.vacio { text-align: center; color: var(--gris); font-size: 1.1rem; }

/* ---------- contacto / pie ---------- */
.contacto {
    background: linear-gradient(160deg, var(--verde) 0%, var(--verde-oscuro) 100%);
    color: #fff; text-align: center; padding: 3.5rem 0;
    border-top: 6px solid var(--oro);
}
.contacto .titulo { margin-bottom: .8rem; }
.contacto-botones { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.4rem; }
.contacto-botones .btn { padding: .85rem 1.6rem; font-size: 1rem; }
.pie { background: var(--verde-oscuro); color: rgba(255, 255, 255, .75); text-align: center; padding: 1.2rem 1rem; font-size: .85rem; }
.pie p { margin: 0; }

/* ---------- ventana de detalle ---------- */
.modal {
    width: min(880px, 100% - 1.5rem); max-height: calc(100% - 2rem); padding: 0;
    border: 3px solid var(--oro); border-radius: var(--radio);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    background: #fff; color: var(--texto);
}
.modal::backdrop { background: rgba(20, 8, 4, .65); backdrop-filter: blur(3px); }
.modal-cuerpo { display: grid; grid-template-columns: 1.1fr 1fr; }
.modal-foto { position: relative; background: #f4ece2; }
.modal-foto img { width: 100%; height: 100%; max-height: 80vh; object-fit: contain; }
.modal-info { padding: 2rem 1.8rem; display: flex; flex-direction: column; gap: .4rem; }
.modal-info h3 { font-family: "Mountains of Christmas", cursive; font-size: 2rem; color: var(--rojo); margin: 0; line-height: 1.1; }
.descripcion { white-space: pre-line; color: var(--gris); margin: .6rem 0 1rem; }
.comprar-opciones { display: grid; gap: .6rem; margin-top: auto; }
.comprar-titulo { margin: 0; font-weight: 600; }
.nota { font-size: .82rem; color: var(--verde); margin: 0; }
.vendido-aviso { margin-top: auto; padding: .8rem 1rem; background: #fdecec; color: var(--rojo-oscuro); border-radius: 10px; }
.cerrar {
    position: absolute; top: .6rem; right: .6rem; z-index: 2; width: 38px; height: 38px;
    border-radius: 50%; border: 0; background: var(--rojo); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}

@media (max-width: 700px) {
    .marca span { font-size: 1.25rem; }
    .nav-links { gap: .8rem; }
    .modal-cuerpo { grid-template-columns: 1fr; }
    .modal-foto img { max-height: 50vh; }
    .modal-info { padding: 1.3rem; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
