:root {
    --burgundy: #7a1526;
    --burgundy-deep: #4d0c18;
    --burgundy-bright: #941e32;
    --caramel: #c98b3c;
    --paper: #fbfaf8;
    --card: #ffffff;
    --ink: #1f1a1b;
    --muted: #6b6468;
    --line: #e9e4e1;
    --wsp: #1f9d55;
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; }

/* Barra superior */
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px clamp(16px, 4vw, 48px);
    background: rgba(77, 12, 24, 0.92);
    backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #fff; text-decoration: none; }
.brand img { width: 76px; height: 76px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.topbar-link { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.9rem; margin-left: auto; margin-right: 18px; }
.topbar-link:hover { color: #fff; }
.topbar-cta {
    color: #fff; text-decoration: none; font-weight: 600; font-size: 0.88rem;
    padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.4);
    transition: background 0.2s;
}
.topbar-cta:hover { background: rgba(255,255,255,0.14); }

/* Banner interactivo */
.hero {
    background: var(--burgundy-deep);
    color: #fff;
    padding: clamp(22px, 3vw, 40px) clamp(20px, 5vw, 64px) 16px;
}
.banner-carousel { max-width: 1120px; margin: 0 auto; }
.banner-slides { min-height: 300px; }
.banner-slide {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    min-height: 300px;
}
.banner-slide[hidden] { display: none; }
.banner-copy { max-width: 540px; }
.hero-note { color: var(--caramel); font-weight: 600; margin-bottom: 10px; }
.banner-copy h1, .banner-copy h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.subtitle { color: rgba(255,255,255,0.78); font-size: 1rem; margin-bottom: 20px; max-width: 46ch; }
.banner-media { position: relative; justify-self: center; width: min(100%, 340px); }
.banner-media img {
    width: 100%; aspect-ratio: 1 / 0.9; object-fit: cover;
    border: 4px solid #fff; border-radius: 20px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.24);
}
.banner-tag {
    position: absolute; left: 14px; bottom: 14px;
    padding: 6px 11px; border-radius: 999px;
    background: #fff; color: var(--burgundy-deep); font-weight: 700; font-size: 0.85rem;
}
.banner-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.banner-controls, .banner-dots { display: flex; align-items: center; gap: 10px; }
.banner-arrow, .banner-dot, .banner-autoplay {
    color: #fff; background: transparent; border: 1px solid rgba(255,255,255,0.55); cursor: pointer;
}
.banner-arrow {
    width: 40px; height: 40px; border-radius: 50%;
    font: 400 1.7rem var(--font-body); line-height: 1;
}
.banner-dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; }
.banner-dot[aria-current="true"] { background: var(--caramel); border-color: var(--caramel); }
.banner-autoplay { padding: 8px 14px; border-radius: 999px; font: 600 0.85rem var(--font-body); }
.banner-arrow:hover, .banner-autoplay:hover { background: rgba(255,255,255,0.14); }
.banner-dot:focus-visible, .banner-arrow:focus-visible, .banner-autoplay:focus-visible { outline-color: #fff; }

/* Contenedor y filtros */
.container { max-width: 1180px; margin: 0 auto; padding: 40px 20px 20px; }

.tabs-wrapper {
    display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
    position: sticky; top: 92px; z-index: 40;
    padding: 12px 0; margin-bottom: 30px;
    background: var(--paper);
}
.tab-btn {
    font: 600 0.9rem var(--font-body);
    background: #fff; color: var(--muted);
    border: 1px solid var(--line); border-radius: 999px;
    padding: 9px 18px; cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tab-btn:hover { border-color: var(--burgundy); color: var(--burgundy); }
.tab-btn.active { background: var(--burgundy); color: #fff; border-color: var(--burgundy); }

/* Categorías */
.category-block { margin-bottom: 64px; }
.category-header { margin-bottom: 26px; max-width: 62ch; }
.category-header h2 { font-family: var(--font-display); font-size: 2rem; letter-spacing: -0.01em; }
.category-header p { color: var(--muted); margin-top: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

/* Tarjetas */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(77, 12, 24, 0.12); }

.card-media {
    position: relative; aspect-ratio: 1 / 1;
    background: #fff; display: grid; place-items: center;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.card-media img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.5s ease;
}
.card:hover .card-media img { transform: scale(1.05); }
.media-icon { font-size: 3.5rem; opacity: 0.7; }

.card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-body h3 { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; margin-bottom: 6px; }
.desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 16px; flex-grow: 1; }

.price-container { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--burgundy); }
.weight-badge {
    background: #f6f1ee; color: #5a4f4a; border-radius: 999px;
    padding: 4px 12px; font-size: 0.82rem; font-weight: 600;
}

.card-actions { display: flex; gap: 8px; }
.btn {
    flex: 1; padding: 11px 12px; border-radius: 12px; text-align: center;
    font: 600 0.88rem var(--font-body); cursor: pointer; text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--burgundy); color: #fff; border: 1px solid var(--burgundy); }
.btn-primary:hover { background: var(--burgundy-bright); }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--burgundy); color: var(--burgundy); }
.btn-lg { display: inline-block; flex: none; padding: 15px 30px; font-size: 1rem; background: var(--caramel); border-color: var(--caramel); color: #2a1a05; }
.btn-lg:hover { background: #dca04f; }

/* Ficha informativa del producto */
.product-info {
    border: none; border-radius: 24px; padding: 0;
    width: min(760px, calc(100% - 24px)); max-height: 88vh;
    margin: auto; overflow: hidden;
    box-shadow: 0 30px 70px rgba(0,0,0,0.3);
}
.product-info::backdrop { background: rgba(30, 8, 14, 0.55); backdrop-filter: blur(5px); }
.product-info[open] { animation: subir 0.3s ease; }
@keyframes subir { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }

.product-info-inner { padding: 0 28px 28px; max-height: 88vh; overflow-y: auto; }
.product-info-img { width: calc(100% + 56px); margin: 0 -28px 22px; height: 220px; object-fit: cover; }
.product-info-inner h2 { font-family: var(--font-display); font-size: 1.8rem; }
.label-kicker { padding-top: 26px; color: var(--burgundy); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.product-info-img:not([hidden]) + .label-kicker { padding-top: 0; }
.modal-close {
    position: absolute; top: 14px; right: 14px; z-index: 2;
    width: 38px; height: 38px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.92); color: var(--ink);
    font-size: 1rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.info-description { color: var(--muted); margin: 4px 0 18px; }
.info-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.info-facts > div { padding: 10px 12px; background: #f6f1ee; border-radius: 10px; }
.info-facts dt { color: var(--muted); font-size: 0.75rem; }
.info-facts dd { font-weight: 700; }
.nutrition-label { margin-top: 20px; padding: 14px; border: 2px solid #252122; background: #fff; color: #252122; }
.nutrition-label h3 { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 5px solid #252122; font-size: 1.1rem; line-height: 1.3; }
.nutrition-label p { font-size: 0.82rem; line-height: 1.5; }
.nutrition-estimate { margin-bottom: 8px; color: var(--burgundy); font-weight: 700; }
.nutrition-composition { margin-bottom: 8px; font-weight: 700; }
.nutrition-serving { margin-bottom: 3px; }
.nutrition-table-scroll { overflow-x: auto; margin: 10px 0; }
.nutrition-table { width: 100%; min-width: 570px; border-collapse: collapse; font-size: 0.78rem; line-height: 1.35; }
.nutrition-table th, .nutrition-table td { padding: 7px 8px; border-bottom: 1px solid #d8d3d0; text-align: right; white-space: nowrap; }
.nutrition-table thead th { background: #f1eeec; font-weight: 700; }
.nutrition-table th:first-child { text-align: left; white-space: normal; }
.nutrition-table tbody th { font-weight: 500; }
.nutrition-table .nutrition-highlight th { font-weight: 700; }
.nutrition-table .nutrition-indented th { padding-left: 20px; }
.nutrition-alternative { padding-top: 5px; border-top: 2px solid #252122; }
.ingredients-info h3 { font-family: var(--font-display); color: var(--burgundy); font-size: 1.15rem; margin: 20px 0 8px; }
.ingredients-info ul { padding-left: 22px; color: #3d3538; }
.ingredients-info li { margin-bottom: 8px; }


.error-box { max-width: 560px; margin: 40px auto; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.error-box h3 { font-family: var(--font-display); color: var(--burgundy); margin-bottom: 8px; }

footer { text-align: center; padding: 36px 20px 90px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }

.social { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.social a {
    color: var(--burgundy); text-decoration: none; font-weight: 600; font-size: 0.92rem;
    padding: 9px 20px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
    transition: border-color 0.2s, background 0.2s;
}
.social a:hover { border-color: var(--burgundy); background: var(--burgundy); color: #fff; }

/* Móvil */
/* Cómo pedir */
.how { background: #fff; border-top: 1px solid var(--line); padding: clamp(40px, 6vw, 80px) 20px; }
.how-inner { max-width: 900px; margin: 0 auto; }
.how h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 26px; }
.steps { list-style: none; counter-reset: paso; display: grid; gap: 14px; margin-bottom: 36px; }
.steps li { counter-increment: paso; display: flex; gap: 16px; align-items: flex-start; max-width: 68ch; }
.steps li::before {
    content: counter(paso); flex: none; width: 34px; height: 34px; border-radius: 50%;
    background: var(--burgundy); color: #fff; display: grid; place-items: center;
    font: 700 0.95rem var(--font-display);
}
.ship { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ship > div { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--paper); }
.ship h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 4px; }
.ship p { color: var(--muted); font-size: 0.92rem; }

/* Carrito */
.cart-fab {
    position: fixed; right: 18px; bottom: 18px; z-index: 60;
    background: var(--burgundy); color: #fff; border: none; cursor: pointer;
    font: 600 0.95rem var(--font-body); padding: 14px 22px; border-radius: 999px;
    box-shadow: 0 12px 28px rgba(77, 12, 24, 0.4); transition: transform 0.2s;
}
.cart-fab:hover { transform: translateY(-2px); background: var(--burgundy-bright); }
.cart-fab[hidden] { display: none; }

.cart {
    border: none; margin: 0 0 0 auto; padding: 0;
    width: min(420px, 100%); height: 100dvh; max-height: 100dvh;
    border-radius: 24px 0 0 24px; box-shadow: -20px 0 60px rgba(0,0,0,0.25);
}
.cart[open] { display: flex; flex-direction: column; animation: entrar 0.3s ease; }
.cart::backdrop { background: rgba(30, 8, 14, 0.5); backdrop-filter: blur(4px); }
@keyframes entrar { from { translate: 40px 0; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 14px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-family: var(--font-display); font-size: 1.5rem; }
.modal-close.static { position: static; box-shadow: none; background: #f6f1ee; }
.cart-list { list-style: none; flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-name { font-weight: 600; line-height: 1.3; }
.cart-sub { color: var(--muted); font-size: 0.85rem; }
.cart-empty { color: var(--muted); padding: 24px 0; }
.qty { display: flex; align-items: center; gap: 4px; background: #f6f1ee; border-radius: 999px; padding: 3px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: none; background: #fff; font-size: 1.1rem; cursor: pointer; color: var(--burgundy); }
.qty span { min-width: 24px; text-align: center; font-weight: 600; }
.cart-foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--burgundy); }
.btn-wsp { display: block; flex: none; background: var(--wsp); color: #fff; border: 1px solid var(--wsp); padding: 14px; }
.btn-wsp:hover { background: #188546; }
.btn-wsp.disabled { opacity: 0.4; pointer-events: none; }
.cart-clear { background: none; border: none; color: var(--muted); font: 500 0.85rem var(--font-body); cursor: pointer; text-decoration: underline; }

@media (max-width: 560px) {
    .brand { font-size: 1.05rem; gap: 8px; }
    .brand img { width: 56px; height: 56px; }
    .topbar-link { display: none; }
    .topbar-cta { padding: 8px 12px; font-size: 0.8rem; margin-left: auto; }
    .tabs-wrapper { top: 72px; }
}
@media (max-width: 800px) {
    .banner-slides, .banner-slide { min-height: 0; }
    .hero { padding: 24px 20px 14px; }
    .banner-slide { grid-template-columns: 1fr; gap: 16px; }
    .banner-media { width: min(100%, 240px); justify-self: start; }
    .banner-copy h1, .banner-copy h2 { font-size: clamp(1.8rem, 7vw, 2.5rem); }
    .subtitle { font-size: 0.94rem; margin-bottom: 16px; }
    .btn-lg { padding: 12px 22px; font-size: 0.92rem; }
    .banner-arrow { width: 36px; height: 36px; }
    .banner-footer { margin-top: 12px; }
    .tabs-wrapper { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
    .tab-btn { white-space: nowrap; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
    .recipe-inner { padding: 0 20px 24px; }
    .recipe-img { width: calc(100% + 40px); margin: 0 -20px 18px; height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}