:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #121620;
  --muted: #5f6878;
  --line: #e3e6eb;
  --accent: #d6127a;
  --accent-ink: #ffffff;
  --accent-soft: #fde7f2;
  --neon: #ff3ea5;
  --night: #140b14;
  --night-2: #22111f;
  --vol: #6d28d9;
  --vol-soft: #efe7fd;
  --display: 'Poppins', 'Inter', system-ui, sans-serif;
  --wa: #1fae55;
  --wa-dark: #178a43;
  --sale: #d1361f;
  --warn: #a45a00;
  --warn-soft: #fff4e2;
  --ok: #0b7a43;
  --ok-soft: #e5f6ec;
  --danger: #c4321c;
  --danger-soft: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
svg.i { width: 18px; height: 18px; flex: none; }

/* ---------- Botones y campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 9px 14px; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text);
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.wa:hover { background: var(--wa-dark); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.icon-btn { border: 0; background: transparent; padding: 8px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-size: 12px; }
input[type=text], input[type=search], input[type=tel], input[type=email], input[type=password],
input[type=number], input[type=date], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 9px 11px; outline: none; min-width: 0;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; line-height: 1.3; }
.badge.sale { background: var(--sale); color: #fff; }
.badge.tag { background: var(--text); color: #fff; }
.badge.out { background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.neutral { background: var(--surface-2); color: var(--muted); }

/* ---------- Toasts ---------- */
#toasts { position: fixed; z-index: 100; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 380px); }
.toast { background: var(--text); color: #fff; padding: 11px 14px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow); transition: opacity .3s, transform .3s; }
.toast.err { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- Modal / overlay ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 30, .5); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 18px; width: min(100%, 760px); box-shadow: 0 20px 60px rgba(0,0,0,.25); position: relative; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
body.noscroll { overflow: hidden; }

/* =========================================================
   TIENDA (catálogo público)
   ========================================================= */
body.shop { background: #f7f3f6; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--night); color: #fff; box-shadow: 0 1px 0 rgba(255,62,165,.35), 0 6px 24px rgba(214,18,122,.18); }
.topbar-in { display: flex; align-items: center; gap: 14px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 2px var(--neon), 0 0 14px rgba(255,62,165,.6); background: #fff; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: -.01em; white-space: nowrap; text-transform: uppercase; text-shadow: 0 0 12px rgba(255,62,165,.55); }
.search { flex: 1; position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #b9a6b5; }
.search input { padding-left: 38px; border-radius: 999px; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.14); color: #fff; height: 42px; }
.search input::placeholder { color: #b9a6b5; }
.search input:focus { background: rgba(255,255,255,.16); border-color: var(--neon); box-shadow: 0 0 0 3px rgba(255,62,165,.25); }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--accent); color: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 700; box-shadow: 0 0 16px rgba(255,62,165,.45); }
.cart-btn b { background: #fff; color: var(--accent); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; padding: 0 6px; }
.cart-btn .cart-ic { display: inline-flex; }
.cart-btn.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.1); } }
.catbar { border-top: 1px solid rgba(255,255,255,.08); }
.catbar .chips { padding-top: 8px; padding-bottom: 10px; }
@media (max-width: 640px) {
  .topbar-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .brand { flex: 1; }
  .brand-logo { width: 40px; height: 40px; }
  .brand-name { font-size: 18px; }
  .search { order: 3; flex-basis: 100%; }
  .cart-btn .cart-label { display: none; }
}

.banner { background: linear-gradient(90deg, var(--accent), #9b1bd1); color: #fff; text-align: center; padding: 8px 16px; font-weight: 600; font-size: 14px; }
.hero { background: radial-gradient(ellipse at 85% 0%, rgba(255,62,165,.35), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(155,27,209,.3), transparent 50%), var(--night); color: #fff; }
.hero-in { padding-top: 34px; padding-bottom: 38px; }
.hero-kicker { margin: 0 0 10px; color: #ffc2e2; font-weight: 600; font-size: 14px; }
.hero h1 { margin: 0 0 10px; font-family: var(--display); font-weight: 900; font-size: clamp(28px, 5vw, 46px); line-height: 1.08; letter-spacing: -.02em; }
.hero h1 span { color: var(--neon); text-shadow: 0 0 18px rgba(255,62,165,.6); }
.hero-sub { margin: 0 0 20px; color: #e4d6e0; max-width: 560px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.hot { background: var(--neon); border-color: var(--neon); color: #fff; box-shadow: 0 0 18px rgba(255,62,165,.55); }
.btn.hot:hover { background: var(--accent); }

.chips { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }
.chip.hot { color: var(--sale); }
.chip.hot.on { background: var(--sale); border-color: var(--sale); color: #fff; }
.catbar .chip { background: transparent; color: #e9dbe5; border-color: rgba(255,255,255,.16); font-size: 13.5px; padding: 6px 13px; }
.catbar .chip:hover { border-color: var(--neon); color: #fff; }
.catbar .chip.on { background: var(--neon); border-color: var(--neon); color: #fff; box-shadow: 0 0 12px rgba(255,62,165,.5); }
.catbar .chip.hot { color: #ffb3d9; }

/* Estantes (portada) */
.shelf { padding: 26px 0 4px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.shelf-head h2, .list-head h2 { margin: 0; font-family: var(--display); font-size: clamp(19px, 2.6vw, 24px); font-weight: 800; letter-spacing: -.01em; }
.shelf.hot .shelf-head h2 { color: var(--accent); }
.see-all { border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 14px; white-space: nowrap; padding: 4px 0; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.row > .card { scroll-snap-align: start; }
@media (max-width: 520px) { .row { grid-auto-columns: 162px; gap: 10px; } }
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 22px 0 16px; flex-wrap: wrap; }
.list-head p { margin: 4px 0 0; font-size: 14px; }
.list-head select { width: auto; }
.back { border: 0; background: none; color: var(--muted); font-weight: 600; padding: 0; margin-bottom: 6px; font-size: 14px; }
.back:hover { color: var(--accent); }

.badge.vol { background: var(--vol-soft); color: var(--vol); }
.vol-line { font-size: 12.5px; color: var(--vol); font-weight: 600; }
.vol-line b { font-weight: 800; }
.vol-cta { color: var(--vol); background: var(--vol-soft); justify-content: flex-start; }
.vol-cta:hover { background: #e2d4fb; }
.upsell { display: inline-block; border: 1px dashed var(--vol); background: var(--vol-soft); color: var(--vol); border-radius: 8px; padding: 3px 8px; font-size: 12px; font-weight: 700; margin-top: 4px; }
.saving { display: flex; justify-content: space-between; font-size: 14px; color: var(--ok); font-weight: 600; margin-bottom: 4px; }

.join { background: var(--night); color: #fff; margin-top: 40px; }
.join-in { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; }
.join h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 800; font-size: 22px; }
.join h2::after { content: ' 💬'; }
.join p { margin: 0; color: #e4d6e0; }
.foot-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.foot-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.foot p { margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; padding-bottom: 40px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-img { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--surface-2); width: 100%; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img .badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.card.soldout .card-img img, .card.soldout .ph { opacity: .45; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #9aa3b2; background: linear-gradient(135deg, #fbeef5, #f1e4f7); letter-spacing: -.02em; }
.ph span { font-size: 54px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.12)); }
.line .ph span, .pcell .ph span { font-size: 24px; }
.ph[data-cat="Limpieza del hogar"] { background: linear-gradient(135deg, #fde7f2, #f9d3e8); }
.ph[data-cat="Papeles y desechables"] { background: linear-gradient(135deg, #f3ecff, #e6dafc); }
.ph[data-cat="Lavado de ropa"] { background: linear-gradient(135deg, #e6f0ff, #d5e4fb); }
.ph[data-cat="Cuidado personal"] { background: linear-gradient(135deg, #fff0e8, #fde0d0); }
.ph[data-cat="Lácteos"] { background: linear-gradient(135deg, #f2f8ff, #e2eefb); }
.ph[data-cat="Congelados"] { background: linear-gradient(135deg, #e7f8fc, #cfeef7); }
.ph[data-cat="Despensa"] { background: linear-gradient(135deg, #fff7e2, #fbebc0); }
.ph[data-cat="Bebidas y snacks"] { background: linear-gradient(135deg, #ffecec, #fbd6d6); }
.ph[data-cat="Hogar y otros"] { background: linear-gradient(135deg, #f1efe9, #e5e1d6); }
.card-img.has-img { background: var(--night); }
.card-img.has-img img { object-position: center 58%; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.card h3 { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card h3 button { border: 0; background: none; padding: 0; text-align: left; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.price b { font-size: 18px; letter-spacing: -.01em; }
.price.sale b { color: var(--sale); }
.price s { color: var(--muted); font-size: 13px; }
.stock-note { font-size: 12px; font-weight: 600; color: var(--warn); min-height: 16px; }
.card-actions { margin-top: auto; padding-top: 8px; }
.stepper { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { border: 0; background: var(--surface-2); width: 38px; height: 38px; display: grid; place-items: center; }
.stepper button:hover { background: var(--line); }
.stepper button:disabled { opacity: .35; }
.stepper output { font-weight: 700; flex: 1; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

.product-modal { width: min(100%, 880px); }
.pm-grid { display: grid; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 700px) { .pm-grid { grid-template-columns: 1fr; } }
.pm-gallery { background: var(--surface-2); }
.pm-main { aspect-ratio: 1; }
.pm-main img { width: 100%; height: 100%; object-fit: cover; }
.pm-gallery.has-img { background: var(--night); }
.pm-gallery.has-img .pm-main { aspect-ratio: 3 / 4; max-height: 78vh; }
.pm-gallery.has-img .pm-main img { object-fit: contain; }
.pm-info .card-cat { border: 0; background: none; padding: 0; text-align: left; color: var(--accent); }
.pm-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.pm-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; width: 58px; height: 58px; flex: none; background: none; }
.pm-thumbs button.on { border-color: var(--accent); }
.pm-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pm-info { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.pm-info h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.pm-info .price b { font-size: 26px; }
.pm-desc { color: var(--muted); white-space: pre-line; margin: 0; }
.pm-close { position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(255,255,255,.9); }
.pm-buy { display: flex; gap: 10px; margin-top: 8px; }
.pm-buy .stepper { width: 130px; flex: none; }
.pm-buy .btn { flex: 1; }

/* Carrito */
.drawer-bg { position: fixed; inset: 0; background: rgba(15,20,30,.45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(100%, 440px); background: var(--surface); z-index: 41; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.15); animation: slide .25s ease-out; }
@keyframes slide { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 18px 18px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px 18px; background: var(--surface); }
.line { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line .thumb { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.line .thumb img, .line .thumb .ph { width: 100%; height: 100%; object-fit: cover; font-size: 18px; }
.line h4 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.line .stepper { width: 110px; margin-top: 6px; }
.line .stepper button { width: 30px; height: 30px; }
.line-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-weight: 700; }
.totals { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.checkout h3 { font-size: 15px; margin: 18px 0 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.seg label { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; font-weight: 600; cursor: pointer; font-size: 14px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.done { text-align: center; padding: 40px 10px; }
.done .big { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 14px; }
.done .big svg { width: 32px; height: 32px; }
.foot { padding: 30px 16px 40px; color: var(--muted); font-size: 13px; text-align: center; }

/* =========================================================
   ADMIN
   ========================================================= */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { background: var(--surface); padding: 28px; border-radius: 18px; box-shadow: var(--shadow); width: min(100%, 380px); }
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card p { margin: 0 0 20px; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: 0 0 8px; }

.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: #10151f; color: #c9d0dc; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .logo { color: #fff; font-weight: 800; font-size: 17px; padding: 6px 10px 18px; letter-spacing: -.02em; }
.side-logo { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; display: block; margin-bottom: 10px; box-shadow: 0 0 0 2px var(--neon), 0 0 14px rgba(255,62,165,.5); }
.side { background: var(--night) !important; }
.side .logo small { display: block; font-weight: 500; color: #8792a6; font-size: 12px; letter-spacing: 0; }
.nav-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: inherit; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; text-align: left; text-decoration: none; }
.nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-btn.on { background: rgba(255,255,255,.1); color: #fff; }
.nav-btn .count { margin-left: auto; background: var(--sale); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.side .spacer { flex: 1; }
.main { padding: 26px 28px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.demo-note { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 18px; }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; z-index: 10; gap: 2px; }
  .side .logo, .side .spacer { display: none; }
  .nav-btn { white-space: nowrap; padding: 9px 11px; }
  .main { padding: 18px 16px 60px; }
}

.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.panel h2 { font-size: 16px; margin: 0 0 14px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols > .panel { margin-bottom: 0; }
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi b { display: block; font-size: 24px; letter-spacing: -.02em; margin-top: 4px; }
.kpi.alert b { color: var(--sale); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input { flex: 1; min-width: 200px; }
.filters select { width: auto; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pcell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.pcell .thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; background: var(--surface-2); }
.pcell .thumb img, .pcell .thumb .ph { width: 100%; height: 100%; object-fit: cover; font-size: 14px; }
.pcell b { display: block; font-weight: 600; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
tr.inactive td { opacity: .55; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-plain li:last-child { border-bottom: 0; }
.qty-pos { color: var(--ok); font-weight: 700; }
.qty-neg { color: var(--danger); font-weight: 700; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #cdd2da; border-radius: 999px; transition: background .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }

.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.img-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.img-item img { width: 100%; height: 100%; object-fit: cover; }
.img-item .tools { position: absolute; inset: auto 4px 4px 4px; display: flex; justify-content: space-between; }
.img-item .tools button { border: 0; background: rgba(0,0,0,.65); color: #fff; border-radius: 6px; padding: 3px 6px; font-size: 11px; font-weight: 600; }
.img-item .main-tag { position: absolute; top: 4px; left: 4px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }
.img-add { border: 2px dashed var(--line); border-radius: 10px; aspect-ratio: 1; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; padding: 6px; }
.img-add:hover { border-color: var(--accent); color: var(--accent); }
.price-preview { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.sect-title { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 0 12px; font-weight: 700; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 8px 0 16px; }

.order { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px; }
.order-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
.order-head h3 { margin: 0; font-size: 16px; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px 18px; font-size: 14px; margin-bottom: 10px; }
.order-items { font-size: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.order-items div { display: flex; justify-content: space-between; padding: 3px 0; gap: 10px; }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.order-foot select { width: auto; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; }

/* =========================================================
   LECTURA FÁCIL (catálogo para adultos mayores)
   Letra grande, alto contraste, todo en una lista vertical
   ========================================================= */
body.shop { font-size: 18px; line-height: 1.5; --muted: #4a4552; color: #15121a; }
.shop .btn { min-height: 48px; font-size: 17px; border-radius: 12px; }
.shop .btn.xl { min-height: 60px; font-size: 20px; font-weight: 800; }
.shop .btn.sm { min-height: 40px; font-size: 15px; }
.shop input[type=text], .shop input[type=tel], .shop input[type=search], .shop textarea { font-size: 18px; padding: 12px 14px; }
.shop .field > span, .field-title { font-size: 16px; font-weight: 700; color: #2a2530; margin: 0 0 6px; }
.shop .search input { height: 50px; font-size: 18px; }
.shop .search input::placeholder { color: #d8c8d4; }
.shop .cart-btn { font-size: 17px; padding: 11px 18px; }
.shop .cart-btn b { min-width: 26px; height: 26px; font-size: 15px; }
.shop .banner { font-size: 16px; padding: 10px 16px; }
.shop #toasts .toast { font-size: 17px; padding: 14px 16px; }

.hero-in { padding-top: 24px; padding-bottom: 26px; }
.hero h1 { font-size: clamp(26px, 6vw, 40px); margin-bottom: 14px; }
.steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; max-width: 640px; }
.steps li { display: flex; gap: 12px; align-items: center; font-size: 18px; color: #f4e9f1; }
.steps li > b:first-child { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--neon); color: #fff; display: grid; place-items: center; font-size: 18px; }

/* Índice de secciones */
.index { padding: 26px 0 8px; }
.index h2 { font-family: var(--display); font-size: 26px; margin: 0; }
.index > p { margin: 4px 0 14px; }
.index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .index-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.index-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; border: 2px solid #ead9e4;
  border-radius: 16px; padding: 14px; min-height: 104px; box-shadow: var(--shadow); }
.index-btn:hover, .index-btn:focus-visible { border-color: var(--accent); outline: none; }
.index-btn .ie { font-size: 30px; line-height: 1; }
.index-btn .in { font-weight: 800; font-size: 18px; line-height: 1.2; margin-top: 4px; }
.index-btn .ic { font-size: 14px; color: var(--muted); }
.index-btn.hot { background: #fff1f6; border-color: var(--sale); }
.index-btn.hot .in { color: var(--sale); }

/* Secciones con la lista completa */
.section { padding-top: 30px; scroll-margin-top: 90px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--night);
  color: #fff; border-radius: 14px; margin-bottom: 12px; position: sticky; top: var(--topbar-h, 128px); z-index: 5; }
.section-head h2 { margin: 0; font-family: var(--display); font-size: 22px; }
.section.hot .section-head { background: var(--sale); }
.section-head .count { font-size: 14px; opacity: .85; white-space: nowrap; }
.section-note { margin: 0 0 12px; font-weight: 600; color: var(--vol); }
.to-index { display: block; margin: 14px auto 0; border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 17px; padding: 10px; }
.search-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 22px 0 14px; }
.search-head h2 { margin: 0; font-size: 22px; }
.count { color: var(--muted); font-weight: 600; }

/* Fila de producto */
.list { display: grid; gap: 12px; }
@media (min-width: 900px) { .list { grid-template-columns: 1fr 1fr; } }
.item { display: grid; grid-template-columns: 112px 1fr; gap: 12px 14px; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); border: 1px solid #efe4ec; }
.item.soldout { background: #f7f5f7; }
.item-img { position: relative; width: 112px; height: 112px; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: var(--surface-2); }
.item-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.item-img.has-img { background: var(--night); }
.item-img .ph span { font-size: 46px; }
.item-img .zoom { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.item.soldout .item-img img, .item.soldout .item-img .ph { opacity: .45; }
.item-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-info .badges { display: flex; flex-wrap: wrap; gap: 5px; }
.item-info .badges:empty { display: none; }
.item h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; }
.item h3 button { border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; }
.item .price b { font-size: 25px; font-weight: 800; }
.item .price s { font-size: 15px; color: #6b6470; }
.shop .vol-line { font-size: 16px; color: var(--vol); font-weight: 600; }
.shop .stock-note { font-size: 15px; font-weight: 700; color: var(--warn); min-height: 0; }
.shop .stock-note.out { color: #6b6470; }
.item-buy { grid-column: 1 / -1; }
.shop .badge { font-size: 13px; padding: 4px 9px; }
.shop .badge.out { background: #e7e3e8; color: #3f3a45; }
.shop .stepper { border: 2px solid var(--accent); border-radius: 12px; }
.shop .stepper button { width: 56px; height: 52px; background: var(--accent-soft); color: var(--accent); }
.shop .stepper button svg { width: 24px; height: 24px; stroke-width: 3; }
.shop .stepper output { font-size: 22px; }
.in-cart { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.in-cart-ok { color: var(--ok); font-weight: 800; font-size: 16px; }
.btn.add svg { width: 22px; height: 22px; stroke-width: 3; }

/* Detalle */
.shop .pm-info h2 { font-size: 24px; }
.shop .pm-info .price b { font-size: 30px; }
.shop .pm-desc { font-size: 17px; color: #3f3a45; }
.pm-buy { flex-direction: column; }
.pm-buy .stepper { width: 100%; }
.shop .pm-close { width: 48px; height: 48px; }
.shop .pm-close svg { width: 26px; height: 26px; }

/* Carrito */
.shop .drawer { width: min(100%, 480px); }
.shop .drawer-head h2 { font-size: 22px; }
.shop .drawer-head .icon-btn svg { width: 28px; height: 28px; }
.shop .line { grid-template-columns: 64px 1fr; align-items: start; }
.shop .line h4 { font-size: 17px; }
.line-price { font-size: 16px; }
.line-price b { font-size: 18px; }
.line-ctrl { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.shop .line .stepper { width: 150px; margin: 0; }
.shop .line .stepper button { width: 46px; height: 44px; }
.shop .upsell { font-size: 15px; padding: 6px 10px; margin: 6px 0 2px; }
.shop .checkout h3 { font-size: 20px; }
.shop .seg label { font-size: 17px; padding: 14px 10px; }
.shop .totals { font-size: 24px; }
.shop .saving { font-size: 16px; }
.shop .err { font-size: 17px; font-weight: 700; }

/* Aviso de confirmación */
.confirm-modal { width: min(100%, 480px); }
.confirm-modal .done { padding: 28px 22px 22px; }
.confirm-modal h2 { font-family: var(--display); font-size: 26px; margin: 0 0 4px; }
.cm-code { font-weight: 700; color: var(--muted); margin: 0 0 16px; }
.cm-steps { text-align: left; background: #fff6fb; border: 2px solid #f6c9e1; border-radius: 14px; padding: 4px 16px; margin-bottom: 18px; }
.cm-steps p { font-size: 18px; margin: 12px 0; }
.foot { font-size: 15px; }

/* Aviso de pedido nuevo (panel) */
.order-banner { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px;
  background: var(--night); color: #fff; padding: 12px 12px 12px 18px; border-radius: 14px; box-shadow: 0 0 0 2px var(--neon), 0 10px 40px rgba(214,18,122,.45);
  width: min(94vw, 560px); animation: ring 1s ease-in-out 3; font-size: 16px; }
.order-banner span { flex: 1; }
.order-banner .icon-btn { color: #fff; }
@keyframes ring { 0%, 100% { transform: translateX(-50%) rotate(0); } 25% { transform: translateX(-50%) rotate(-1.5deg); } 75% { transform: translateX(-50%) rotate(1.5deg); } }
.alert-btn { background: var(--accent) !important; color: #fff !important; animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,62,165,.25); } }
.shop .search input { padding-left: 44px; }
.shop .search svg { left: 14px; width: 20px; height: 20px; }
.section-head .count { color: #f3e6ef; }

/* Venta por paquete completo (manga, caja…) */
.buy-two { display: grid; gap: 8px; }
.btn.pack-btn { background: var(--vol); border-color: var(--vol); color: #fff; font-weight: 800; white-space: normal; text-align: center; }
.btn.pack-btn:hover { background: #5b21b6; }
.item-buy .pack-btn { margin-top: 8px; }
.buy-two .pack-btn { margin-top: 0; }
.vol-sub { display: block; font-weight: 500; font-size: 14px; color: #5b4a7a; }
.pm-buy .pack-btn { margin: 0; }
.btn.pack-btn svg { width: 22px; height: 22px; stroke-width: 3; flex: none; }

/* Tienda física */
.visit { background: #fff; border-top: 1px solid #efe4ec; margin-top: 40px; }
.visit-in { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: center; padding-top: 30px; padding-bottom: 30px; }
@media (max-width: 760px) { .visit-in { grid-template-columns: 1fr; } }
.visit h2 { font-family: var(--display); font-size: 26px; margin: 0 0 10px; }
.visit-addr { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.visit-hours { font-size: 18px; margin: 0 0 18px; color: #3f3a45; }
.visit-map iframe { width: 100%; height: 300px; border: 0; border-radius: 16px; box-shadow: var(--shadow); }
.visit + .join { margin-top: 0; }
.visit-hours { white-space: pre-line; line-height: 1.6; }
.foot-addr { font-weight: 600; color: var(--text); margin: 0 0 10px !important; }
