/* =========================================================
   Plataforma de tiendas — hoja de estilos única
   Panel del comerciante + tienda pública. Móvil primero.
   ========================================================= */

:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --text: #15181d;
  --muted: #6b7280;
  --line: #e6e7ea;
  --accent: #111827;          /* cada tienda lo reemplaza con su color */
  --accent-text: #ffffff;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --warn: #b45309;
  --warn-bg: #fff7e6;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --info-bg: #eef2ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .35em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.strong { font-weight: 700; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }
.center { text-align: center; }
.row { display: flex; gap: .75rem; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: .75rem; }
.hide { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Contenedores ---------- */
.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 960px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card + .card { margin-top: 12px; }
.card.pad-0 { padding: 0; overflow: hidden; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 20px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--accent); color: var(--accent-text);
  font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .08s ease, filter .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.08); }
.btn.block { width: 100%; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { filter: none; background: #f3f4f6; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { filter: none; background: rgba(0,0,0,.04); }
.btn.danger { background: var(--danger-bg); color: var(--danger); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 9px; }
.btn.icon { width: 40px; min-height: 40px; padding: 0; border-radius: 10px; flex: none; }
.btn.whatsapp { background: #25d366; color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; }

/* ---------- Formularios ---------- */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .82rem; margin-top: 5px; }
.input, textarea.input, select.input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); outline: none;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.input.error { border-color: var(--danger); }
.prefix { display: flex; align-items: stretch; }
.prefix span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: #f3f4f6; color: var(--muted); font-weight: 600; }
.prefix .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.error-text { color: var(--danger); font-size: .85rem; margin-top: 5px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #d1d5db; border-radius: 999px; transition: .2s; }
.switch i::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::before { transform: translateX(18px); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Opciones tipo tarjeta (radio) */
.choice { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .box { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); transition: .15s; }
.choice input:checked + .box { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); box-shadow: 0 0 0 1px var(--accent) inset; }
.choice .box b { display: block; }
.choice .box span { color: var(--muted); font-size: .85rem; }

/* Subida de imagen */
.upload { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 14px; text-align: center; background: var(--surface); cursor: pointer; }
.upload img { max-height: 220px; margin: 0 auto 10px; border-radius: 10px; object-fit: contain; }
.upload input { display: none; }

/* ---------- Avisos ---------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .95rem; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.info { background: var(--info-bg); color: #3730a3; }
.alert ul { margin: .3em 0 0 1.1em; padding: 0; }

/* ---------- Etiquetas ---------- */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #eef0f3; color: var(--muted); white-space: nowrap; }
.badge.pendiente { background: var(--warn-bg); color: var(--warn); }
.badge.pagado { background: var(--info-bg); color: #3730a3; }
.badge.entregado { background: var(--ok-bg); color: var(--ok); }
.badge.cancelado { background: var(--danger-bg); color: var(--danger); }
.badge.accent { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }

/* ---------- Listas ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li a.main { text-decoration: none; display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; }
.thumb { width: 56px; height: 56px; border-radius: 10px; background: #eef0f3; object-fit: cover; flex: none; display: grid; place-items: center; color: var(--muted); font-size: 1.3rem; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.lg { width: 72px; height: 72px; }

/* Tabs/filtros */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--muted); }
.tabs a.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* ---------- Estado vacío ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { font-size: 2.4rem; margin-bottom: 8px; }
.empty h3 { color: var(--text); }

/* =========================================================
   Panel del comerciante
   ========================================================= */
.panel-top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246,246,244,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.panel-top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.panel-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; min-width: 0; }
.panel-top .brand .thumb { width: 32px; height: 32px; border-radius: 8px; font-size: .9rem; }
.panel-top .row { gap: 4px; }
.panel-top .btn.sm { padding: 0 10px; white-space: nowrap; }
@media (max-width: 420px) { .panel-top .btn.sm { font-size: .82rem; padding: 0 8px; } }
.list li .actions { display: flex; gap: 6px; flex: none; }
.list li .actions .btn.icon { width: 36px; min-height: 36px; }
.panel-main { padding: 18px 0 calc(var(--nav-h) + 24px); }
.panel-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}
.panel-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; position: relative; }
.panel-nav a svg { width: 24px; height: 24px; }
.panel-nav a.active { color: var(--accent); }
.panel-nav .dot { position: absolute; top: 10px; right: calc(50% - 16px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem; display: grid; place-items: center; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

@media (min-width: 900px) {
  .panel-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
  .panel-nav { position: sticky; top: 0; bottom: auto; height: 100vh; display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 18px 12px; border-top: 0; border-right: 1px solid var(--line); }
  .panel-nav a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: .95rem; }
  .panel-nav a.active { background: color-mix(in srgb, var(--accent) 10%, #fff); }
  .panel-nav .dot { position: static; margin-left: auto; }
  .panel-nav .nav-brand { display: block !important; font-weight: 800; padding: 6px 12px 16px; font-size: 1.05rem; }
  .panel-main { padding-bottom: 40px; }
  .panel-top .brand-name { display: none; }
}
.panel-nav .nav-brand { display: none; }

/* =========================================================
   Tienda pública
   ========================================================= */
.shop { padding-bottom: 110px; }
.shop-wrap { max-width: 1100px; }
.shop-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.shop-head .wrap { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.shop-head .logo { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; flex: none; overflow: hidden; text-decoration: none; }
.shop-head .logo img { width: 100%; height: 100%; object-fit: cover; }
.shop-head h1 { font-size: 1.2rem; margin: 0; }
.shop-head p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.head-wa span { display: none; }
@media (min-width: 640px) { .head-wa span { display: inline; } .shop-head h1 { font-size: 1.4rem; } }

/* Barra fija: buscador + categorías */
.shop-bar { position: sticky; top: 0; z-index: 15; background: rgba(246,246,244,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.shop-bar .wrap { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box .input { min-height: 42px; padding-left: 38px; border-radius: 999px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; font-weight: 600; color: var(--text); cursor: pointer; flex: none; transition: .15s; }
.chip.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chip.offer:not(.active) { color: #b91c1c; border-color: #fecaca; background: #fff5f5; }
@media (min-width: 720px) {
  .shop-bar .wrap { flex-direction: row; align-items: center; }
  .search-box { flex: none; width: 300px; }
  .chips { margin: 0; padding: 0; flex: 1; }
}

/* Banners */
.banners-wrap { position: relative; margin-top: 14px; }
.banners { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 18px; gap: 0; -webkit-overflow-scrolling: touch; }
.banners::-webkit-scrollbar { display: none; }
.banner { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 16 / 7; background: #e9eaee; overflow: hidden; text-decoration: none; color: #fff; display: block; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-text { position: absolute; inset: auto 0 0 0; padding: 48px 18px 18px; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.35) 55%, transparent); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.banner-text h2 { color: #fff; font-size: clamp(1.1rem, 4.5vw, 1.8rem); margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.banner-text p { color: rgba(255,255,255,.92); margin: 0; font-size: clamp(.82rem, 3.2vw, 1rem); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-text .btn { margin-top: 6px; background: #fff; color: #15181d; }
.banner-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.banner-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: #cfd2d8; padding: 0; cursor: pointer; transition: .2s; }
.banner-dots button.active { background: var(--accent); width: 22px; border-radius: 99px; }
@media (min-width: 720px) { .banner { aspect-ratio: 3 / 1; } .banner-text { padding: 60px 28px 26px; } }

/* Encabezados de sección */
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.section-head h2 { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.section-head .count { font-weight: 600; }
.cat-section { scroll-margin-top: 120px; }

/* Destacados: fila deslizable */
.featured-track { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.featured-track::-webkit-scrollbar { display: none; }
.featured-track .product { flex: 0 0 46%; max-width: 220px; scroll-snap-align: start; }
@media (min-width: 640px) { .featured-track .product { flex-basis: 30%; } }
@media (min-width: 900px) { .featured-track { margin: 0; padding: 2px 0 6px; } .featured-track .product { flex-basis: 23%; } }

/* Tarjetas de producto */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .products { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 900px) { .products { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .products { grid-template-columns: repeat(5, 1fr); } }
.product {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.product:hover { box-shadow: var(--shadow); }
.product:active { transform: scale(.985); }
.product.in-cart { border-color: var(--accent); }
.product-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; cursor: pointer; }
.product .img { position: relative; aspect-ratio: 1; background: #f1f2f4; display: grid; place-items: center; overflow: hidden; }
.product .img .ph { color: #c4c7cc; font-size: 2rem; }
.product .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.product:hover .img img { transform: scale(1.03); }
.product .tag { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .01em; }
.product .tag.off, .sheet .hero .tag.off { background: #dc2626; color: #fff; }
.product .tag.out { background: rgba(21,24,29,.85); color: #fff; }
.product .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product .name { font-weight: 600; font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product .price { font-weight: 800; margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; padding-right: 40px; }
.product .price s { color: var(--muted); font-weight: 500; font-size: .8rem; }
.product.unavailable .img img { filter: grayscale(1); opacity: .6; }
.product.unavailable .name, .product.unavailable .price { color: var(--muted); }
.product .add {
  position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--accent-text); font-size: 1.35rem; font-weight: 700; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 4px 12px -4px rgba(0,0,0,.35); transition: transform .15s ease;
}
.product .add:hover { filter: brightness(1.08); }
.product .add.pop { transform: scale(1.25); }
.product.in-cart .add { font-size: 1rem; }

/* Ventana que sube desde abajo (producto / carrito) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15,18,25,.45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); border-radius: 22px 22px 0 0;
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  transform: translateY(105%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s .28s;
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.open { transform: translateY(0); visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.sheet .handle { width: 40px; height: 4px; border-radius: 99px; background: #d9dbdf; margin: 10px auto 0; }
.sheet .close { position: absolute; z-index: 2; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.06); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center; }
.sheet .hero { position: relative; aspect-ratio: 1; max-height: 46vh; background: #f1f2f4; display: grid; place-items: center; color: #c4c7cc; font-size: 3rem; overflow: hidden; margin: 12px 16px 0; border-radius: 16px; }
.sheet .hero img { width: 100%; height: 100%; object-fit: cover; }
.sheet .hero .tag { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.sheet .content { padding: 16px 20px 20px; }
.sheet .content h2 { font-size: 1.3rem; }
.sheet .desc { color: var(--muted); white-space: pre-line; font-size: .95rem; }
.sheet .price-big { font-size: 1.5rem; font-weight: 800; }
.sheet .price-big s { font-size: 1rem; color: var(--muted); font-weight: 500; margin-left: 8px; }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; width: 560px; transform: translate(-50%, 105%); border-radius: 22px; bottom: 24px; max-height: 88vh; }
  .sheet.open { transform: translate(-50%, 0); }
}

/* Selector de cantidad */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; }
.qty span { min-width: 36px; text-align: center; font-weight: 700; }
.qty.sm button { width: 36px; height: 36px; }
.qty.sm span { min-width: 28px; }

/* Barra flotante del carrito */
.cart-bar {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 35;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent); color: var(--accent-text); border-radius: 16px; padding: 12px 16px 12px 18px;
  box-shadow: var(--shadow); cursor: pointer; border: 0; width: calc(100% - 32px); max-width: 640px; margin: 0 auto; text-align: left;
}
@media (min-width: 720px) { .cart-bar { left: 50%; right: auto; transform: translateX(-50%); } }
.cart-bar.show { display: flex; }
.cart-bar .count { background: rgba(255,255,255,.22); border-radius: 999px; padding: 2px 10px; font-weight: 800; margin-right: 8px; }
.cart-bar .total { font-weight: 800; font-size: 1.05rem; }

/* Líneas del carrito */
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-lines li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.cart-lines li:first-child { border-top: 0; }
.cart-lines .name { font-weight: 600; font-size: .95rem; }
.cart-lines .sub { color: var(--muted); font-size: .85rem; }

/* Pie de la tienda */
.shop-foot { margin-top: 40px; background: var(--surface); border-top: 1px solid var(--line); padding: 28px 0 18px; }
.shop-foot p { margin: 0 0 .4em; }
.foot-grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1fr auto; align-items: start; } }
.foot-name { font-weight: 800; font-size: 1.1rem; margin-bottom: 6px; }
.foot-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.social { display: flex; gap: 10px; }
.social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); background: var(--bg); }
.social a svg { width: 20px; height: 20px; }
.social a:hover { border-color: var(--accent); color: var(--accent); }
.foot-bottom { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; text-align: center; }
.foot-bottom a { color: var(--muted); }
/* Landing usa el mismo pie, simple */
.wrap > .shop-foot { background: transparent; border: 0; text-align: center; color: var(--muted); font-size: .8rem; padding: 30px 16px 10px; margin-top: 20px; }
.wrap > .shop-foot a { color: var(--muted); }

/* Ventana emergente (bienvenida / oferta) */
.popup-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(15,18,25,.55); display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.popup-backdrop.open { opacity: 1; pointer-events: auto; }
.popup { position: relative; width: 100%; max-width: 400px; background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); transform: translateY(16px) scale(.96); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.popup-backdrop.open .popup { transform: none; }
.popup .close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #15181d; cursor: pointer; font-size: 1rem; display: grid; place-items: center; z-index: 1; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.popup-img { width: 100%; max-height: 46vh; object-fit: cover; }
.popup-body { padding: 22px 22px 20px; text-align: center; }
.popup-body h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: .3em; }
.popup-body p { color: var(--muted); white-space: pre-line; }
.popup-body .btn { margin-top: 6px; }

/* QR en la página del pedido */
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; }
.qr-box img { width: 280px; max-width: 100%; margin: 0 auto; }

/* Pasos del pedido */
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; }
.step.done .n { background: var(--ok); }

/* =========================================================
   Landing / Auth
   ========================================================= */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 420px; padding: 26px; }
.auth .logo-text { font-weight: 900; font-size: 1.4rem; text-align: center; margin-bottom: 18px; letter-spacing: -.02em; }
.hero-landing { padding: 56px 0 30px; text-align: center; }
.hero-landing h1 { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -.03em; line-height: 1.05; }
.hero-landing p { font-size: 1.1rem; color: var(--muted); max-width: 520px; margin: 14px auto 24px; }
.features { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 20px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(3, 1fr); } }
.plans { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan .price { font-size: 1.9rem; font-weight: 900; letter-spacing: -.02em; }
.plan .price small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 18px; margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.topbar .brand { font-weight: 900; text-decoration: none; letter-spacing: -.02em; font-size: 1.15rem; }

/* Enlace para copiar */
.copy-box { display: flex; gap: 8px; align-items: center; background: #f3f4f6; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 8px 8px 14px; }
.copy-box code { font-size: .85rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Toast */
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%) translateY(-20px); background: #15181d; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: .9rem; font-weight: 600; opacity: 0; transition: .25s; pointer-events: none; z-index: 60; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   Panel de administración
   ========================================================= */
.admin-top { position: sticky; top: 0; z-index: 20; background: #15181d; color: #fff; }
.admin-top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 12px; }
.admin-top .brand { font-weight: 800; text-decoration: none; color: #fff; letter-spacing: -.01em; }
.admin-top .brand span { color: #9ca3af; font-weight: 500; font-size: .85rem; margin-left: 6px; }
.admin-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.admin-nav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.admin-nav .wrap::-webkit-scrollbar { display: none; }
.admin-nav a { white-space: nowrap; padding: 12px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; }
.admin-nav a.active { color: var(--text); border-bottom-color: var(--text); }
.admin-nav a .n { background: var(--danger); color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 6px; margin-left: 4px; }
.admin-main { padding: 20px 0 60px; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .v { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.kpi .s { color: var(--muted); font-size: .78rem; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl th { border-top: 0; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.tbl tr:hover td { background: #fafafa; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl a.strong { text-decoration: none; }
.tbl .sub { color: var(--muted); font-size: .8rem; display: block; }

.badge.prueba { background: var(--info-bg); color: #3730a3; }
.badge.activo { background: var(--ok-bg); color: var(--ok); }
.badge.vencido { background: var(--warn-bg); color: var(--warn); }
.badge.suspendido { background: var(--danger-bg); color: var(--danger); }
.badge.confirmado { background: var(--ok-bg); color: var(--ok); }
.badge.rechazado { background: var(--danger-bg); color: var(--danger); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .input { min-height: 42px; width: auto; flex: 1; min-width: 180px; }
.filters select.input { flex: none; }
.grid3 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .grid3 { grid-template-columns: 2fr 1fr; align-items: start; } }
.impersonation { background: #fef3c7; color: #92400e; border-bottom: 1px solid #fcd34d; }
.impersonation .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; font-size: .9rem; }
.plan-banner { border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.plan-banner.prueba { background: var(--info-bg); color: #3730a3; }
.plan-banner.aviso { background: var(--warn-bg); color: var(--warn); }
.perks { margin: 8px 0 0; padding-left: 18px; }
.perks li { margin: 2px 0; }
.plan-banner.vencido, .plan-banner.suspendido { background: var(--danger-bg); color: var(--danger); }
.plan-banner a { font-weight: 700; }
.btn.google { background: #fff; color: var(--text); border-color: var(--line); }
.btn.google:hover { background: #f3f4f6; filter: none; }
.sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 14px 0; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
