/* =====================================================================
   UnionSupermarket — estilos de la tienda, cuentas e instalador
   Tipografía: Bricolage Grotesque (OFL, autoalojada).
   --brand y --accent se definen desde la configuración del panel.
   ===================================================================== */
@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque.woff") format("woff");
  font-weight: 200 800;
  font-display: swap;
}

/* Valores predeterminados en `html` (menor especificidad): la paleta configurada en el panel
   llega como :root{...} desde partials/head.php y siempre tiene prioridad. */
html {
  --brand: #0B7A3E;
  --accent: #F4A51C;
  --ink: #16271D;
  --ink-soft: color-mix(in srgb, var(--ink) 78%, #fff);
  --ink-faint: color-mix(in srgb, var(--ink) 56%, #fff);
  --line: color-mix(in srgb, var(--brand) 7%, color-mix(in srgb, var(--ink) 12%, #fff));
  --mist: color-mix(in srgb, var(--brand) 7%, #fff);
  --paper: #FFFFFF;
  --tomato: #C8361F;
  --ok: #157A3A;
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1200px;
  --font: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand-dark: color-mix(in srgb, var(--brand) 78%, #000);
  --brand-tint: color-mix(in srgb, var(--brand) 9%, #fff);
  --accent-tint: color-mix(in srgb, var(--accent) 22%, #fff);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--paper); font-optical-sizing: auto; }
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
code { font-size: .9em; background: var(--mist); padding: .1em .35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.icon { flex: none; }
.text-danger { color: var(--tomato); }
.text-ok { color: var(--ok); }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 2px solid transparent; font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--primary:disabled { background: var(--line); color: var(--ink-faint); cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--brand-dark); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn--block { width: 100%; }

.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.field__optional { font-weight: 400; color: var(--ink-faint); }
.field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 11px 14px; font: 16px/1.4 var(--font); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.field input[type=color] { width: 72px; height: 44px; padding: 3px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.field__hint { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.field__error { margin: 6px 0 0; font-size: 14px; color: var(--tomato); font-weight: 600; }
.field--error input, .field--error textarea, .field--error select { border-color: var(--tomato) !important; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-weight: 400 !important; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid__full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 16px 0; border-left: 4px solid; font-size: 15px; }
.alert p { margin: 0 0 6px; }
.alert-success { background: #EAF6EE; border-color: var(--ok); }
.alert-info { background: #EDF3FB; border-color: #2E6AB8; }
.alert-warning { background: #FFF6E3; border-color: #D08A00; }
.alert-error { background: #FCEDEA; border-color: var(--tomato); }

/* ---------- Encabezado de la tienda ---------- */
.servicebar { background: var(--topbar-bg, var(--brand-dark)); color: var(--topbar-text, #fff); font-size: 14px; }
.servicebar__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; }
.servicebar__modes { display: flex; gap: 18px; margin: 0; }
.servicebar__modes span, .servicebar__phone { display: inline-flex; align-items: center; gap: 6px; }
.servicebar__phone { color: inherit; text-decoration: none; }
.servicebar__phone:hover { color: var(--accent); }

.masthead { background: var(--header-bg, var(--brand)); color: var(--header-text, #fff); position: sticky; top: 0; z-index: 20; }
.masthead__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px 12px 12px 3px; background: var(--accent); color: var(--ink); font-weight: 800; font-size: 24px; }
.brand__name { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.brand__logo { max-height: 46px; width: auto; }

.search { display: flex; background: #fff; border-radius: 999px; overflow: hidden; max-width: 640px; width: 100%; justify-self: center; }
.search input { flex: 1; min-width: 0; border: 0; padding: 0 20px; height: 46px; font: 16px var(--font); color: var(--ink); background: transparent; }
.search input:focus { outline: none; }
.search button { border: 0; background: var(--accent); color: var(--ink); width: 54px; cursor: pointer; display: grid; place-items: center; }
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 70%, transparent); }
.search--page { border: 1.5px solid var(--line); margin-top: 16px; justify-self: start; }

.masthead__actions { display: flex; gap: 6px; align-items: center; }
.action { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; }
a.action:hover { background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; }
.action--soon { opacity: .62; cursor: not-allowed; }
.action--soon small { font-weight: 400; font-size: 12px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 700; font-size: 13px; }

.aisles-nav { background: var(--nav-bg, #fff); border-bottom: 1px solid var(--line); }
.aisles-nav__track { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px 0; }
.aisles-nav__track::-webkit-scrollbar { display: none; }
.aisles-nav a { flex: none; padding: 8px 14px; border-radius: 999px; color: var(--nav-text, var(--ink)); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.aisles-nav a:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.aisles-nav a.is-current { background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; }

@media (max-width: 860px) {
  .masthead__inner { grid-template-columns: 1fr auto; gap: 12px; padding: 10px 0 12px; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .action__label { display: none; }
  .servicebar__phone { display: none; }
}

/* ---------- Portada ---------- */
.page { min-height: 50vh; }
.hero { background: linear-gradient(180deg, var(--brand-tint), #fff 85%); padding: 40px 0 48px; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero__title { font-size: clamp(34px, 5.2vw, 62px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; margin: 0 0 18px; max-width: 14ch; font-variation-settings: "opsz" 96; }
.hero__lead { font-size: 19px; color: var(--ink-soft); max-width: 52ch; margin: 0 0 26px; }
.hero__modes { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 0; }
.hero__modes li { display: flex; gap: 12px; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 18px 12px 14px; }
.hero__modes .icon { color: var(--brand); }
.hero__modes strong { display: block; font-size: 16px; }
.hero__modes span { display: block; font-size: 14px; color: var(--ink-soft); }
.hero__banner img { border-radius: 18px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* Letrero de horario: un cartel de tienda real, no una tarjeta genérica */
.hours-sign { background: var(--ink); color: #fff; border-radius: 18px; padding: 26px 28px; position: relative; box-shadow: 0 18px 40px -22px rgba(22, 39, 29, .6); transform: rotate(1.2deg); }
.hours-sign::before { content: ""; position: absolute; top: -14px; left: 50%; width: 120px; height: 14px; margin-left: -60px; border: 2px solid var(--ink-faint); border-bottom: 0; border-radius: 60px 60px 0 0; }
.hours-sign__title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 26px; font-weight: 800; color: var(--accent); }
.hours-sign__body { margin: 0; font-size: 17px; line-height: 1.7; }
.hours-sign__address { display: flex; gap: 8px; margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.3); font-size: 15px; color: rgba(255,255,255,.82); }

@media (max-width: 860px) {
  .hero { padding: 28px 0 32px; }
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hours-sign { transform: none; }
}

/* ---------- Secciones ---------- */
.section { padding: 36px 0; }
.section--offers { background: color-mix(in srgb, var(--accent) 12%, #fff); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 20px; }
.section__title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.section__title--small { font-size: 20px; margin: 36px 0 12px; }
.section__note { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Pasillos: letreros colgantes de supermercado (elemento distintivo) */
.aisles { list-style: none; padding: 18px 0 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 30px 16px; }
.aisle { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 16px 16px 14px; border-radius: 10px; background: var(--brand); color: #fff; text-decoration: none; transition: transform .2s ease, background-color .2s; }
.aisle::before, .aisle::after { content: ""; position: absolute; top: -18px; width: 2px; height: 18px; background: var(--ink-faint); }
.aisle::before { left: 22%; } .aisle::after { right: 22%; }
.aisle:hover { color: #fff; background: var(--brand-dark); transform: rotate(-1.5deg); }
.aisle__number { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--ink); background: var(--accent); padding: 2px 9px; border-radius: 999px; }
.aisle__icon { font-size: 30px; line-height: 1.2; margin-top: 4px; }
.aisle__img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.aisle__name { margin-top: auto; font-weight: 700; font-size: 17px; line-height: 1.2; }
@media (max-width: 520px) { .aisles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; } .aisle { min-height: 118px; } }

/* ---------- Productos y etiqueta de precio ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.product { position: relative; display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product__media { position: relative; display: block; aspect-ratio: 1; background: var(--mist); }
.product__media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.product__placeholder { display: grid; place-items: center; height: 100%; color: var(--ink-faint); }
.product__badge { position: absolute; top: 10px; left: 10px; background: var(--tomato); color: #fff; font-weight: 800; font-size: 14px; padding: 3px 9px; border-radius: 6px; }
.product__body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.product__brand { margin: 0; font-size: 13px; color: var(--ink-faint); }
.product__name { font-size: 16px; font-weight: 600; margin: 2px 0 2px; }
.product__name a { color: var(--ink); text-decoration: none; }
.product__name a:hover { color: var(--brand-dark); text-decoration: underline; }
.product__unit { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }
.product__stock { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--tomato); }

.pricetag { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; position: relative; padding: 5px 12px 5px 22px; background: var(--accent); color: var(--ink); clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); border-radius: 0 6px 6px 0; }
.pricetag::before { content: ""; position: absolute; left: 10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fff; }
.pricetag__amount { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.price-before { margin: auto 0 4px; font-size: 13px; color: var(--ink-soft); }
.price-before + .pricetag { margin-top: 0; }
.pricetag--sale { background: var(--tomato); color: #fff; }
.pricetag--large { padding: 8px 18px 8px 28px; }
.pricetag--large .pricetag__amount { font-size: 32px; }

/* ---------- Listados, detalle y vacíos ---------- */
.listing { padding: 24px 0 48px; }
.crumbs { font-size: 14px; color: var(--ink-soft); margin-bottom: 14px; }
.crumbs a { color: var(--ink-soft); }
.listing__head { margin-bottom: 24px; }
.listing__title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin: 0 0 6px; letter-spacing: -0.025em; }
.listing__lead { margin: 0 0 6px; color: var(--ink-soft); max-width: 60ch; }
.listing__count { margin: 0; color: var(--ink-faint); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--mist); color: var(--ink); text-decoration: none; font-size: 15px; }
.chip:hover { background: var(--brand-tint); color: var(--brand-dark); }
.pagination { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 32px 0 0; }
.empty { text-align: center; max-width: 520px; margin: 12px auto; padding: 40px 24px; border: 2px dashed var(--line); border-radius: 18px; color: var(--ink-soft); }
.empty .icon { color: var(--brand); margin: 0 auto 8px; }
.empty h2 { color: var(--ink); font-size: 22px; margin: 0 0 8px; }
.empty p { margin: 0 0 18px; }

.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.pdp__main { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--mist); border-radius: 18px; padding: 18px; }
.pdp__main--empty { display: grid; place-items: center; color: var(--ink-faint); }
.pdp__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.pdp__thumbs img { aspect-ratio: 1; object-fit: contain; background: var(--mist); border-radius: 10px; padding: 6px; }
.pdp__title { font-size: clamp(26px, 3.4vw, 38px); margin: 4px 0 6px; font-weight: 800; letter-spacing: -0.02em; }
.pdp__tax { font-size: 14px; color: var(--ink-soft); margin: 10px 0 4px; }
.pdp__soon { background: var(--mist); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; }
.pdp__desc h2 { font-size: 18px; margin: 24px 0 6px; }
@media (max-width: 760px) { .pdp { grid-template-columns: 1fr; gap: 20px; } }

.section--plain { border-top: 1px solid var(--line); }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.mode .icon { color: var(--brand); }
.mode h3 { font-size: 20px; margin: 8px 0 6px; }
.mode p { margin: 0; color: var(--ink-soft); max-width: 42ch; }

/* ---------- Cuentas ---------- */
.auth { padding: 40px 16px 64px; display: grid; place-items: start center; }
.auth__card { width: min(100%, 440px); background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 32px 28px; }
.auth__title { font-size: 30px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; }
.auth__lead { margin: 0 0 24px; color: var(--ink-soft); }
.auth__aside { text-align: right; margin: -8px 0 18px; font-size: 15px; }
.auth__switch { margin: 22px 0 0; text-align: center; font-size: 15px; color: var(--ink-soft); }
.store--minimal .auth { min-height: 100vh; place-items: center; }
.account__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.panel { background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 24px; }
.panel--muted { background: var(--mist); border-color: transparent; }
.panel__title { font-size: 20px; margin: 0 0 18px; }
.panel--muted p { color: var(--ink-soft); margin: 0 0 18px; }

/* ---------- Pie y barra móvil ---------- */
.footer { background: var(--footer-bg, var(--ink)); color: rgba(255,255,255,.82); padding: 44px 0 20px; margin-top: 24px; }
.footer a { color: #fff; }
.footer a:hover { color: var(--accent); }
.footer__grid { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; }
.footer__brand { font-size: 24px; font-weight: 800; color: #fff; margin: 0 0 8px; }
.footer__title { font-size: 16px; color: #fff; margin: 0 0 12px; }
.footer__text { margin: 0 0 12px; font-size: 15px; }
.footer__social { display: flex; gap: 14px; margin: 0; }
.footer__list { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.footer__list li { display: flex; gap: 8px; margin-bottom: 10px; align-items: flex-start; }
.footer__list .icon { margin-top: 2px; color: var(--accent); }
.footer__legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 16px; font-size: 13px; color: #9FB0A5; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

.tabbar { display: none; }
@media (max-width: 760px) {
  body.store { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 12px; color: var(--ink-soft); text-decoration: none; }
  .tabbar a:hover, .tabbar a:focus-visible { color: var(--brand-dark); }
  .store--minimal { padding-bottom: 0; }
}

/* ---------- Instalador ---------- */
.installer { background: var(--mist); min-height: 100vh; }
.installer__shell { width: min(100% - 32px, 760px); margin: 0 auto; padding: 36px 0 48px; }
.installer__head { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.installer__product { margin: 0; font-weight: 800; font-size: 22px; }
.installer__sub { margin: 0; color: var(--ink-soft); font-size: 15px; }
.installer__card { background: #fff; border-radius: 18px; padding: 32px; border: 1.5px solid var(--line); }
.installer__title { font-size: 28px; margin: 0 0 8px; font-weight: 800; letter-spacing: -0.02em; }
.installer__lead { color: var(--ink-soft); margin: 0 0 24px; max-width: 62ch; }
.installer__howto { padding-left: 20px; margin: 0 0 18px; }
.installer__howto li { margin-bottom: 6px; }
.installer__foot { text-align: center; color: var(--ink-faint); font-size: 13px; margin-top: 18px; }
.steps { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.steps li { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-faint); border-top: 4px solid var(--line); padding-top: 8px; }
.steps__n { font-weight: 800; font-size: 15px; }
.steps li.is-done { border-color: var(--brand); color: var(--ink-soft); }
.steps li.is-current { border-color: var(--accent); color: var(--ink); font-weight: 700; }
@media (max-width: 600px) { .steps__label { display: none; } .installer__card { padding: 24px 18px; } }
.checklist { list-style: none; padding: 0; margin: 0 0 24px; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist__mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: 14px; flex: none; }
.checklist .is-ok .checklist__mark { background: #DDF1E3; color: var(--ok); }
.checklist .is-fail .checklist__mark { background: #FCE1DB; color: var(--tomato); }
.checklist .is-warn .checklist__mark { background: #FFF0CF; color: #9A6500; }
.chips--sub { margin: 10px 0 12px; }

/* =====================================================================
   Fase 3 — carrito, checkout, cuenta del cliente
   ===================================================================== */
.choice { display: grid; gap: 8px; }
.choice label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; margin: 0; background: #fff; }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.choice label.is-disabled { opacity: .55; cursor: not-allowed; }
.choice input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.choice span { font-size: 14px; color: var(--ink-soft); }
.choice strong { display: block; color: var(--ink); font-size: 15px; }
.choice em { display: block; font-style: normal; font-weight: 600; color: var(--brand-dark); margin-top: 2px; }
.select, .textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: 16px var(--font); color: var(--ink); background: #fff; }
.select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

/* Botones de la tarjeta de producto */
.add { margin-top: 10px; }
.add__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 40px; border: 1.5px solid var(--brand); border-radius: 999px; background: #fff; color: var(--brand-dark); font: 700 15px var(--font); cursor: pointer; }
.add__btn:hover { background: var(--brand); color: #fff; }
.add__btn.is-done { background: var(--brand); color: #fff; }
.fav { position: absolute; top: 8px; right: 8px; z-index: 2; }
.fav__btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink-soft); cursor: pointer; box-shadow: 0 1px 4px rgba(22,39,29,.15); }
.fav__btn.is-on, .fav-text.is-on { color: var(--tomato); }
.fav__btn.is-on svg, .fav-text.is-on svg { fill: currentColor; }
.fav-text { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; }
.price-before { margin: auto 0 4px; font-size: 13px; color: var(--ink-soft); }
.pdp__buy { margin: 16px 0 6px; }
.pdp__buyrow { display: flex; gap: 10px; flex-wrap: wrap; }
.qty-input { width: 92px; min-height: 46px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: 600 16px var(--font); text-align: center; }

/* Encabezado: contador del carrito y aviso flotante */
.action--cart { position: relative; }
.cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--ink); font: 800 12px/1 var(--font); }
.tabbar__cart { position: relative; }
.tabbar__cart .cart-count { position: absolute; top: 4px; left: 55%; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); max-width: calc(100% - 32px); }
.toast a { color: var(--accent); margin-left: 8px; }
@media (min-width: 761px) { .toast { bottom: 28px; } }

/* Carrito */
.cart, .checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .cart, .checkout { grid-template-columns: 1fr; } }
.lines { list-style: none; margin: 0; padding: 0; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto auto; gap: 12px 16px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line--problem { background: #FFF8F6; }
.line__media { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 10px; background: var(--mist); color: var(--ink-faint); overflow: hidden; }
.line__media img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.line__name { font-weight: 600; color: var(--ink); text-decoration: none; }
.line__name:hover { text-decoration: underline; }
.line__unit { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }
.line__problem { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: var(--tomato); }
.line__qty { display: flex; align-items: center; gap: 4px; }
.line__qty .qty-input { width: 76px; min-height: 40px; }
.line__total { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 96px; text-align: right; }
@media (max-width: 640px) {
  .line { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .line__qty { grid-column: 2; }
  .line__total { grid-column: 3; grid-row: 1; }
  .line__remove { grid-column: 3; grid-row: 2; text-align: right; }
}
.summary { position: sticky; top: 150px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 12px; }
.summary__title { margin: 0; font-size: 20px; }
.summary__rows { margin: 0; display: grid; gap: 8px; }
.summary__rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.summary__rows dt { color: var(--ink-soft); }
.summary__rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.summary__rows .is-save dd, .summary__rows .is-save dt { color: var(--ok); }
.summary__total { border-top: 1.5px solid var(--line); padding-top: 10px; font-size: 18px !important; }
.summary__total dt { color: var(--ink) !important; font-weight: 700; }
.summary__total dd { font-weight: 800 !important; }
.summary__note { margin: 0; font-size: 13px; color: var(--ink-faint); }
@media (max-width: 900px) { .summary { position: static; } }
.coupon label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.coupon__row { display: flex; gap: 8px; }
.coupon__row input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: 600 15px var(--font); text-transform: uppercase; }
.mini-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; max-height: 240px; overflow: auto; }
.mini-lines li { display: flex; justify-content: space-between; gap: 10px; }
.mini-lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-lines--big { max-height: none; font-size: 15px; margin-bottom: 14px; }
.mini-lines--big li { border-bottom: 1px solid var(--mist); padding-bottom: 8px; }

/* Checkout */
.checkout__main { display: grid; gap: 18px; }
.step { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; margin: 0; background: #fff; min-width: 0; }
.step__title { font-weight: 800; font-size: 18px; padding: 0 6px; }
.newaddr { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.js .newaddr[hidden] { display: none; }

/* Cuenta del cliente */
.account-nav { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.account-nav a { flex: none; padding: 10px 14px; text-decoration: none; color: var(--ink-soft); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.account-nav a.is-on { color: var(--ink); border-color: var(--brand); }
.order-list, .address-list, .notif-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.address-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 18px; }
.address-list p, .notif-list p { margin: 0 0 6px; }
.order-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); text-decoration: none; }
.order-card:hover { border-color: var(--brand); color: var(--ink); }
.order-card__top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.order-card__meta { grid-column: 1; font-size: 14px; color: var(--ink-soft); }
.order-card__total { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 800; font-size: 18px; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--mist); color: var(--ink-soft); }
.status--pending { background: var(--accent-tint); color: #6B4500; }
.status--confirmed, .status--preparing, .status--ready, .status--out_for_delivery { background: #E2EEFB; color: #1E4F8A; }
.status--delivered, .status--picked_up { background: #DDF1E3; color: var(--ok); }
.status--cancelled { background: #FCE1DB; color: var(--tomato); }
.status--lg { font-size: 15px; padding: 6px 14px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tracker { list-style: none; padding: 0; margin: 16px 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.tracker li { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; font-size: 13px; color: var(--ink-faint); padding: 0 2px; }
.tracker li::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker li.is-done::before { background: var(--brand); }
.tracker__dot { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--line); }
.tracker li.is-done .tracker__dot { background: var(--brand); border-color: var(--brand); }
.tracker li.is-current .tracker__dot { box-shadow: 0 0 0 5px var(--brand-tint); }
.tracker li.is-done { color: var(--ink); font-weight: 600; }
.tracker__time { font-weight: 400; color: var(--ink-faint); font-size: 12px; }
@media (max-width: 560px) { .tracker__label { font-size: 11px; } .tracker__time { display: none; } }
.order-msg { margin: 6px 0 18px; font-size: 17px; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
.order-side { display: grid; gap: 16px; }
@media (max-width: 860px) { .order-grid { grid-template-columns: 1fr; } }
.pickup-code { margin: 10px 0 4px; font-size: 34px; font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; color: var(--brand-dark); }
.toolbar-store { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.push-panel { margin-bottom: 18px; }
.address-form { max-width: 820px; }
/* Utilidades compartidas con el panel */
.inline-form { display: inline; }
.linkbtn { background: none; border: 0; padding: 4px 6px; margin: 0; font: 600 14px var(--font); color: var(--brand-dark); cursor: pointer; text-decoration: none; border-radius: 6px; }
.linkbtn:hover { background: var(--brand-tint); color: var(--brand-dark); }
.linkbtn--danger { color: var(--tomato); }
.linkbtn--danger:hover { background: #FCEDEA; color: var(--tomato); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge--on { background: #DDF1E3; color: var(--ok); }
.badge--off { background: var(--mist); color: var(--ink-soft); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.help { color: var(--ink-soft); font-size: 14px; }
.field__label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }

/* Carrusel de banners (scroll-snap; funciona sin JavaScript) */
.carousel { position: relative; }
.carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; border-radius: 18px; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; position: relative; }
.carousel__slide a { display: block; color: inherit; }
.carousel__slide img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.carousel__slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 18px; background: linear-gradient(transparent, rgba(22, 39, 29, .82)); color: #fff; display: grid; gap: 2px; }
.carousel__slide figcaption strong { font-size: 22px; line-height: 1.15; }
.carousel__slide figcaption span { font-size: 15px; opacity: .9; }
.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.carousel__dots a { width: 10px; height: 10px; border-radius: 50%; background: var(--line, #D5DED8); }
.carousel__dots a[aria-current="true"] { background: var(--brand); width: 26px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .carousel__track { scroll-behavior: auto; } }

/* Logo configurable (partials/logo.php) */
.logo { display: inline-flex; align-items: center; }
.logo img { display: block; width: auto; height: auto; object-fit: contain; }
.logo--chip { background: #fff; border-radius: 10px; padding: 5px 10px; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.logo--header img { height: var(--logo-h, 46px); max-width: calc(var(--logo-h, 46px) * 5); }
.logo--chip.logo--header img { height: calc(var(--logo-h, 46px) - 10px); }
.logo--footer img { height: calc(var(--logo-h, 46px) * 1.1); max-width: calc(var(--logo-h, 46px) * 5); }
.logo--auth img { height: calc(var(--logo-h, 46px) * 1.35); max-width: min(100%, calc(var(--logo-h, 46px) * 6)); }
.logo--sidebar img { height: var(--admin-logo-h, min(var(--logo-h, 46px), 64px)); max-width: 220px; }
.logo--chip.logo--sidebar img { height: calc(var(--admin-logo-h, min(var(--logo-h, 46px), 64px)) - 10px); }
.brand__mark { width: var(--logo-h, 42px); height: var(--logo-h, 42px); font-size: calc(var(--logo-h, 42px) * .55); }
.auth__brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--ink); text-decoration: none; }
.auth__brand .brand__name { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.store--minimal .auth { align-content: center; justify-items: center; }
.footer__brand .logo { margin-bottom: 4px; }
@media (max-width: 560px) { .logo--header img { height: min(var(--logo-h, 46px), 56px); max-width: 190px; } .logo--chip.logo--header img { height: min(calc(var(--logo-h, 46px) - 10px), 46px); } .masthead .brand__mark { width: min(var(--logo-h, 42px), 42px); height: min(var(--logo-h, 42px), 42px); font-size: 22px; } }

/* Precio por unidad de medida (contenido neto) */
.product__per { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.product__per--large { font-size: 15px; margin-top: 6px; }

/* Slider de banners de ancho completo (100 % × --slider-h, 300 px por defecto) */
.slider { position: relative; background: var(--mist); }
.slider__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; height: var(--slider-h, 300px); }
.slider__track::-webkit-scrollbar { display: none; }
.slider__slide { position: relative; flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: start; }
.slider__slide a { display: block; height: 100%; color: inherit; }
.slider__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slider__caption { position: absolute; inset: auto 0 0 0; padding: 48px 0 22px; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); color: #fff; }
.slider__caption .wrap { display: grid; gap: 2px; }
.slider__caption strong { font-size: clamp(20px, 2.6vw, 32px); line-height: 1.1; letter-spacing: -0.01em; }
.slider__caption span span, .slider__caption .wrap > span { font-size: clamp(14px, 1.4vw, 17px); opacity: .92; }
.slider__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .45); }
.slider__arrow:hover { background: #fff; color: var(--brand-dark); }
.slider__arrow:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.slider__arrow--prev { left: max(12px, calc((100% - var(--wrap)) / 2 - 56px)); }
.slider__arrow--next { right: max(12px, calc((100% - var(--wrap)) / 2 - 56px)); }
.slider__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 8px; }
.slider__dots a { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.slider__dots a[aria-current="true"] { background: #fff; width: 26px; border-radius: 6px; }
@media (max-width: 760px) {
  .slider__track { height: min(var(--slider-h, 300px), 46vw); }
  .slider__arrow { display: none; }
  .slider__caption { padding: 28px 0 26px; }
}
@media (prefers-reduced-motion: reduce) { .slider__track { scroll-behavior: auto; } }
.hero__inner--solo { grid-template-columns: 1fr; }
.textblock { max-width: 760px; }
.prose h2 { font-size: 24px; margin: 22px 0 8px; }
.prose h3 { font-size: 19px; margin: 18px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; line-height: 1.65; }
.prose a { font-weight: 600; }
.page-content { max-width: 780px; }
.page-content__updated { margin-top: 28px; font-size: 14px; color: var(--ink-faint); }

/* Ubicación GPS del cliente */
.gps-block { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.gps-block__title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-weight: 700; }
.gps__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn--sm { min-height: 38px; padding: 6px 14px; font-size: 15px; }
.gps__map, .cloc__map { width: 100%; height: 220px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; background: var(--mist); }
.live-share { margin-bottom: 16px; border-color: var(--brand); }
.live-share__head { display: flex; gap: 14px; align-items: flex-start; }
.live-share__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-dark); flex: none; }
.live-share__status { margin: 8px 0 0; font-weight: 600; color: var(--brand-dark); }

/* Tarjeta de puntos */
.card-page { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .card-page { grid-template-columns: 1fr; } }
.lcard { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); max-width: 400px; }
.lcard__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; }
.lcard__brand { font-weight: 800; font-size: 18px; }
.lcard__brand img { height: 34px; width: auto; max-width: 170px; background: #fff; border-radius: 8px; padding: 3px 8px; display: block; }
.lcard__program { font-size: 13px; font-weight: 700; background: var(--accent); color: var(--ink); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.lcard__codes { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; padding: 18px 20px 6px; }
.lcard__qr svg { display: block; width: 100%; height: auto; }
.lcard__label { margin: 0; font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.lcard__points { margin: 0; font-size: 44px; line-height: 1; font-weight: 800; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.lcard__name { margin: 8px 0 0; font-weight: 600; }
.lcard__barcode { padding: 8px 20px 0; }
.lcard__barcode svg { display: block; width: 100%; height: 64px; }
.lcard__number { margin: 4px 0 0; padding: 0 20px 16px; text-align: center; font: 600 17px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; }
.lcard.is-inactive .lcard__codes, .lcard.is-inactive .lcard__barcode { opacity: .25; filter: grayscale(1); }
.lcard__inactive { margin: 0; padding: 12px 20px; background: #FCE1DB; color: var(--tomato); font-weight: 700; }
.lcard--large { max-width: 520px; margin: 0 auto; }
.lcard--large .lcard__codes { grid-template-columns: 220px 1fr; }
.lcard--large .lcard__barcode svg { height: 90px; }
.lcard-full { display: grid; gap: 16px; justify-items: center; text-align: center; padding: 8px; }
.howto-list { margin: 0 0 10px; padding-left: 20px; line-height: 1.6; }
.howto-list li { margin-bottom: 6px; }
.points-history { list-style: none; margin: 0; padding: 0; }
.points-history li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.points-history__pts { font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums; white-space: nowrap; }
.points-history__pts.is-neg { color: var(--tomato); }
.points-summary { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; background: var(--brand-tint); color: var(--ink); text-decoration: none; border: 1.5px solid transparent; }
.points-summary:hover { border-color: var(--brand); color: var(--ink); }
.points-summary strong { display: block; font-size: 20px; }
.points-summary small { color: var(--ink-soft); }
.points-summary__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--ink); flex: none; }
.points-summary.is-inactive { background: #FCEDEA; }
@media print {
  .masthead, .servicebar, .footer, .account-nav, .tabbar, .card-page > div:last-child, .form-actions, .listing__title, .aisles-nav { display: none !important; }
  .lcard { box-shadow: none; border: 1px solid #000; }
}
.lcard--large { width: 100%; max-width: 520px; }
.lcard--large .lcard__codes { grid-template-columns: minmax(0, 210px) minmax(0, 1fr); }
@media (max-width: 480px) { .lcard--large .lcard__codes { grid-template-columns: minmax(0, 1fr) auto; } .lcard__codes { grid-template-columns: minmax(0, 130px) minmax(0, 1fr); } .lcard__points { font-size: 36px; } }
.store--minimal .auth__card:has(.lcard-full) { width: min(100%, 560px); padding: 16px; }
.slider__slide picture { display: block; width: 100%; height: 100%; }
@media (max-width: 760px) { .slider--mobile-art .slider__track { height: 50vw; } }

/* Pasillos: círculos y tarjetas con imagen */
.aisle-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px 16px; }
.aisle-grid--circles { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.aisle-grid--cards { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.aisle-tile { display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--ink); text-decoration: none; }
.aisle-tile__media { display: grid; place-items: center; overflow: hidden; background: var(--brand-tint); transition: transform .2s ease, box-shadow .2s ease; }
.aisle-grid--circles .aisle-tile__media { width: 112px; height: 112px; border-radius: 50%; box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--brand-tint); }
.aisle-grid--cards .aisle-tile__media { width: 100%; aspect-ratio: 1; border-radius: 16px; }
.aisle-tile__media img { width: 100%; height: 100%; object-fit: cover; }
.aisle-tile__icon { font-size: 48px; line-height: 1; }
.aisle-grid--cards .aisle-tile__icon { font-size: 64px; }
.aisle-tile__icon--letter { font-size: 40px; font-weight: 800; color: var(--brand-dark); }
.aisle-tile__name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.aisle-tile:hover .aisle-tile__media { transform: translateY(-3px); box-shadow: 0 10px 20px -12px rgba(0,0,0,.35), 0 0 0 3px var(--brand); }
.aisle-tile:hover { color: var(--brand-dark); }
.aisle-tile:focus-visible { outline: none; }
.aisle-tile:focus-visible .aisle-tile__media { box-shadow: 0 0 0 4px var(--accent); }
@media (max-width: 560px) {
  .aisle-grid--circles { grid-template-columns: repeat(3, 1fr); gap: 16px 10px; }
  .aisle-grid--circles .aisle-tile__media { width: 86px; height: 86px; }
  .aisle-tile__icon { font-size: 38px; }
  .aisle-grid--cards { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .aisle-tile__media { transition: none; } }

/* Pie de página editable: imagen propia con tamaño. */
.footer__image { display: inline-flex; align-items: center; max-width: 100%; }
.footer__image img { display: block; width: auto; max-width: 100%; object-fit: contain; }
.footer__image--chip { background: #fff; padding: 8px 12px; border-radius: 12px; }
@media (max-width: 520px) { .footer__image img { max-height: 120px; } }

/* Filas de widgets de la portada */
.widget-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.widget-cell { grid-column: span var(--span, 12); container-type: inline-size; min-width: 0; }
.widget-image { margin: 0; position: relative; height: var(--h, 300px); border-radius: 18px; overflow: hidden; background: var(--mist); }
.widget-image a { display: block; height: 100%; }
.widget-image img { width: 100%; height: 100%; display: block; }
.widget-image figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.62); color: #fff; padding: 6px 12px; border-radius: 10px; font-weight: 700; }
.widget-products { height: 100%; }
.widget-products__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.widget-products__title { font-size: 20px; margin: 0; }
.widget-products__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@container (max-width: 340px) { .widget-products__grid { grid-template-columns: 1fr 1fr; } }
.widget-text { height: 100%; border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; justify-content: center; align-items: flex-start; }
.widget-text .prose > :last-child { margin-bottom: 0; }
.widget-text__title { font-size: 22px; margin: 0; }
.widget-text--plain { padding: 8px 0; }
.widget-text--soft { background: var(--brand-tint); }
.widget-text--brand { background: var(--brand); color: #fff; }
.widget-text--brand a:not(.btn) { color: #fff; text-decoration: underline; }
.btn--light { background: #fff; color: var(--brand-dark); }
.btn--light:hover { background: var(--mist); }
@media (max-width: 760px) {
  .widget-row { grid-template-columns: 1fr; gap: 14px; }
  .widget-cell { grid-column: 1 / -1; }
  .widget-cell--empty { display: none; }
  .widget-image { height: min(var(--h, 300px), 62vw); }
}

/* Actualización en vivo de pedidos */
.live-notice { position: fixed; z-index: 60; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 12px; align-items: center; background: var(--ink); color: #fff; padding: 10px 12px 10px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); font-weight: 600; }
.is-updated { animation: liveflash 2.4s ease-out; }
@keyframes liveflash { 0% { background-color: color-mix(in srgb, var(--accent) 35%, transparent); } 100% { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .is-updated { animation: none; } }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok, #1a7f45); }

/* Apariencia personalizada (Configuración → Apariencia) */
body.store { background: var(--page-bg, var(--paper)); color: var(--text-color, var(--ink)); }
body.store main :is(h1, h2) { color: var(--heading-color, inherit); }
.aisles-nav a.is-current { background: color-mix(in srgb, var(--nav-text, var(--brand)) 12%, transparent); color: var(--nav-text, var(--brand-dark)); }

/* Colores de fondo de filas y columnas de widgets */
.section--widgets-bg { background: var(--row-bg); color: var(--row-text); padding: 36px 0; margin: 24px 0; }
.section--widgets-bg .section__title { color: var(--row-text); }
.widget-cell--bg .widget-text { background: var(--cell-bg); color: var(--cell-text); }
.widget-cell--bg .widget-text a:not(.btn) { color: inherit; text-decoration: underline; }
.widget-cell--bg .widget-products { background: var(--cell-bg); color: var(--cell-text); border-radius: 18px; padding: 16px; }
.widget-cell--bg .widget-products__head .linkbtn { color: inherit; }
.widget-cell--bg .widget-image { background: var(--cell-bg); }
.widget-row .product { color: var(--text-color, var(--ink)); }

/* Total del carrito en el encabezado */
.cart-total { font-weight: 800; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 2px; }
@media (max-width: 860px) {
  .masthead__inner > :first-child { min-width: 0; }
  .masthead__actions { gap: 2px; }
  .action { padding: 8px 6px; }
  /* El contador va sobre el icono para dejar sitio al total. */
  .action--cart .cart-count { position: absolute; top: 1px; left: 20px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }
  .cart-total { font-size: 14px; padding-left: 4px; }
}
@media (max-width: 420px) { .logo--header img { max-width: 140px; } .cart-total { font-size: 13px; } }
@media (max-width: 330px) { .cart-total { display: none; } }

/* Imágenes de widgets completas (sin recortes) y slider de widget */
.widget-image--natural { height: auto; background: transparent; }
.widget-image--natural img { width: 100%; height: auto; }
.widget-image--contain img { object-fit: contain; }
.widget-image--cover img { object-fit: cover; }
.widget-cell--bg .widget-image--natural { background: var(--cell-bg); }
.wslider { position: relative; border-radius: 18px; overflow: hidden; background: var(--cell-bg, var(--mist)); }
.wslider .slider__track { height: var(--h, 300px); }
.wslider--natural .slider__track { height: auto; aspect-ratio: var(--ratio, 16 / 9); }
.wslider .slider__slide img { width: 100%; height: 100%; object-fit: contain; }
.wslider--cover .slider__slide img { object-fit: cover; }
.wslider .slider__arrow--prev { left: 10px; }
.wslider .slider__arrow--next { right: 10px; }
.wslider .slider__arrow { width: 38px; height: 38px; }
@media (max-width: 760px) {
  .widget-image--natural { height: auto; }
  .wslider:not(.wslider--natural) .slider__track { height: min(var(--h, 300px), 62vw); }
  .wslider--natural .slider__track { height: auto; }
}

/* Cuadro de cantidad al agregar al carrito */
.product { scroll-margin-top: 150px; }
.qty-dialog { border: 0; border-radius: 20px; padding: 0; width: min(420px, calc(100vw - 32px)); box-shadow: 0 24px 60px -20px rgba(0,0,0,.45); color: var(--ink); }
.qty-dialog::backdrop { background: rgba(10, 20, 15, .48); }
.qty-dialog__box { display: grid; gap: 14px; padding: 22px; margin: 0; }
.qty-dialog__product { display: flex; gap: 14px; align-items: center; }
.qty-dialog__product img { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; background: var(--mist); flex: none; }
.qty-dialog__title { font-size: 18px; margin: 0 0 4px; line-height: 1.25; }
.qty-dialog__price { margin: 0; font-weight: 800; color: var(--brand-dark); }
.qty-dialog__label { font-weight: 700; }
.qty-stepper { display: grid; grid-template-columns: 56px 1fr 56px; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.qty-stepper__btn { border: 0; background: var(--mist); font: 800 26px/1 var(--font); color: var(--brand-dark); cursor: pointer; min-height: 56px; }
.qty-stepper__btn:hover { background: var(--brand-tint); }
.qty-stepper input { border: 0; text-align: center; font: 800 24px var(--font); min-width: 0; color: var(--ink); -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--brand) 40%, transparent); }
.qty-dialog__error { margin: 0; color: var(--tomato); font-weight: 600; }
.qty-dialog__actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.qty-dialog__actions .btn { justify-content: center; min-height: 50px; }
@media (max-width: 560px) { .qty-dialog { margin: auto auto 0; border-radius: 20px 20px 0 0; width: 100vw; max-width: 100vw; } .qty-dialog__box { padding-bottom: calc(22px + env(safe-area-inset-bottom)); } }

/* Descripción corta del producto */
.product__short { margin: -4px 0 10px; font-size: 13px; line-height: 1.4; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pdp__short { margin: 0 0 12px; font-size: 17px; line-height: 1.5; color: var(--ink-soft); max-width: 56ch; }

/* Pie: contacto y redes sociales debajo del logo */
.footer__contact { margin: 4px 0 16px; }
.footer__social { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.footer__social a { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; text-decoration: none; transition: background .15s ease, color .15s ease, transform .15s ease; }
.footer__social--circle a { border-radius: 50%; background: rgba(255,255,255,.12); }
.footer__social--square a { border-radius: 10px; background: rgba(255,255,255,.12); }
.footer__social--plain a { width: 32px; }
.footer__social a:hover, .footer__social a:focus-visible { background: var(--accent); color: var(--ink); transform: translateY(-2px); }
.footer__social--plain a:hover { background: transparent; color: var(--accent); }
.social-icon { display: block; }
@media (prefers-reduced-motion: reduce) { .footer__social a { transition: none; } }

/* Boletín (newsletter) */
.btn--accent { background: var(--accent); color: var(--ink); border-color: transparent; }
.btn--accent:hover { filter: brightness(1.05); color: var(--ink); }
.footer__newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer__newsletter-title { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 22px; margin: 0 0 6px; }
.footer__newsletter-copy p { margin: 0; }
.nl-form { display: grid; gap: 10px; }
.nl-form__row { display: flex; background: #fff; border-radius: 999px; padding: 5px; gap: 6px; }
.nl-form__row input { flex: 1; min-width: 0; border: 0; padding: 0 16px; font: 16px var(--font); color: var(--ink); background: transparent; border-radius: 999px; }
.nl-form__row input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.nl-form__row .btn { border-radius: 999px; white-space: nowrap; }
.nl-form__consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.nl-form__consent input { margin-top: 2px; accent-color: var(--accent); }
.nl-form__msg { margin: 0; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.nl-form__msg.is-ok { background: rgba(255,255,255,.14); color: #fff; }
.nl-form__msg.is-error { background: #FCE1DB; color: var(--tomato); }
.newsletter-page { max-width: 640px; }
.newsletter-page__form { margin-top: 32px; padding: 24px; border-radius: 18px; background: var(--ink); color: rgba(255,255,255,.86); }
.newsletter-page__form .section__title { color: #fff; }
@media (max-width: 760px) { .footer__newsletter { grid-template-columns: 1fr; } .nl-form__row { flex-direction: column; border-radius: 16px; } .nl-form__row input { min-height: 46px; } }

/* Chat flotante */
.chatw { position: fixed; right: 18px; bottom: 18px; z-index: 45; font-size: 15px; }
.chatw__fab { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 14px 20px 14px 16px; background: var(--brand); color: #fff; font: 700 16px var(--font); cursor: pointer; box-shadow: 0 12px 28px -10px rgba(0,0,0,.45); }
.chatw__fab:hover { background: var(--brand-dark); }
.chatw__fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.chatw.is-open .chatw__fab-label { display: none; }
.chatw__badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 999px; background: var(--tomato); color: #fff; font: 800 12px/22px var(--font); text-align: center; padding: 0 6px; }
.chatw__panel { position: absolute; right: 0; bottom: 70px; width: min(380px, calc(100vw - 24px)); height: min(600px, calc(100vh - 120px)); background: #fff; border-radius: 20px; box-shadow: 0 24px 60px -18px rgba(0,0,0,.45); display: flex; flex-direction: column; overflow: hidden; color: var(--ink); }
.chatw__panel[hidden] { display: none; }
.chatw__head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: var(--brand); color: #fff; }
.chatw__avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.18); flex: none; }
.chatw__headtext { flex: 1; min-width: 0; }
.chatw__head h2 { margin: 0; font-size: 17px; color: #fff; }
.chatw__head p { margin: 0; font-size: 12.5px; opacity: .88; }
.chatw__close { border: 0; background: rgba(255,255,255,.14); color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.chatw__log { list-style: none; margin: 0; padding: 14px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: var(--mist); }
.chatw__msg { max-width: 86%; padding: 9px 12px; border-radius: 16px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.05); white-space: pre-line; overflow-wrap: anywhere; line-height: 1.45; }
.chatw__msg--customer { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.chatw__msg--customer a { color: #fff; }
.chatw__msg--ai, .chatw__msg--staff { align-self: flex-start; border-bottom-left-radius: 4px; }
.chatw__msg--staff { background: var(--accent-tint); }
.chatw__msg--system { align-self: center; background: transparent; box-shadow: none; font-size: 13px; color: var(--ink-soft); text-align: center; max-width: 100%; }
.chatw__who { display: block; font-size: 11.5px; font-weight: 700; color: var(--brand-dark); margin-bottom: 2px; }
.chatw__time { display: block; font-size: 11px; opacity: .65; margin-top: 3px; text-align: right; }
.chatw__typing { display: flex; gap: 4px; padding: 0 16px 8px; background: var(--mist); }
.chatw__typing[hidden] { display: none; }
.chatw__typing span:not(.sr-only) { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); animation: chatdot 1s infinite ease-in-out; }
.chatw__typing span:nth-child(2) { animation-delay: .15s; } .chatw__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chatw__quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.chatw__quick[hidden] { display: none; }
.chatw__chip { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 600 13px var(--font); color: var(--brand-dark); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.chatw__chip:hover { border-color: var(--brand); }
.chatw__chip--human { background: var(--accent-tint); border-color: transparent; color: var(--ink); }
.chatw__chip[hidden] { display: none; }
.chatw__human { display: grid; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.chatw__human[hidden] { display: none; }
.chatw__human p { margin: 0; }
.chatw__human input { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 15px var(--font); }
.chatw__human-actions { display: flex; gap: 8px; justify-content: flex-end; }
.chatw__form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.chatw__form textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; font: 15px/1.35 var(--font); max-height: 120px; color: var(--ink); }
.chatw__form textarea:focus { outline: none; border-color: var(--brand); }
.chatw__send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chatw__wa { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 8px; font-size: 13px; font-weight: 600; border-top: 1px solid var(--line); text-decoration: none; }
@media (max-width: 760px) {
  .chatw { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .chatw__fab { padding: 13px; }
  .chatw__fab-label { display: none; }
  .chatw__panel { position: fixed; inset: auto 0 0 0; width: 100vw; height: min(86vh, 640px); border-radius: 20px 20px 0 0; bottom: 0; }
  .chatw.is-open .chatw__fab { display: none; }
}
@media (prefers-reduced-motion: reduce) { .chatw__typing span { animation: none; } }
@media print { .chatw { display: none !important; } }
