/* Colores de marca: cambiá --a1 / --a2 para ajustar al logo */
:root {
  --bg: #140d09;
  --card: #1e1510;
  --card-2: #170f0b;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #fbf4ea;
  --muted: #b5a491;
  --a1: #a8652c;            /* canela */
  --a2: #e2b16f;            /* dulce de leche */
  --glow: rgba(198, 138, 69, .32);
  --grad: linear-gradient(135deg, var(--a1), var(--a2));
  --green: #10b981;
  --radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(198, 138, 69, .16), transparent 38%),
    radial-gradient(circle at 88% 12%, rgba(233, 196, 140, .11), transparent 34%);
  background-attachment: fixed;
  color: var(--text);
  padding-bottom: 110px;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.container { max-width: 1160px; margin: 0 auto; padding: 0 18px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(20, 13, 9, .78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand-icon {
  position: relative; width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: #fdf8f0; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--a2), 0 8px 20px var(--glow); overflow: hidden;
}
.brand-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.brand-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-title h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.25rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(16, 185, 129, .14); color: #34d399; border: 1px solid rgba(16, 185, 129, .3);
}
.live-pill.off { background: rgba(255,255,255,.06); color: var(--muted); border-color: var(--border); }
.live-pill.off .live-dot { background: var(--muted); box-shadow: none; animation: none; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.85); } }
.subtitle { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-header-cart {
  background: var(--grad); color: #fff; border: none; border-radius: 14px; padding: 10px 16px;
  font-size: .84rem; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 18px var(--glow);
  transition: transform .15s, filter .15s; flex-shrink: 0;
}
.btn-header-cart:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-header-cart.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.1); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; margin-top: 20px; border-radius: 24px; padding: 26px;
  min-height: 260px; border: 1px solid var(--border-strong); background: var(--card);
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.hero-text { flex: 1; min-width: 0; }
.hero-meta { margin-top: 18px; }
.hero-logo {
  position: relative; z-index: 1; flex-shrink: 0; width: clamp(170px, 24vw, 250px); aspect-ratio: 1;
  border-radius: 28px; background: #fdf8f0; padding: 6px; overflow: hidden;
  box-shadow: 0 0 0 3px rgba(226, 177, 111, .55), 0 0 0 10px rgba(226, 177, 111, .12), 0 24px 50px rgba(0, 0, 0, .55);
  animation: floaty 6s ease-in-out infinite;
}
.hero-logo img { width: 100%; height: 100%; object-fit: contain; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.hero-bg { position: absolute; inset: 0; }
.hero-bg div {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 7s ease;
}
.hero-bg div.on { opacity: 1; transform: scale(1); }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(30, 21, 16, .95) 38%, rgba(198, 138, 69, .22) 100%);
}
.hero-text, .hero-meta, .hero-dots { position: relative; z-index: 1; }
.hero-tag {
  display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: #f3dcb8; background: rgba(198, 138, 69, .18); border: 1px solid rgba(233, 196, 140, .35);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 10px;
}
.hero h2 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.08; max-width: 560px; }
.hero h2 span { font-style: italic; font-weight: 600; background: linear-gradient(90deg, #e2b16f, #f7e3c0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { margin-top: 8px; font-size: .92rem; color: #e6d8c6; max-width: 480px; }
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.meta-chip {
  background: rgba(20, 13, 9, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong); border-radius: 14px; padding: 10px 14px; font-size: .78rem; color: #efe4d6;
}
.meta-chip strong { display: block; color: #fff; font-size: .9rem; }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.hero-dots button { width: 7px; height: 7px; border-radius: 99px; border: 0; padding: 0; background: rgba(255,255,255,.35); transition: width .3s, background .3s; }
.hero-dots button.on { width: 22px; background: #fff; }

/* ---------- Buscador y categorías ---------- */
.controls { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.search-wrap { position: relative; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search-input {
  width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px 12px 42px; color: var(--text); font-family: inherit; font-size: .95rem; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input:focus { border-color: var(--a1); box-shadow: 0 0 0 3px rgba(198, 138, 69, .16); }
.categories { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.categories::-webkit-scrollbar { display: none; }
.cat-btn {
  background: var(--card); color: var(--muted); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-size: .84rem; font-weight: 600; white-space: nowrap; transition: all .2s;
}
.cat-btn:hover { color: #fff; border-color: var(--border-strong); }
.cat-btn.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px var(--glow); }

/* ---------- Carruseles ---------- */
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 14px; }
.section-header h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.section-header h3 small { font-weight: 500; color: var(--muted); font-size: .85rem; margin-left: 6px; }
.carousel-nav { display: flex; gap: 8px; }
.nav-arrow {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--card);
  font-size: 1.2rem; display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.nav-arrow:hover { background: #2a1d15; border-color: var(--a1); }
.carousel {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 2px 16px; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

.card {
  flex: 0 0 290px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(198, 138, 69, .45); box-shadow: 0 18px 36px rgba(0, 0, 0, .45); }
.thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #2a1d15; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .thumb img { transform: scale(1.07); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(30, 21, 16, .85) 0%, transparent 48%); pointer-events: none; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 4.2rem; }
.ph-0 { background: radial-gradient(circle at 30% 30%, #5a3a22, #2a1d15 70%); }
.ph-1 { background: radial-gradient(circle at 30% 30%, #6a4a26, #2a1d15 70%); }
.ph-2 { background: radial-gradient(circle at 30% 30%, #523424, #2a1d15 70%); }
.ph-3 { background: radial-gradient(circle at 30% 30%, #4a4426, #2a1d15 70%); }
.ph-4 { background: radial-gradient(circle at 30% 30%, #603222, #2a1d15 70%); }
.badge-top, .badge-right {
  position: absolute; top: 12px; z-index: 2; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
.badge-top { left: 12px; background: rgba(20, 13, 9, .72); color: #fff; border: 1px solid rgba(255, 255, 255, .14); }
.badge-right { right: 12px; background: rgba(233, 196, 140, .2); color: #f3d9a8; border: 1px solid rgba(255, 216, 154, .3); }
.badge-bottom { position: absolute; bottom: 10px; left: 12px; z-index: 2; color: #efe4d6; font-size: .76rem; font-weight: 600; }
.card-body { padding: 14px 16px 6px; }
.card-title { font-size: 1.08rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -.01em; line-height: 1.25; }
.card-desc { font-size: .84rem; color: var(--muted); line-height: 1.45; }
.card-footer { padding: 12px 16px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price { font-size: 1.18rem; font-weight: 900; background: linear-gradient(90deg, #e8b978, #f7e3c0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.price small { font-size: .78rem; font-weight: 600; }
.price.ask { font-size: .95rem; }
.btn-add {
  background: var(--grad); color: #fff; border: none; border-radius: 12px; padding: 9px 15px;
  font-size: .82rem; font-weight: 700; box-shadow: 0 6px 16px var(--glow); transition: transform .15s, filter .15s; white-space: nowrap;
}
.btn-add:hover { transform: scale(1.03); filter: brightness(1.08); }
.btn-add .count { background: rgba(0,0,0,.25); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.qty-control {
  display: flex; align-items: center; gap: 12px; background: var(--bg);
  border: 1px solid rgba(198, 138, 69, .45); border-radius: 12px; padding: 6px 12px;
}
.qty-control button { background: none; border: none; font-size: 1.1rem; font-weight: 800; line-height: 1; padding: 0 2px; }
.qty-control button.plus { color: var(--a2); }
.qty-control span { font-size: .9rem; font-weight: 800; min-width: 16px; text-align: center; }

.empty-state {
  width: 100%; padding: 44px 20px; margin-top: 20px; text-align: center; color: var(--muted);
  background: var(--card); border: 1px dashed var(--border-strong); border-radius: var(--radius);
}

/* ---------- Cómo pedir / footer ---------- */
.how { margin-top: 34px; padding: 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--border); }
.how h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.4rem; font-weight: 800; margin-bottom: 14px; }
.how ol { list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.how li { display: flex; gap: 12px; align-items: center; color: #e6d8c6; font-size: .92rem; }
.how b { flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.footer { margin-top: 26px; padding: 22px 2px; border-top: 1px solid var(--border); display: grid; gap: 8px; color: var(--muted); font-size: .88rem; }
.footer strong { color: var(--text); font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer a { color: var(--a2); font-weight: 600; text-decoration: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 82px; right: 18px; z-index: 60; max-width: calc(100vw - 36px);
  background: rgba(30, 21, 16, .95); border: 1px solid rgba(198, 138, 69, .5);
  padding: 10px 16px; border-radius: 14px; font-size: .84rem; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(-10px);
  pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Barra flotante ---------- */
.floating-bar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 28px); max-width: 680px;
  background: rgba(30, 21, 16, .92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(198, 138, 69, .4); border-radius: 18px; padding: 13px 16px;
  display: none; justify-content: space-between; align-items: center; gap: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .65); z-index: 40;
}
.floating-bar.visible { display: flex; animation: rise .3s ease; }
@keyframes rise { from { transform: translate(-50%, 20px); opacity: 0; } }
.floating-bar small { display: block; font-size: .76rem; color: var(--muted); }
.floating-bar strong { font-size: 1.15rem; font-weight: 900; }
.btn-continue {
  background: var(--grad); color: #fff; border: none; border-radius: 13px; padding: 11px 20px;
  font-size: .9rem; font-weight: 800; box-shadow: 0 6px 18px var(--glow); white-space: nowrap;
}

/* ---------- Modales ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: flex-end; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%; max-width: 510px; max-height: 92vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 26px 26px 0 0; padding: 22px;
  animation: up .25s ease;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.modal-head h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.35rem; font-weight: 800; }
.btn-close { background: rgba(255, 255, 255, .06); border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; font-size: .8rem; font-weight: 600; }

.vm-img { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; margin-bottom: 12px; background: #2a1d15; }
.vm-img img { width: 100%; height: 100%; object-fit: cover; }
#vmDesc { font-size: .9rem; margin-bottom: 14px; }
.variant-list { display: grid; gap: 8px; }
.variant-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px 10px 16px;
}
.variant-row.in { border-color: rgba(198, 138, 69, .5); }
.variant-row .v-name { font-weight: 600; }
.variant-row .v-price { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }

.label { font-size: .85rem; font-weight: 700; margin: 4px 0 8px; }
.stars { color: #ffc94d; letter-spacing: 1px; }
.stars .off { color: rgba(255,255,255,.18); }
.badge-right.new { background: rgba(16, 185, 129, .18); color: #6ee7b7; border-color: rgba(16,185,129,.35); }
.thumb .badge-right { cursor: pointer; }
.rating-summary {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0;
  margin-bottom: 8px; font-size: .9rem; color: var(--muted);
}
.rating-summary b { color: var(--text); font-size: 1rem; }
.reviews { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.reviews-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.reviews-head h4 { font-size: 1rem; font-weight: 800; }
.btn-ghost { background: rgba(233,196,140,.12); color: #f3d9a8; border: 1px solid rgba(233,196,140,.3); border-radius: 10px; padding: 6px 12px; font-size: .82rem; font-weight: 700; }
.rate-form { display: grid; gap: 10px; margin-bottom: 14px; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--border); }
.star-input { display: flex; gap: 4px; justify-content: center; }
.star-input button { background: none; border: 0; font-size: 2.1rem; line-height: 1; color: rgba(255,255,255,.18); transition: color .1s, transform .1s; }
.star-input button.on { color: #ffc94d; }
.star-input button:hover { transform: scale(1.12); }
.btn-add.block { width: 100%; padding: 12px; }
.review-list { display: grid; gap: 10px; }
.review { padding: 12px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); font-size: .9rem; }
.review-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.review-top span:last-child { color: var(--muted); font-size: .78rem; }
.review p { color: #e6d8c6; }
.review-empty { color: var(--muted); font-size: .9rem; text-align: center; padding: 10px; }

.summary-box { background: var(--card-2); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .9rem; }
.summary-row .s-name { line-height: 1.25; }
.summary-row .s-name small { display: block; color: var(--muted); }
.summary-row .qty-control { padding: 4px 10px; gap: 10px; flex-shrink: 0; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mode-btn { background: var(--card-2); color: var(--muted); border: 1px solid var(--border); border-radius: 14px; padding: 11px 8px; font-size: .84rem; font-weight: 700; transition: all .15s; }
.mode-btn.active { border-color: var(--a1); background: rgba(198, 138, 69, .16); color: #f3dcb8; }
.form-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-wrap { display: grid; gap: 4px; }
.field-wrap span { font-size: .75rem; color: var(--muted); padding-left: 4px; }
.field {
  width: 100%; background: var(--card-2); border: 1px solid var(--border); border-radius: 13px; padding: 11px 13px;
  color: var(--text); font-family: inherit; font-size: .92rem; outline: none; color-scheme: dark;
}
.field:focus { border-color: var(--a1); }
textarea.field { resize: vertical; }
.totals { border-top: 1px solid var(--border); padding-top: 14px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.totals .muted-row { display: flex; justify-content: space-between; color: var(--muted); }
.totals .final-row { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 900; padding-top: 6px; }
.totals .final-row span:last-child { color: var(--a2); }
.hint { font-size: .8rem; color: var(--muted); }
.error { color: #ff8080; font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.btn-submit {
  width: 100%; background: linear-gradient(135deg, #059669, #10b981); color: #fff; border: none; border-radius: 14px;
  padding: 14px; font-size: .98rem; font-weight: 800; box-shadow: 0 8px 20px rgba(16, 185, 129, .3);
}
.btn-submit:disabled { opacity: .6; }
.done { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 10px 0; }
.done .big { font-size: 3.6rem; }
.done h4 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; font-weight: 800; }
.done a.btn-submit { display: block; text-decoration: none; }

@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: 16px; }
  .modal { border-radius: 26px; }
}
@media (max-width: 560px) {
  .card { flex-basis: 78%; }
  .subtitle { max-width: 52vw; }
  .brand-title h1 { font-size: 1.12rem; }
  .live-pill { display: none; }
  .hero { padding: 22px 20px 34px; flex-direction: column-reverse; align-items: stretch; text-align: center; gap: 16px; }
  .hero-logo { width: 150px; margin: 0 auto; }
  .hero h2, .hero p { margin-left: auto; margin-right: auto; }
  .hero-meta { justify-content: center; }
  .carousel-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
