/* ============================================================
   Tienda online - hoja de estilos principal
   ============================================================ */

/* Los colores de marca los sobreescribe /theme.css segun la configuracion.
   Estos son valores neutros por defecto (cada local saca los suyos del logo). */
:root {
  --bg: #F2F0E4;
  --bg-soft: #E8E6DB;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --card-hover: #E8E5DA;
  --line: #D2CEC3;
  --line-soft: #E0DDD2;
  --text: #2B1A17;
  --muted: #857A73;
  --muted-2: #A69F96;
  --accent: #CC0001;
  --accent-soft: #D4292A;
  --accent-dark: #891918;
  --accent-ink: #FFFFFF;
  --accent-rgb: 204, 0, 1;
  --secondary: #FF741F;
  --secondary-rgb: 255, 116, 31;
  --secondary-ink: #FFFFFF;
  --ok: #1F8A44;
  --ok-ink: #14612F;
  --ok-bg: rgba(31, 138, 68, .12);
  --warn: #B26A00;
  --warn-ink: #8A5200;
  --warn-bg: rgba(178, 106, 0, .13);
  --danger: #C02626;
  --danger-ink: #9B1C1C;
  --danger-bg: rgba(192, 38, 38, .12);
  --info: #0B6E99;
  --info-ink: #0A5C80;
  --info-bg: rgba(11, 110, 153, .11);
  --topbar: rgba(242, 240, 228, .9);
  --badge-bg: rgba(255, 255, 255, .92);
  --badge-ink: #2B1A17;
  --overlay: rgba(43, 26, 23, .45);
  --media-from: rgba(204, 0, 1, .13);
  --media-to: rgba(255, 116, 31, .07);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-rgb: 80, 40, 24;
  --shadow: 0 20px 44px -22px rgba(80, 40, 24, .4);
  --shadow-sm: 0 8px 20px -14px rgba(80, 40, 24, .35);
  --wrap: 1140px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(var(--accent-rgb), 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(var(--secondary-rgb), 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent-soft); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.78rem; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap-gap { display: flex; flex-wrap: wrap; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------ topbar --- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: var(--accent-dark);
  box-shadow: 0 8px 22px -12px rgba(var(--accent-rgb), 0.9);
}

.brand-name {
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub { font-size: 0.76rem; color: var(--muted-2); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: nowrap;
}

.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.status-pill.is-open { border-color: var(--ok); color: var(--ok-ink); background: var(--ok-bg); }
.status-pill.is-open .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.status-pill.is-closed { border-color: var(--danger); color: var(--danger-ink); background: var(--danger-bg); }
.status-pill.is-closed .dot { background: var(--danger); }
.status-pill.is-paused { border-color: var(--warn); color: var(--warn-ink); background: var(--warn-bg); }
.status-pill.is-paused .dot { background: var(--warn); }

/* ------------------------------------------------------------ buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 650;
  font-size: 0.92rem;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:hover { background: var(--card-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 12px 26px -16px rgba(var(--accent-rgb), 0.95);
}
.btn-primary:hover { background: var(--accent-soft); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 1rem; border-radius: 13px; }
.btn-sm { padding: 7px 11px; font-size: 0.84rem; border-radius: 9px; }
.btn-icon { padding: 9px 11px; }
.btn-danger { border-color: var(--danger); color: var(--danger-ink); }
.btn-danger:hover { background: var(--danger-bg); }

/* --------------------------------------------------------------- hero --- */

.hero { padding: 34px 0 22px; }

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  min-height: 270px;
  padding: clamp(26px, 5vw, 56px);
  background:
    radial-gradient(600px 260px at 100% 0%, rgba(var(--accent-rgb), 0.14), transparent 65%),
    linear-gradient(180deg, var(--surface), var(--bg-soft));
  box-shadow: var(--shadow);
}

.hero-card.has-image {
  color: #fff;
  background-image: linear-gradient(90deg, rgba(20, 12, 10, .84), rgba(20, 12, 10, .35)), var(--hero-image);
  background-size: cover;
  background-position: center;
  border-color: transparent;
}

.hero-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; }
.hero-card.has-image::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(20, 12, 10, .84), rgba(20, 12, 10, .35)); }
.hero-card > :not(.hero-background) { position: relative; z-index: 2; }

.hero-card.has-image p { color: rgba(255, 255, 255, .86); }
.hero-brand { margin-bottom: 16px; }
.hero-brand img, .hero-brand span {
  width: 72px; height: 72px; border-radius: 20px; object-fit: cover;
  display: grid; place-items: center; font-size: 2rem;
  background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}
.hero-card.has-image .hero-brand span { color: var(--accent); }
.hero-card.has-image .chip { color: #fff; background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.28); }

.hero-card h1 { margin-bottom: 8px; }
.hero-card p { margin: 0; color: var(--muted); max-width: 58ch; }

.hero-features { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-hover);
  font-size: 0.85rem;
  font-weight: 600;
}

.chip.is-on { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.09); color: var(--accent-dark); }

/* --------------------------------------------------- selector entrega --- */

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  margin: 22px 0 8px;
}

.mode-btn {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 12px 10px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
}

.mode-btn .mode-title { font-size: 0.95rem; }
.mode-btn .mode-note { font-size: 0.74rem; font-weight: 500; color: var(--muted-2); }
.mode-btn.active { background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.06)); color: var(--text); outline: 1px solid var(--accent); }
.mode-btn.active .mode-note { color: var(--accent-dark); }
.mode-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.notice {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.9rem;
}
.notice-warn { border-color: var(--warn); background: var(--warn-bg); color: var(--warn-ink); }
.notice-info { border-color: var(--info); background: var(--info-bg); color: var(--info-ink); }

/* ---------------------------------------------------------- cat nav --- */

.catnav {
  position: sticky;
  top: 64px;
  z-index: 30;
  background: var(--topbar);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.catnav-inner { display: flex; gap: 8px; overflow-x: auto; padding: 11px 0; scrollbar-width: none; }
.catnav-inner::-webkit-scrollbar { display: none; }

.catnav a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 620;
}
.catnav a:hover { background: var(--card-hover); }

/* ------------------------------------------------------------ menu --- */

.section { padding: 26px 0 6px; scroll-margin-top: 130px; }

.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head .emoji { font-size: 1.35rem; }

.product-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), var(--surface));
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
  text-align: left;
}

.product-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-card.is-off { opacity: 0.55; }
.product-card.is-off:hover { transform: none; border-color: var(--line); }

.product-media {
  height: 132px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--media-from), var(--media-to));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }

.product-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-name { font-weight: 720; font-size: 1.02rem; }
.product-desc { color: var(--muted); font-size: 0.86rem; flex: 1; }

.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.price { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; }
.product-prices { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.price-old { color: var(--muted); font-size: .78rem; font-weight: 500; }
.price-sale { color: var(--danger); }
.product-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.product-tag { border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); font-size: .68rem; font-weight: 700; line-height: 1.4; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--badge-bg);
  border: 1px solid var(--line);
  color: var(--badge-ink);
  backdrop-filter: blur(6px);
}
.badge-hot { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.badge-off { background: var(--danger); border-color: transparent; color: #fff; }

/* ------------------------------------------------------------ cart --- */

.cart-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 750;
  box-shadow: 0 18px 34px -16px rgba(var(--accent-rgb), 0.95);
}
.cart-fab:hover { filter: brightness(1.06); }
.cart-count {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.82rem;
}

.drawer-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.drawer-backdrop.open, .modal-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 51;
  height: 100%;
  width: min(420px, 100%);
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1);
}
.drawer.open { transform: translateX(0); }

.drawer-head, .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.drawer-foot { padding: 16px 18px; border-top: 1px solid var(--line); background: var(--surface); }

.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-thumb {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(var(--secondary-rgb), 0.07));
  font-size: 1.5rem;
}
.cart-opts { color: var(--muted); font-size: 0.8rem; }

/* sugerencias dentro del carrito ("¿le sumás algo?") */
.cart-sug { border-top: 1px solid var(--line); padding: 12px 18px; background: var(--surface); }
.cart-sug:empty { display: none; }
.sug-title { font-size: 0.78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted-2); margin-bottom: 8px; }
.sug-lista { display: flex; flex-direction: column; gap: 7px; }
.sug { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--card); cursor: pointer; text-align: left; width: 100%; }
.sug:hover { border-color: var(--accent); background: var(--card-hover); }
.sug-thumb { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center;
  font-size: 1rem; background: linear-gradient(135deg, var(--media-from), var(--media-to)); overflow: hidden; }
.sug-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sug-name { display: block; font-size: 0.87rem; font-weight: 620; }
.sug-price { display: block; font-size: 0.8rem; color: var(--muted); }
.sug-plus { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; background: var(--accent);
  color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }

.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.qty button { border: 0; background: transparent; width: 30px; height: 30px; font-weight: 800; font-size: 1rem; }
.qty button:hover { background: var(--card-hover); }
.qty span { min-width: 26px; text-align: center; font-weight: 700; font-size: 0.9rem; }

.totals { display: flex; flex-direction: column; gap: 7px; margin-bottom: 13px; }
.totals .line { display: flex; justify-content: space-between; font-size: 0.92rem; color: var(--muted); }
.totals .line.grand { color: var(--text); font-weight: 800; font-size: 1.16rem; padding-top: 9px; border-top: 1px dashed var(--line); }

.empty { text-align: center; padding: 46px 18px; color: var(--muted); }
.empty .big { font-size: 2.6rem; margin-bottom: 10px; }

/* ----------------------------------------------------------- modal --- */

.modal {
  position: fixed;
  z-index: 52;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  width: min(560px, calc(100% - 24px));
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  overflow: hidden;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 16px 18px; border-top: 1px solid var(--line); background: var(--surface); }

/* ------------------------------------------------------------ forms --- */

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 0.83rem; font-weight: 650; margin-bottom: 6px; color: var(--muted); }
.field .hint { font-size: 0.76rem; color: var(--muted-2); margin-top: 5px; }
.field .error { font-size: 0.78rem; color: var(--danger-ink); margin-top: 5px; }

input[type="text"], input[type="tel"], input[type="number"], input[type="password"],
input[type="date"], input[type="time"], input[type="search"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(var(--accent-rgb), 0.45); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; min-height: 74px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* -------------------------------------------------- grupo de opciones --- */

.opt-group { border-top: 1px solid var(--line); padding: 14px 0; }
.opt-group:first-child { border-top: 0; padding-top: 0; }
.opt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.opt-tag { font-size: 0.7rem; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.opt-tag.req { border-color: var(--accent); color: var(--accent-dark); }

.opt-list { display: flex; flex-direction: column; gap: 7px; }

.opt {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
}
.opt:hover { background: var(--card-hover); }
.opt input { accent-color: var(--accent); width: 17px; height: 17px; flex: 0 0 17px; }
.opt .opt-name { flex: 1; font-size: 0.92rem; }
.opt .opt-price { font-size: 0.86rem; color: var(--accent-dark); font-weight: 650; }
.opt.selected { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.07); }

/* ------------------------------------------------------ seguimiento --- */

.timeline { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.tl-step { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 16px; position: relative; }
.tl-step:not(:last-child)::before {
  content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: var(--line);
}
.tl-dot {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--bg-soft);
  display: grid; place-items: center; font-size: 0.66rem; z-index: 1;
}
.tl-step.done .tl-dot { border-color: var(--ok); background: var(--ok-bg); color: var(--ok-ink); }
.tl-step.now .tl-dot { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.16); box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.12); }
.tl-step.now .tl-label { color: var(--accent-dark); font-weight: 700; }

.order-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
}

.eta-box {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 14px; margin-bottom: 16px; border-radius: 12px;
  border: 1px solid var(--accent); background: rgba(var(--accent-rgb), 0.07);
  font-weight: 700; color: var(--accent-dark); text-align: center;
}

.toast-wrap { position: fixed; left: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column-reverse; gap: 8px; align-items: flex-start; max-width: min(360px, 78vw); }
.toast {
  padding: 11px 17px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  font-weight: 620;
  animation: pop 0.2s ease;
  max-width: 92vw;
}
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--danger); color: var(--danger-ink); }

@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--card), var(--card-hover), var(--card)); background-size: 200% 100%; animation: shimmer 1.3s infinite; height: 240px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ----------------------------------------------------------- footer --- */

.footer { margin-top: 46px; padding: 30px 0 110px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 0.85rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }

@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


/* ============================================================
   SUAVIDAD Y COMODIDAD
   Capa de refinamiento: mismos colores de marca (salen de los
   tokens y de /theme.css), pero con formas, sombras, espacios y
   botones mas amables. Todo lo que esta abajo pisa lo de arriba.
   ============================================================ */

:root {
  --radius: 22px;
  --radius-sm: 14px;
  --r-pill: 999px;
  --soft-1: 0 1px 2px rgba(var(--shadow-rgb), .06), 0 6px 16px -8px rgba(var(--shadow-rgb), .16);
  --soft-2: 0 2px 4px rgba(var(--shadow-rgb), .06), 0 16px 32px -16px rgba(var(--shadow-rgb), .26);
  --soft-3: 0 4px 10px rgba(var(--shadow-rgb), .08), 0 32px 64px -28px rgba(var(--shadow-rgb), .42);
  --ease: cubic-bezier(.22, .68, .2, 1);
  --tap: 46px;
}

html { scroll-behavior: smooth; }
* { -webkit-tap-highlight-color: transparent; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::selection { background: rgba(var(--accent-rgb), .22); }

body {
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

h1 { letter-spacing: -0.03em; }
h2 { letter-spacing: -0.025em; }

.wrap { padding: 0 20px; }

/* Foco visible para quien navega con teclado, sin ruido para el resto */
:focus-visible { outline: 3px solid rgba(var(--accent-rgb), .45); outline-offset: 2px; border-radius: 10px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* ------------------------------------------------------------ botones --- */

.btn {
  min-height: var(--tap);
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  box-shadow: var(--soft-1);
  font-weight: 650;
  letter-spacing: -0.005em;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .18s ease, border-color .18s ease, filter .18s ease;
}
.btn:hover { background: var(--card-hover); transform: translateY(-1px); box-shadow: var(--soft-2); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: var(--soft-1); }
.btn:disabled, .btn:disabled:hover { opacity: .5; transform: none; box-shadow: none; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 22px -12px rgba(var(--accent-rgb), .75);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  filter: brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 16px 28px -14px rgba(var(--accent-rgb), .85);
}
.btn-primary:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 6px 14px -10px rgba(var(--accent-rgb), .8); }

.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--card-hover); box-shadow: none; transform: none; }

.btn-danger { background: var(--surface); border-color: transparent; color: var(--danger-ink); }
.btn-danger:hover { background: var(--danger-bg); }

.btn-sm { min-height: 38px; padding: 8px 15px; font-size: .88rem; border-radius: 12px; }
.btn-lg { min-height: 56px; padding: 15px 26px; font-size: 1.02rem; border-radius: 18px; }
.btn-icon { min-width: var(--tap); padding: 10px; }

/* Los botones de cerrar (la "x") son redondos y comodos de tocar */
.drawer-head .btn, .modal-head .btn {
  width: 40px; min-height: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: var(--bg-soft); box-shadow: none; flex: 0 0 40px;
}
.drawer-head .btn:hover, .modal-head .btn:hover { background: var(--card-hover); transform: none; }

/* ------------------------------------------------------------ barra --- */

.topbar { border-bottom: 1px solid rgba(var(--shadow-rgb), .07); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 24px -20px rgba(var(--shadow-rgb), .5); }
.topbar-inner { min-height: 68px; gap: 16px; }
.brand-mark { width: 44px; height: 44px; flex-basis: 44px; border-radius: 15px; box-shadow: var(--soft-1); }

.status-pill { padding: 7px 14px; border-radius: var(--r-pill); border-color: transparent; box-shadow: var(--soft-1); font-weight: 650; }
.status-pill.is-open, .status-pill.is-closed, .status-pill.is-paused { border-color: transparent; }

/* ------------------------------------------------------------ inicio --- */

.hero { padding: 30px 0 18px; }
.hero-card {
  border-radius: 30px;
  padding: 34px 32px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--soft-2);
}
.hero-card p { font-size: 1.04rem; line-height: 1.6; }
.hero-features { gap: 10px; margin-top: 22px; }

.chip { padding: 9px 15px; border-radius: var(--r-pill); border: 0; background: rgba(var(--shadow-rgb), .06); font-weight: 600; }
.chip.is-on { background: rgba(var(--accent-rgb), .12); color: var(--accent-dark); }
.chip-link { color: var(--accent-dark); text-decoration: none; font-weight: 700; }
.loyalty-card { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.loyalty-card h3 { margin: 14px 0 8px; }
.loyalty-points { display: block; font-size: 1.6rem; line-height: 1.2; }
.loyalty-reward { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.loyalty-reward .grow { min-width: 0; }

@media (max-width: 560px) {
  .topbar-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding-top: 9px; padding-bottom: 10px; }
  .topbar-inner > .grow { display: none; }
  .topbar-inner .brand { grid-column: 1 / -1; min-width: 0; }
  .topbar-inner .brand > .grow { min-width: 0; }
  .brand-name { max-width: calc(100vw - 92px); }
  .brand-sub { max-width: calc(100vw - 92px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #status-pill { grid-column: 1; grid-row: 2; justify-self: start; padding: 6px 10px; }
  #btn-track { grid-column: 2; grid-row: 2; justify-self: end; padding: 8px 12px; white-space: nowrap; }
  .hero { padding-top: 18px; }
  .hero-features { gap: 7px; }
  .chip { padding: 7px 10px; font-size: .78rem; }
}

/* Retiro / Delivery como control segmentado */
.mode-switch { gap: 6px; padding: 6px; margin: 22px 0 10px; border-radius: 22px; border: 0; background: rgba(var(--shadow-rgb), .07); }
.mode-btn { min-height: 68px; padding: 12px 10px; border-radius: 17px; gap: 4px; transition: background .2s ease, box-shadow .2s var(--ease), color .2s ease; }
.mode-btn:hover:not(.active):not(:disabled) { background: rgba(var(--shadow-rgb), .05); }
.mode-btn.active { background: var(--surface); outline: none; color: var(--text); box-shadow: var(--soft-1), inset 0 0 0 1.5px rgba(var(--accent-rgb), .75); }
.mode-btn .mode-title { font-size: 1rem; }
.mode-btn .mode-note { font-size: .78rem; }

.notice { padding: 15px 18px; border-radius: 18px; border-color: transparent; box-shadow: var(--soft-1); line-height: 1.5; }
.notice-warn { border-color: transparent; }
.notice-info { border-color: transparent; }

/* ------------------------------------------------------- categorias --- */

.catnav { border-bottom: 1px solid rgba(var(--shadow-rgb), .07); box-shadow: 0 8px 24px -22px rgba(var(--shadow-rgb), .6); }
.catnav-inner { gap: 10px; padding: 12px 0; }
.catnav a {
  display: inline-flex; align-items: center; min-height: 42px; padding: 9px 18px;
  border-radius: var(--r-pill); border: 0; background: var(--surface); box-shadow: var(--soft-1);
  font-weight: 640; transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .18s ease, color .18s ease;
}
.catnav a:hover { background: var(--card-hover); transform: translateY(-1px); }
.catnav a:active { transform: scale(.97); }

/* ------------------------------------------------------------- menu --- */

.section { padding: 32px 0 8px; }
.section-head { margin-bottom: 18px; }

.product-grid { gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.product-card {
  border-radius: 24px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  box-shadow: var(--soft-1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.product-card:hover { border-color: var(--line-soft); transform: translateY(-3px); box-shadow: var(--soft-3); }
.product-card.is-off:hover { transform: none; box-shadow: var(--soft-1); }
.product-card.is-clickable { cursor: pointer; }

.product-media { height: auto; aspect-ratio: 16 / 11; border-bottom: 0; }
.product-body { padding: 18px 20px 20px; gap: 8px; }
.product-name { font-size: 1.08rem; font-weight: 740; letter-spacing: -0.015em; }
.product-desc { font-size: .9rem; line-height: 1.55; }
.product-foot { margin-top: 8px; gap: 12px; }
.price { font-size: 1.2rem; }
.product-foot .btn { min-height: 44px; padding: 10px 22px; border-radius: 14px; }

.badge {
  top: 14px; left: 14px; padding: 6px 12px; font-size: .78rem; font-weight: 700;
  text-transform: none; letter-spacing: 0; border: 0; box-shadow: var(--soft-1);
}

/* ------------------------------------------------------------ pedido --- */

.cart-fab {
  right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  padding: 16px 24px; min-height: 56px;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 22px 40px -18px rgba(var(--accent-rgb), .95);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s ease;
}
.cart-fab:hover { transform: translateY(-2px); filter: brightness(1.06); }
.cart-fab:active { transform: scale(.97); }
.cart-count { background: rgba(0, 0, 0, .2); padding: 3px 11px; }

.drawer-backdrop, .modal-backdrop { backdrop-filter: blur(5px); transition: opacity .25s ease; }

.drawer {
  width: min(450px, 100%);
  border-left: 0;
  border-radius: 28px 0 0 28px;
  box-shadow: var(--soft-3);
  transition: transform .32s var(--ease);
}
.drawer-head, .modal-head { padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.drawer-body { padding: 8px 24px 16px; }
.drawer-foot { padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); border-radius: 24px 24px 0 0; box-shadow: 0 -12px 28px -22px rgba(var(--shadow-rgb), .5); }

.cart-line { gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.cart-thumb { width: 58px; height: 58px; flex-basis: 58px; border-radius: 18px; }
.cart-opts { line-height: 1.45; }

/* "¿Le sumás algo?": una sola fila chica que se desliza de costado, para que se siga viendo el pedido */
.cart-sug { border-top: 1px solid var(--line-soft); padding: 8px 0 8px 24px; }
.sug-title { font-size: .76rem; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--muted); margin-bottom: 6px; }
.sug-lista {
  flex-direction: row; gap: 6px; overflow-x: auto; padding: 2px 24px 4px 0;
  scrollbar-width: none; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
}
.sug-lista::-webkit-scrollbar { display: none; }
.sug {
  flex: 0 0 auto; width: auto; max-width: 220px; min-height: 0; gap: 7px; padding: 4px 5px 4px 4px;
  border: 1px solid var(--line-soft); border-radius: var(--r-pill); background: var(--card); box-shadow: none;
  scroll-snap-align: start; transition: background .18s ease, border-color .18s ease;
}
.sug:hover { border-color: var(--accent); background: var(--card-hover); transform: none; box-shadow: none; }
.sug:active { transform: scale(.97); }
.sug .grow { min-width: 0; }
.sug-thumb { width: 28px; height: 28px; flex-basis: 28px; border-radius: 50%; font-size: .85rem; }
.sug-name { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.sug-price { font-size: .72rem; line-height: 1.15; }
.sug-plus { width: 24px; height: 24px; flex-basis: 24px; border-radius: 50%; font-size: .95rem; }

.qty { gap: 0; border: 0; border-radius: var(--r-pill); padding: 3px; background: rgba(var(--shadow-rgb), .07); }
.qty button { width: 38px; height: 38px; border-radius: 50%; font-size: 1.1rem; transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.qty button:hover { background: var(--surface); box-shadow: var(--soft-1); }
.qty button:active { transform: scale(.92); }
.qty span { min-width: 32px; }

.totals { gap: 9px; margin-bottom: 16px; }
.totals .line.grand { padding-top: 12px; border-top: 1px dashed var(--line); font-size: 1.22rem; }

.empty { padding: 56px 20px; line-height: 1.6; }

/* ------------------------------------------------------------ modal --- */

.modal {
  width: min(580px, calc(100% - 24px));
  border: 0;
  border-radius: 30px;
  box-shadow: var(--soft-3);
  transition: opacity .22s ease, transform .3s var(--ease);
}
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 18px 24px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); }

@media (max-width: 640px) {
  .modal { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 92vh; border-radius: 28px 28px 0 0; transform: translateY(28px); }
  .modal.open { transform: none; }
  .drawer { border-radius: 0; }
  .hero-card { padding: 26px 22px; border-radius: 26px; }
  .product-grid { gap: 16px; }
}

/* ------------------------------------------------------- formularios --- */

.field { margin-bottom: 16px; }
.field label { font-size: .86rem; font-weight: 650; color: var(--text); margin-bottom: 7px; }
.field .hint { font-size: .8rem; margin-top: 6px; }

input[type="text"], input[type="tel"], input[type="number"], input[type="password"],
input[type="date"], input[type="time"], input[type="search"], select, textarea {
  min-height: var(--tap);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: inset 0 1px 2px rgba(var(--shadow-rgb), .05);
  transition: border-color .18s ease, box-shadow .2s ease, background .18s ease;
}
input:hover, select:hover, textarea:hover { border-color: rgba(var(--accent-rgb), .35); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .16);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
textarea { min-height: 92px; line-height: 1.5; }

/* ------------------------------------------------- opciones del producto --- */

.opt-group { border-top: 1px solid var(--line-soft); padding: 18px 0; }
.opt-tag { padding: 4px 11px; border: 0; background: rgba(var(--shadow-rgb), .07); font-size: .76rem; font-weight: 600; }
.opt-tag.req { background: rgba(var(--accent-rgb), .12); color: var(--accent-dark); }
.opt-list { gap: 8px; }
.opt {
  min-height: 54px; padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: 16px;
  background: var(--surface); box-shadow: var(--soft-1);
  transition: background .15s ease, border-color .15s ease, box-shadow .2s var(--ease);
}
.opt:hover { background: var(--card-hover); }
.opt input { width: 20px; height: 20px; flex-basis: 20px; }
.opt.selected { border-color: rgba(var(--accent-rgb), .7); background: rgba(var(--accent-rgb), .08); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); }

/* ----------------------------------------------------- seguimiento --- */

.tl-dot { width: 24px; height: 24px; flex-basis: 24px; }
.tl-step:not(:last-child)::before { left: 11px; top: 26px; background: var(--line-soft); }
.eta-box { padding: 14px 16px; border: 0; border-radius: 18px; background: rgba(var(--accent-rgb), .1); }

/* -------------------------------------------------------- avisos --- */

.toast-wrap { left: max(18px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); }
.toast { padding: 13px 20px; border: 1px solid var(--line-soft); border-radius: 18px; box-shadow: var(--soft-3); font-weight: 640; }
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--danger); }

.skeleton { height: 300px; border-radius: 24px; }

.footer { border-top: 1px solid var(--line-soft); }
.footer-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.footer-link:hover, .footer-link:focus-visible { color: var(--accent-dark); text-decoration: underline; }
.product-media { background: #f0eee9; }
.product-media img { display: block; border: 0; outline: 0; object-fit: cover; }

.checkout-map { width: 100%; height: 250px; margin-top: 10px; border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; background: var(--card); z-index: 0; }
.checkout-map .leaflet-container { width: 100%; height: 100%; font: inherit; }
.payment-subnote { display: block; margin-top: 3px; font-size: .76rem; line-height: 1.3; font-weight: 450; color: var(--muted); }
.transfer-detail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 5px 0; }
.transfer-detail b { overflow-wrap: anywhere; }
.coverage-ok { color: var(--ok); font-weight: 650; }
#co-address.co-filled { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 35%, transparent); transition: box-shadow .3s; }
.coverage-out { color: var(--danger); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .product-card:hover, .cart-fab:hover, .catnav a:hover, .sug:hover { transform: none; }
}

@media (max-width: 560px) {
  .catnav { top: 98px; margin: 0; border-radius: 0; }
  .catnav-inner { display: flex; flex-wrap: nowrap; gap: 7px; overflow-x: auto; padding: 6px 0; }
  .catnav a { display: flex; align-items: center; justify-content: center; min-width: max-content; min-height: 36px; padding: 6px 11px; white-space: nowrap; text-align: center; line-height: 1.2; font-size: .82rem; }
  .cart-fab { right: max(12px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); gap: 7px; min-height: 44px; padding: 9px 13px; font-size: .88rem; font-weight: 700; box-shadow: 0 8px 22px -12px rgba(var(--accent-rgb), .8); }
  .cart-fab > span:first-child { font-size: .92rem; }
  .cart-count { min-width: 23px; padding: 2px 7px; font-size: .74rem; text-align: center; }
  body:has(.cart-fab:not(.hidden)) #menu-root { padding-bottom: 76px; }
  .section { padding: 18px 0 4px; scroll-margin-top: 148px; }
  .section-head { margin-bottom: 10px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .product-card { border-radius: 16px; }
  .product-media { aspect-ratio: 1.35; }
  .product-body { padding: 10px; gap: 5px; }
  .product-name { font-size: .9rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-desc { font-size: .75rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-tags { gap: 3px; }
  .product-tag { font-size: .62rem; padding: 2px 6px; }
  .product-foot { align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 3px; }
  .product-foot .price { font-size: 1rem; }
  .product-foot .btn { min-height: 38px; padding: 8px 10px; border-radius: 11px; font-size: .78rem; }
  .hero-directions { min-height: 36px; }
  .product-card:hover { border-color: var(--line-soft); transform: none; }
}
