/* ═══════════════════════════════════════════════════
   TOKENS — sobreescritos dinámicamente por applyTheme()
   La API puede devolver: color_primario, color_secundario,
   color_fondo, color_superficie, color_texto
═══════════════════════════════════════════════════ */
:root {
  --brand:      #ff3d5a;
  --brand2:     #ff7043;
  --brand-bg:   rgba(255,61,90,.08);
  --brand-bdr:  rgba(255,61,90,.22);
  --brand-rgb:  255,61,90;        /* para sombras dinámicas */
  --green:      #00c47d;
  --green-bg:   rgba(0,196,125,.1);
  --bg:         #f4f3f0;
  --surface:    #ffffff;
  --ink:        #1a1a22;
  --ink2:       #5a5a6a;
  --ink3:       #9a9aaa;
  --bdr:        #e9e8e4;
  --sh-xs:      0 1px 4px rgba(0,0,0,.07);
  --sh-sm:      0 4px 14px rgba(0,0,0,.09);
  --sh:         0 10px 32px rgba(0,0,0,.12);
  --sh-lg:      0 24px 60px rgba(0,0,0,.18);
  --r:          14px;
  --r-sm:       10px;
  --r-pill:     999px;
  --hdr-h:      56px;
  --tab-h:      64px;
  --font:       'Outfit', sans-serif;
  --ease:       cubic-bezier(.4,0,.2,1);
  --t:          .2s;
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
input, select, button, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }
img { display: block; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ═══ LOADING SCREEN ═══ */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.loading-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--bdr);
  border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-txt { font-size: .82rem; font-weight: 600; color: var(--ink3); }
.loading-screen.hidden { display: none; }

/* ═══ HEADER ═══ */
.hdr {
  position: sticky; top: 0; z-index: 300;
  height: var(--hdr-h);
  background: rgba(244,243,240,.94);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid var(--bdr);
  display: flex; align-items: center;
  padding: 0 18px; gap: 12px;
}
.hdr-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb),.3);
}
.hdr-info { flex: 1; min-width: 0; }
.hdr-name { font-size: .92rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-sub  { font-size: .67rem; font-weight: 600; color: var(--ink2); }
.hdr-right { display: flex; align-items: center; gap: 10px; }
.hdr-status { display: flex; align-items: center; gap: 5px; background: var(--green-bg); border-radius: var(--r-pill); padding: 5px 10px; }
.hdr-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: dotAnim 2s infinite; }
.hdr-dot.closed { background: var(--brand); animation: none; }
@keyframes dotAnim { 0%,100%{opacity:1} 50%{opacity:.3} }
.hdr-status-txt { font-size: .7rem; font-weight: 700; color: var(--green); }
.hdr-status-txt.closed { color: var(--brand); }
.hdr-cart-btn {
  display: none; align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  border-radius: var(--r-pill); padding: 8px 16px;
  font-size: .8rem; font-weight: 700;
  transition: opacity var(--t); flex-shrink: 0;
}
.hdr-cart-btn:hover { opacity: .85; }
.hdr-cart-badge { background: var(--brand); color: #fff; border-radius: var(--r-pill); padding: 1px 7px; font-size: .68rem; font-weight: 900; }

/* ═══ HERO ═══ */
.hero { position: relative; overflow: hidden; background: var(--ink); padding: 28px 20px 24px; }
.hero-blobs { position: absolute; inset: 0; pointer-events: none; }
.hblob { position: absolute; border-radius: 50%; filter: blur(55px); animation: blobMove 7s ease-in-out infinite alternate; }
.hblob1 { width: 280px; height: 280px; top: -90px; left: -50px; background: rgba(var(--brand-rgb),.38); animation-delay: 0s; }
.hblob2 { width: 220px; height: 220px; top: -50px; right: -40px; background: rgba(91,94,244,.3); animation-delay: -3s; }
.hblob3 { width: 200px; height: 200px; bottom: -70px; left: 35%; background: rgba(0,196,125,.22); animation-delay: -5s; }
@keyframes blobMove { 0%{transform:translate(0,0) scale(1)} 100%{transform:translate(18px,22px) scale(1.12)} }
.hero-inner { position: relative; z-index: 2; max-width: 700px; }
.hero-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-pill); padding: 4px 11px;
  font-size: .67rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.hero-hours { font-size: .68rem; font-weight: 600; color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-pill); padding: 4px 10px; }
.hero-title { font-size: clamp(1.8rem, 6vw, 3.2rem); font-weight: 900; letter-spacing: -.03em; line-height: .96; color: #fff; margin-bottom: 6px; }
.hero-title .accent { background: linear-gradient(90deg, var(--brand), var(--brand2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.5); margin-bottom: 16px; }
.hero-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.hchip { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-pill); padding: 5px 11px; font-size: .7rem; font-weight: 600; color: rgba(255,255,255,.7); white-space: nowrap; }

/* ═══ SEARCH ═══ */
.search-wrap {
  position: sticky; top: var(--hdr-h); z-index: 200;
  background: rgba(244,243,240,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bdr); padding: 8px 18px;
}
.search-box {
  position: relative; background: var(--surface); border: 1.5px solid var(--bdr); border-radius: var(--r);
  display: flex; align-items: center; transition: border-color var(--t), box-shadow var(--t);
}
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-bg); }
.search-ico { padding: 0 10px 0 13px; color: var(--ink3); flex-shrink: 0; }
.search-ico svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.search-inp { flex: 1; background: none; border: none; outline: none; padding: 10px 0; font-size: .88rem; font-weight: 500; color: var(--ink); }
.search-inp::placeholder { color: var(--ink3); }
.search-x { padding: 0 12px; color: var(--ink3); font-size: .85rem; display: none; align-items: center; transition: color var(--t); }
.search-x:hover { color: var(--brand); }
.search-x.show { display: flex; }

/* ═══ CAT BAR ═══ */
.cat-bar {
  position: sticky; top: calc(var(--hdr-h) + 46px); z-index: 190;
  background: rgba(244,243,240,.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bdr);
  display: flex; overflow-x: auto; scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cbar-btn {
  flex-shrink: 0; display: flex; align-items: center; gap: 5px;
  padding: 10px 15px; font-size: .75rem; font-weight: 700; color: var(--ink2);
  border-bottom: 2.5px solid transparent;
  transition: color var(--t), border-color var(--t); white-space: nowrap;
}
.cbar-btn.active, .cbar-btn:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* ═══ LAYOUT ═══ */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 20px 18px 100px; display: flex; gap: 24px; align-items: flex-start; }

/* Sidebar — desktop */
.sidebar { display: none; flex: 0 0 200px; position: sticky; top: calc(var(--hdr-h) + 52px); background: var(--surface); border: 1.5px solid var(--bdr); border-radius: var(--r); padding: 16px 0; box-shadow: var(--sh-xs); }
.sb-heading { font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); padding: 0 14px 12px; border-bottom: 1px solid var(--bdr); margin-bottom: 6px; }
.sb-link { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: .82rem; font-weight: 600; color: var(--ink2); border-left: 2.5px solid transparent; border-radius: 0 8px 8px 0; transition: color var(--t), background var(--t), padding-left var(--t); cursor: pointer; }
.sb-link:hover { color: var(--ink); background: var(--bg); }
.sb-link.active { color: var(--brand); background: var(--brand-bg); border-left-color: var(--brand); padding-left: 18px; }
.sb-count { margin-left: auto; font-size: .64rem; font-weight: 700; background: var(--bg); border-radius: 8px; padding: 2px 6px; color: var(--ink3); }
.main-content { flex: 1; min-width: 0; }

/* ═══ CATEGORY SECTION ═══ */
.cat-section { margin-bottom: 32px; scroll-margin-top: 120px; }
.cat-label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cat-label-emoji { font-size: 1.15rem; }
.cat-label-name { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.cat-label-count { margin-left: auto; font-size: .7rem; font-weight: 700; color: var(--ink3); background: var(--surface); border: 1px solid var(--bdr); border-radius: var(--r-pill); padding: 2px 8px; }

/* ═══ CARD MOBILE (horizontal) ═══ */
.prod-list { flex-direction: column; gap: 10px; }
.pcard {
  background: var(--surface); border: 1.5px solid var(--bdr); border-radius: var(--r);
  display: flex; align-items: stretch; overflow: hidden; position: relative;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t); box-shadow: var(--sh-xs);
}
.pcard:active { transform: scale(.985); }
.pcard.in-cart { border-color: var(--green); box-shadow: 0 0 0 2px rgba(0,196,125,.12); }
.pcard-accent { width: 3px; flex-shrink: 0; background: linear-gradient(to bottom, var(--brand), var(--brand2)); opacity: 0; transition: opacity var(--t); }
.pcard.in-cart .pcard-accent { opacity: 1; }
.pcard-img-wrap { width: 88px; flex-shrink: 0; background: linear-gradient(135deg,#f0eef8,#e8e6f0); position: relative; overflow: hidden; }
.pcard-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.pcard:hover .pcard-img-wrap img { transform: scale(1.06); }
.pcard-img-placeholder { width: 100%; height: 100%; min-height: 82px; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.incart-chip { position: absolute; top: 5px; left: 5px; z-index: 2; background: var(--green); color: #fff; border-radius: var(--r-pill); padding: 2px 6px; font-size: .58rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; opacity: 0; transform: scale(.7); pointer-events: none; transition: opacity var(--t), transform var(--t); }
.pcard.in-cart .incart-chip { opacity: 1; transform: scale(1); }
.pcard-body { flex: 1; padding: 11px 12px; display: flex; flex-direction: column; min-width: 0; }
.pcard-name { font-size: .88rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 3px; }
.pcard-desc { font-size: .72rem; font-weight: 500; color: var(--ink2); line-height: 1.45; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.pcard-price { font-size: 1.05rem; font-weight: 900; letter-spacing: -.02em; color: var(--brand); }
.pcard-actions { display: flex; align-items: center; gap: 5px; }

/* ═══ CARD DESKTOP (vertical) ═══ */
.prod-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pcard-v { background: var(--surface); border: 1.5px solid var(--bdr); border-radius: var(--r); overflow: hidden; position: relative; transition: border-color var(--t), box-shadow var(--t), transform var(--t); box-shadow: var(--sh-xs); display: flex; flex-direction: column; }
.pcard-v:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: rgba(0,0,0,.1); }
.pcard-v.in-cart { border-color: var(--green); box-shadow: 0 0 0 2px rgba(0,196,125,.12); }
.pcard-v-img { width: 100%; height: 150px; background: linear-gradient(135deg,#f0eef8,#e8e6f0); overflow: hidden; position: relative; }
.pcard-v-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.pcard-v:hover .pcard-v-img img { transform: scale(1.06); }
.pcard-v-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.8rem; }
.incart-chip-v { position: absolute; top: 8px; right: 8px; background: var(--green); color: #fff; border-radius: var(--r-pill); padding: 2px 8px; font-size: .6rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; opacity: 0; transform: scale(.7); pointer-events: none; transition: opacity var(--t), transform var(--t); }
.pcard-v.in-cart .incart-chip-v { opacity: 1; transform: scale(1); }
.pcard-v-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.pcard-v-name { font-size: .9rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 4px; }
.pcard-v-desc { font-size: .74rem; font-weight: 500; color: var(--ink2); line-height: 1.45; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.pcard-v-price { font-size: 1.15rem; font-weight: 900; color: var(--brand); margin-bottom: 10px; }
.pcard-v-actions { display: flex; gap: 7px; align-items: center; }
.pcard-v-actions .qty-row { flex: 0 0 auto; }
.pcard-v-actions .btn-add-v { flex: 1; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 5px; transition: opacity var(--t), transform var(--t); box-shadow: 0 3px 8px rgba(var(--brand-rgb),.28); }
.pcard-v-actions .btn-add-v:hover { opacity: .88; }
.pcard-v-actions .btn-add-v:active { transform: scale(.96); }
.pcard-v-actions .btn-add-v.added { background: var(--green); box-shadow: 0 3px 8px rgba(0,196,125,.28); }

/* ═══ QTY + BTN SHARED ═══ */
.qty-row { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--bdr); border-radius: 8px; overflow: hidden; }
.qb { width: 27px; height: 27px; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 300; color: var(--ink2); transition: color var(--t), background var(--t); }
.qb:hover { color: var(--brand); background: var(--brand-bg); }
.qv { width: 24px; text-align: center; font-size: .82rem; font-weight: 800; background: none; border: none; outline: none; color: var(--ink); -moz-appearance: textfield; }
.qv::-webkit-inner-spin-button, .qv::-webkit-outer-spin-button { -webkit-appearance: none; }
.btn-add { width: 27px; height: 27px; border-radius: 8px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 300; transition: background var(--t), transform var(--t); box-shadow: 0 3px 8px rgba(var(--brand-rgb),.28); }
.btn-add:hover { opacity: .88; }
.btn-add:active { transform: scale(.88); }
.btn-add.added { background: var(--green); box-shadow: 0 3px 8px rgba(0,196,125,.28); }
.btn-rm { width: 24px; height: 24px; border-radius: 7px; background: rgba(var(--brand-rgb),.07); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: .75rem; transition: background var(--t); }
.btn-rm:hover { background: rgba(var(--brand-rgb),.15); }

/* ═══ EMPTY STATE ═══ */
.empty-state { grid-column: 1/-1; padding: 52px 20px; text-align: center; color: var(--ink2); }
.empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.empty-msg { font-size: .9rem; font-weight: 600; }

/* ═══ BOTTOM TAB BAR — mobile ═══ */
.tab-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 300; height: var(--tab-h); background: rgba(255,255,255,.97); backdrop-filter: blur(18px) saturate(1.8); border-top: 1px solid var(--bdr); display: flex; align-items: stretch; box-shadow: 0 -4px 20px rgba(0,0,0,.08); }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink3); transition: color var(--t); }
.tab-item.active { color: var(--brand); }
.tab-icon { font-size: 1.2rem; line-height: 1; }
.tab-cart-wrap { flex: 1.3; position: relative; }
.tab-cart-inner { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink3); transition: color var(--t); font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tab-cart-wrap.active .tab-cart-inner { color: var(--brand); }
.tab-badge { position: absolute; top: 8px; right: calc(50% - 22px); background: var(--brand); color: #fff; border-radius: var(--r-pill); min-width: 18px; height: 18px; display: none; align-items: center; justify-content: center; font-size: .62rem; font-weight: 900; padding: 0 5px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(var(--brand-rgb),.4); }
.tab-badge.show { display: flex; }

/* ═══ SCRIM ═══ */
.scrim { position: fixed; inset: 0; z-index: 400; background: rgba(26,26,34,.5); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.open { opacity: 1; pointer-events: all; }

/* ═══ SHEET (mobile bottom) ═══ */
.sheet { position: fixed; bottom: 0; left: 0; right: 0; z-index: 401; background: var(--surface); border-radius: 22px 22px 0 0; border-top: 1px solid var(--bdr); max-height: 88dvh; flex-direction: column; transform: translateY(100%); transition: transform .32s var(--ease); box-shadow: var(--sh-lg); }
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 36px; height: 4px; background: var(--bdr); border-radius: 2px; margin: 10px auto 0; flex-shrink: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 12px; border-bottom: 1px solid var(--bdr); flex-shrink: 0; }
.sheet-title { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.sheet-close { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--ink2); font-size: .8rem; display: flex; align-items: center; justify-content: center; transition: background var(--t), color var(--t); }
.sheet-close:hover { background: var(--brand-bg); color: var(--brand); }
.sheet-body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.sheet-foot { padding: 12px 18px calc(env(safe-area-inset-bottom,0px) + 12px); border-top: 1px solid var(--bdr); flex-shrink: 0; }

/* ═══ CART MODAL (desktop lateral) ═══ */
.cart-modal { position: fixed; top: 0; right: 0; bottom: 0; z-index: 401; width: 380px; max-width: 100vw; background: var(--surface); border-left: 1px solid var(--bdr); flex-direction: column; transform: translateX(100%); transition: transform .3s var(--ease); box-shadow: var(--sh-lg); }
.cart-modal.open { transform: translateX(0); }
.cart-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 16px; border-bottom: 1px solid var(--bdr); flex-shrink: 0; }
.cart-modal-title { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.cart-modal-close { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--ink2); font-size: .8rem; display: flex; align-items: center; justify-content: center; transition: background var(--t), color var(--t); }
.cart-modal-close:hover { background: var(--brand-bg); color: var(--brand); }
.cart-modal-body { flex: 1; overflow-y: auto; padding: 14px 22px; }
.cart-modal-foot { padding: 14px 22px 20px; border-top: 1px solid var(--bdr); flex-shrink: 0; }

/* ═══ CHECKOUT MODAL (desktop centrado) ═══ */
.checkout-modal-bg { position: fixed; inset: 0; z-index: 500; background: rgba(26,26,34,.6); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 20px; }
.checkout-modal-bg.open { display: flex; }
.checkout-modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--sh-lg); animation: slideUp .3s var(--ease); }
@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
.checkout-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--bdr); flex-shrink: 0; }
.checkout-modal-title { font-size: 1.1rem; font-weight: 800; }
.checkout-modal-close { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--ink2); font-size: .8rem; display: flex; align-items: center; justify-content: center; transition: background var(--t), color var(--t); }
.checkout-modal-close:hover { background: var(--brand-bg); color: var(--brand); }
.checkout-modal-body { flex: 1; overflow-y: auto; padding: 18px 24px; }
.checkout-modal-foot { padding: 14px 24px 20px; border-top: 1px solid var(--bdr); flex-shrink: 0; }

/* ═══ CART ITEMS (compartido) ═══ */
.cart-empty-state { display: flex; flex-direction: column; align-items: center; padding: 40px 0; text-align: center; color: var(--ink2); gap: 8px; }
.cart-empty-icon { font-size: 2.5rem; }
.cart-empty-msg { font-size: .85rem; font-weight: 600; }
.cart-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--bdr); }
.cart-item:last-child { border-bottom: none; }
.ci-img { width: 44px; height: 44px; border-radius: 9px; background: var(--bg); flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.ci-img img { width: 100%; height: 100%; object-fit: cover; }
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-size: .82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-qty { font-size: .7rem; font-weight: 600; color: var(--ink2); margin-top: 1px; }
.ci-price { font-size: .92rem; font-weight: 800; color: var(--brand); flex-shrink: 0; }
.ci-rm { color: var(--ink3); font-size: .8rem; padding: 4px; transition: color var(--t); }
.ci-rm:hover { color: var(--brand); }
.cart-totals { margin-top: 12px; border-top: 1px solid var(--bdr); padding-top: 10px; }
.ct-row { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 600; color: var(--ink2); margin-bottom: 5px; }
.ct-row.grand { font-size: 1.05rem; font-weight: 800; color: var(--ink); padding-top: 8px; border-top: 1px solid var(--bdr); margin-top: 4px; margin-bottom: 0; }
.ct-row.grand span:last-child { color: var(--brand); }

/* ═══ ORDER RECAP ═══ */
.ord-recap { background: var(--bg); border: 1px solid var(--bdr); border-radius: var(--r); padding: 11px 13px; margin-bottom: 16px; }
.or-item { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 600; color: var(--ink2); padding: 3px 0; }
.or-total { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; margin-top: 5px; border-top: 1px solid var(--bdr); }
.or-total-lbl { font-weight: 800; font-size: .85rem; color: var(--ink); }
.or-total-val { font-size: 1.15rem; font-weight: 900; color: var(--brand); }

/* ═══ FORM ═══ */
.fg { margin-bottom: 12px; }
.fg label { display: block; font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); margin-bottom: 5px; }
.fg input, .fg select { width: 100%; background: var(--bg); border: 1.5px solid var(--bdr); border-radius: var(--r-sm); padding: 11px 13px; font-size: .9rem; font-weight: 600; color: var(--ink); outline: none; -webkit-appearance: none; transition: border-color var(--t), box-shadow var(--t); }
.fg input::placeholder { color: var(--ink3); }
.fg input:focus, .fg select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-bg); }
.fg.err input, .fg.err select { border-color: var(--brand); }
.fg .emsg { display: none; font-size: .68rem; font-weight: 700; color: var(--brand); margin-top: 3px; }
.fg.err .emsg { display: block; }
.frow { display: flex; gap: 9px; }
.frow .fg { flex: 1; }
.rpills { display: flex; gap: 8px; }
.rpill { flex: 1; }
.rpill input { display: none; }
.rpill-lbl { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border: 1.5px solid var(--bdr); border-radius: var(--r-sm); font-size: .78rem; font-weight: 700; color: var(--ink2); cursor: pointer; transition: all var(--t); }
.rpill input:checked + .rpill-lbl { border-color: var(--brand); background: var(--brand-bg); color: var(--brand); }

/* ═══ BOTONES ═══ */
.btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border-radius: var(--r); background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-size: .95rem; font-weight: 800; letter-spacing: -.01em; box-shadow: 0 6px 20px rgba(var(--brand-rgb),.3); transition: opacity var(--t), transform var(--t); margin-bottom: 8px; }
.btn-primary:hover { opacity: .9; }
.btn-primary:active { transform: scale(.97); }
.btn-wapp { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border-radius: var(--r); background: #25d366; color: #fff; font-size: .95rem; font-weight: 800; letter-spacing: -.01em; box-shadow: 0 6px 20px rgba(37,211,102,.28); transition: opacity var(--t), transform var(--t); margin-bottom: 8px; }
.btn-wapp:hover { opacity: .9; }
.btn-wapp:active { transform: scale(.97); }
.btn-ghost { display: flex; align-items: center; justify-content: center; width: 100%; height: 40px; border-radius: var(--r); background: transparent; border: 1.5px solid var(--bdr); color: var(--ink2); font-size: .82rem; font-weight: 700; transition: border-color var(--t), color var(--t); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ═══ TOAST ═══ */
.toast { position: fixed; top: calc(var(--hdr-h) + 12px); left: 50%; transform: translateX(-50%) translateY(-120px); opacity: 0; background: var(--green); color: #fff; border-radius: var(--r-pill); padding: 11px 22px; font-size: .82rem; font-weight: 800; box-shadow: 0 8px 24px rgba(0,196,125,.4); z-index: 700; white-space: nowrap; display: flex; align-items: center; gap: 8px; transition: transform .38s var(--ease), opacity .38s; pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ═══ CLOSED WALL ═══ */
.closed-wall { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(26,26,34,.97); flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 32px; }
.closed-wall.show { display: flex; }
.cw-icon { font-size: 3.5rem; margin-bottom: 4px; }
.cw-title { font-size: 2rem; font-weight: 900; letter-spacing: -.03em; color: #fff; }
.cw-sub { font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.45); max-width: 260px; line-height: 1.7; margin-top: 4px; }

/* ═══ RESPONSIVE ═══ */
.tab-bar      { display: none; }
.sheet        { display: none; }
.cart-modal   { display: none; }
.hdr-cart-btn { display: none; }
.sidebar      { display: none; }
.prod-list    { display: none; }
.prod-grid    { display: none; }

@media (max-width: 767px) {
  .tab-bar          { display: flex; }
  .sheet            { display: flex; }
  .sheet:not(.open) { transform: translateY(100%); }
  .prod-list        { display: flex; }
  .cat-bar          { top: calc(var(--hdr-h) + 46px); }
  .cat-section      { scroll-margin-top: 150px; }
  .page-wrap        { padding-bottom: calc(var(--tab-h) + 20px); }
}
@media (min-width: 768px) {
  .hdr-cart-btn     { display: flex; }
  .sidebar          { display: block; }
  .prod-grid        { display: grid; }
  .page-wrap        { padding-bottom: 60px; }
  .cat-section      { scroll-margin-top: 110px; }
  .cart-modal.open  { display: flex; }
  .checkout-modal-bg.open { display: flex; }
}