/* Estructura común del sitio. Cada versión (temas/*.css) define colores, letras y su propio carácter
   con estas variables y sus reglas propias. */
:root {
  --bg: #fff; --ink: #1a1a1a; --muted: #5c5c5c; --line: #ddd; --card: #fff;
  --accent: #1f6b3e; --accent-ink: #fff; --ok: #1f6b3e; --ok-bg: #e3f1e7; --soon: #8a4b12; --soon-bg: #f8ead9;
  --radius: 10px; --gap: clamp(14px, 3.4vw, 26px); --wrap: 1180px;
  --font-body: system-ui, sans-serif; --font-display: var(--font-body);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 12px; background: var(--ink); color: var(--bg); }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }

/* encabezado y pie */
.top-in, .foot-in, main > section, .prod { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-logo { height: 44px; width: auto; }
.brand-mark .i { width: 30px; height: 30px; }
.brand-name { font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; text-decoration: none; position: relative; }
.nav-cart b { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; font-size: .8rem; }
.foot-in { display: grid; gap: 8px; padding: 34px 0 calc(34px + var(--bar-h, 0px)); }
.foot-when, .foot-social { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.foot-social a { display: inline-flex; gap: 6px; align-items: center; margin-right: 16px; padding: 6px 0; }

/* portada */
.hero { display: grid; gap: var(--gap); padding: clamp(18px, 4vw, 44px) 0; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.35fr 1fr; align-items: stretch; } }
.sign-intro { max-width: 52ch; }
.board-rows { list-style: none; margin: 0; padding: 0; }
.board-rows li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.b-hours { font-variant-numeric: tabular-nums; white-space: nowrap; }
.shop { padding-bottom: 40px; }
.filters { display: grid; gap: 12px; margin: 14px 0 18px; }
.search { display: flex; align-items: center; gap: 10px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 12px 0; font-size: 1.05rem; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-inline: calc(-1 * var(--gap)); padding-inline: var(--gap); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; cursor: pointer; padding: 8px 14px; white-space: nowrap; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 158px), 1fr)); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.card { display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.card .ph { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.ph-none { display: grid; place-items: center; width: 100%; height: 100%; }
.ph-none .i { width: 34%; height: 34%; opacity: .55; }
.cb { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 14px; flex: 1; }
.nm { font-weight: 700; line-height: 1.2; }
.br { font-size: .86rem; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.cb .price { margin-top: auto; }
.tag { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; padding: 2px 8px; }
.tag.ok { color: var(--ok); background: var(--ok-bg); }
.tag.soon, .soon { color: var(--soon); background: var(--soon-bg); }
.care-mini { display: inline-flex; gap: 10px; align-items: center; }
.cm { display: inline-flex; align-items: center; gap: 3px; }
.cm .i { width: 16px; height: 16px; }
.scale { display: inline-flex; gap: 2px; align-items: center; }
.scale i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .22; }
.scale[data-l="1"] i:nth-child(-n+1), .scale[data-l="2"] i:nth-child(-n+2), .scale[data-l="3"] i { opacity: 1; }
.empty { padding: 26px 0; color: var(--muted); }

/* ficha de producto */
.prod { padding: 14px 0 48px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 22px 10px 14px; margin-bottom: 14px; font-size: 1.08rem; text-decoration: none; }
.back .i { width: 22px; height: 22px; }
.back-end { margin: 22px 0 0; }
.prod-in { display: grid; gap: var(--gap); }
@media (min-width: 860px) { .prod-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .pimg { position: sticky; top: 16px; } }
.pimg { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { display: grid; gap: 20px; align-content: start; }
.pmeta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.pmeta .price { font-size: 1.5rem; }
.desc { max-width: 62ch; }
.care-list { margin: 0; display: grid; gap: 0; }
.ci { display: grid; gap: 4px; padding: 12px 0; }
.ci dt { display: flex; align-items: center; gap: 8px; font-weight: 700; flex-wrap: wrap; }
.ci dt .i { width: 22px; height: 22px; }
.ci dt .scale i { width: 8px; height: 8px; }
.lvl-word { font-weight: 500; color: var(--muted); }
.ci dd { margin: 0; max-width: 60ch; }
.add { display: grid; gap: 12px; }
.add-row { display: flex; gap: 10px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: stretch; }
.qty button { width: 48px; border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; }
.qty input, .qty output { width: 46px; text-align: center; border: 0; background: transparent; font-weight: 700; font-variant-numeric: tabular-nums; display: grid; place-items: center; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button { display: none; }
.qty.sm button { width: 38px; font-size: 1.15rem; }
.qty.sm output { width: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px; text-decoration: none; cursor: pointer; border: 0; font-weight: 700; }
.btn.go { flex: 1; min-width: 200px; }
.btn.big { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }
.gift { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.gift input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); }
.gift span { display: grid; gap: 1px; }
.gift small { color: var(--muted); }
.gift .i { margin-right: 6px; }
.add-note, .when p { display: flex; gap: 8px; align-items: flex-start; }
.add-note { font-size: .95rem; color: var(--muted); }
.add.added .btn.go { animation: added .5s cubic-bezier(.2, .9, .2, 1); }
@keyframes added { 40% { transform: scale(.96); } }

/* pedido */
.order { padding: 18px 0 56px; display: grid; gap: 22px; max-width: 760px; }
.ol { list-style: none; margin: 0; padding: 0; }
.oli { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 0; }
.oli-ph { display: grid; place-items: center; width: 64px; aspect-ratio: 4 / 3; overflow: hidden; }
.oli-ph img { width: 100%; height: 100%; object-fit: cover; }
.oli-main { display: grid; gap: 2px; min-width: 0; }
.oli-name { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.oli-sub { font-size: .88rem; color: var(--muted); }
.oli-sub .i { width: 15px; height: 15px; }
.oli-del { width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
@media (max-width: 420px) { .oli { grid-template-columns: 56px minmax(0, 1fr) auto; } .oli-ph { width: 56px; } .oli .qty { grid-column: 2; justify-self: start; } .oli-del { grid-row: 1; grid-column: 3; } }
.empty-order { display: grid; justify-items: start; gap: 14px; padding: 18px 0; }
.empty-order > .i { width: 40px; height: 40px; }
.of { display: grid; gap: 22px; }
.tot { display: grid; gap: 6px; }
.tot p { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.tot-main { font-size: 1.25rem; font-weight: 700; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
legend { padding: 0; margin-bottom: 4px; }
.f { display: grid; gap: 6px; font-weight: 600; }
.f small { font-weight: 400; color: var(--muted); }
.f input, .f textarea { width: 100%; min-height: 50px; padding: 12px 14px; font-weight: 400; }
.f textarea { resize: vertical; }
.opt { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 12px 14px; }
.opt input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.pay-note { font-size: .92rem; color: var(--muted); }
.err { padding: 12px 14px; color: #8f1d14; background: #fbe4e1; }
.done-in { display: grid; justify-items: start; gap: 14px; padding: 18px 0; }
.done-in > .i { width: 54px; height: 54px; }
.done-when { display: flex; gap: 8px; }
.msg { padding: 60px 0; display: grid; gap: 14px; justify-items: start; }

.credit { margin-top: 6px; font-size: .75rem; color: var(--muted); }
.foot-credits a { font-size: .85rem; }
.credits { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
/* barra fija con el pedido en curso */
.cbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(var(--gap), calc((100% - var(--wrap)) / 2)) calc(10px + env(safe-area-inset-bottom)); }
.cbar[hidden] { display: none; }
.cbar-t { display: flex; gap: 8px; align-items: center; font-size: 1rem; min-width: 0; }
.cbar .btn.go { flex: 0 0 auto; min-width: 0; }
:root.has-cbar { --bar-h: 76px; }

/* resumen del pedido al agregar un producto */
.sheet-bg { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .45); }
.sheet { position: relative; width: min(100%, 520px); max-height: 88vh; overflow: auto; display: grid; gap: 12px;
  padding: 22px clamp(18px, 5vw, 28px) calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .sheet-bg { align-items: center; } }
.sheet h2 { display: flex; gap: 10px; align-items: flex-start; margin: 0 44px 0 0; font-size: 1.25rem; line-height: 1.25; }
.sheet h2 .i { width: 28px; height: 28px; flex: none; }
.sheet-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: inherit; cursor: pointer; }
.sheet-x .i { width: 24px; height: 24px; }
.sheet-sub { margin: 0; color: var(--muted); }
.sheet-list ul { list-style: none; margin: 0; padding: 0; }
.sheet-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
.sheet-list li .i { width: 16px; height: 16px; vertical-align: -2px; }
.sheet-tot { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 0; font-size: 1.12rem; font-weight: 800; }
.sheet-acts { display: grid; gap: 10px; margin-top: 6px; }
.sheet-acts .btn { min-height: 56px; font-size: 1.1rem; }

/* aviso flotante */
#toast { position: fixed; left: 50%; bottom: calc(18px + var(--bar-h, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 40;
  display: flex; gap: 10px; align-items: center; max-width: min(92vw, 460px); padding: 12px 16px; transition: opacity .25s, transform .35s cubic-bezier(.2, .9, .2, 1); }
#toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast a { font-weight: 700; }

/* barra para comparar las versiones (solo mientras se elige) */
:root:has(.tema-bar) { --bar-h: 52px; }
.tema-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: 6px; align-items: center; overflow-x: auto; height: 52px; padding: 0 10px;
  background: #111; color: #eee; font: 600 .8rem/1 system-ui, sans-serif; scrollbar-width: none; }
.tema-bar span { opacity: .7; flex: none; }
.tema-bar a { flex: none; padding: 9px 11px; border-radius: 99px; text-decoration: none; color: #eee; border: 1px solid #444; }
.tema-bar a.on { background: #eee; color: #111; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* celular: encabezado liviano y portada compacta, para que el catálogo aparezca rápido */
@media (max-width: 559px) {
  .nav a:not(.nav-cart) { display: none; }
  .nav-cart span { white-space: nowrap; }
  .top-in { min-height: 58px; }
}
@media (max-width: 699px) {
  .hero { gap: 14px; padding: 14px 0 6px; }
  .board-rows li { padding-block: 8px; }
  .pimg { aspect-ratio: 16 / 10; }
}
@media (min-width: 700px) { .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }

/* el título de cada grupo del formulario va adentro de su tarjeta, no sobre el borde */
fieldset > legend { float: left; width: 100%; margin-bottom: 6px; }
fieldset > legend + * { clear: both; }

/* escala de 1 a 3: puntos llenos y aros vacíos, legibles sin zoom */
.scale { gap: 3px; }
.scale i { width: 8px; height: 8px; opacity: 1; background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.scale[data-l="1"] i:nth-child(-n+1), .scale[data-l="2"] i:nth-child(-n+2), .scale[data-l="3"] i { background: currentColor; }
.ci dt .scale i { width: 11px; height: 11px; }
.lvl { display: inline-flex; align-items: center; gap: 8px; }
.lvl-word { font-size: 1rem; font-weight: 600; color: var(--ink); }
/* lo que el navegador dibuja también lleva la paleta */
::placeholder { color: var(--muted); opacity: 1; }
input, textarea { caret-color: var(--accent); }
html { scrollbar-color: var(--muted) var(--bg); }
.qty button { display: grid; place-items: center; }
.qty button .i { width: 20px; height: 20px; }
.f-l small { font-weight: 400; color: var(--muted); }
.gift > span > .gift-t { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.gift .gift-t .i { margin-right: 0; }

/* manual de cuidados (lo que abre el QR) */
.manual { width: min(100% - 2 * var(--gap), 760px); margin-inline: auto; padding: 18px 0 56px; display: grid; gap: 22px; }
.thanks { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 20px clamp(16px, 4vw, 26px); }
.thanks-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; }
.thanks-mark .i { width: 30px; height: 30px; }
.thanks-h { font-size: clamp(1.45rem, 5.5vw, 1.9rem); margin-bottom: 8px; }
.thanks p + p { margin-top: 8px; }
.thanks-sign { font-weight: 800; }
.m-head { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; }
.m-img { margin: 0; aspect-ratio: 1; overflow: hidden; display: grid; place-items: center; }
.m-img img { width: 100%; height: 100%; object-fit: cover; }
.m-name { font-size: clamp(1.8rem, 7vw, 2.6rem); }
.m-sp { color: var(--muted); margin-top: 4px; }
.m-help { display: grid; gap: 10px; }
.m-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.m-actions .btn.go { flex: 0 1 auto; min-width: 0; }
.foot-when { flex-wrap: nowrap; }

.m-use { display: grid; gap: 14px; }
.m-use > p { max-width: 62ch; }
.m-use .ci { border: 0; padding: 0; }

/* Panchita al lado del agradecimiento */
.thanks.has-img { grid-template-columns: clamp(96px, 30vw, 160px) minmax(0, 1fr); align-items: center; }
.thanks-img { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
@media (max-width: 559px) {
  .thanks.has-img { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .thanks.has-img .thanks-img { width: min(56vw, 210px); }
}
