/* =============================================================
   TIENDA 2026 — diseño neón + burbujas (solo index.html)
   Se carga DESPUÉS de styles.css y solo afecta a body.shop:
   el panel de administración no cambia.
   Concepto: letrero neón ciruela/magenta arriba, catálogo claro y
   fácil de leer abajo, pedido con estilo de chat de WhatsApp.
   ============================================================= */
body.shop {
  --plum: #1d0a22;
  --plum-2: #2c1033;
  --magenta: #ff2e93;
  --magenta-d: #d10f6f;
  --bubble: #5fe0ff;
  --lemon: #ffe14d;
  --paper: #fff6fa;
  --ink: #2a1430;
  --ink-2: #6d5a73;
  --line-2: #f1dbe7;
  --chat: #efe6dd;
  --chat-me: #d9fdd3;
  --chat-head: #0b5c4b;
  --accent: #e0137c;
  --accent-soft: #ffe3f0;
  --night: var(--plum);
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
}
body.shop :focus-visible { outline: 3px solid var(--bubble); outline-offset: 2px; }

/* ---------- Barra superior fija: logo, estado, pedido + categorías y buscador ---------- */
body.shop .topbar { background: rgba(29, 10, 34, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(29, 10, 34, .25); z-index: 30; }
body.shop .topbar-in { height: 64px; flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; }
body.shop .brand { flex: none; }
body.shop .brand-logo { width: 44px; height: 44px; box-shadow: 0 0 0 2px var(--magenta), 0 0 18px rgba(255, 46, 147, .55); }
body.shop .brand-name { font-family: var(--display); font-weight: 800; text-transform: none; font-size: 21px; text-shadow: none; }
.open-status { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 14.5px; color: #e9d6ee; white-space: nowrap; }
.open-status i { width: 10px; height: 10px; border-radius: 50%; background: #8a7a90; flex: none; }
.open-status.open i { background: #3ee07f; animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(62, 224, 127, .7); } 70%, 100% { box-shadow: 0 0 0 9px rgba(62, 224, 127, 0); } }
body.shop .cart-btn { background: var(--magenta); box-shadow: 0 0 22px rgba(255, 46, 147, .5); }
body.shop .cart-btn b { color: var(--magenta-d); }

body.shop .tools { display: flex; gap: 10px; padding-bottom: 12px; }
body.shop .sec-btn { order: 0; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--lemon); color: var(--ink); font-weight: 800; font-size: 16px; }
body.shop .sec-btn:hover, body.shop .sec-btn.on { background: #ffd51f; color: var(--ink); }
body.shop .sec-btn .chev { font-style: normal; transition: transform .25s; }
body.shop .sec-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
body.shop .tools .search { order: 0; flex: 1 1 auto; flex-basis: auto; min-width: 0; }
body.shop .tools .search input { height: 48px; background: #fff; border: 0; color: var(--ink); font-weight: 500; }
body.shop .tools .search input::placeholder { color: #9a8aa0; }
body.shop .tools .search input:focus { box-shadow: 0 0 0 3px rgba(95, 224, 255, .55); }
body.shop .tools .search svg { color: var(--ink-2); }

/* Menú desplegable de categorías */
body.shop .sec-menu { position: absolute; left: 0; right: 0; top: 100%; background: transparent; border: 0; box-shadow: none; max-height: none; overflow: visible; }
body.shop .sec-grid { background: #fff; border-radius: 20px; padding: 12px; margin-top: -4px; box-shadow: 0 24px 60px rgba(29, 10, 34, .35);
  max-height: min(70vh, 560px); overflow-y: auto; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; animation: drop .22s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
body.shop .sec-item { background: transparent; border: 0; color: var(--ink); border-radius: 12px; min-height: 50px; }
body.shop .sec-item:hover { background: #fdeef5; border-color: transparent; }
body.shop .sec-item .in { font-size: 16px; }
body.shop .sec-item .ic { background: #f6e9f0; color: var(--ink-2); opacity: 1; }
body.shop .sec-item.star { background: #fff6cc; }
body.shop .sec-item.hot { background: #ffe9e4; }
body.shop .sec-item.sec-top { color: var(--ink-2); }

/* ---------- Portada: letrero neón + burbujas + chat "cómo pedir" ---------- */
body.shop .hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 85% 10%, #4a1452 0%, var(--plum) 55%); }
#bubbles { position: absolute; inset: 0; width: 100%; height: 100%; }
body.shop .hero-in { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 72px; pointer-events: none; }
body.shop .hero-in > * { pointer-events: auto; }
body.shop .hero h1.neon { font-family: var(--display); font-weight: 800; font-size: clamp(42px, 6.6vw, 88px); line-height: .96; letter-spacing: -.03em; margin: 0 0 22px; color: #ffe9f4;
  text-shadow: 0 0 6px #fff, 0 0 18px var(--magenta), 0 0 42px var(--magenta), 0 0 80px rgba(255, 46, 147, .6); text-wrap: balance; }
.neon.on { animation: flicker 1.6s steps(1) both; }
@keyframes flicker { 0% { opacity: .15; text-shadow: none; } 8% { opacity: 1; } 12% { opacity: .2; text-shadow: none; } 18% { opacity: 1; } 22% { opacity: .35; } 26%, 100% { opacity: 1; } }
body.shop .hero-tag { font-size: 19px; color: #ecd9f0; max-width: 36ch; margin: 0 0 24px; opacity: 1; }
.comunas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; font-size: 15.5px; color: #e4cfe9; }
.comunas span { border: 1.5px solid rgba(95, 224, 255, .6); color: #bff3ff; border-radius: 999px; padding: 5px 13px; font-weight: 700; }
.howto { justify-self: end; width: 100%; max-width: 400px; background: var(--chat); color: var(--ink); border-radius: 28px; padding: 0 18px 18px; transform: rotate(1.5deg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: hidden; }
.howto-head { display: flex; align-items: center; gap: 10px; background: var(--chat-head); color: #fff; margin: 0 -18px 12px; padding: 12px 16px; font-weight: 700; }
.howto-head img { width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.howto-head small { display: block; font-weight: 400; opacity: .8; font-size: 12px; }
.msg { max-width: 88%; margin: 8px 0; padding: 9px 12px; border-radius: 12px; font-size: 15.5px; line-height: 1.35; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.msg.show { opacity: 1; transform: none; }
.msg.me { margin-left: auto; background: var(--chat-me); border-top-right-radius: 4px; }
.msg.them { background: #fff; border-top-left-radius: 4px; }
.msg .n { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--magenta); color: #fff; font-size: 12px; margin-right: 6px; }

/* ---------- Secciones ---------- */
body.shop main#main { padding-bottom: 20px; }
body.shop .section { padding-top: 44px; scroll-margin-top: 150px; }
body.shop .section-head { position: static; background: none; color: var(--ink); padding: 0; border-radius: 0; margin-bottom: 18px; align-items: flex-end; flex-wrap: wrap; }
body.shop .section-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4vw, 42px); line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; }
body.shop .section-head .count { color: var(--ink-2); background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; font-size: 14px; opacity: 1; }
body.shop .section.hot .section-head, body.shop .section.star .section-head { background: none; }
body.shop .section.hot .section-head h2 { color: #c4321c; }
body.shop .section-note { font-size: 16px; color: var(--ink-2); font-weight: 600; margin: -8px 0 18px; }
body.shop .section-note.relampago { background: none; padding: 0; color: #5b4a1a; }
/* Ofertas relámpago: franja amarilla de lado a lado (estilo afiche) */
body.shop .section.star { position: relative; padding-bottom: 40px; margin-bottom: 4px;
  box-shadow: 0 0 0 100vmax var(--lemon); clip-path: inset(0 -100vmax);
  background: var(--lemon); background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .035) 0 14px, transparent 14px 28px); }
body.shop .section.star .to-index { background: #fff; border-color: var(--ink); color: var(--ink); }
body.shop .to-index { margin-top: 22px; border: 1.5px solid var(--line-2); padding: 10px 20px; font-size: 16px; color: var(--magenta-d); }
/* Llamado "Lleva más, paga menos": botón en la portada y franja después de las ofertas relámpago */
body.shop .hero .mayor-cta { display: inline-flex; margin: 0 0 22px; border: 0; border-radius: 999px; min-height: 50px; padding: 12px 22px; font-weight: 800; font-size: 17px;
  background: #7c3aed; color: #fff; box-shadow: 0 0 24px rgba(124, 58, 237, .65); }
body.shop .hero .mayor-cta:hover { background: #6d28d9; }
body.shop .hero .mayor-cta[hidden] { display: none; }
.mayor-banner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; margin: 44px 0 0; padding: 26px 28px; border-radius: 26px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #7c3aed 0%, #4c1d95 45%, var(--plum) 100%); box-shadow: 0 18px 40px rgba(76, 29, 149, .25); }
.mayor-banner h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4vw, 40px); line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; }
.mayor-banner p { margin: 0 0 16px; color: #e9ddff; font-size: 17px; max-width: 46ch; }
.mayor-banner p b { color: #fff; }
body.shop .mayor-banner .mb-btn { background: var(--lemon); border: 0; color: var(--ink); border-radius: 999px; font-weight: 800; min-height: 50px; padding: 12px 22px; }
body.shop .mayor-banner .mb-btn:hover { background: #ffd51f; }
.mb-ej { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; text-align: left; background: #fff; color: var(--ink); border: 0; border-radius: 20px; padding: 12px; cursor: pointer; font: inherit; }
.mb-ej img, .mb-ej .ph { width: 96px; height: 96px; object-fit: contain; border-radius: 14px; background: #fdeef5; }
.mb-ej b { display: block; font-size: 16px; line-height: 1.25; }
.mb-ej .mb-precio { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.mb-ej .mb-precio s { color: var(--ink-2); font-size: 15px; }
.mb-ej .mb-precio b { display: inline; font-family: var(--display); font-size: 24px; color: #6d28d9; }
.mb-ej small { color: var(--ink-2); font-size: 14px; }
@media (max-width: 760px) { .mayor-banner { grid-template-columns: 1fr; padding: 22px 18px; margin-top: 34px; } }
body.shop .filtro-volver { margin: 0 0 18px; border-radius: 999px; min-height: 44px; font-size: 16px; }
body.shop .badge.vol { background: #f1eafe; color: #6d28d9; }
body.shop .search-head h2 { font-family: var(--display); font-size: 30px; }

/* ---------- Cuadrícula de productos (solo hacia abajo) ---------- */
body.shop .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line-2); border-radius: 22px; padding: 14px; transition: border-color .2s; min-width: 0; }
.pcard:hover { border-color: #f3b3d2; }
.pcard.featured { border: 2.5px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.pcard .bolt { position: absolute; top: -12px; right: -8px; z-index: 2; background: var(--magenta); color: #fff; font: 800 14px var(--display); padding: 5px 11px; border-radius: 999px;
  transform: rotate(6deg); border: 2px solid var(--ink); }
.pcard-img { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 100%; border: 0; padding: 0; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle at 50% 58%, #fff 0 46%, #fdeef5 47%); cursor: zoom-in; }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; }
.pcard-img.pack { background: var(--plum); }
.pcard-img.pack img { object-fit: cover; object-position: center 58%; }
.pcard-img .ph { border-radius: 16px; }
.pcard-img .zoom { position: absolute; left: 8px; bottom: 8px; background: rgba(29, 10, 34, .75); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; }
.pcard.soldout .pcard-img img, .pcard.soldout .pcard-img .ph { opacity: .45; }
.pcard.soldout { background: #faf7f9; }
.pcard-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.pcard-info .badges { display: flex; flex-wrap: wrap; gap: 5px; }
.pcard-info .badges:empty { display: none; }
.pcard.featured .badge.star { display: none; } /* ya lo dice el sello "⚡ Oferta" */
.pcard h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.pcard h3 button { border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.pcard h3 button:hover { color: var(--magenta-d); }
body.shop .pcard .price b { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
body.shop .pcard .price s { font-size: 14px; color: var(--ink-2); }
body.shop .vol-line { font-size: 14.5px; color: #6d28d9; line-height: 1.35; }
body.shop .vol-sub { font-size: 13px; }
body.shop .stock-note { font-size: 14px; color: #b4235a; }
.pcard .item-buy { margin-top: auto; }

/* Barra "lleva más, paga menos" */
.tier { margin-top: 6px; }
.tierbar { display: flex; gap: 4px; }
.tierbar i { flex: 1; height: 6px; border-radius: 3px; background: var(--line-2); transition: background .3s; }
.tierbar i.on { background: var(--bubble); }
.tier.full .tierbar i { background: #3ee07f; }
.tier-txt { margin: 6px 0 0; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.tier-txt b { color: var(--magenta-d); }
.tier-txt .ok { color: #127a3f; font-weight: 700; }
.tier.pop { animation: pop .5s; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* Botones de compra dentro de la tarjeta */
body.shop .pcard .btn { border-radius: 999px; min-height: 48px; }
body.shop .pcard .btn.primary { background: var(--magenta); border-color: var(--magenta); }
body.shop .pcard .btn.primary:hover { background: var(--magenta-d); }
body.shop .pcard .in-cart { grid-template-columns: 1fr; gap: 4px; }
body.shop .pcard .in-cart-ok { font-size: 14px; text-align: center; }
body.shop .pcard .stepper { background: var(--plum); border: 0; border-radius: 999px; padding: 4px; }
body.shop .pcard .stepper button { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; }
body.shop .pcard .stepper button:hover:not(:disabled) { background: var(--magenta); }
body.shop .pcard .stepper output { color: #fff; font-family: var(--display); font-size: 20px; }
body.shop .pcard .pack-btn { font-size: 14.5px; line-height: 1.25; padding: 10px 12px; }

/* ---------- Pedido (estilo chat de WhatsApp) ---------- */
body.shop .drawer { background: var(--chat); }
body.shop .drawer-head { background: var(--chat-head); color: #fff; border: 0; gap: 12px; justify-content: flex-start; }
body.shop .drawer-head img { width: 40px; height: 40px; border-radius: 50%; background: #fff; flex: none; }
body.shop .drawer-head h2 { flex: 1; font-family: var(--display); font-weight: 800; }
body.shop .drawer-head h2 small { display: block; font: 400 13px var(--font); opacity: .85; }
body.shop .drawer-head .icon-btn { color: #fff; }
body.shop .drawer-body { padding-top: 14px; }
body.shop .drawer-body .line { background: var(--chat-me); border-radius: 14px; border-top-right-radius: 4px; padding: 10px 12px; margin: 0 0 8px; border: 0; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
body.shop .drawer-body .checkout { background: #fff; border-radius: 18px; padding: 14px 16px 6px; margin-top: 14px; }
body.shop .drawer-foot { background: #fff; }
body.shop .drawer-foot .totals span:last-child { font-family: var(--display); font-weight: 800; }
.dias-despacho .days { display: flex; gap: 4px; margin: 6px 0; }
.dias-despacho .days i { flex: 1; text-align: center; font-style: normal; font-weight: 800; font-size: 13px; border-radius: 8px; padding: 4px 0; background: #fff; color: #b5aab8; border: 1px solid var(--line-2); }
.dias-despacho .days i.on { background: #1fae55; border-color: #1fae55; color: #fff; }

/* Barra de pedido en celular */
.mbar { display: none; }
@media (max-width: 900px) {
  .mbar:not([hidden]) { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 0; border-radius: 18px; padding: 12px 16px; background: var(--plum); color: #fff; text-align: left; box-shadow: 0 10px 30px rgba(29, 10, 34, .4); animation: subir .3s ease-out; }
  .mbar small { display: block; font-size: 13px; color: #e4cfe9; }
  .mbar b { font: 800 21px var(--display); }
  .mbar .go { background: #1fae55; border-radius: 999px; padding: 9px 16px; font-weight: 800; font-size: 15px; }
  body.shop:has(.mbar:not([hidden])) .foot { padding-bottom: 110px; }
  body.shop #toasts { bottom: 96px; }
}
@keyframes subir { from { transform: translateY(140%); } }

/* ---------- Tienda física, días de despacho y grupo ---------- */
body.shop .visit { background: var(--plum); color: #fff; border: 0; margin-top: 50px; }
body.shop .visit-in { align-items: start; gap: 40px; padding-top: 56px; padding-bottom: 56px; }
body.shop .visit h2 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.02em; }
body.shop .visit-addr { color: #fff; }
body.shop .visit-hours { color: #e4cfe9; }
.hours { list-style: none; padding: 0; margin: 14px 0 22px; max-width: 380px; }
.hours li { display: flex; justify-content: space-between; padding: 7px 12px; border-radius: 10px; color: #d8c3de; font-size: 16.5px; }
.hours li.today { background: rgba(255, 46, 147, .18); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--magenta); }
.visit-btns { display: grid; gap: 10px; max-width: 420px; }
body.shop .visit .btn.review { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.visit-side { display: grid; gap: 14px; min-width: 0; }
.zones { display: grid; gap: 10px; }
.zone { display: flex; align-items: center; gap: 14px; background: var(--plum-2); border: 1px solid rgba(95, 224, 255, .25); border-radius: 14px; padding: 14px 16px; }
.zone .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--bubble); box-shadow: 0 0 12px var(--bubble); flex: none; }
.zone strong { font: 700 19px var(--display); }
.zone small { display: block; color: #d6c2db; font-size: 15px; }
body.shop .visit-map iframe { height: 240px; }
body.shop .join { background: linear-gradient(100deg, var(--magenta), #c4127a); }
body.shop .join h2 { font-family: var(--display); }
body.shop .join p { color: #ffe3f0; }
body.shop .info h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; }
body.shop .info-card { border-color: var(--line-2); border-radius: 18px; }
body.shop .foot { background: #14061a; color: #a993b0; margin-top: 0; }
body.shop .foot-links a, body.shop .foot-addr { color: #fff; }

/* ---------- Celular ---------- */
@media (max-width: 900px) {
  body.shop .hero-in { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; padding-bottom: 48px; }
  .howto { justify-self: start; transform: none; }
}
@media (max-width: 760px) {
  .open-status span { display: none; }
  body.shop .hero h1.neon { font-size: clamp(38px, 11vw, 56px); margin-bottom: 16px; }
  body.shop .hero-tag { font-size: 16.5px; margin-bottom: 16px; }
  body.shop .sec-grid { grid-template-columns: 1fr 1fr; }
  body.shop .section { padding-top: 34px; }
}
@media (max-width: 560px) {
  body.shop .topbar-in { height: 58px; }
  body.shop .brand-name { display: none; }
  body.shop .cart-btn .cart-label { display: none; }
  body.shop .sec-btn { padding: 0 14px; font-size: 15px; }
  body.shop .list { grid-template-columns: 1fr 1fr; gap: 16px 10px; }
  .pcard { padding: 10px; gap: 8px; border-radius: 18px; }
  .pcard.featured { border-width: 2px; box-shadow: 3px 3px 0 var(--ink); }
  .pcard .bolt { font-size: 12px; padding: 4px 8px; right: -5px; }
  .pcard h3 { font-size: 15px; }
  body.shop .pcard .price b { font-size: 23px; }
  body.shop .vol-line, .tier-txt { font-size: 13px; }
  body.shop .pcard .btn { min-height: 44px; font-size: 15px; padding: 8px 10px; }
  body.shop .pcard .stepper button { width: 36px; height: 36px; }
  body.shop .pcard .pack-btn { font-size: 13px; }
  .pcard-img .zoom { font-size: 11px; left: 6px; bottom: 6px; }
  .howto { padding: 0 14px 14px; }
  .howto-head { margin: 0 -14px 10px; }
}
@media (max-width: 380px) { body.shop .sec-btn span { display: inline; } } /* styles.css la escondía a este ancho */
@media (max-width: 340px) { body.shop .sec-btn span { display: none; } }

@media (prefers-reduced-motion: reduce) {
  body.shop *, body.shop *::before, body.shop *::after { animation: none !important; transition: none !important; }
  .msg { opacity: 1; transform: none; }
}
