/* La cocina de Abi — sitio público */
:root {
    --crema: #FEFAF9;
    --crema-2: #F8EFEA;
    --crema-3: #F1E3DA;
    --cafe: #8E5537;
    --cafe-osc: #6E3E25;
    --celeste: #6AA6C4;
    --celeste-osc: #3F7E9E;
    --celeste-suave: #E5F0F6;
    --texto: #3B2A21;
    --texto-2: #7A6559;
    --blanco: #FFFFFF;
    --oferta: #C2452D;
    --wa: #1FA855;
    --radio: 18px;
    --sombra: 0 1px 2px rgba(110, 62, 37, .06), 0 8px 24px rgba(110, 62, 37, .08);
    --serif: "Playfair Display", Georgia, serif;
    --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    margin: 0;
    background: var(--crema);
    color: var(--texto);
    font: 400 17px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--cafe); }
h1, h2, h3 { font-family: var(--serif); color: var(--cafe-osc); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); font-style: italic; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }

.eyebrow {
    font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--celeste-osc); margin-bottom: .6em;
}

/* Botones */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    background: var(--cafe); color: var(--blanco); border: 2px solid var(--cafe);
    padding: .8em 1.5em; border-radius: 999px;
    font: 700 1rem/1.1 var(--sans); text-decoration: none; cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
}
.btn:hover { background: var(--cafe-osc); border-color: var(--cafe-osc); }
.btn:active { transform: scale(.97); }
.btn:disabled { background: var(--crema-3); border-color: var(--crema-3); color: var(--texto-2); cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--cafe); }
.btn--ghost:hover { background: var(--cafe); color: var(--blanco); }
.btn--sm { padding: .55em 1.1em; font-size: .9rem; }
.btn--wa { background: var(--wa); border-color: var(--wa); width: 100%; }
.btn--wa:hover { background: #178a45; border-color: #178a45; }
.link { background: none; border: 0; color: var(--texto-2); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; padding: .5em; }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 2px; }

/* Anuncio */
.anuncio {
    background: var(--celeste); color: var(--blanco); text-align: center;
    padding: .55em 16px; font-weight: 700; font-size: .95rem;
}

/* Header */
.header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(254, 250, 249, .9); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--crema-3);
}
.header__in { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.header__logo img { height: 56px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(10px, 3vw, 28px); }
.nav a { color: var(--texto); text-decoration: none; font-weight: 700; font-size: .95rem; }
.nav a:hover { color: var(--cafe); }
.nav__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--crema-2); }

/* Hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 88px); overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.hero__intro { font-size: 1.15rem; color: var(--texto-2); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__art { position: relative; }
.hero__art::before {
    content: ""; position: absolute; inset: 4% 2%;
    background: radial-gradient(circle at 50% 50%, var(--celeste-suave) 0%, var(--crema-2) 55%, transparent 72%);
    border-radius: 50%;
}
.hero__art img { position: relative; width: 100%; max-width: 480px; margin-inline: auto; }

/* Secciones */
.seccion { padding: clamp(56px, 8vw, 96px) 0; }
.seccion--suave { background: var(--crema-2); }
.seccion__head { text-align: center; margin-bottom: 36px; }

/* Filtros */
.filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 32px; }
.chip {
    border: 1.5px solid var(--crema-3); background: var(--blanco); color: var(--texto);
    padding: .5em 1.1em; border-radius: 999px; font: 700 .9rem var(--sans); cursor: pointer;
}
.chip:hover { border-color: var(--cafe); }
.chip.is-on { background: var(--cafe); border-color: var(--cafe); color: var(--blanco); }

/* Tarjetas */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.card {
    background: var(--blanco); border-radius: var(--radio); overflow: hidden;
    box-shadow: var(--sombra); display: flex; flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(110,62,37,.06), 0 16px 36px rgba(110,62,37,.12); }
.card[hidden] { display: none; }
.card__media {
    position: relative; aspect-ratio: 4 / 3; padding: 0; border: 0; cursor: pointer;
    background: var(--crema-2); overflow: hidden; display: block; width: 100%;
}
.card__media img, .card__media video { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img, .card:hover .card__media video { transform: scale(1.04); }
.card__placeholder { display: grid; place-items: center; height: 100%; }
.card__placeholder img { width: 60%; height: auto; object-fit: contain; opacity: .55; }
.card__play {
    position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(255,255,255,.88); color: var(--cafe); font-size: 1.1rem;
}
.card__badges { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.card__count {
    position: absolute; right: 10px; bottom: 10px; background: rgba(59,42,33,.7); color: #fff;
    font-size: .75rem; font-weight: 700; padding: .2em .6em; border-radius: 999px;
}
.badge {
    background: var(--blanco); color: var(--celeste-osc); font-size: .75rem; font-weight: 800;
    padding: .3em .7em; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.badge--oferta { background: var(--oferta); color: #fff; }
.badge--fav { color: var(--cafe); }
.badge--gris { background: var(--texto-2); color: #fff; }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1.3rem; margin-bottom: .2em; }
.card__porcion { color: var(--celeste-osc); font-weight: 700; font-size: .85rem; margin-bottom: .5em; }
.card__desc {
    color: var(--texto-2); font-size: .95rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; }
.card--agotado .card__media { filter: grayscale(.6); opacity: .8; }

.precio { margin: 0; display: flex; align-items: baseline; gap: .5em; flex-wrap: wrap; }
.precio strong { font-size: 1.3rem; color: var(--cafe-osc); font-weight: 800; }
.precio s { color: var(--texto-2); font-size: .95rem; }
.precio s + strong { color: var(--oferta); }
.precio--lg strong { font-size: 1.7rem; }
.precio__consultar { white-space: nowrap; font-weight: 800; color: var(--celeste-osc); font-size: 1rem; }
.precio--lg .precio__consultar { font-size: 1.3rem; }

/* Stock */
.stock { display: inline-flex; align-items: center; gap: .45em; font-size: .85rem; font-weight: 800; margin: 0 0 .6em; }
.stock::before { content: ""; width: .6em; height: .6em; border-radius: 50%; background: currentColor; }
.stock--ok { color: #2F7D4F; }
.stock--bajo { color: #B26A00; }
.stock--sin { color: var(--texto-2); }
.aviso-stock, .pedido__aviso {
    background: #FFF4DC; color: #7A4A00; border-radius: 12px; padding: .55em .8em;
    font-size: .88rem; font-weight: 700; line-height: 1.4; margin: 12px 0 0;
}
.pedido__aviso { grid-column: 1 / -1; margin: 2px 0 0; }

.vacio { text-align: center; color: var(--texto-2); font-size: 1.1rem; padding: 40px 0; }

/* Pasos */
.pasos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pasos li { background: var(--blanco); border-radius: var(--radio); padding: 28px; box-shadow: var(--sombra); }
.pasos span {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: var(--celeste-suave); color: var(--celeste-osc); font: 600 1.3rem var(--serif); margin-bottom: 14px;
}
.pasos p { color: var(--texto-2); margin: 0; }

/* Envíos */
.envios { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.envios p { color: var(--texto-2); font-size: 1.1rem; }
.envios__horarios { font-size: 1rem !important; }
.envios__card {
    background: var(--blanco); border-radius: var(--radio); padding: 32px; box-shadow: var(--sombra);
    display: flex; flex-direction: column; gap: 12px;
}
.envios__zona { font-weight: 800; color: var(--texto) !important; margin: 0 0 6px; }

/* Footer */
.footer { background: var(--crema-2); padding: 48px 0 32px; text-align: center; color: var(--texto-2); }
.footer__logo { width: 160px; margin: 0 auto 12px; }
.footer__small { font-size: .85rem; margin: 0; }

/* Botón flotante de pedido */
.fab {
    position: fixed; right: 16px; bottom: 16px; z-index: 30;
    display: flex; align-items: center; gap: 10px;
    background: var(--cafe); color: #fff; border: 0; border-radius: 999px;
    padding: 14px 20px; font: 800 1rem var(--sans); cursor: pointer;
    box-shadow: 0 10px 30px rgba(110,62,37,.35);
    animation: aparecer .3s ease-out;
}
.fab b { background: #fff; color: var(--cafe); border-radius: 999px; min-width: 26px; height: 26px; display: grid; place-items: center; font-size: .85rem; padding: 0 6px; }
.fab.pulso { animation: pulso .4s ease-out; }
.fab--wa { background: var(--wa); text-decoration: none; box-shadow: 0 10px 30px rgba(31,168,85,.35); }
.fab--wa:hover { background: #178a45; }
.detalle__consultar {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em; margin-top: 12px;
    color: var(--wa); font-weight: 800; text-decoration: none; padding: .5em; border-radius: 999px;
}
.detalle__consultar::before { content: "💬"; }
.detalle__consultar:hover { background: #E8F6EE; }
@keyframes aparecer { from { transform: translateY(20px); opacity: 0; } }
@keyframes pulso { 50% { transform: scale(1.08); } }

/* Modales */
.modal {
    border: 0; padding: 0; border-radius: 22px; background: var(--crema);
    width: min(920px, 100% - 32px); max-height: calc(100% - 32px); color: var(--texto);
    box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.modal::backdrop { background: rgba(59, 42, 33, .5); backdrop-filter: blur(3px); }
.modal[open] { animation: aparecer .25s ease-out; }
.modal__x {
    position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
    border: 0; background: rgba(255,255,255,.92); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--texto);
}
.detalle { display: grid; grid-template-columns: 1.1fr 1fr; }
.detalle__galeria { background: var(--crema-2); }
.detalle__principal { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.detalle__principal img, .detalle__principal video { width: 100%; height: 100%; object-fit: cover; }
.detalle__principal .card__placeholder img { width: 60%; height: auto; object-fit: contain; }
.detalle__thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.detalle__thumbs:empty { display: none; }
.detalle__thumbs button {
    flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px;
    overflow: hidden; cursor: pointer; background: var(--crema-3); position: relative;
}
.detalle__thumbs button.is-on { border-color: var(--cafe); }
.detalle__thumbs img, .detalle__thumbs video { width: 100%; height: 100%; object-fit: cover; }
.detalle__info { padding: 36px 32px; display: flex; flex-direction: column; }
.detalle__info h3 { font-size: 1.9rem; padding-right: 30px; }
.detalle__desc { color: var(--texto-2); overflow-wrap: anywhere; margin-bottom: 1em; }
.detalle__desc > :last-child { margin-bottom: 0; }
.detalle__desc p, .detalle__desc ul, .detalle__desc ol, .detalle__desc blockquote { margin: 0 0 .7em; }
.detalle__desc ul, .detalle__desc ol { padding-left: 1.3em; }
.detalle__desc li { margin-bottom: .2em; }
.detalle__desc h2 { font-size: 1.35rem; margin: .5em 0 .3em; }
.detalle__desc h3 { font-size: 1.1rem; margin: .5em 0 .3em; font-family: var(--sans); font-weight: 800; }
.detalle__desc a { color: var(--celeste-osc); }
.detalle__comprar { display: flex; gap: 12px; margin-top: auto; padding-top: 24px; flex-wrap: wrap; }
.detalle__comprar .btn { flex: 1; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--crema-3); border-radius: 999px; background: #fff; }
.qty button { width: 40px; height: 44px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--cafe); }
.qty output { min-width: 28px; text-align: center; font-weight: 800; }
.qty--sm button { width: 32px; height: 34px; font-size: 1.1rem; }

.modal--lado {
    margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(420px, 100%);
    border-radius: 22px 0 0 22px; padding: 28px 24px; display: none; flex-direction: column;
}
.modal--lado[open] { display: flex; animation: deslizar .25s ease-out; }
@keyframes deslizar { from { transform: translateX(40px); opacity: 0; } }
.pedido { list-style: none; margin: 8px 0 0; padding: 0; overflow-y: auto; flex: 1; }
.pedido li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--crema-3); }
.pedido__img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--crema-2); }
.pedido__nombre { font-weight: 700; line-height: 1.25; }
.pedido__sub { color: var(--texto-2); font-size: .9rem; }
.pedido__vacio { color: var(--texto-2); }
.pedido__pie { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.pedido__total { display: flex; justify-content: space-between; font-size: 1.15rem; margin: 0; }
.pedido__total strong { color: var(--cafe-osc); }
.pedido__nota { font-size: .9rem; color: var(--texto-2); margin: 0; }
.campo { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .9rem; }
.campo input, .campo textarea {
    font: inherit; font-weight: 400; padding: .6em .8em; border: 1.5px solid var(--crema-3);
    border-radius: 12px; background: #fff; color: var(--texto);
}

.toast {
    position: fixed; left: 50%; bottom: 90px; z-index: 50; transform: translate(-50%, 20px);
    background: var(--texto); color: #fff; padding: .7em 1.2em; border-radius: 999px;
    font-weight: 700; font-size: .95rem; opacity: 0; pointer-events: none; transition: .25s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 860px) {
    .hero__in, .envios { grid-template-columns: 1fr; }
    .hero__art { order: -1; max-width: 300px; margin-inline: auto; }
    .hero__text { text-align: center; }
    .hero__intro { margin-inline: auto; }
    .hero__cta { justify-content: center; }
    .pasos { grid-template-columns: 1fr; }
    .detalle { grid-template-columns: 1fr; }
    .detalle__principal { aspect-ratio: 4 / 3; }
    .detalle__info { padding: 24px 20px; }
    .modal:not(.modal--lado) { overflow-y: auto; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .nav a:not(.nav__icon):not([href="#menu"]) { display: none; }
    .header__logo img { height: 48px; }
    .grid { grid-template-columns: 1fr; }
    .modal--lado { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
