/* FILE: biblias.css — limpio y consolidado */
/* =======================================================================================
   BASE / RESET
   ======================================================================================= */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
img{max-width:100%;display:block}
button,input,select,textarea{font:inherit}
[hidden]{display:none!important}

/* Accesibilidad base */
:where(a,button,input,select,textarea){outline:none}
:where(a,button):focus-visible{outline:3px solid #22d3ee; outline-offset:2px; border-radius:8px}
.visually-hidden{position:absolute!important;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;overflow:hidden;white-space:nowrap}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
}

:root{
  /* Paleta */
  --mx-green:#006847; --mx-white:#ffffff; --mx-red:#ce1126;
  --ink:#0f172a; --muted:#64748b;
  --bg:#f6f7fb; --card:#ffffff; --soft:#f1f5f9; --border:#e6e8ef;
  --accent:var(--mx-green); --accent-2:var(--mx-red);
  --radius:14px; --shadow:0 18px 50px rgba(2,6,23,.12);
}
@media (prefers-color-scheme:dark){
  :root{
    --ink:#e2e8f0; --muted:#94a3b8;
    --bg:#0b1220; --card:#0f172a; --soft:#0b1420; --border:#1e2a3e;
    --shadow:0 25px 70px rgba(0,0,0,.45);
  }
}
body{
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  color:var(--ink); background:var(--bg); line-height:1.5;
}

/* =======================================================================================
   HEADER (con franja tricolor)
   ======================================================================================= */
.header{
  position:sticky; top:0; z-index:60; background:var(--card);
  border-bottom:1px solid var(--border);
  display:grid; grid-template-columns:auto 1fr auto auto;
  gap:.6rem; align-items:center; padding:.7rem 1rem;
}
.header::after{
  content:""; display:block; height:4px;
  background:linear-gradient(90deg,var(--mx-green) 0 33.3%,var(--mx-white) 33.3% 66.6%,var(--mx-red) 66.6% 100%);
}
.logo{display:flex;align-items:center;gap:.6rem;color:inherit;text-decoration:none}
.logo img{width:40px;height:40px;object-fit:contain}

.menu-toggle{display:none;background:transparent;border:0}
.menu-toggle span{display:block;width:22px;height:3px;background:currentColor;margin:4px 0;border-radius:2px}

.nav{display:flex;gap:.6rem}
.nav a{color:inherit;text-decoration:none;font-weight:700;padding:.35rem .6rem;border-radius:.55rem}
.nav a.active,.nav a:hover{background:rgba(0,104,71,.08)}

.header__cta{
  background:var(--accent); color:#fff; padding:.55rem .85rem;
  border-radius:.65rem; text-decoration:none; font-weight:800;
}
@media (max-width:940px){
  .header{grid-template-columns:auto auto 1fr auto}
  .menu-toggle{display:block}
  .nav{display:none}
}

/* Buscador en header */
.header-search{min-width:220px; max-width:520px; width:100%}
.header-search .group{position:relative;display:flex;align-items:center}
.header-search .search-icon{position:absolute;left:.7rem;width:18px;height:18px;fill:#6b7280;pointer-events:none}
.header-search input{
  width:100%;height:44px;padding:.6rem .9rem .6rem 2.3rem;
  border:1px solid var(--border);border-radius:.7rem;background:#f9fbff;color:var(--ink);
}
.header-search input:focus{border-color:#9ec9b7;box-shadow:0 0 0 3px rgba(20,184,166,.15);background:#fff}

/* =======================================================================================
   BREADCRUMB / TOOLBAR
   ======================================================================================= */
.breadcrumb{
  max-width:1200px;margin:10px auto 0;padding:0 12px;color:var(--muted);
  display:flex;gap:8px;align-items:center
}
.breadcrumb a{color:inherit;text-decoration:none}
.breadcrumb a:hover{color:var(--ink)}

.toolbar{
  max-width:1200px;margin:10px auto;padding:0 12px;
  display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap
}
.left-tools{display:flex;align-items:center;gap:10px}
.sorter{display:flex;align-items:center;gap:8px}
.filter-btn{
  border:1px solid var(--border);background:#fff;border-radius:.65rem;
  padding:.5rem .7rem;font-weight:800;cursor:pointer
}

/* =======================================================================================
   BOTONES
   ======================================================================================= */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;cursor:pointer;font-weight:800;padding:.6rem .9rem;border-radius:.65rem;border:1px solid transparent;transition:filter .15s ease,transform .05s ease}
.btn:active{transform:translateY(1px)}
.btn.primary{background:var(--accent);color:#fff}
.btn.primary:hover{filter:brightness(1.05)}
.btn.secondary{background:#fff;color:var(--accent);border-color:var(--accent)}
.btn.ghost{background:#fff;border:1px solid var(--border);color:inherit}
.btn.danger{background:var(--mx-red);color:#fff}
.btn.flag{color:#fff;border:0;background:linear-gradient(90deg,var(--mx-green),#1aa36f 33%,#e3e3e3 33% 66%,#ff3b3b 66%)}

/* =======================================================================================
   DRAWER DE FILTROS
   ======================================================================================= */
.filters-drawer{
  position:fixed; inset:auto 0 0 auto; right:-380px; width:min(94vw,360px); height:100%;
  background:var(--card); border-left:1px solid var(--border); box-shadow:var(--shadow);
  transition:right .28s ease; z-index:60; overflow:auto
}
.filters-drawer[aria-hidden="false"]{right:0}
.filters-drawer__header{
  position:sticky; top:0; background:var(--card); border-bottom:1px solid var(--border);
  padding:.8rem 1rem; display:flex; justify-content:space-between; align-items:center
}
.icon-btn{background:#fff;border:1px solid var(--border);border-radius:.55rem;padding:.3rem .6rem;cursor:pointer}
.filters-form{padding:10px 12px;display:grid;gap:14px}
.filters-form fieldset{border:1px solid var(--border);border-radius:.7rem;padding:.6rem;margin:0}
.filters-form legend{padding:0 .35rem;font-weight:800}
.price-field .price-row{display:flex;gap:8px;align-items:center}
.price-field input{width:100%}
.filters-actions{display:flex;gap:8px;justify-content:flex-end}
.backdrop{position:fixed;inset:0;background:rgba(2,6,23,.45);z-index:55}

/* =======================================================================================
   META / VISTA
   ======================================================================================= */
.catalog-meta{
  max-width:1200px;margin:6px auto 0;padding:0 12px;
  display:flex;align-items:center;justify-content:space-between
}
.view-toggle button{
  border:1px solid var(--border);background:#fff;border-radius:.55rem;
  padding:.35rem .6rem;cursor:pointer;font-weight:800
}
.view-toggle .active{border-color:var(--accent);box-shadow:0 0 0 2px rgba(0,104,71,.18)}

/* =======================================================================================
   GRID / LISTA
   ======================================================================================= */
.grid{
  max-width:1200px;margin:12px auto 24px;padding:0 12px;
  display:grid;grid-template-columns:repeat(4,1fr);gap:12px
}
@media (max-width:1100px){.grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:800px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:540px){.grid{grid-template-columns:1fr}}
.grid.list{grid-template-columns:1fr}
.grid.list .card-product{flex-direction:row;align-items:stretch}
.grid.list .card-media{flex:0 0 210px}
.grid.list .info{padding:12px}

/* =======================================================================================
   CARD DE PRODUCTO
   ======================================================================================= */
.card-product{
  display:flex;flex-direction:column;background:var(--card);
  border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:0 12px 28px rgba(2,6,23,.08);overflow:hidden;
  transition:transform .15s ease,box-shadow .15s ease
}
.card-product:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.card-media{position:relative;background:#000}
.card-media img{width:100%;height:100%;object-fit:cover;display:block;aspect-ratio:4/5}
.badge{position:absolute;top:10px;right:10px;background:#1842e6;color:#fff;padding:.25rem .5rem;border-radius:.55rem;font-weight:800}
.info{padding:.85rem;display:flex;flex-direction:column;gap:.45rem}
.info h3{margin:0;font-size:1.03rem;line-height:1.25}
.meta{color:var(--muted);font-size:.92rem}
.actions{margin-top:.5rem;display:flex;gap:8px;flex-wrap:wrap}

/* Swatches en card */
.color-inline{display:flex;gap:6px;align-items:center;margin:.45rem 0 .2rem}
.color-inline .sw{width:18px;height:18px;border-radius:999px;border:2px solid #e5e7eb;background:var(--sw,#ddd);cursor:pointer}
.color-inline small{opacity:.75}

/* =======================================================================================
   MINI-CART
   ======================================================================================= */
.mini-cart{position:fixed;right:14px;bottom:14px;z-index:70}
.mini-cart__toggle{
  background:var(--card);border:1px solid var(--border);border-radius:.8rem;
  padding:.55rem .8rem;box-shadow:0 10px 28px rgba(2,6,23,.15);font-weight:800;cursor:pointer
}
.mini-cart .qty{background:var(--accent);color:#fff;padding:.05rem .35rem;border-radius:.5rem;margin-left:.35rem}
.mini-cart__panel{
  display:none;margin-top:8px;background:var(--card);
  border:1px solid var(--border);border-radius:.8rem;box-shadow:var(--shadow);
  width:min(92vw,360px);max-height:60vh;overflow:auto
}
.mini-cart__items{list-style:none;margin:0;padding:.6rem;display:flex;flex-direction:column;gap:.5rem}
.mini-cart__footer{border-top:1px solid var(--border);padding:.6rem}
.mini-cart .line{display:flex;justify-content:space-between;align-items:center}

/* =======================================================================================
   FAB DE MÚSICA (coincide con #musicPanel, etc.)
   ======================================================================================= */
.music-card.floating{
  position:fixed; right:16px; bottom:86px; z-index:65;
  width:min(92vw,420px); max-width:420px;
  background:#fff; border:1px solid var(--border); border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.18);
  display:flex; gap:12px; padding:12px; align-items:center; overflow:hidden;
}
.music-card__left{flex:0 0 auto}
.music-card__main{flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:8px}
.collapse-btn{
  position:absolute; right:8px; top:8px;
  border:1px solid var(--border); background:#fff; border-radius:8px;
  padding:2px 6px; font-size:14px; cursor:pointer;
}
.mini-play,.mini-label{display:none}
.music-card.floating.collapsed{
  padding:8px 12px; gap:8px; border-radius:999px;
  width:auto; max-width:calc(100vw - 24px); bottom:16px;
}
.music-card.floating.collapsed .music-card__main{display:none}
.music-card.floating.collapsed .mini-play{
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--border); background:#fff; border-radius:999px; padding:4px 8px; font-weight:800; cursor:pointer
}
.music-card.floating.collapsed .mini-label{
  display:inline; max-width:220px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--ink)
}
.music-card.floating.collapsed .collapse-btn{transform:rotate(180deg)}
.disc{
  width:56px;height:56px;border-radius:50%;display:grid;place-items:center;
  background:radial-gradient(circle at 50% 50%, #000 0 38%, #c81e1e 39% 41%, #000 42% 100%);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.06), inset 0 0 12px rgba(255,255,255,.06);
  animation:spin 4.5s linear infinite;
}
.disc.paused{animation-play-state:paused;opacity:.95}
.disc .label{width:10px;height:10px;border-radius:50%;background:#fff;box-shadow:0 0 0 2px #c81e1e}
@keyframes spin{to{transform:rotate(360deg)}}
@media (max-width:480px){.music-card.floating.collapsed .mini-label{max-width:140px}}

/* =======================================================================================
   MODAL FULLSCREEN DE PRODUCTO (#fsModalTmpl)
   ======================================================================================= */
.fs-backdrop{
  position:fixed; inset:0;
  background:rgba(2,6,23,.6);
  backdrop-filter:saturate(120%) blur(2px);
  z-index:10000; display:flex; align-items:center; justify-content:center;
  padding:16px;
}
.fs-modal{
  background:#0b1220; color:#e5e7eb;
  border:1px solid #1f2937; border-radius:16px;
  max-width:980px; width:100%; max-height:92vh; overflow:hidden;
  display:grid; grid-template-columns:1.2fr 1fr; gap:18px;
  box-shadow:0 30px 100px rgba(0,0,0,.45); position:relative;
}
@media (max-width:900px){ .fs-modal{ grid-template-columns:1fr; max-width:100%; height:100vh; border-radius:0 } }

.fs-left{ background:#0a0f1a; padding:12px; }
.fs-right{ padding:18px 18px 22px; overflow:auto; max-height:90vh; }

.fs-close{
  position:absolute; top:10px; right:12px;
  background:#111827; border:1px solid #1f2937; color:#e5e7eb;
  border-radius:999px; width:36px; height:36px; cursor:pointer; display:grid; place-items:center;
}

.fs-title{ font-size:1.25rem; font-weight:800; line-height:1.2; margin:0 }
.fs-price{ display:flex; gap:10px; align-items:baseline; margin:.4rem 0 }
.fs-price .now{ font-size:1.4rem; font-weight:800; color:#22d3ee }
.fs-price .before{ opacity:.6; text-decoration:line-through }

.fs-meta{font-size:.9rem;opacity:.85}
.fs-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
.btn-xl{padding:14px 18px;border-radius:12px;font-weight:800}
.btn-ghost{background:#111827;color:#e5e7eb;border:1px solid #1f2937}
.btn-primary{background:#22c55e;color:#052e16;border:0}

/* Slider */
.fs-slider{ position:relative; height:100%; display:flex; flex-direction:column }
.fs-stage{
  display:grid; place-items:center; background:#0a0f1a;
  border:1px solid #111827; border-radius:10px; overflow:hidden; aspect-ratio:1/1;
}
.fs-stage img{ width:100%; height:100%; object-fit:contain }
.fs-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  background:#0b1220cc; border:1px solid #1f2937; color:#e5e7eb;
  width:42px; height:42px; border-radius:50%; display:grid; place-items:center; cursor:pointer
}
.fs-arrow.left{ left:10px } .fs-arrow.right{ right:10px }
.fs-nav{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.fs-thumb{
  width:68px; height:68px; border-radius:10px; overflow:hidden;
  border:2px solid transparent; cursor:pointer; opacity:.85; background:#fff;
}
.fs-thumb[aria-current="true"]{ border-color:#22d3ee; opacity:1 }
.fs-thumb img{ width:100%; height:100%; object-fit:cover }

/* Swatches dentro del modal */
.fs-swatches{ display:flex; gap:10px; flex-wrap:wrap; }
.fs-swatches .sw{
  width:28px; height:28px; border-radius:999px;
  border:2px solid #1f2937; box-shadow:0 0 0 2px #0f172a; cursor:pointer; background:var(--sw,#888)
}
.fs-swatches .sw[aria-checked="true"]{ outline:2px solid #22d3ee }

/* Stock + promo (coinciden con JS) */
.prod-meta{display:grid;gap:8px;margin:8px 0 2px}
.badge-oferta{display:inline-block;background:#ef4444;color:#fff;border-radius:8px;padding:2px 8px;font-weight:800;font-size:.75rem;margin-right:.5rem}
.promo-text{font-weight:700}
.stock{display:flex;align-items:center;gap:.5rem;font-weight:700}
.stock-dot{width:.65rem;height:.65rem;border-radius:50%;background:#16a34a}
.stock.low .stock-dot{background:#f59e0b}
.stock.out .stock-dot{background:#ef4444}

/* =======================================================================================
   MODAL DE CHECKOUT (#coModalTmpl)
   ======================================================================================= */
.co-backdrop{
  position:fixed; inset:0; z-index:11000;
  background:rgba(2,6,23,.65);
  backdrop-filter:saturate(120%) blur(2px);
  display:flex; align-items:center; justify-content:center; padding:16px;
}
.co-modal{
  width:min(920px,calc(100vw - 32px)); max-height:92vh; overflow:auto;
  background:#0b1220; color:#e5e7eb;
  border:1px solid #1f2937; border-radius:18px;
  box-shadow:0 30px 100px rgba(0,0,0,.45); position:relative;
}
.co-flag{ height:6px; background:linear-gradient(90deg,#006847 0 33%,#ffffff 33% 66%,#CE1126 66%) }

.co-hdr{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; border-bottom:1px solid #162338;
}
.co-title{ font-size:18px; font-weight:800; letter-spacing:.2px }
.co-close{
  width:34px; height:34px; border-radius:999px;
  background:#111827; border:1px solid #1f2937; color:#e5e7eb; cursor:pointer;
}

.co-body{ display:grid; grid-template-columns:1.15fr .85fr; gap:14px; padding:14px 18px }
.co-col{ background:#0a0f1a; border:1px solid #111827; border-radius:12px; padding:14px }
.co-col h4{ margin:0 0 10px; font-size:14px; font-weight:800; opacity:.95 }

.co-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px }
.co-grid .full{ grid-column:1 / -1 }

.co-field{ display:flex; flex-direction:column; gap:6px }
.co-label{ font-size:12px; opacity:.85 }
.co-input,.co-textarea{
  background:#0b1220; border:1px solid #1f2937; border-radius:10px;
  padding:10px 12px; color:#e5e7eb;
}
.co-input:focus,.co-textarea:focus{ border-color:#006847; box-shadow:0 0 0 2px rgba(0,104,71,.25) }
.co-textarea{ min-height:80px; resize:vertical }
.co-err{ display:none; color:#ff7676; font-size:12px }
.co-field.error .co-input,.co-field.error .co-textarea{ border-color:#CE1126 }
.co-field.error .co-err{ display:block }

.co-summary{ display:flex; flex-direction:column; gap:8px }
.co-item{ display:flex; justify-content:space-between; gap:6px; font-size:13px }
.co-total{ display:flex; justify-content:space-between; gap:6px; margin-top:6px; padding-top:6px; border-top:1px dashed #1f2937; font-weight:800 }

.co-terms{ display:flex; align-items:flex-start; gap:10px; margin-top:10px; font-size:13px }
.co-terms a{ color:#60a5fa; text-decoration:none }
.co-terms a:hover{ text-decoration:underline }

.co-ftr{
  display:flex; gap:10px; justify-content:flex-end;
  padding:12px 18px; border-top:1px solid #162338;
  background:#0a0f1a; border-radius:0 0 18px 18px;
}
.co-btn{ padding:12px 16px; border-radius:12px; border:1px solid transparent; font-weight:800; cursor:pointer }
.co-btn.ghost{ background:#0b1220; border-color:#1f2937; color:#e5e7eb }
.co-btn.primary{ background:#006847; color:#ffffff; border-color:#00543a }
.co-btn.primary:disabled{ opacity:.6; cursor:not-allowed }
@media (max-width:900px){ .co-body{ grid-template-columns:1fr } }

/* =======================================================================================
   FAB DEL CARRITO (coincide con #cartFab / #cartFabCount)
   ======================================================================================= */
.cart-fab,#cartFab{
  position:fixed; left:16px; bottom:16px; z-index:10001;
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 16px; border-radius:999px;
  background:#2563eb; color:#fff; border:1px solid #1d4ed8;
  box-shadow:0 10px 30px rgba(0,0,0,.25); font-weight:700; cursor:pointer;
}
.cart-fab:hover,#cartFab:hover{filter:brightness(1.05)}
.cart-fab__badge,#cartFabCount{
  min-width:22px; height:22px; padding:0 6px; border-radius:999px;
  background:#0b1220; color:#fff; display:inline-flex; align-items:center; justify-content:center;
  font-size:12px; line-height:1;
}

/* ====== Historia (opcional en páginas con sección corporativa) ====== */
.history {
  padding: clamp(24px, 4vw, 48px) 16px;
  background: var(--bg-history, #0b1220);
  color: var(--fg-history, #e5e7eb);
  border-top: 1px solid #1f2937;
}
.history h2 { font-size: clamp(1.6rem, 2.2vw, 2.2rem); margin: 0 0 .5rem; }
.history .lead { color: #9aa3b2; max-width: 60ch; }

.history__hero {
  display: grid; gap: 1.25rem; align-items: center;
  grid-template-columns: 1.2fr .8fr;
}
.history__copy { display: grid; gap: 1rem; }
.history__kv { display:flex; flex-wrap:wrap; gap:.75rem; }
.history__kv .kv { background:#0f172a; border:1px solid #1f2937; border-radius:10px; padding:.6rem .8rem; }
.history__kv .kv strong { display:block; font-size:1.05rem; }
.history__kv .kv span { color:#9aa3b2; font-size:.9rem; }

.history__image { margin:0; }
.history__image img { width:100%; border-radius:12px; border:1px solid #1f2937; }
.history__cta .btn { margin-top:.25rem; }

/* Timeline */
.timeline {
  position: relative;
  margin: clamp(20px, 3vw, 36px) auto;
  padding-left: 1rem;
  max-width: 1100px;
}
.timeline::before {
  content:""; position:absolute; left:10px; top:0; bottom:0;
  width:2px; background: linear-gradient(#1f2937, #374151);
}
.tl-item { display:grid; grid-template-columns: 28px 1fr; gap:.8rem; margin: 1rem 0; }
.tl-item .dot { width:14px; height:14px; border-radius:50%; background:#22c55e; margin-top:.45rem; border:2px solid #052e16; }
.tl-item .card {
  background:#0f172a; border:1px solid #1f2937; border-radius:12px; padding:.9rem 1rem;
}
.tl-title { margin:.1rem 0; font-size:1.05rem; }
.tl-time { color:#9aa3b2; font-size:.9rem; }

/* Misión / Visión / Valores */
.mvv {
  display:grid; gap:1rem; margin-top: clamp(16px, 3vw, 28px);
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.mvv__card {
  background:#0f172a; border:1px solid #1f2937; border-radius:12px; padding:1rem;
}
.mvv__card h3 { margin-top:.25rem; }
.mvv__card ul { margin:.4rem 0 0 1rem; color:#cbd5e1; }

@media (max-width: 900px) {
  .history__hero { grid-template-columns: 1fr; }
  .timeline { padding-left: .25rem; }
  .timeline::before { left: 6px; }
  .tl-item { grid-template-columns: 20px 1fr; }
  .mvv { grid-template-columns: 1fr; }
}
/* === Mini-cart como drawer lateral fijo === */
.mini-cart__panel{
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: min(420px, 96vw) !important;
  height: 100vh !important;
  display: block !important;      /* lo manejamos con transform/visibility */
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .28s ease, opacity .28s ease, visibility 0s linear .28s;
  z-index: 10002 !important;
  background: #0b1220;            /* ya lo traías */
  color: #e5e7eb;
  border: 1px solid #1f2937;
  border-radius: 0;               /* drawer de borde a borde */
  padding: 12px;
}

/* Estado abierto */
.mini-cart__panel.is-open{
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  transition: transform .28s ease, opacity .28s ease;
}

/* Backdrop del carrito */
#cartBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.45);
  backdrop-filter: saturate(120%) blur(2px);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
}
#cartBackdrop.is-open{
  opacity: 1;
  visibility: visible;
  transition: opacity .2s ease;
}

/* Ocultar cualquier dropdown del header si existiera */
.header-cart__panel,
.cart-panel{
  display: none !important;
}
/* === Música flotante (coincide con .music-fab / #musicPanel del HTML) === */
.music-fab{
  position:fixed; right:16px; bottom:16px; z-index:10000;
  padding:.65rem .9rem; border-radius:999px; border:1px solid var(--border);
  background:#fff; color:var(--ink); box-shadow:0 10px 28px rgba(2,6,23,.16); font-weight:800; cursor:pointer;
}
.music-fab:hover{filter:brightness(1.03)}
#musicPanel.music-panel{
  position:fixed; right:16px; bottom:70px; z-index:9999;
  width:min(92vw,420px); max-width:420px;
  background:var(--card); color:var(--ink);
  border:1px solid var(--border); border-radius:16px; padding:12px;
  box-shadow:0 20px 50px rgba(0,0,0,.18);
}
#musicPanel .small{opacity:.8; margin:.25rem 0 .5rem}
#musicPanel .select{width:100%; padding:.4rem .6rem; border:1px solid var(--border); border-radius:.55rem; background:#fff}
/* ===== Scroll suave y delgado dentro del modal de producto ===== */
.fs-right{
  overflow:auto;
  max-height:90vh;
  scrollbar-width: thin;          /* Firefox */
  scrollbar-color: #334155 transparent;
}
.fs-left .fs-nav{
  max-height: 180px;              /* miniaturas con scroll si exceden */
  overflow:auto;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

/* WebKit (Chrome/Edge/Safari) */
.fs-right::-webkit-scrollbar,
.fs-left .fs-nav::-webkit-scrollbar{
  width:8px; height:8px;
}
.fs-right::-webkit-scrollbar-thumb,
.fs-left .fs-nav::-webkit-scrollbar-thumb{
  background:#334155; border-radius:8px;
}
.fs-right::-webkit-scrollbar-track,
.fs-left .fs-nav::-webkit-scrollbar-track{
  background:transparent;
}

/* En móvil el modal ocupa alto y deja scroll interno */
@media (max-width:900px){
  .fs-modal{ height: 92vh; }
  .fs-right{ max-height: calc(92vh - 16px); }
}
#productModal .gallery__stage {
  display: flex;
  justify-content: center; /* horizontal */
  align-items: center;     /* vertical */
  height: 100%;            /* asegura espacio */
}

#productModal .gallery__stage img {
  margin: auto;
  display: block;
}
.modal__dialog{
  position:relative; z-index:2; 
  max-width:980px; margin:40px auto;
  background:#fff; border-radius:14px;
  padding:18px; box-shadow:0 20px 70px rgba(0,0,0,.35);
}
.modal__dialog{
  max-height:90vh;   /* que nunca pase de la ventana */
  overflow-y:auto;   /* activa scroll vertical si el contenido es más grande */
}
.modal__dialog{
  display:flex;
  flex-direction:column;
  max-height:90vh;
}

.product-gallery,
.modal__header{
  flex-shrink:0;   /* no se encogen */
}

.modal__body{
  flex:1;
  overflow-y:auto;  /* aquí aparece el scroll */
  padding-right:6px; /* espacio para scrollbar */
}
/* === RESET MÓVIL SANO === */
html, body { height: 100%; }
img, svg { max-width: 100%; height: auto; display: block; }
* { box-sizing: border-box; }

/* === HEADER === */
.header {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: .5rem;
  padding: .5rem .8rem; background: #fff; border-bottom: 1px solid #eee;
}
.logo { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.logo img { width: 40px; height: 40px; object-fit: contain; }
.logo span { font-weight: 700; white-space: nowrap; }

/* Botón hamburguesa visible en móvil */
.menu-toggle {
  display: inline-flex; flex-direction: column; gap: 4px;
  width: 40px; height: 40px; justify-content: center; align-items: center;
  border: 1px solid #e3e3e3; border-radius: 8px; background: #fff;
}
.menu-toggle span { width: 18px; height: 2px; background: #222; border-radius: 1px; }

/* NAV como “drawer” móvil */
.nav {
  position: fixed; inset: 0 0 auto auto; /* top-right */
  top: 56px; right: 0;
  width: min(85vw, 320px); height: calc(100vh - 56px);
  background: #fff; border-left: 1px solid #eee;
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column; padding: .8rem;
}
.nav a { padding: .8rem .6rem; border-radius: 8px; }
.nav a.active { background: #f3f5f7; font-weight: 600; }

/* Estado abierto */
.nav.is-open { transform: translateX(0); }

/* Backdrop del drawer (aprovecha el mismo de modales si lo tienes) */
.nav-backdrop {
  position: fixed; inset: 56px 0 0 0; background: rgba(0,0,0,.28);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.nav-backdrop.show { opacity: 1; pointer-events: auto; }

/* Header search compacto en móvil */
.header-search {
  grid-column: 1 / -1;
  margin-top: .4rem;
}
.header-search .group {
  display: flex; align-items: center; gap: .4rem;
  border: 1px solid #e3e3e3; border-radius: 10px; padding: .4rem .6rem;
  background: #fff;
}
.header-search input { width: 100%; border: 0; outline: none; font-size: 16px; }

/* Carrito del header: colócalo como icono sencillo en móvil */
.header-cart { margin-left: .4rem; }
.header-cart .cart-panel {
  position: fixed; right: .8rem; top: 64px; left: .8rem;
  max-height: 65vh; overflow: auto; background: #fff; border: 1px solid #eee; border-radius: 12px; padding: .6rem;
}

/* === HERO === */
.hero { position: relative; overflow: hidden; }
.hero .slides { display: flex; scroll-snap-type: x mandatory; overflow-x: auto; }
.hero .slides img { width: 100%; flex: 0 0 100%; scroll-snap-align: start; }

/* Botones del slider: más grandes y accesibles en móvil */
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); }
.slider-btn.prev { left: 6px; }
.slider-btn.next { right: 6px; }

/* === GRID DE PRODUCTOS === */
.grid {
  display: grid; gap: .8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: .8rem;
}
@media (min-width: 480px){
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px){
  /* En tablet/desktop, nav horizontal y sin drawer */
  .menu-toggle { display: none; }
  .nav { position: static; transform: none; height: auto; width: auto; flex-direction: row; gap: .4rem; padding: 0; border: 0; }
  .nav a { padding: .4rem .6rem; }
  .nav-backdrop { display: none; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Tarjeta compacta en móvil */
.card-product { border: 1px solid #eee; border-radius: 12px; background: #fff; overflow: hidden; }
.card-product .card-media { position: relative; aspect-ratio: 1/1; background: #fafafa; }
.card-product .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-product .badge.price {
  position: absolute; left: 8px; bottom: 8px; background: #0b8457; color: #fff;
  padding: .2rem .5rem; border-radius: 8px; font-size: .85rem;
}
.card-product .info { padding: .6rem; }
.card-product .actions { display: flex; gap: .4rem; }

/* === MODAL DE PRODUCTO === */
.modal { position: fixed; inset: 0; display: none; }
.modal[aria-hidden="false"] { display: block; }
.modal__dialog {
  position: fixed; inset: auto .6rem .6rem .6rem; top: 10vh;
  max-height: 80vh; overflow: hidden; border-radius: 14px; background: #fff; border: 1px solid #eee;
}
.modal__body { display: grid; grid-template-columns: 1fr; gap: .6rem; padding: .8rem; overflow: hidden; }
.product-gallery { overflow: hidden; }
.gallery__stage { position: relative; overflow: hidden; border-radius: 10px; }
.gallery__stage img { width: 100%; height: auto; display: block; }
#galleryThumbs { display: grid; grid-auto-flow: column; gap: .4rem; overflow-x: auto; padding-top: .4rem; }
.modal__info { overflow: auto; }

/* En pantallas grandes, dos columnas en el modal */
@media (min-width: 768px){
  .modal__dialog { inset: 10vh auto auto auto; left: 50%; transform: translateX(-50%); max-width: 980px; }
  .modal__body { grid-template-columns: 1.2fr .8fr; }
}

/* Backdrop genérico (sirve también para el drawer si quieres reutilizarlo) */
.modal__backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.32);
}
/* Swatches en card y modal */
.color-inline.swatches, .fs-swatches { display:flex; flex-wrap:wrap; gap:.5rem; }
.sw{
  --sw:#eee;
  width:28px; height:28px; border-radius:999px; cursor:pointer;
  border:2px solid #fff; outline:1px solid #d1d5db;
  background:var(--sw) center/cover no-repeat;
  transition:transform .15s ease, outline-color .15s ease;
}
.sw:hover{ transform:scale(1.06); }
.sw[data-selected="true"],
.fs-swatches .sw[aria-checked="true"]{
  outline-color:#111; box-shadow:inset 0 0 0 2px #1113;
}
/* Backdrop */
.fs-backdrop{
  position:fixed; inset:0; z-index:9999;
  background:rgba(0,0,0,.55);
  display:grid; place-items:center;
}

/* Caja del modal */
.fs-modal{
  background:#000000; width:min(100%,1000px); max-height:90vh;
  border-radius:16px; overflow:hidden;
  display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap:0; position:relative;
}

/* Columnas */
.fs-left{ padding:16px; overflow:hidden; }
.fs-right{
  padding:16px;
  overflow:auto;                   /* <- scroll interno aquí */
  -webkit-overflow-scrolling:touch;/* suaviza scroll en iOS */
}

/* Stage y thumbnails */
.fs-stage{
  height:420px; display:grid; place-items:center;
  background:#f8fafc; border-radius:12px; overflow:hidden;
}
.fs-nav{ display:flex; gap:.5rem; padding-top:.5rem; overflow:auto; }

/* Flechas y cerrar */
.fs-arrow{ background:#fff; border:1px solid #000000; border-radius:10px; padding:.25rem .5rem; }
.fs-close{
  position:absolute; top:10px; right:10px;
  background:#fff; border:1px solid #0055ff; border-radius:10px; padding:.25rem .6rem; font-size:20px;
}

/* Responsive */
@media (max-width: 768px){
  .fs-modal{ grid-template-columns:1fr; max-height:92vh; }
  .fs-stage{ height:300px; }
}
/* === Swatches de color en modales === */
.swatches {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.swatches .sw {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ccc;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

.swatches .sw:hover {
  transform: scale(1.1);
  border-color: #333;
}

/* Colores comunes (puedes extenderlos) */
.sw[data-color="Negro"]   { background:#111; }
.sw[data-color="Blanco"]  { background:#fff; border-color:#aaa; }
.sw[data-color="Azul"]    { background:#1d4ed8; }
.sw[data-color="Rojo"]    { background:#dc2626; }
.sw[data-color="Rosa"]    { background:#ec4899; }
.sw[data-color="Verde"]   { background:#10b981; }
.sw[data-color="Beige"]   { background:#f5f5dc; }
.sw[data-color="Café"],
.sw[data-color="CAFE"]    { background:#7b4a2e; }
.sw[data-color="Acua"],
.sw[data-color="ACUA"]    { background:#3ddad7; }
.sw[data-color="Naranja"]    { background:#ff7700; }
.sw[data-color="Rsosa"]    { background:#ff56ff; }
.sw[data-color="Lila"]    { background:#c084fc; }
.sw[data-color="Lila"]    { background:#f39975; }

/* Estado activo (cuando el usuario selecciona uno) */
.sw.active {
  outline: 2px solid var(--amarillo, #facc15);
  outline-offset: 2px;
}
/* Swatches con 2 colores (mitad y mitad) */
.sw[data-color="lila-negro"] {
  background: linear-gradient(90deg, #c43cff 50%, #000000 50%);
}

.sw[data-color="Salmon-Beige-rosa"] {
  background: linear-gradient(
    45deg,
    #fa8072 0% 33.3%,   /* Salmón */
    #dedac9 33.3% 66.6%,/* Beige */
    #faa89f 66.6% 100%  /* Rosado claro */
  );
}

.sw[data-color="rosa-beige-rosita"] {
 background: linear-gradient(
    45deg,
    #ff2dce 0% 33.3%,   /* Salmón */
    #dedac9 33.3% 66.6%,/* Beige */
    #fa9fec 66.6% 100%  /* Rosado claro */
  );
}

.sw[data-color="rosa-rosita"] {
  background: linear-gradient(90deg, #ec4899 50%, #ff8fd8 50%);
}

.sw[data-color="rosa-celeste"] {
  background: linear-gradient(90deg, #ec4899 50%, #21cbff 50%);
}

.sw[data-color="salmon-beige"] {
  background: linear-gradient(90deg, #fa8072  50%, #dedac9 50%);
}
/* ====== Móvil: grid compacto y tarjetas equilibradas ====== */
@media (max-width:640px){
  .grid{
    grid-template-columns: repeat(2, minmax(0,1fr)); /* 2 por fila */
    gap: 10px;
  }
  .card-media img{
    height: 150px;            /* evita saltos */
    object-fit: cover;
  }
  .info h3{ font-size: .95rem; }
  .info p.meta{ font-size: .82rem; }
}
/* ====== Móvil: modal de producto pantalla completa ====== */
@media (max-width:640px){
  .fs-backdrop{ position:fixed; inset:0; }
  .fs-modal{
    position:fixed; inset:0;
    width:100%; height:100dvh; /* usa viewport real en móvil */
    margin:0; border-radius:0;
    display:flex; flex-direction:column;
    background:#fff;
  }
  .fs-left{ padding:10px; }
  .fs-right{
    padding:12px;
    overflow:auto;            /* el body no se mueve, solo el panel derecho */
    -webkit-overflow-scrolling: touch;
  }

  /* Galería: cuadrada y sin brincos */
  .fs-stage{ aspect-ratio: 1/1; background:#0b1220; border-radius:12px; display:grid; place-items:center; }
  .fs-stage img{ width:100%; height:100%; object-fit: contain; }

  .fs-nav{ display:flex; gap:8px; overflow-x:auto; padding-top:8px; }
  .fs-nav img{ height:64px; width:84px; object-fit:cover; border-radius:10px; border:2px solid transparent; }
  .fs-nav img.active{ border-color:#facc15; }

  /* Botones del modal siempre accesibles */
  .fs-actions{
    position: sticky; bottom:0;
    display:flex; gap:10px; padding:10px 0;
    background: linear-gradient(#fff 75%, rgba(255,255,255,.85));
  }
  .btn-xl{ padding: .9rem 1rem; font-size: 1rem; border-radius: 12px; width: 100%; }
  .fs-arrow{ width:40px; height:40px; }
  .fs-close{ position:absolute; top:10px; right:10px; }
}
/* ====== Móvil: modal de checkout pantalla completa ====== */
@media (max-width:640px){
  .co-backdrop{ position:fixed; inset:0; }
  .co-modal{
    position:fixed; inset:0;
    width:100%; height:100dvh;
    margin:0; border-radius:0; display:flex; flex-direction:column;
    background:#fff;
  }
  .co-hdr{ padding:12px; border-bottom:1px solid #e5e7eb; }
  .co-body{
    flex:1; overflow:auto; padding:12px;
    display:block;          /* una sola columna */
  }
  .co-col{ margin-bottom:14px; }
  .co-grid{ display:block; } /* inputs 1 por línea en móvil */
  .co-field{ margin-bottom:10px; }
  .co-ftr{
    position: sticky; bottom:0;
    display:flex; gap:10px; padding:10px 12px; background:#fff;
    border-top:1px solid #e5e7eb;
  }
  .co-btn{ flex:1; padding:.9rem 1rem; border-radius:12px; }
}
/* ====== Swatches mejorados en móvil ====== */
.swatches{ display:flex; gap:8px; flex-wrap:wrap; }
.swatches .sw{
  width: 36px; height: 36px;           /* 44px táctiles incluyendo borde */
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
  transition: transform .12s ease, border-color .12s ease;
  touch-action: manipulation;
}
.sw:active{ transform: scale(.96); }
.sw.active{ outline: 3px solid #facc15; outline-offset: 2px; }
/* ===========================
   VIDA — Minimal Azul (Overrides)
   Pega este bloque al final
   =========================== */

/* Paleta sobria en azules */
:root{
  --ink:#0f172a;             /* texto principal */
  --muted:#5b6b82;           /* texto secundario */
  --bg:#f7f9fc;              /* fondo app */
  --card:#ffffff;            /* tarjetas/superficies */
  --soft:#f1f5fb;            /* superficies suaves */
  --border:#e6ecf4;          /* bordes sutiles */
  --accent:#2563eb;          /* azul principal (confianza) */
  --accent-2:#1e40af;        /* azul profundo (hover/foco) */
  --radius:14px;
  --shadow:0 16px 40px rgba(2, 12, 32, .08);
}
@media (prefers-color-scheme:dark){
  :root{
    --ink:#e6edf7;
    --muted:#9fb0c7;
    --bg:#0b1220;
    --card:#0e1626;
    --soft:#0b1422;
    --border:#1a2740;
    --accent:#3b82f6;
    --accent-2:#1d4ed8;
    --shadow:0 28px 70px rgba(0,0,0,.45);
  }
}
body{ color:var(--ink); background:var(--bg); }

/* ===== Header limpio: sin tricolor, subrayado azul sutil ===== */
.header{
  background:var(--card);
  border-bottom:1px solid var(--border);
  box-shadow: 0 6px 18px rgba(2,12,32,.04);
}
.header::after{
  content:"";
  display:block; height:3px;
  background:linear-gradient(90deg,var(--accent), var(--accent-2));
}

/* Marca y navegación */
.nav a{ font-weight:700; }
.nav a.active,.nav a:hover{
  background: rgba(37,99,235,.10);
  color: var(--accent-2);
}

/* ===== Buscador más “trusty” ===== */
.header-search input{
  background:#fff;
  border:1px solid var(--border);
  border-radius:.75rem;
}
.header-search input:focus{
  border-color: color-mix(in oklab, var(--accent) 45%, #fff);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
}

/* ===== Botones ===== */
.btn{
  border-radius:.7rem;
  font-weight:800;
  transition: transform .04s ease, filter .15s ease, box-shadow .15s ease;
}
.btn.primary{
  background: linear-gradient(180deg,var(--accent),var(--accent-2));
  color:#fff; border:0;
  box-shadow: 0 10px 24px rgba(37,99,235,.25);
}
.btn.primary:hover{ filter:brightness(1.03); }
.btn.secondary{
  background:#fff; color:var(--accent); border-color:var(--accent);
}
.btn.ghost{
  background:#fff; border:1px solid var(--border);
  color:var(--ink);
}
.btn.danger{ background:#ef4444; color:#fff; border:0; }
.btn.flag{
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#fff; border:0;
}

/* ===== Tarjetas de producto ===== */
.card-product{
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow: var(--shadow);
}
.card-product:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(2,12,32,.12);
}
.card-media{ background:#0b1220; }
.card-media img{ aspect-ratio:4/5; object-fit:cover; }
.badge{
  background: var(--accent-2);
  color:#fff; border-radius:.6rem; font-weight:800;
}
.badge.price{
  left:10px; right:auto; bottom:10px; top:auto;
  background:linear-gradient(180deg,var(--accent),var(--accent-2));
  box-shadow:0 8px 18px rgba(37,99,235,.25);
}
.info h3{ font-size:1.02rem; }
.meta{ color:var(--muted); }

/* Swatches contorno suave */
.color-inline .sw,
.sw{
  border:2px solid #fff; outline:1px solid var(--border);
}
.sw:hover{ transform:scale(1.05); }
.sw[data-selected="true"],
.fs-swatches .sw[aria-checked="true"]{
  outline-color: var(--accent-2);
  box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--accent) 30%, transparent);
}

/* ===== Grid & estados ===== */
.grid{ gap:14px; }
#emptyState{
  color:var(--muted);
  background:var(--soft);
  border:1px dashed var(--border);
  padding:1rem; border-radius:12px; text-align:center;
}

/* ===== Mini-cart (drawer azul claro) ===== */
.mini-cart__panel{
  background:var(--card); color:var(--ink);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
}
.mini-cart__toggle{
  background:#fff; border:1px solid var(--border);
}
.mini-cart .qty{
  background:var(--accent); color:#fff;
}

/* ===== Modal de producto (claro, con acentos azules) ===== */
.fs-backdrop{ background: rgba(2,12,32,.55); }
.fs-modal{
  background:var(--card); color:var(--ink);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
}
.fs-left{ background:linear-gradient(180deg,#f8fbff,#f3f7ff); }
.fs-stage{
  background:#f6f9ff; border:1px solid var(--border);
}
.fs-arrow{
  background:#ffffffcc; color:var(--ink);
  border:1px solid var(--border);
}
.fs-close{
  background:#fff; color:var(--ink);
  border:1px solid var(--border);
}
.fs-title{ font-weight:900; }
.fs-price .now{ color:var(--accent); }
.fs-thumb{ background:#fff; border:2px solid transparent; }
.fs-thumb[aria-current="true"]{ border-color:var(--accent); }
.fs-swatches .sw{ border-color:var(--border); box-shadow:0 0 0 2px #fff; }

/* Stock / oferta */
.badge-oferta{ background:#ef4444; }
.stock-dot{ background:#10b981; }
.stock.low .stock-dot{ background:#f59e0b; }
.stock.out .stock-dot{ background:#ef4444; }

/* ===== Checkout modal con acentos azules (sin tricolor) ===== */
.co-backdrop{ background: rgba(2,12,32,.58); }
.co-modal{
  background:var(--card); color:var(--ink);
  border:1px solid var(--border); box-shadow: var(--shadow);
}
.co-flag{
  height:6px;
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
}
.co-hdr{ border-bottom:1px solid var(--border); }
.co-col{
  background:linear-gradient(180deg,#fbfdff,#f8fbff);
  border:1px solid var(--border);
}
.co-input,.co-textarea{
  background:#fff; border:1px solid var(--border); color:var(--ink);
}
.co-input:focus,.co-textarea:focus{
  border-color: var(--accent);
  box-shadow:0 0 0 2px color-mix(in oklab, var(--accent) 25%, transparent);
}
.co-btn.ghost{
  background:#fff; border-color:var(--border); color:var(--ink);
}
.co-btn.primary{
  background: linear-gradient(180deg,var(--accent),var(--accent-2));
  color:#fff; border:0;
  box-shadow:0 10px 24px rgba(37,99,235,.25);
}

/* ===== Hero / slider ===== */
.hero{
  border:1px solid var(--border);
  background: linear-gradient(180deg,#fbfdff,#f5f9ff);
  box-shadow: var(--shadow);
}
.slider-btn{
  background:#ffffffcc; color:var(--ink);
  border:1px solid var(--border);
}
.dots button{ background:#c7d5f5; }
.dots button.active{ background:var(--accent); }

/* ===== Toolbar / chips ===== */
.toolbar{ color:var(--muted); }
.chip{
  background:#fff; border:1px solid var(--border);
  color:var(--ink); padding:.45rem .7rem; border-radius:999px; font-weight:800;
}
.chip.active{ background:rgba(37,99,235,.10); border-color: var(--accent); color:var(--accent-2); }

/* ===== Footer sobrio ===== */
.footer{
  color:var(--muted);
  border-top:1px solid var(--border);
  background: linear-gradient(180deg,#f9fbff,#f4f8ff);
}
.footer .accent{ color:var(--accent-2); font-weight:800; }

/* ===== Accesibilidad visual ===== */
:where(a,button):focus-visible{
  outline:3px solid color-mix(in oklab, var(--accent) 35%, transparent);
  outline-offset:3px; border-radius:8px;
}

/* ===== Pequeños ajustes responsivos ===== */
@media (max-width:768px){
  .badge.price{ left:8px; bottom:8px; }
  .fs-stage{ border-radius:12px; }
}


/* =========================================================
   VIDA CHATBOT — Neon Glass UI + botones premium
   ========================================================= */
:root{
  --vcb-ink: var(--ink, #e6edf7);
  --vcb-bg: var(--bg, #0b1220);
  --vcb-card: var(--card, #0e1626);
  --vcb-border: var(--border, #1a2740);
  --vcb-accent: var(--accent, #15f5ba);
  --vcb-accent-2: var(--accent-2, #5b8cff);
  --vcb-accent-3: var(--accent-3, #ff7ad9);
  --vcb-shadow: 0 30px 80px rgba(0,0,0,.45);
  --vcb-glass: rgba(12,18,40,.72);
  --vcb-blur: blur(16px) saturate(140%);
  --vcb-radius: 16px;
}

/* FAB */
.vcb-fab{
  position: fixed; right: 16px; bottom: 16px; z-index: 12000;
  display:inline-flex; align-items:center; gap:10px;
  padding: 12px 16px; border-radius: 999px; border: 1px solid var(--vcb-accent-2);
  background: linear-gradient(120deg, var(--vcb-accent-2), var(--vcb-accent));
  color:#021222; font-weight:1000; cursor:pointer;
  box-shadow: 0 0 24px color-mix(in oklab, var(--vcb-accent-2) 45%, transparent);
  transition: filter .15s ease, transform .05s ease;
}
.vcb-fab:hover{ filter: brightness(1.06); }
.vcb-fab:active{ transform: translateY(1px); }
.vcb-fab .badge{
  min-width:22px; height:22px; padding:0 6px; border-radius:999px;
  background:#0b1220; color:#fff; display:inline-grid; place-items:center; font-size:12px;
}

/* Panel */
.vcb-panel{
  position: fixed; right: 16px; bottom: 76px; z-index: 12000;
  width: min(420px, 96vw); height: min(72vh, 680px);
  display: grid; grid-template-rows: auto 1fr auto;
  border: 1px solid var(--vcb-border); border-radius: var(--vcb-radius);
  background: var(--vcb-glass);
  -webkit-backdrop-filter: var(--vcb-blur); backdrop-filter: var(--vcb-blur);
  box-shadow: var(--vcb-shadow);
  color: var(--vcb-ink);
  transform: translateY(16px) scale(.98); opacity: 0; visibility: hidden;
  transition: transform .25s ease, opacity .25s ease, visibility 0s linear .25s;
}
.vcb-panel.is-open{ transform: translateY(0) scale(1); opacity: 1; visibility: visible; transition: transform .25s ease, opacity .25s ease; }

/* Header */
.vcb-header{
  display:flex; align-items:center; gap:10px; padding:10px 12px;
  background: linear-gradient(180deg, #0f1835, #0c152d);
  border-bottom: 1px solid var(--vcb-border);
  border-radius: var(--vcb-radius) var(--vcb-radius) 0 0;
}
.vcb-avatar{
  width:34px;height:34px;border-radius:12px;overflow:hidden;display:grid;place-items:center;
  background: radial-gradient(#0ea5e9, #5b8cff);
  box-shadow: 0 0 18px color-mix(in oklab, var(--vcb-accent-2) 30%, transparent);
  font-weight:1000;color:#021222;
}
.vcb-title{ font-weight:1000; letter-spacing:.2px; }
.vcb-sub{ font-size:.84rem; color:#9fb0c7; }
.vcb-spacer{ flex:1 }
.vcb-icon-btn{
  border:1px solid var(--vcb-border); background:#0b1022; color:#dbeafe;
  width:34px; height:34px; border-radius:10px; display:grid; place-items:center; cursor:pointer;
}

/* Mensajes */
.vcb-messages{
  padding:12px; overflow:auto; display:flex; flex-direction:column; gap:10px;
  scrollbar-width: thin; scrollbar-color:#2a3758 transparent;
}
.vcb-msg{ display:grid; gap:6px; max-width:88%; }
.vcb-msg .bubble{
  padding:10px 12px; border-radius:14px; border:1px solid var(--vcb-border);
  background: linear-gradient(180deg, #101935, #0c152d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.vcb-msg.bot{ align-self:flex-start; }
.vcb-msg.user{ align-self:flex-end; }
.vcb-msg.user .bubble{
  background: linear-gradient(120deg, var(--vcb-accent-2), var(--vcb-accent));
  color:#021222; border-color: color-mix(in oklab, var(--vcb-accent-2) 50%, #fff);
}
.vcb-time{ font-size:.75rem; color:#93a2c7; }

/* Typing */
.vcb-typing{ display:inline-grid; grid-auto-flow:column; gap:4px; }
.vcb-typing span{ width:6px;height:6px;border-radius:999px;background:#a8b6d6; opacity:.6; animation:blink 1.2s infinite ease-in-out }
.vcb-typing span:nth-child(2){ animation-delay:.15s }
.vcb-typing span:nth-child(3){ animation-delay:.3s }
@keyframes blink{0%,100%{opacity:.2}50%{opacity:1}}

/* Quick replies */
.vcb-quick{
  display:flex; gap:8px; flex-wrap:wrap; padding:8px 12px; border-top:1px solid var(--vcb-border);
  background: linear-gradient(180deg, #0f1835, #0c152d);
}
.vcb-chip{
  display:inline-flex; align-items:center; gap:.4rem; cursor:pointer;
  padding:.5rem .75rem; border-radius:999px; font-weight:900; color:#dbeafe;
  border:1px solid var(--vcb-border);
  background: linear-gradient(180deg, #101935, #0c152d);
  transition: transform .06s ease, box-shadow .15s ease;
}
.vcb-chip::before{ content:""; width:8px;height:8px;border-radius:999px; background: radial-gradient(var(--vcb-accent-2), var(--vcb-accent)); }
.vcb-chip:hover{ transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,.3); }
.vcb-chip.active{ background: linear-gradient(120deg, var(--vcb-accent-2), var(--vcb-accent)); color:#021222; border-color: var(--vcb-accent-2); }

/* Composer */
.vcb-composer{
  display:grid; grid-template-columns: 1fr auto; gap:8px; padding:10px 12px; border-top:1px solid var(--vcb-border);
  background: linear-gradient(180deg, #0f1835, #0c152d); border-radius:0 0 var(--vcb-radius) var(--vcb-radius);
}
.vcb-input{
  min-height:44px; max-height:120px; resize:none;
  background:#0b1022; border:1px solid #1b2742; border-radius:12px; color:#e5e7eb;
  padding:10px 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.vcb-input:focus{ border-color: var(--vcb-accent-2); box-shadow: 0 0 0 3px color-mix(in oklab, var(--vcb-accent-2) 25%, transparent); }
.vcb-send{
  border:1px solid var(--vcb-accent-2);
  background: linear-gradient(120deg, var(--vcb-accent-2), var(--vcb-accent));
  color:#021222; font-weight:1000; border-radius:12px; padding:0 14px; cursor:pointer;
}

/* Botones premium (reutilizables dentro de mensajes) */
.vcb-btn{
  display:inline-flex; align-items:center; gap:.45rem; padding:.55rem .8rem; border-radius:12px; font-weight:1000; cursor:pointer;
  border:1px solid var(--vcb-border); background: linear-gradient(180deg, #101935, #ffffff); color:#e5e7eb;
}
.vcb-btn.primary{ border-color: var(--vcb-accent-2); background: linear-gradient(120deg, var(--vcb-accent-2), var(--vcb-accent)); color:#021222; }
.vcb-btn.ghost{ background:#0b1022; }
.vcb-btn.danger{ border-color:#ff6b8a; background: linear-gradient(120deg,#ff7a7a,#ff3d6e); color:#fff; }

/* Tarjeta de producto dentro del chat */
.vcb-card{
  border:1px solid var(--vcb-border); border-radius:14px; overflow:hidden;
  background: linear-gradient(180deg, #0f1835, #ffffff);
}
.vcb-card .media{ position:relative; aspect-ratio: 4/3; background:#0b1022; }
.vcb-card .media img{ width:100%; height:100%; object-fit:cover; }
.vcb-card .body{ padding:10px; display:grid; gap:6px; }
.vcb-card .title{ font-weight:900 }
.vcb-card .meta{ color:#9fb0c7; font-size:.9rem }
.vcb-card .row{ display:flex; gap:8px; flex-wrap:wrap }

@media (max-width: 480px){
  .vcb-panel{ right: 8px; left: 8px; width:auto; bottom: 76px; }
  .vcb-fab{ right: 8px; bottom: 8px; }
}
/* =======================
   FIX CHATBOT VIDA
   ======================= */
.vcb-panel {
  width: min(420px, 94vw);
  height: min(70vh, 620px);     /* altura máxima controlada */
  max-height: 80vh;             /* nunca más del viewport */
}

.vcb-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: #4b5563 transparent;
}
.vcb-messages::-webkit-scrollbar { width: 8px; }
.vcb-messages::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 8px;
}

/* Ajusta composer fijo abajo */
.vcb-composer {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, #0f1835, #0c152d);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--vcb-border);
}

/* Mejor escala en móviles */
@media (max-width: 640px) {
  .vcb-panel {
    inset: auto 8px 72px 8px;   /* márgenes laterales */
    width: auto;
    height: 65vh;               /* más bajo en móviles */
  }
  .vcb-messages {
    font-size: 0.92rem;
    line-height: 1.35;
  }
}
/* === FIX dimensiones ChatBot (modal y chat) === */

/* 1) El diálogo ocupa la pantalla en móvil y su fila central es elástica */
.vam-dialog{
  /* usar el viewport moderno y respetar notch */
  height: 100svh;           /* soporte moderno */
  max-height: 100svh;
  height: 100dvh;           /* fallback adicional */
  max-height: 100dvh;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));

  /* grid con fila central elástica real (sin recortes) */
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto; /* <— clave */
}

/* 2) El contenedor de chat NO lleva alturas fijas: que crezca con 1fr */
.vam-chat{
  height: auto !important;
  min-height: 0 !important;   /* permite que el overflow funcione dentro del 1fr */
  max-height: none !important;
  overflow: auto;
}

/* 3) El wrapper de input pegado abajo no “empuja” al abrir teclado */
.vam-input{
  position: sticky;
  bottom: 0;
  background: #fff;
}

/* 4) Desktop: el modal es más compacto pero el chat sigue elástico */
@media (min-width:640px){
  .vam-dialog{
    margin: 40px auto;
    height: auto;
    max-height: min(90svh, 90vh);
    max-width: min(680px, 92vw);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
    grid-template-rows: auto minmax(0, 1fr) auto; /* reafirmamos */
  }
}

/* 5) (Opcional) Scroll más suave y sin rebote en iOS */
.vam-chat{
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
/* Colores básicos */
.sw[data-color="Negro"]{ background:#111; }
.sw[data-color="Blanco"]{ background:#fff; border-color:#aaa; }
.sw[data-color="Azul"]{ background:var(--primary); }
.sw[data-color="Rojo"]{ background:#ef4444; }
.sw[data-color="Rosa"]{ background:#ec4899; }
.sw[data-color="Verde"]{ background:#10b981; }
.sw[data-color="Beige"]{ background:#f5f5dc; }
.sw[data-color="Café"], .sw[data-color="CAFE"]{ background:#7b4a2e; }
.sw[data-color="Acua"], .sw[data-color="ACUA"], .sw[data-color="celeste"]{ background:#3ddad7; }
.sw[data-color="Naranja"]{ background:#ff7700; }
.sw[data-color="Lila"]{ background:#c084fc; }

/* Bicolores / Tricolores */
.sw[data-color="lila-negro"]{ background:linear-gradient(90deg,#c084fc 50%,#000 50%); }
.sw[data-color="rosa-celeste"]{ background:linear-gradient(90deg,#ec4899 50%,#21cbff 50%); }
.sw[data-color="salmon-beige"]{ background:linear-gradient(90deg,#fa8072 50%,#dedac9 50%); }
.sw[data-color="salmon-beige-rosa"], .sw[data-color="Salmon-Beige-rosa"]{
  background:linear-gradient(45deg,#fa8072 0% 33.3%,#dedac9 33.3% 66.6%,#faa89f 66.6% 100%);
}
.sw[data-color="rosa-beige-rosita"]{
  background:linear-gradient(45deg,#ec4899 0% 33.3%,#dedac9 33.3% 66.6%,#f8bad2 66.6% 100%);
}
.sw[data-color="rosa-rosita"]{ background:linear-gradient(90deg,#ec4899 50%,#ff8fd8 50%); }
@media (max-width: 768px){
  .menu-toggle{ display:block; }
  .nav{
    position:absolute; right:0; top:60px;
    display:flex; flex-direction:column;
    background:var(--azul-900); width:220px;
    transform:translateX(100%); transition:transform .28s ease;
    padding:.8rem 0;
  }
  .nav.open{ transform:translateX(0); }
}
