@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* Paleta Yayer */
  --color-primary: #ff6a3d;
  --color-primary-dark: #e2551f;
  --color-primary-soft: #ffe3d5;
  --color-beige: #f6ede0;
  --color-beige-dark: #ecdcc3;
  --color-beige-deep: #e3cca6;
  --color-white: #ffffff;
  --color-ink: #2b2118;
  --color-ink-soft: #8a7c6b;
  --color-success: #2fa66a;
  --color-success-soft: #e3f6ea;
  --color-danger: #e0483f;
  --color-danger-soft: #fdeae8;

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 22px;
  --radius-pill: 999px;

  --shadow-card: 0 2px 10px rgba(43, 33, 24, 0.06), 0 1px 2px rgba(43, 33, 24, 0.05);
  --shadow-float: 0 10px 26px rgba(255, 106, 61, 0.28);
  --shadow-sheet: 0 -8px 30px rgba(43, 33, 24, 0.14);

  --nav-h: 64px;
  --app-max: 480px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-beige-dark);
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.icon { width: 22px; height: 22px; flex-shrink: 0; }
.icon-sm { width: 17px; height: 17px; }
.icon-lg { width: 30px; height: 30px; }

/* ===== Shell móvil ===== */
.app-shell {
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--color-beige);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.08);
}
@media (min-width: 560px) {
  body { background: linear-gradient(180deg, #fff2e8, var(--color-beige-dark)); padding: 24px 0; }
  .app-shell { min-height: calc(100vh - 48px); border-radius: 28px; overflow: hidden; }
}

.screen {
  flex: 1;
  display: none;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + 18px);
  animation: screenIn 0.22s ease;
}
.screen.active { display: flex; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.screen.no-nav { padding-bottom: 18px; }

/* ===== Topbar ===== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--color-beige);
  padding: 14px 18px 10px;
  display: flex; align-items: center; gap: 12px;
}
.topbar-title { font-size: 19px; font-weight: 800; flex: 1; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  border: none; background: var(--color-white); color: var(--color-ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; box-shadow: var(--shadow-card);
  transition: transform 0.15s ease;
}
.icon-btn:active { transform: scale(0.9); }
.badge {
  position: absolute; top: -3px; right: -3px;
  background: var(--color-primary); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 17px; height: 17px;
  border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 2px solid var(--color-beige);
}

/* ===== Header de marca ===== */
.brand-header { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark .icon { width: 19px; height: 19px; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }

/* ===== Contenido ===== */
.content { padding: 0 18px; display: flex; flex-direction: column; gap: 20px; }

/* ===== Buscador ===== */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--color-white); border-radius: var(--radius-pill);
  padding: 11px 16px; box-shadow: var(--shadow-card);
}
.search-bar input {
  border: none; outline: none; background: transparent; flex: 1;
  font-size: 14.5px; color: var(--color-ink); font-family: var(--font-body);
}
.search-bar input::placeholder { color: var(--color-ink-soft); }
.search-bar .icon { color: var(--color-ink-soft); }

/* ===== Categorías (chips scroll) ===== */
.cat-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 18px 4px; margin: 0 -18px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 68px; cursor: pointer; border: none; background: none; padding: 0;
}
.cat-chip-thumb {
  width: 60px; height: 60px; border-radius: 18px; overflow: hidden;
  background: var(--color-primary-soft); box-shadow: var(--shadow-card);
  border: 2px solid transparent; display: flex; align-items: center; justify-content: center;
}
.cat-chip-thumb .icon { color: var(--color-primary-dark); width: 28px; height: 28px; }
.cat-chip.active .cat-chip-thumb { border-color: var(--color-primary); }
.cat-chip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-chip-label { font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.15; color: var(--color-ink); }

/* ===== Section header ===== */
.section-head { display: flex; align-items: center; justify-content: space-between; }
.section-head h3 { font-size: 16px; font-weight: 800; }
.link-more { font-size: 12.5px; font-weight: 700; color: var(--color-primary-dark); display: flex; align-items: center; gap: 2px; background: none; border: none; cursor: pointer; }

/* ===== Mejores precios (comparativa) ===== */
.compare-card { background: var(--color-white); border-radius: var(--radius-m); padding: 14px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 10px; }
.compare-head { display: flex; gap: 10px; align-items: center; }
.compare-thumb { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; background: var(--color-beige-dark); flex-shrink: 0; }
.compare-thumb img { width: 100%; height: 100%; object-fit: cover; }
.compare-title { font-size: 13px; font-weight: 800; line-height: 1.2; }
.compare-brand { font-size: 11px; color: var(--color-ink-soft); font-weight: 600; }
.compare-rows { display: flex; flex-direction: column; gap: 6px; }
.compare-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: var(--radius-s); background: var(--color-beige); cursor: pointer; }
.compare-row.best { background: var(--color-success-soft); }
.compare-row-store { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.compare-badge { font-size: 9.5px; font-weight: 800; text-transform: uppercase; background: var(--color-success); color: #fff; padding: 2px 6px; border-radius: var(--radius-pill); }
.compare-row-price { font-size: 14px; font-weight: 800; }
.compare-row.best .compare-row-price { color: var(--color-success); }
.compare-save { font-size: 11px; color: var(--color-success); font-weight: 700; text-align: center; }
.home-compare-preview { display: flex; flex-direction: column; gap: 8px; }

/* ===== Tarjetas de descuento (scroll horizontal) ===== */
.deal-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 18px 6px; margin: 0 -18px; scrollbar-width: none; }
.deal-scroll::-webkit-scrollbar { display: none; }
.deal-card { flex-shrink: 0; width: 150px; background: var(--color-white); border-radius: var(--radius-m); box-shadow: var(--shadow-card); overflow: hidden; cursor: pointer; }
.deal-card-thumb { position: relative; aspect-ratio: 1.3/1; background: var(--color-beige-dark); }
.deal-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.deal-card-badge { position: absolute; top: 7px; left: 7px; background: var(--color-danger); color: #fff; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px; }
.deal-card-info { padding: 8px 10px 10px; }
.deal-card-name { font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.deal-card-price-row { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; }
.deal-card-price { font-size: 13.5px; font-weight: 800; color: var(--color-primary-dark); }
.deal-card-old { font-size: 10px; color: var(--color-ink-soft); text-decoration: line-through; }

/* ===== Grid de productos compacta ===== */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.product-card {
  background: var(--color-white); border-radius: var(--radius-m);
  box-shadow: var(--shadow-card); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; transition: transform 0.15s ease;
  position: relative;
}
.product-card:active { transform: scale(0.97); }
.product-thumb { position: relative; aspect-ratio: 1.15/1; background: var(--color-beige-dark); overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-discount {
  position: absolute; top: 7px; left: 7px; background: var(--color-danger); color: #fff;
  font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 6px;
}
.product-add {
  position: absolute; bottom: 7px; right: 7px; width: 30px; height: 30px;
  border-radius: var(--radius-pill); background: var(--color-primary); color: #fff;
  border: none; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(255,106,61,0.4); cursor: pointer;
}
.product-add .icon { width: 16px; height: 16px; }
.product-add:active { transform: scale(0.85); }
.product-info { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 2px; }
.product-name { font-size: 12.8px; font-weight: 700; line-height: 1.25; }
.product-unit { font-size: 10.5px; color: var(--color-ink-soft); }
.product-price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 3px; }
.product-price { font-size: 14.5px; font-weight: 800; color: var(--color-primary-dark); }
.product-old-price { font-size: 11px; color: var(--color-ink-soft); text-decoration: line-through; }
.product-outstock { position: absolute; inset: 0; background: rgba(255,255,255,0.72); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--color-ink-soft); }

/* ===== Bottom nav ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--app-max);
  background: var(--color-white); border-top: 1px solid rgba(43,33,24,0.06);
  display: flex; height: var(--nav-h); z-index: 30;
  box-shadow: 0 -4px 18px rgba(43,33,24,0.06);
}
.nav-btn {
  flex: 1; border: none; background: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; color: var(--color-ink-soft);
  cursor: pointer; position: relative;
}
.nav-btn .icon { width: 21px; height: 21px; }
.nav-btn span { font-size: 10px; font-weight: 700; }
.nav-btn.active { color: var(--color-primary-dark); }
.nav-btn .badge { top: 2px; right: 20%; }

/* ===== Botones ===== */
.btn {
  border: none; border-radius: var(--radius-pill); font-weight: 800;
  font-family: var(--font-display); cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 8px; transition: transform 0.12s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; pointer-events: none; }
.btn-primary { background: var(--color-primary); color: #fff; padding: 15px; font-size: 15px; width: 100%; box-shadow: var(--shadow-float); }
.btn-secondary { background: var(--color-white); color: var(--color-ink); padding: 14px; font-size: 14.5px; width: 100%; box-shadow: var(--shadow-card); }
.btn-outline { background: transparent; border: 1.6px solid var(--color-beige-deep); color: var(--color-ink); padding: 13px; font-size: 14px; width: 100%; }
.btn-danger-outline { background: var(--color-danger-soft); color: var(--color-danger); padding: 13px; font-size: 13.5px; width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 12.5px; width: auto; }

/* ===== Formularios ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--color-ink-soft); }
.field input, .field textarea, .field select {
  border: 1.6px solid var(--color-beige-deep); background: var(--color-white);
  border-radius: var(--radius-s); padding: 13px 14px; font-size: 14.5px;
  font-family: var(--font-body); color: var(--color-ink); outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--color-primary); }
.field-pass-wrap { position: relative; }
.field-pass-wrap input { width: 100%; padding-right: 42px; }
.field-pass-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--color-ink-soft); cursor: pointer; }

/* ===== Splash ===== */
.splash-screen {
  min-height: 100vh; background: linear-gradient(160deg, var(--color-primary) 0%, #ff8b5c 60%, #ffb385 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; gap: 14px;
}
.splash-mark {
  width: 84px; height: 84px; border-radius: 24px; background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center; animation: splashPop 0.7s ease;
}
.splash-mark .icon { width: 46px; height: 46px; }
@keyframes splashPop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.splash-word { font-family: var(--font-display); font-weight: 800; font-size: 32px; letter-spacing: -0.02em; }
.splash-tag { font-size: 13px; opacity: 0.9; letter-spacing: 0.02em; }
.splash-loader { width: 30px; height: 30px; margin-top: 18px; }
.splash-loader .icon { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Auth ===== */
.auth-screen { padding: 32px 24px; gap: 22px; }
.auth-head { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.auth-head h2 { font-size: 23px; font-weight: 800; }
.auth-head p { font-size: 13.5px; color: var(--color-ink-soft); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--color-ink-soft); }
.auth-switch button { background: none; border: none; color: var(--color-primary-dark); font-weight: 800; cursor: pointer; font-size: 13px; }
.role-toggle { display: flex; gap: 8px; background: var(--color-beige-dark); padding: 4px; border-radius: var(--radius-pill); }
.role-toggle button { flex: 1; border: none; background: none; padding: 9px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700; color: var(--color-ink-soft); cursor: pointer; }
.role-toggle button.active { background: var(--color-white); color: var(--color-ink); box-shadow: var(--shadow-card); }

/* ===== Producto detalle ===== */
.detail-hero { aspect-ratio: 1/0.85; background: var(--color-beige-dark); position: relative; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .icon-btn { position: absolute; top: 14px; left: 14px; }
.detail-sheet { background: var(--color-white); border-radius: 26px 26px 0 0; margin-top: -22px; padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.detail-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.detail-title-row h2 { font-size: 20px; font-weight: 800; }
.detail-price { font-size: 21px; font-weight: 800; color: var(--color-primary-dark); white-space: nowrap; }
.detail-desc { font-size: 13.5px; line-height: 1.55; color: var(--color-ink-soft); }
.qty-row { display: flex; align-items: center; justify-content: space-between; }
.qty-stepper { display: flex; align-items: center; gap: 14px; background: var(--color-beige); border-radius: var(--radius-pill); padding: 6px 8px; }
.qty-stepper button { width: 32px; height: 32px; border-radius: var(--radius-pill); border: none; background: var(--color-white); box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.qty-stepper span { font-weight: 800; min-width: 18px; text-align: center; font-size: 15px; }
.detail-sticky-cta { position: sticky; bottom: 0; background: var(--color-white); padding-top: 4px; }

/* ===== Carrito ===== */
.cart-item { display: flex; gap: 12px; background: var(--color-white); border-radius: var(--radius-m); padding: 10px; box-shadow: var(--shadow-card); align-items: center; }
.cart-item-thumb { width: 58px; height: 58px; border-radius: 12px; overflow: hidden; background: var(--color-beige-dark); flex-shrink: 0; }
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 700; }
.cart-item-price { font-size: 12.5px; color: var(--color-primary-dark); font-weight: 800; }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mini-stepper { display: flex; align-items: center; gap: 8px; background: var(--color-beige); border-radius: var(--radius-pill); padding: 4px 6px; }
.mini-stepper button { width: 24px; height: 24px; border-radius: var(--radius-pill); border: none; background: var(--color-white); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-card); }
.mini-stepper span { font-weight: 800; font-size: 13px; min-width: 14px; text-align: center; }
.icon-remove { background: none; border: none; color: var(--color-ink-soft); cursor: pointer; padding: 2px; }

.summary-card { background: var(--color-white); border-radius: var(--radius-m); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-card); }
.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--color-ink-soft); }
.summary-row.total { font-size: 16px; font-weight: 800; color: var(--color-ink); padding-top: 8px; border-top: 1px dashed var(--color-beige-deep); }
.cart-footer { position: sticky; bottom: 0; background: var(--color-beige); padding-top: 10px; margin-top: auto; }

/* ===== Checkout ===== */
.check-card { background: var(--color-white); border-radius: var(--radius-m); padding: 16px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 12px; }
.check-card h4 { font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.pay-option { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius-s); border: 1.6px solid var(--color-beige-deep); cursor: pointer; }
.pay-option.selected { border-color: var(--color-primary); background: var(--color-primary-soft); }
.pay-option span { font-size: 13px; font-weight: 600; flex: 1; }
.order-mini-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 0; }

/* ===== Confirmación ===== */
.confirm-screen { align-items: center; text-align: center; padding: 40px 26px; gap: 16px; justify-content: center; flex: 1; }
.confirm-icon { width: 90px; height: 90px; border-radius: 50%; background: var(--color-success-soft); color: var(--color-success); display: flex; align-items: center; justify-content: center; animation: popIn 0.4s ease; }
.confirm-icon .icon { width: 46px; height: 46px; }
@keyframes popIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm-code { background: var(--color-beige); padding: 10px 18px; border-radius: var(--radius-pill); font-weight: 800; letter-spacing: 0.04em; font-size: 14px; }

/* ===== Pedidos / tracking ===== */
.order-card { background: var(--color-white); border-radius: var(--radius-m); padding: 14px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.order-card-top { display: flex; justify-content: space-between; align-items: center; }
.order-code { font-size: 13px; font-weight: 800; }
.order-date { font-size: 11px; color: var(--color-ink-soft); }
.status-pill { font-size: 10.5px; font-weight: 800; padding: 5px 10px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 0.03em; }
.status-nuevo { background: #fdeee3; color: #c05a1e; }
.status-confirmado { background: #e7ecfd; color: #3454d1; }
.status-preparando { background: #fff3d6; color: #b8790a; }
.status-listo { background: #e3f6ea; color: #2fa66a; }
.status-en_camino { background: #e3f0fd; color: #2a7fd6; }
.status-entregado { background: #e3f6ea; color: #217a4d; }
.status-cancelado { background: var(--color-danger-soft); color: var(--color-danger); }
.order-items-preview { font-size: 12px; color: var(--color-ink-soft); }
.order-card-bottom { display: flex; justify-content: space-between; align-items: center; }
.order-total { font-weight: 800; font-size: 14px; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-step { display: flex; gap: 12px; }
.timeline-dot-col { display: flex; flex-direction: column; align-items: center; }
.timeline-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--color-beige-dark); color: var(--color-ink-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.timeline-dot.done { background: var(--color-primary); color: #fff; }
.timeline-dot .icon { width: 13px; height: 13px; }
.timeline-line { width: 2.5px; flex: 1; background: var(--color-beige-dark); min-height: 26px; }
.timeline-line.done { background: var(--color-primary); }
.timeline-step-body { padding-bottom: 22px; flex: 1; }
.timeline-step-title { font-size: 13.5px; font-weight: 700; }
.timeline-step-title.done { color: var(--color-ink); }
.timeline-step-title.pending { color: var(--color-ink-soft); }
.timeline-step-time { font-size: 11px; color: var(--color-ink-soft); margin-top: 2px; }

/* ===== Perfil ===== */
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0 4px; }
.profile-avatar { width: 74px; height: 74px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary-dark); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.profile-name { font-size: 17px; font-weight: 800; }
.profile-email { font-size: 12.5px; color: var(--color-ink-soft); }
.menu-list { display: flex; flex-direction: column; background: var(--color-white); border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow-card); }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--color-beige); cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; }
.menu-item:last-child { border-bottom: none; }
.menu-item .icon { color: var(--color-primary-dark); }
.menu-item span { flex: 1; font-size: 13.5px; font-weight: 600; }
.menu-item.danger span, .menu-item.danger .icon { color: var(--color-danger); }
.switch { width: 42px; height: 24px; border-radius: var(--radius-pill); background: var(--color-beige-deep); position: relative; border: none; cursor: pointer; flex-shrink: 0; }
.switch.on { background: var(--color-primary); }
.switch::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform 0.18s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch.on::after { transform: translateX(18px); }

/* ===== Carrusel de promociones ===== */
.promo-carousel { border-radius: var(--radius-l); overflow: hidden; position: relative; }
.promo-track { display: flex; transition: transform 0.5s cubic-bezier(.4,0,.2,1); }
.promo-track.no-transition { transition: none; }
.promo-track .promo-banner {
  flex: 0 0 100%; border-radius: 0;
  background: linear-gradient(120deg, var(--color-primary) 0%, #ff8b5c 100%);
  padding: 18px 20px; color: #fff; display: flex; flex-direction: column; gap: 4px; min-height: 92px; justify-content: center;
}
.promo-track .promo-banner .tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.9; }
.promo-track .promo-banner h4 { font-size: 18px; font-weight: 800; }
.promo-track .promo-banner p { font-size: 12.5px; opacity: 0.92; }
.promo-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.promo-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.5); transition: all 0.25s ease; }
.promo-dot.active { background: #fff; width: 14px; border-radius: 3px; }

/* ===== Tiendas compactas (home) ===== */
.store-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.store-mini-card { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; height: 100px; }
.store-mini-thumb { width: 100%; height: 68px; border-radius: var(--radius-m); overflow: hidden; background: var(--color-beige-dark); box-shadow: var(--shadow-card); flex-shrink: 0; }
.store-mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-mini-name { font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; width: 100%; }

/* ===== Tiendas ===== */
.store-card { display: flex; align-items: center; gap: 12px; background: var(--color-white); border-radius: var(--radius-m); padding: 12px; box-shadow: var(--shadow-card); cursor: pointer; }
.store-card-thumb { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; background: var(--color-beige-dark); flex-shrink: 0; }
.store-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.store-card-info { flex: 1; min-width: 0; }
.store-card-name { font-size: 13.5px; font-weight: 800; }
.store-card-meta { font-size: 11px; color: var(--color-ink-soft); text-transform: capitalize; }
.store-card-status { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: var(--radius-pill); }
.store-open { background: var(--color-success-soft); color: var(--color-success); }
.store-closed { background: var(--color-danger-soft); color: var(--color-danger); }
.city-pick-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--color-white); border-radius: var(--radius-m); padding: 15px 16px; box-shadow: var(--shadow-card); cursor: pointer; width: 100%; border: none; text-align: left; font-family: var(--font-body); }
.city-pick-card span.name { font-size: 14px; font-weight: 700; color: var(--color-ink); }
#gate-loading-state .icon { animation: spin 0.9s linear infinite; color: var(--color-primary); }

/* ===== Estados vacíos / carga / error ===== */
.state-block { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 46px 24px; color: var(--color-ink-soft); flex: 1; justify-content: center; }
.state-block .icon-lg { color: var(--color-beige-deep); width: 54px; height: 54px; }
.state-block h4 { font-size: 15px; color: var(--color-ink); font-weight: 800; }
.state-block p { font-size: 12.5px; max-width: 240px; }

.skeleton { background: linear-gradient(90deg, var(--color-beige-dark) 25%, var(--color-beige) 37%, var(--color-beige-dark) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--radius-m); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.skel-card { height: 168px; }
.skel-row { height: 66px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px); transform: translateX(-50%) translateY(20px);
  background: var(--color-ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; z-index: 60;
  opacity: 0; pointer-events: none; transition: all 0.25s ease; box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  max-width: 90%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .icon { color: var(--color-success); width: 17px; height: 17px; }
.toast.danger .icon { color: #ff9f8f; }

.sheet-overlay { position: fixed; inset: 0; background: rgba(43,33,24,0.42); z-index: 50; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.sheet-overlay.show { opacity: 1; pointer-events: auto; }
.confirm-sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: var(--app-max); background: #fff; border-radius: 22px 22px 0 0; padding: 22px 20px 26px; z-index: 55; box-shadow: var(--shadow-sheet); transition: transform 0.28s cubic-bezier(.32,.72,0,1); display: flex; flex-direction: column; gap: 14px; }
.confirm-sheet.show { transform: translate(-50%, 0); }
.confirm-sheet h4 { font-size: 15.5px; font-weight: 800; }
.confirm-sheet p { font-size: 13px; color: var(--color-ink-soft); }
.sheet-actions { display: flex; gap: 10px; }

.processing-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.94); z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.processing-overlay.show { opacity: 1; pointer-events: auto; }
.processing-overlay .icon-lg { animation: spin 0.9s linear infinite; color: var(--color-primary); }
.processing-overlay p { font-weight: 700; font-size: 13.5px; color: var(--color-ink-soft); }

::selection { background: var(--color-primary-soft); }
:focus-visible { outline: 2.5px solid var(--color-primary); outline-offset: 2px; }
