/* Página pública de Santa María.
   Concepto: pizarra de carnicería. Bandas oscuras tipo pizarra, tipografía condensada de cartelería
   y renglones de precios con puntos guía, sobre una base clara y sobria. */
@font-face { font-family: "Santa Maria Logo"; src: url("/fonts/santa-maria-logo.woff2") format("woff2"); font-display: block; }
:root {
  --f-logo: "Santa Maria Logo", "Brush Script MT", cursive;
  --paper: #F7F6F4;
  --card: #FFFFFF;
  --ink: #1C1718;
  --muted: #6D6366;
  --line: #E2DCDA;
  --board: #1E1A1B;
  --board-2: #2A2425;
  --chalk: #EEE8E3;
  --chalk-dim: #A99FA0;
  --wine: #8A1C38;
  --wine-hi: #C2445F;
  --ok: #2E7647;
  --ok-soft: #E2F0E6;
  --wa: #25D366; /* verde oficial de WhatsApp */
  --f-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; }
img { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--wine-hi); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: .005em; }
h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1; font-weight: 700; text-transform: uppercase; }
h3 { font-size: 22px; font-weight: 600; line-height: 1.1; }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--wine-hi); }
.eyebrow.dark { color: var(--wine); }
.muted { color: var(--muted); margin: 0; }
.muted-light { color: var(--chalk-dim); margin: 0; }
.note { font-size: 14px; color: var(--muted); margin: 0; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 10px 18px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; background: var(--card); }
.btn.big { padding: 14px 24px; font-size: 17px; }
.btn.wine { background: var(--wine); color: #fff; }
.btn.wine:hover { background: #761530; }
.btn.ghost-light { border-color: rgba(238, 232, 227, .35); color: var(--chalk); background: transparent; }
.btn.ghost-light:hover { border-color: var(--chalk); }
.btn.wa { background: var(--wa); color: #fff; width: 100%; }
.btn.wa:hover { filter: brightness(1.08); }
.btn.line { border-color: var(--line); }
.badge { background: #fff; color: var(--wine); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 0 7px; line-height: 18px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(247, 246, 244, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.nav-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1; flex: none; }
.logo b { font-family: var(--f-logo); font-weight: 400; font-size: 40px; line-height: .95; color: var(--wine); }
.logo span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.links { display: flex; gap: 22px; flex: 1; justify-content: center; }
.links a { text-decoration: none; font-weight: 600; color: var(--muted); }
.links a:hover { color: var(--ink); }
@media (max-width: 860px) { .links { display: none; } .nav-in { justify-content: space-between; } }

/* hero */
.hero { background: var(--board); color: var(--chalk); background-image: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.05), transparent 55%), radial-gradient(ellipse at 90% 100%, rgba(138,28,56,.28), transparent 60%); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding-block: 72px 80px; }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; padding-block: 48px 56px; gap: 36px; } }
.hero h1 { font-size: clamp(46px, 7vw, 88px); line-height: .92; font-weight: 700; text-transform: uppercase; color: #fff; }
.lead { font-size: 19px; color: var(--chalk); opacity: .86; max-width: 34em; margin: 22px 0 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.board { background: var(--board-2); border: 1px solid rgba(238,232,227,.14); border-radius: 14px; padding: 22px 24px; box-shadow: inset 0 0 60px rgba(0,0,0,.35); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--f-display); text-transform: uppercase; letter-spacing: .08em; font-size: 20px; font-weight: 600; border-bottom: 1px dashed rgba(238,232,227,.25); padding-bottom: 12px; }
.board-date { font-size: 14px; color: var(--chalk-dim); letter-spacing: .04em; }
.board-list { list-style: none; margin: 0; padding: 8px 0 0; }
.board-list li { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; font-size: 18px; }
.board-list .n { font-family: var(--f-display); font-size: 22px; font-weight: 500; letter-spacing: .02em; }
.board-list .dots { flex: 1; border-bottom: 2px dotted rgba(238,232,227,.28); transform: translateY(-5px); min-width: 20px; }
.board-list .p { font-family: var(--f-display); font-size: 24px; font-weight: 700; color: #fff; }
.board-list .u { font-size: 13px; color: var(--chalk-dim); }
.board-empty { color: var(--chalk-dim); }
.board-foot { display: inline-block; margin-top: 12px; color: var(--wine-hi); font-weight: 600; text-decoration: none; }

/* rubros */
.rubros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: -34px; position: relative; }
@media (max-width: 900px) { .rubros { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; } }
.rubro { text-align: left; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; cursor: pointer; box-shadow: 0 10px 30px rgba(28,23,24,.06); }
.rubro:hover { border-color: var(--wine); }
.r-k { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wine); }
.r-t { font-family: var(--f-display); font-size: 22px; font-weight: 600; line-height: 1.05; }
.r-n { font-size: 14px; color: var(--muted); }

/* secciones */
.sec { padding-block: 80px; }
@media (max-width: 700px) { .sec { padding-block: 56px; } }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.band { background: var(--board); color: var(--chalk); }
.band h2 { color: #fff; }
.band-wine { background: var(--wine); color: #fff; background-image: radial-gradient(ellipse at 100% 0%, rgba(255,255,255,.08), transparent 55%); }
.band-wine h2 { color: #fff; }
.band-wine .eyebrow { color: #F4C6D1; }
.band-wine .trio article { border-top-color: rgba(255,255,255,.6); }
.band-wine .trio h3 { color: #fff; }
.band-wine .trio p { color: rgba(255,255,255,.84); }

/* lista de precios */
.tools { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.inp { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.inp:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(138,28,56,.12); }
#q { font-size: 18px; max-width: 560px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.chip small { font-weight: 500; opacity: .7; margin-left: 3px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.plist { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pgroup { font-family: var(--f-display); font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--wine); padding: 14px 20px 8px; background: #FBFAF9; border-bottom: 1px solid var(--line); }
.prow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 6px 18px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.pthumb { grid-row: 1 / span 2; grid-column: 1; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #F3EEEC; color: var(--wine); }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb svg { width: 30px; height: 30px; }
.pthumb[data-cat="Vinos"], .pthumb[data-cat="Espumantes y sidras"] { background: #F1E3E7; }
.pthumb[data-cat="Congelados"] { background: #E5EDF1; color: #3E6377; }
.prow:last-child { border-bottom: 0; }
.prow .pn { grid-column: 2; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.prow .pn a { font-weight: 600; font-size: 17px; color: inherit; text-decoration: none; }
.prow .pn a:hover { color: var(--wine); text-decoration: underline; }
.prow .dots { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-4px); min-width: 16px; }
.prow .pu { grid-column: 2; font-size: 14px; color: var(--muted); margin-top: -4px; }
.prow .pp { grid-row: 1; grid-column: 3; font-family: var(--f-display); font-size: 24px; font-weight: 700; text-align: right; white-space: nowrap; }
.prow .pp small { font-family: var(--f-body); font-size: 13px; font-weight: 500; color: var(--muted); }
.prow .pa { grid-row: 1 / span 2; grid-column: 4; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 250px; }
.en-pedido { font-size: 13px; font-weight: 700; color: var(--ok); white-space: nowrap; }
.step.on { background: var(--wine); }
.step.on button, .step.on span { color: #fff; }
.step.on button:hover { background: rgba(255,255,255,.12); }
.prow .pc { grid-row: 2; grid-column: 3; text-align: right; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.q { background: #F1EDEB; color: var(--muted); }
.add { border: 1px solid var(--wine); color: var(--wine); background: transparent; border-radius: 999px; padding: 7px 16px; font-weight: 700; cursor: pointer; }
.add:hover { background: var(--wine); color: #fff; }
.step { display: inline-flex; align-items: center; border: 1px solid var(--wine); border-radius: 999px; overflow: hidden; }
.step button { border: 0; background: transparent; color: var(--wine); width: 36px; height: 34px; font-size: 20px; font-weight: 700; cursor: pointer; }
.step button:hover { background: rgba(138,28,56,.08); }
.step span { min-width: 62px; text-align: center; font-weight: 700; font-size: 15px; }
@media (max-width: 640px) {
  .prow { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; }
  .pthumb { width: 48px; height: 48px; }
  .prow .pn .dots { display: none; }
  .prow .pa { grid-row: 3; grid-column: 1 / -1; justify-content: flex-start; min-width: 0; }
  .prow .pc { grid-row: 2; grid-column: 3; }
}
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.pager:empty { display: none; }
.pg-info { font-size: 14px; color: var(--muted); }
.pg-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pg { min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; font-weight: 600; cursor: pointer; color: var(--ink); }
.pg:hover:not(:disabled) { border-color: var(--wine); color: var(--wine); }
.pg[aria-current="page"] { background: var(--wine); border-color: var(--wine); color: #fff; }
.pg:disabled { opacity: .4; cursor: default; }
.pg-gap { align-self: center; color: var(--muted); padding: 0 2px; }
.pager + .note { margin-top: 14px; }
.envio-note { margin: 0; font-size: 14px; padding: 10px 12px; border-radius: 10px; background: #F4E6E9; color: var(--wine); font-weight: 600; }
.envio-note[data-ok="1"] { background: var(--ok-soft); color: var(--ok); }

/* combos */
.combos { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.combo { background: var(--board-2); border: 1px solid rgba(238,232,227,.12); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.combo h3 { color: #fff; font-size: 26px; text-transform: uppercase; }
.combo .for { color: var(--chalk-dim); font-size: 15px; margin: -8px 0 0; }
.combo ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.combo li { display: flex; gap: 8px; align-items: baseline; font-size: 15px; }
.combo li .dots { flex: 1; border-bottom: 2px dotted rgba(238,232,227,.2); transform: translateY(-4px); }
.combo li .q { color: var(--chalk-dim); white-space: nowrap; }
.combo .ct { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed rgba(238,232,227,.2); padding-top: 12px; }
.combo .ct b { font-family: var(--f-display); font-size: 28px; color: #fff; }
.combo .btn { width: 100%; }

/* al vacío / pasos */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 800px) { .trio { grid-template-columns: 1fr; } }
.trio article { border-top: 3px solid var(--wine); padding-top: 18px; }
.trio p { color: var(--muted); margin: 10px 0 0; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 8px; }
.steps li::before { content: counter(s); font-family: var(--f-display); font-size: 56px; font-weight: 700; line-height: 1; color: var(--wine); }
.steps b { font-family: var(--f-display); font-size: 24px; font-weight: 600; text-transform: uppercase; }
.steps span { color: var(--muted); }

/* footer */
.foot { background: var(--board); color: var(--chalk); border-top: 4px solid var(--wine); background-image: radial-gradient(ellipse at 0% 100%, rgba(138,28,56,.22), transparent 55%); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, .6fr); gap: 40px 32px; padding-block: 64px 48px; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; gap: 32px; padding-block: 48px 36px; } }
.f-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.f-logo { font-family: var(--f-logo); font-weight: 400; font-size: 58px; line-height: .9; color: #fff; }
.f-rubros { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; white-space: nowrap; text-transform: uppercase; color: var(--chalk-dim); }
.f-cta { display: inline-grid; gap: 10px; margin-top: 8px; }
.f-cta > * { width: 100%; height: 44px; box-sizing: border-box; justify-content: center; margin: 0; }
.f-cta .btn { font-size: 15px; padding: 0 18px; }
.minimapa { margin-top: 14px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(238,232,227,.14); aspect-ratio: 4 / 3; max-width: 100%; background: var(--board-2); }
.minimapa iframe { display: block; width: 100%; height: 100%; border: 0; }
.afip { display: inline-block; line-height: 0; border-radius: 6px; overflow: hidden; }
.afip img { display: block; height: auto; }
.estado { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(238,232,227,.08); }
.estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E0A84A; }
.estado[data-abierto="1"]::before { background: #5FCB86; }
.f-col h3 { font-family: var(--f-body); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--wine-hi); margin-bottom: 14px; }
.f-col p, .f-col ul { margin: 0; color: var(--chalk); }
.f-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.f-col p + p, .f-col ul + p { margin-top: 12px; }
.horarios { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.horarios div { display: flex; flex-direction: column; padding-left: 10px; border-left: 2px solid rgba(238,232,227,.14); }
.horarios div[data-hoy="1"] { border-left-color: var(--wine-hi); }
.horarios dt { font-weight: 600; color: #fff; }
.horarios dd { margin: 0; color: var(--chalk-dim); }
.horarios div[data-hoy="1"] dt::after { content: " · hoy"; color: var(--wine-hi); font-weight: 600; }
.f-link { display: inline-block; margin-top: 12px; color: #fff; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--wine-hi); padding-bottom: 1px; }
.f-link:hover { color: var(--wine-hi); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; border-top: 1px solid rgba(238,232,227,.12); padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--chalk-dim); }
.foot-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-bottom a { color: var(--chalk); text-decoration: none; }
.foot-bottom a:hover { color: #fff; }
/* con pedido, solo el lugar justo para que la barra del pedido no tape el último renglón */
body.has-cart .foot-bottom { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
/* a la derecha quedan los botones flotantes: el texto no va debajo */
.foot-bottom { padding-right: calc(84px + env(safe-area-inset-right, 0px)); }

/* barra y panel del pedido */
.cartbar { position: fixed; z-index: 25; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(560px, calc(100% - 32px)); background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 10px 10px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.3); }
.cartbar div { display: flex; flex-direction: column; line-height: 1.15; }
.cartbar span { font-size: 13px; color: var(--chalk-dim); }
.cartbar b { font-family: var(--f-display); font-size: 24px; }
.drawer-bg { position: fixed; inset: 0; z-index: 40; background: rgba(20,14,16,.5); display: flex; justify-content: flex-end; }
.drawer { width: min(460px, 100%); height: 100%; background: var(--card); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); overflow: auto; }
.dr-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dr-head h2 { font-size: 30px; }
.x { border: 0; background: transparent; font-size: 30px; line-height: 1; cursor: pointer; color: var(--muted); }
.dr-items { padding: 6px 22px; flex: 1; }
.dr-it { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.dr-it .n { font-weight: 600; }
.dr-it .s { grid-column: 2; grid-row: 1 / span 2; text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.dr-it .s b { font-family: var(--f-display); font-size: 20px; }
.dr-it .rm { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
.dr-form { padding: 18px 22px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); background: #FBFAF9; }
.dr-total { display: flex; justify-content: space-between; align-items: baseline; }
.dr-total b { font-family: var(--f-display); font-size: 32px; }
.f { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #EFECEA; border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; padding: 9px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
@media (max-width: 480px) {
  .logo span { display: none; }
  .nav-in { gap: 12px; }
  .nav-in .btn { padding: 8px 14px; }
  .hero h1 { font-size: 44px; }
}

/* ---------- imágenes (se activan con data/fotos.json) ---------- */
.hero.con-foto { background-image: linear-gradient(90deg, rgba(30,26,27,.96) 0%, rgba(30,26,27,.82) 45%, rgba(30,26,27,.45) 100%), var(--foto); background-size: cover; background-position: center; }
@media (max-width: 900px) { .hero.con-foto { background-image: linear-gradient(180deg, rgba(30,26,27,.88), rgba(30,26,27,.92)), var(--foto); } }
.rubro .r-img { display: none; }
.rubro .r-img.ico { display: flex; width: 40px; height: 40px; color: var(--wine); margin-bottom: 8px; }
.rubro .r-img.ico svg { width: 100%; height: 100%; }
.rubro.con-foto { padding-top: 0; overflow: hidden; }
.rubro.con-foto .r-img { display: block; margin: 0 -18px 12px; aspect-ratio: 16 / 9; background: var(--foto) center / cover; }
.band-wine.con-foto { background-image: linear-gradient(rgba(138,28,56,.9), rgba(110,20,44,.9)), var(--foto); background-size: cover; background-position: center; }
.combo .c-img { margin: -22px -22px 4px; aspect-ratio: 16 / 10; background-size: cover; background-position: center; border-radius: 14px 14px 0 0; }

/* ---------- botones flotantes: asistente y WhatsApp ---------- */
.fabs { position: fixed; z-index: 24; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; transition: bottom .2s; }
/* solo suben si la barra del pedido les queda debajo (pantallas angostas) */
@media (max-width: 760px) { body.has-cart .fabs { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }
.fab { width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; box-shadow: 0 10px 28px rgba(28,23,24,.28); text-decoration: none; transition: transform .15s, filter .15s; }
.fab:hover { transform: translateY(-2px); filter: brightness(1.08); }
.fab svg { width: 28px; height: 28px; }
.fab[hidden] { display: none; }
.fab-chat { background: var(--wine); }
.fab-wa { background: var(--wa); }
.fab-tip { position: absolute; right: 68px; top: 8px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 24px rgba(28,23,24,.14); pointer-events: none; }
@media (max-width: 700px) { .fab-tip { display: none; } }
body.chat-abierto .fab-chat, body.chat-abierto .fab-tip { visibility: hidden; }

.chat { position: fixed; z-index: 30; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(400px, calc(100% - 32px)); height: min(620px, calc(100dvh - 32px)); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(28,23,24,.3); display: flex; flex-direction: column; overflow: hidden; }
.chat[hidden] { display: none; }
@media (max-width: 560px) { .chat { inset: 0; width: 100%; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--board); color: var(--chalk); }
.chat-head > div { flex: 1; min-width: 0; }
.chat-head h2 { font-size: 20px; color: #fff; line-height: 1.1; }
.chat-head p { margin: 2px 0 0; font-size: 13px; color: var(--chalk-dim); }
.chat-av { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--wine); color: #fff; display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.chat-head .x { background: transparent; border: 0; color: var(--chalk); font-size: 28px; line-height: 1; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.chat-head .x:hover, .chat-nueva:hover { background: rgba(255,255,255,.08); }
.chat-nueva { background: transparent; border: 1px solid rgba(238,232,227,.3); color: var(--chalk); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chat-nueva[hidden] { display: none; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); overscroll-behavior: contain; }
.cm { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.cm p { margin: 0; }
.cm p + p, .cm p + ul, .cm ul + p { margin-top: 8px; }
.cm ul { margin: 6px 0 0; padding-left: 18px; }
.cm li + li { margin-top: 3px; }
.cm a { color: var(--wine); font-weight: 600; }
.cm.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.cm.yo { align-self: flex-end; background: var(--wine); color: #fff; border-bottom-right-radius: 6px; }
.cm.error .btn { margin-top: 10px; width: auto; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--chalk-dim); animation: tecleo 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tecleo { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: .7; } }
.chat-sug { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; background: var(--paper); }
.chat-sug[hidden] { display: none; }
.chat-sug button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 12px; font-size: 14px; cursor: pointer; text-align: left; }
.chat-sug button:hover { border-color: var(--wine); color: var(--wine); }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--card); }
.chat-form textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; line-height: 1.35; max-height: 120px; background: var(--card); color: var(--ink); }
.chat-form textarea:focus { outline: none; border-color: var(--wine); }
.chat-send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--wine); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-send:disabled { opacity: .5; cursor: default; }
.chat-send svg { width: 20px; height: 20px; }
.chat-legal { margin: 0; padding: 0 14px 10px; background: var(--card); font-size: 11.5px; color: var(--muted); text-align: center; }
.buscando { margin-left: 8px; font-size: 14px; color: var(--muted); }
.cm-fuentes { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.cm-fuentes > span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cm .cm-fuentes a { font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; line-height: 1.25; }
.cm .cm-fuentes a:hover { color: var(--wine); }
.cm-fuentes small { color: var(--muted); font-size: 12px; }
