:root {
  --ink: #1E1A2B;
  --muted: #6B6878;
  --paper: #F4F4F8;
  --card: #FFFFFF;
  --line: #E2E0EA;
  --wine: #7A2048;
  --wine-soft: #F5E6EE;
  --green: #17785A;
  --green-soft: #E3F3EC;
  --amber: #8A5200;
  --amber-soft: #FDF1DC;
  --red: #B42318;
  --red-soft: #FDECEA;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.5;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
}
img { max-width: 100%; display: block; }
a { color: var(--wine); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 600; font-family: var(--body); }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 2px; }

/* ---------- Barra superior / navegación ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--wine); }
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab {
  height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: .75rem; font-weight: 600; color: var(--muted); text-decoration: none; position: relative;
}
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--wine); }
.badge {
  position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--wine); color: #fff; font-size: .7rem; line-height: 18px; text-align: center;
}
.badge:empty { display: none; }

@media (min-width: 900px) {
  body { padding-bottom: 32px; }
  .topbar { padding: 14px 32px; }
  .tabs { position: static; display: flex; gap: 4px; border: 0; padding: 0; background: none; }
  .tab { height: auto; flex-direction: row; gap: 8px; padding: 8px 14px; border-radius: 10px; font-size: .95rem; }
  .tab svg { width: 20px; height: 20px; }
  .tab.on { background: var(--wine-soft); }
  .badge { position: static; }
}

/* ---------- Layout ---------- */
.app { max-width: 1180px; margin: 0 auto; padding: 20px 16px; outline: none; }
@media (min-width: 900px) { .app { padding: 32px; } }
.intro { margin: 4px 0 20px; max-width: 62ch; }
.intro p { color: var(--muted); margin: 8px 0 0; }
.rule {
  display: inline-flex; gap: 10px; align-items: baseline; margin-top: 14px;
  background: var(--green-soft); color: var(--green); border-radius: 10px; padding: 8px 12px; font-weight: 600;
}
.rule b { font-family: var(--display); font-size: 1.5rem; font-weight: 800; }
.muted { color: var(--muted); }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }

/* ---------- Catálogo ---------- */
.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card);
}
textarea { min-height: 80px; resize: vertical; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px;
  font: inherit; font-size: .9rem; white-space: nowrap; cursor: pointer; color: var(--ink);
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
}
.card-img { aspect-ratio: 1; background: #EDEBF2; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.card-body h3 { font-size: .95rem; line-height: 1.3; }
.price-main { font-weight: 700; color: var(--green); }
.price-main small { font-weight: 500; color: var(--muted); }
.price-sub { font-size: .85rem; color: var(--muted); }
.stock { font-size: .8rem; color: var(--muted); }
.tag {
  position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 6px;
  font-size: .75rem; font-weight: 700; background: var(--ink); color: #fff;
}
.tag.out { background: var(--red); }

/* ---------- Ficha de producto ---------- */
.product { display: grid; gap: 20px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; } }
.gallery-main { position: relative; aspect-ratio: 1; background: #EDEBF2; border-radius: 16px; overflow: hidden; touch-action: pan-y; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gal-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); font-size: 1.3rem; cursor: pointer; color: var(--ink);
}
.gal-btn.prev { left: 10px; } .gal-btn.next { right: 10px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { border-color: var(--wine); }

/* El bloque de precio es la pieza central del diseño */
.pricebox { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.price-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; gap: 12px; }
.price-row + .price-row { border-top: 1px solid var(--line); }
.price-row.whole { background: var(--green-soft); }
.price-row.whole strong { font-family: var(--display); font-size: 1.8rem; font-weight: 800; color: var(--green); }
.price-row.retail strong { font-size: 1.15rem; }
.price-row span { color: var(--muted); font-size: .9rem; }
.price-row.whole span { color: var(--green); font-weight: 600; }
.saving { padding: 10px 16px; background: var(--ink); color: #fff; font-size: .92rem; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.qty button { width: 42px; height: 42px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.qty input { width: 60px; border: 0; text-align: center; padding: 8px 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.live { font-size: .95rem; }
.hint { background: var(--amber-soft); color: var(--amber); padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.ok { background: var(--green-soft); color: var(--green); padding: 10px 12px; border-radius: 10px; font-size: .9rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--wine); color: #fff; font: inherit; font-weight: 700; padding: 13px 20px; border-radius: 12px;
  text-decoration: none; min-height: 48px;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.wa { background: #1F9D55; }
.btn.small { padding: 8px 12px; min-height: 36px; font-size: .9rem; }
.linkbtn { background: none; border: 0; color: var(--red); font: inherit; font-size: .85rem; cursor: pointer; padding: 4px 0; }

/* ---------- Carrito / checkout ---------- */
.two-col { display: grid; gap: 20px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 360px; align-items: start; gap: 32px; } .sticky { position: sticky; top: 90px; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.line { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: #EDEBF2; }
.line-top { display: flex; justify-content: space-between; gap: 8px; }
.line-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.pill { font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.pill.whole { background: var(--green-soft); color: var(--green); }
.pill.retail { background: var(--amber-soft); color: var(--amber); }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-row.total { font-weight: 800; font-size: 1.2rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.sum-row.save { color: var(--green); font-weight: 600; }
.porpagar {
  border-left: 5px solid var(--amber); background: var(--amber-soft); color: #5C3700;
  padding: 14px 16px; border-radius: 10px;
}
.porpagar strong { display: block; font-size: 1.05rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-family: var(--display); font-weight: 800; font-size: 1.15rem; margin-bottom: 10px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.field + .field { margin-top: 12px; }
.row2 { display: grid; gap: 12px; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
.options { display: grid; gap: 8px; }
.option {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; cursor: pointer; font-weight: 500; margin: 0; background: var(--card);
}
.option input { width: auto; margin-top: 4px; accent-color: var(--wine); }
.option:has(input:checked) { border-color: var(--wine); background: var(--wine-soft); }
.err { color: var(--red); font-size: .85rem; margin-top: 4px; }
.alert { background: var(--red-soft); color: var(--red); padding: 12px 14px; border-radius: 10px; }

/* ---------- Pedidos ---------- */
.order { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.order + .order { margin-top: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.steps { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.steps li { font-size: .7rem; color: var(--muted); text-align: center; }
.steps li::before {
  content: ""; display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: 6px;
}
.steps li.done::before { background: var(--green); }
.steps li.now::before { background: var(--wine); }
.steps li.now { color: var(--wine); font-weight: 700; }
@media (max-width: 600px) { .steps li span { display: none; } .steps li.now span { display: inline; } .steps { grid-template-columns: repeat(6, 1fr); } }
.status-msg { padding: 10px 12px; border-radius: 10px; background: var(--paper); font-size: .92rem; }
.items { margin: 12px 0; padding: 0; list-style: none; }
.items li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: .92rem; border-bottom: 1px dashed var(--line); }
.items li.no { color: var(--muted); text-decoration: line-through; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- Varios ---------- */
.empty { text-align: center; padding: 48px 16px; }
.empty p { color: var(--muted); }
.loading { padding: 48px; text-align: center; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 900px) { .toast { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }

/* =============================================================
   IDENTIDAD SAM'S STORE ANGELICA — colores tomados del logo
   ============================================================= */
:root {
  --ink: #3A3330;
  --muted: #7A6F69;
  --paper: #FDF3E7;          /* crema del logo */
  --card: #FFFFFF;
  --line: #EFE3D6;
  --wine: #C13F78;           /* rosado del logo, oscurecido para buen contraste */
  --wine-soft: #FBE6EF;
  --lilac: #A57BBF;          /* lila del anillo del logo */
  --lilac-deep: #7A5596;
  --lilac-soft: #F2EAF7;
  --green: #4D7A22;          /* verde de la hoja: ahorro */
  --green-soft: #EEF4E2;
  --display: "Fredoka", "Nunito", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}
h1 { font-weight: 600; letter-spacing: -0.01em; }
h2 { font-weight: 600; }

/* Barra superior */
.topbar { background: rgba(253, 243, 231, .94); backdrop-filter: blur(8px); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.brand-text i { font-family: var(--display); font-style: normal; font-weight: 600; font-size: 1.05rem; color: var(--wine); }
.brand span { color: inherit; }
.tabs { background: var(--card); }
.tab.on { color: var(--wine); }
@media (min-width: 900px) { .tab.on { background: var(--wine-soft); } }

/* Portada */
.hero { display: grid; gap: 18px; align-items: center; margin: 4px 0 22px; }
.hero-logo { width: 112px; height: 112px; border-radius: 50%; box-shadow: 0 0 0 6px var(--card); }
.hero-text h1 { font-size: clamp(1.75rem, 5.5vw, 3rem); line-height: 1.08; max-width: 18ch; }
.hero-text p { color: var(--muted); max-width: 52ch; margin: 12px 0 0; font-size: 1.05rem; }
.rule {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 18px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 18px 6px 6px; font-weight: 600; font-size: .95rem;
}
.rule b {
  font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: #fff; background: var(--wine);
  border-radius: 999px; padding: 6px 14px;
}
@media (min-width: 760px) {
  .hero { grid-template-columns: 200px 1fr; gap: 40px; margin: 12px 0 32px; }
  .hero-logo { width: 200px; height: 200px; }
}

/* Línea de puntos lila, como la del logo */
.dash {
  height: 8px; margin: 0 0 26px; border-radius: 4px;
  background: radial-gradient(circle, var(--lilac) 0 3.2px, transparent 3.6px) 0 50% / 26px 8px repeat-x;
  -webkit-mask: linear-gradient(90deg, #000 0 0);
}

/* Buscador y categorías */
input, select, textarea { border-color: var(--line); border-radius: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lilac); box-shadow: 0 0 0 3px var(--lilac-soft); }
#buscar { padding: 13px 16px; background: var(--card); }
.chip { border-color: var(--line); }
.chip.on { background: var(--lilac-deep); border-color: var(--lilac-deep); }

/* Tarjetas de producto: limpias, foto protagonista */
.card { border: 0; border-radius: 20px; background: var(--card); transition: transform .15s ease; }
.card:hover { transform: translateY(-2px); }
.card-img { margin: 8px 8px 0; border-radius: 14px; overflow: hidden; background: #F7EEE4; }
.card-body { padding: 12px 14px 16px; gap: 3px; }
.card-body h3 { font-family: var(--body); font-weight: 700; font-size: .98rem; }
.price-main { color: var(--ink); font-size: 1.1rem; font-weight: 800; }
.price-main small { color: var(--green); font-weight: 700; }
.tag { background: var(--ink); border-radius: 999px; padding: 4px 10px; }
.tag.out { background: var(--wine); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* Ficha de producto */
.gallery-main { border-radius: 24px; background: #F7EEE4; }
.thumb { border-radius: 12px; }
.thumb.on { border-color: var(--lilac); }
.pricebox { border: 0; border-radius: 20px; }
.price-row.whole { background: var(--green-soft); }
.price-row.whole strong { font-family: var(--display); font-weight: 600; }
.saving { background: var(--lilac-deep); }
.qty { border-color: var(--line); border-radius: 999px; }

/* Botones */
.btn { border-radius: 999px; padding: 13px 24px; }
.btn.ghost { border-color: var(--line); }
.panel, .order { border: 0; border-radius: 20px; }
.porpagar { border-left-color: var(--lilac); background: var(--lilac-soft); color: #4A3560; border-radius: 14px; }
.option { border-color: var(--line); border-radius: 14px; }
.option:has(input:checked) { border-color: var(--wine); background: var(--wine-soft); }
.steps li.now::before { background: var(--wine); }
.steps li.done::before { background: var(--lilac); }
.badge { background: var(--wine); }

/* Botón flotante de WhatsApp */
.wa-fab {
  position: fixed; right: 16px; z-index: 40;
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(37, 211, 102, .35);
}
.wa-fab svg { width: 30px; height: 30px; }
.wa-fab[hidden] { display: none; }
@media (min-width: 900px) { .wa-fab { bottom: 84px; right: 28px; } }

/* Pie de página */
.foot {
  max-width: 1180px; margin: 24px auto 0; padding: 24px 16px; border-top: 1px solid var(--line);
  display: grid; gap: 12px; color: var(--muted); font-size: .92rem;
}
.foot img { border-radius: 50%; }
.foot p { margin: 0; }
.foot b { color: var(--ink); }
@media (min-width: 760px) { .foot { grid-template-columns: 56px 1fr auto; align-items: center; gap: 20px; padding: 28px 32px; } .foot p:last-child { text-align: right; } }
@media (min-width: 900px) { .tabs { background: none; } }
.price-main small { white-space: nowrap; }

/* =============================================================
   PANEL DE ADMINISTRACIÓN
   ============================================================= */
.admin-tabs { margin-bottom: 4px; }
a.chip { text-decoration: none; display: inline-block; }
.admin-bar { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.admin-bar input { flex: 1 1 220px; }
.small { font-size: .85rem; }
.arow { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.arow:last-child { border-bottom: 0; }
.arow > img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #F7EEE4; }
.arow-main { min-width: 0; }
.arow-title { font-weight: 700; color: var(--ink); text-decoration: none; }
.arow-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.arow-act { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 700px) { .arow { grid-template-columns: 64px 1fr auto; } .arow-act { grid-column: auto; } }
.rank { width: 64px; text-align: center; font-family: var(--display); font-size: 1.6rem; font-weight: 600; color: var(--lilac-deep); }
.pill.est { background: var(--lilac-soft); color: var(--lilac-deep); }
.pill.est-pendiente_aprobacion { background: var(--amber-soft); color: var(--amber); }
.pill.est-aprobado_por_pagar { background: var(--wine-soft); color: var(--wine); }
.pill.est-entregado { background: var(--green-soft); color: var(--green); }
.pill.est-cancelado { background: var(--red-soft); color: var(--red); }
.adm-grid { display: grid; gap: 12px; margin-top: 12px; font-size: .92rem; }
@media (min-width: 760px) { .adm-grid { grid-template-columns: repeat(3, 1fr); } }
.adm-items li { align-items: center; }
.adm-items li.no { text-decoration: none; }
.adm-items li.no .it-name { text-decoration: line-through; color: var(--muted); }
.disp { display: inline-flex; gap: 6px; flex-shrink: 0; }
.mini { font: inherit; font-size: .8rem; font-weight: 700; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--ink); }
.mini.si { background: var(--green); border-color: var(--green); color: #fff; }
.mini.nop { background: var(--red); border-color: var(--red); color: #fff; }
.adm-step { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.fotos-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .fotos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .fotos-grid { grid-template-columns: repeat(4, 1fr); } }
.slot { padding: 12px; }
.slot-img { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #F7EEE4; }
.slot-img img { width: 100%; height: 100%; object-fit: cover; }
.slot-img.vacio { display: grid; place-items: center; border: 2px dashed var(--line); color: var(--muted); font-weight: 600; }
.slot-n { position: absolute; top: 8px; left: 8px; background: var(--ink); color: #fff; border-radius: 999px; width: 26px; height: 26px; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.provs { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.prov { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.addprov summary { cursor: pointer; color: var(--wine); font-weight: 700; font-size: .9rem; margin-top: 10px; }
label.btn { cursor: pointer; margin: 0; }

/* ---------- Despacho ---------- */
.etiqueta {
  margin: 12px 0 10px; padding: 14px 16px; border: 2px dashed var(--lilac); border-radius: 14px;
  background: var(--lilac-soft); line-height: 1.55; font-size: .95rem;
}
.desp-h { margin: 18px 0 6px; font-family: var(--display); font-size: 1.05rem; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.adm-items li.falta .it-name { color: var(--red); }
.desp-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.df { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #F7EEE4; }
.df img { width: 100%; height: 100%; object-fit: cover; }
.df-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(58,51,48,.8); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }

/* ---------- Precios masivos ---------- */
.masivo { margin-bottom: 16px; border: 2px solid var(--lilac-soft); }
.tabla-wrap { overflow-x: auto; }
.tabla-previa { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla-previa th { text-align: left; color: var(--muted); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tabla-previa td { padding: 8px 6px; border-bottom: 1px dashed var(--line); vertical-align: top; }

/* =============================================================
   LIQUIDACIÓN Y OFERTA ESPECIAL
   ============================================================= */
:root { --liq: #D2462E; --liq-soft: #FDE9E4; --of: #7A5596; --of-soft: #F2EAF7; }
.tag.t-liquidacion, .pill.t-liquidacion { background: var(--liq); color: #fff; }
.tag.t-oferta, .pill.t-oferta { background: var(--of); color: #fff; }
.price-main.promo-price { color: var(--liq); }
.price-main.promo-price small { color: var(--muted); }
s { color: var(--muted); text-decoration-thickness: 2px; }

.promo-banners { display: grid; gap: 10px; margin: 0 0 20px; }
@media (min-width: 700px) { .promo-banners { grid-template-columns: 1fr 1fr; } }
.pbanner {
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  border: 0; border-radius: 18px; padding: 14px 18px; font: inherit; color: #fff;
}
.pbanner b { display: block; font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.pbanner small { display: block; opacity: .92; font-size: .88rem; }
.pb-ico { font-size: 2rem; line-height: 1; }
.pb-liquidacion { background: var(--liq); }
.pb-oferta { background: var(--of); }

.promo-row.t-liquidacion { background: var(--liq-soft); }
.promo-row.t-liquidacion strong, .promo-row.t-liquidacion span { color: var(--liq); font-weight: 700; }
.promo-row.t-oferta { background: var(--of-soft); }
.promo-row.t-oferta strong, .promo-row.t-oferta span { color: var(--of); font-weight: 700; }
.promo-row strong { font-family: var(--display); font-size: 1.8rem; font-weight: 600; }

/* Ventana emergente */
.promo-dlg {
  padding: 0; border: 0; border-radius: 24px; width: min(920px, calc(100% - 24px));
  max-height: calc(100% - 32px); background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.promo-dlg::backdrop { background: rgba(58, 51, 48, .55); }
.promo-in { padding: 0 0 16px; }
.promo-head {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 18px 20px; color: #fff;
}
.pd-liquidacion .promo-head { background: var(--liq); }
.pd-oferta .promo-head { background: var(--of); }
.promo-kicker { font-weight: 800; font-size: .95rem; opacity: .95; }
.promo-head h2 { font-size: clamp(1.25rem, 4vw, 1.7rem); margin-top: 4px; color: #fff; }
.promo-x { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.22); color: #fff; font-size: 1.5rem; cursor: pointer; }
.promo-grid { display: grid; gap: 12px; padding: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .promo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .promo-grid { grid-template-columns: repeat(3, 1fr); } }
.pcard { background: var(--card); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.pcard-img { position: relative; display: block; aspect-ratio: 4 / 3; background: #F7EEE4; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pct { position: absolute; top: 10px; right: 10px; background: var(--liq); color: #fff; font-weight: 800; border-radius: 999px; padding: 4px 10px; font-size: .9rem; }
.pd-oferta .pct { background: var(--of); }
.pcard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.pcard-name { font-size: 1rem; }
.tachados { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .85rem; color: var(--muted); }
.pcard-precio { font-family: var(--display); font-size: 1.7rem; font-weight: 600; color: var(--liq); }
.pd-oferta .pcard-precio { color: var(--of); }
.pcard-precio small { font-family: var(--body); font-size: .85rem; color: var(--muted); font-weight: 600; }
.pcard-buy { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.qty-sm button { width: 34px; height: 36px; font-size: 1.1rem; }
.qty-sm input { width: 42px; padding: 6px 0; }
.pcard-ok { margin-top: 6px; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: .88rem; border-radius: 10px; padding: 6px 10px; }
.promo-foot { display: flex; justify-content: space-between; gap: 10px; padding: 0 16px; flex-wrap: wrap; }

/* Admin */
.promo-fs { margin-top: 16px; padding: 14px; border: 2px dashed var(--line); border-radius: 14px; }
.promo-fs legend { font-family: var(--body); font-size: 1rem; font-weight: 800; padding: 0 6px; }
.price-main.promo-price.pp-oferta { color: var(--of); }

/* ---------- Opciones de pago ---------- */
.pagos-in { margin-bottom: 4px; }
.pago-box { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--wine-soft); }
.pago-box .desp-h { margin-top: 0; }
.transf { margin-top: 12px; padding: 12px 14px; background: var(--card); border-radius: 14px; border: 2px dashed var(--line); }
.transf-datos { margin: 6px 0 4px; line-height: 1.6; }
.pago-opciones { display: grid; gap: 12px; }
@media (min-width: 640px) { .pago-opciones { grid-template-columns: 1fr 1fr; } }
.pago-op { background: var(--card); border-radius: 14px; padding: 14px; border: 2px solid var(--line); }
.pago-op.transf { border-style: dashed; margin-top: 0; }
.pago-monto { font-family: var(--display); font-size: 1.7rem; font-weight: 600; margin: 4px 0; }
.aviso-resp { display: block; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-weight: 700; font-size: .9rem; text-decoration: none; }
.respaldo { border: 2px solid var(--green-soft); }
/* Carrito: controles más claros */
.line .qty button { width: 44px; height: 44px; font-size: 1.4rem; font-weight: 700; }
.btn-quitar { margin-top: 10px; border: 1px solid var(--red-soft); background: var(--red-soft); color: var(--red); font: inherit; font-weight: 700; font-size: .88rem; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.carro-extra { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
body[data-ruta="/carrito"] .wa-fab, body[data-ruta="/checkout"] .wa-fab { display: none; }

/* ---------- Estadísticas ---------- */
.stats { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stat-ico { font-size: 1.3rem; }
.stat-t { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat-v { font-family: var(--display); font-size: 1.7rem; font-weight: 600; }
.stat-n { font-size: .75rem; color: var(--muted); }
.barras { display: flex; align-items: flex-end; gap: 4px; height: 180px; overflow-x: auto; padding-bottom: 4px; }
.barra { flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.b-area { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.b-col { width: 70%; background: var(--lilac); border-radius: 6px 6px 0 0; display: flex; align-items: flex-end; justify-content: center; }
.b-ped { font-style: normal; font-size: .68rem; font-weight: 700; color: #fff; white-space: nowrap; padding-bottom: 3px; }
.b-num { font-size: .7rem; color: var(--muted); }
.b-dia { font-size: .62rem; color: var(--muted); margin-top: 4px; white-space: nowrap; transform: rotate(-35deg); transform-origin: top; height: 22px; }

/* ---------- Mapas, proveedores y clientes por región ---------- */
.mapa { height: 320px; border-radius: 14px; overflow: hidden; background: #EDE6DD; z-index: 0; }
.mapa-alto { height: 480px; }
.geo-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .geo-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.reg-barras { display: grid; gap: 6px; }
.reg-fila { display: grid; grid-template-columns: 128px 1fr 72px; gap: 8px; align-items: center; font-size: .85rem; }
.reg-nom { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reg-pista { position: relative; height: 16px; background: var(--paper); border-radius: 8px; overflow: hidden; }
.reg-total, .reg-comp { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; }
.reg-total { background: var(--lilac-soft); border: 1px solid var(--lilac); }
.reg-comp { background: var(--wine); }
.reg-num { font-weight: 700; text-align: right; }
.reg-num small { font-weight: 600; color: var(--muted); }
.ley { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 8px; }
.ley-t { background: var(--lilac-soft); border: 1px solid var(--lilac); margin-left: 0; }
.ley-c { background: var(--wine); }
.leaflet-container a { color: var(--wine); }
.geo-opc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.geo-opc .chip { white-space: normal; text-align: left; font-size: .82rem; }

/* ---------- IVA, precisar y plazos ---------- */
.iva { font-size: .72em; font-weight: 700; color: var(--muted); white-space: nowrap; }
.nota-iva { margin: 10px 0 0; font-size: .9rem; font-weight: 700; color: var(--lilac-deep); }
.plazo { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.mini.prec { background: var(--lilac-deep); border-color: var(--lilac-deep); color: #fff; }
.precisar-box { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--lilac-soft); border: 2px dashed var(--lilac); }
.cant-adm { width: 64px; padding: 4px 6px; border-radius: 8px; display: inline-block; text-align: center; }
.aviso-venc { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: .9rem; }
.desc-box { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--green-soft); }
.desc-box summary { cursor: pointer; font-weight: 700; color: var(--green); }
.desc-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.desc-form select { flex: 0 1 170px; }
.desc-form input[type="number"] { flex: 0 1 110px; }
.desc-form input:not([type]) { flex: 1 1 200px; }

/* ---------- v19: avisos de inicio, compra mínima y precio mayorista por excepción ---------- */
.avisos-inicio { display: grid; gap: 8px; margin-top: 14px; max-width: 640px; }
.aviso-wa { display: flex; align-items: center; gap: 12px; text-decoration: none; background: #1F9D55; color: #fff;
  padding: 12px 14px; border-radius: 14px; font-weight: 700; line-height: 1.35; box-shadow: 0 4px 14px rgba(31,157,85,.25); }
.aviso-wa:hover { background: #188547; }
.aviso-wa-ico { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #1F9D55;
  display: grid; place-items: center; }
.aviso-wa-ico svg { width: 22px; height: 22px; }
.aviso-info { margin: 0; background: var(--green-soft); color: var(--green); padding: 8px 12px; border-radius: 10px; font-size: .9rem; font-weight: 600; }
.aviso-info.small { font-size: .82rem; margin: 8px 0 0; }
.panel .hint { margin: 10px 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pill.mayor { background: var(--green-soft); color: var(--green); margin-left: 4px; }
.pill.excep { background: var(--amber-soft); color: var(--amber); margin-left: 4px; }
.adm-items .pill.t-liquidacion, .adm-items .pill.t-oferta { margin-left: 4px; }
.mini.excep-btn { margin-left: 6px; border-color: var(--amber); color: var(--amber); }

/* Catálogo Argentina */
.hero-kicker { display:inline-block; margin:0 0 8px !important; padding:4px 12px; border-radius:999px; background:var(--card); font-weight:800; font-size:.85rem !important; color:var(--wine, #b03a6f) !important; letter-spacing:.02em; }

/* v20: Compras a proveedores */
.parada-n { display:inline-grid; place-items:center; width:32px; height:32px; border-radius:50%; background:var(--wine); color:#fff; font-size:1rem; flex:none; }
.parada-n.gris { background:var(--muted); }
.compra-foto { width:52px; height:52px; object-fit:cover; border-radius:10px; flex:none; background:var(--line); }
.compra-items li.hecho { opacity:.6; }
.compra-items li { align-items:flex-start; gap:10px; flex-wrap:wrap; }
.print-only { display:none; }
.ia-box { border:2px dashed var(--line); border-radius:16px; padding:14px; margin:0 0 16px; background:var(--wine-soft); }
.ia-box img { max-width:140px; border-radius:12px; display:block; margin-top:10px; }
@media print {
  .topbar, .tabs, .foot, .wa-fab, .no-print, .admin-tabs, .aviso-resp, .toast, h1 { display:none !important; }
  .print-only { display:block; }
  body, .app { background:#fff !important; padding:0 !important; }
  .order, .panel { box-shadow:none !important; border:1px solid #ccc; break-inside:avoid; }
}
.compra-items .disp { flex-wrap:wrap; justify-content:flex-start; flex-shrink:1; max-width:100%; }
.compra-items li > .it-name { flex:1 1 220px; min-width:0; }
