:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e5e9f0;
  --bg: #f5f7fa;
  --card: #fff;
  --brand: #0b4fd6;
  --brand-dk: #0a3ea8;
  --navy: #0b1b3a;
  --wa: #16a34a;
  --wa-dk: #128a3e;
  --ok: #047857;
  --ok-bg: #e7f7ef;
  --warn: #b45309;
  --warn-bg: #fff4e0;
  --off: #475569;
  --off-bg: #eef2f7;
  --r: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-hi: 0 10px 30px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, "Segoe UI", Roboto, system-ui, sans-serif; font-size: 15px; line-height: 1.45; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
.shell { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }

/* ---------- cabecera ---------- */
.mt-top { background: var(--navy); color: #cbd5e1; font-size: 12.5px; }
.mt-top-in { display: flex; justify-content: space-between; gap: 12px; min-height: 34px; align-items: center; }
.mt-top b { color: #fff; }
.mt-head { background: #fff; position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 0 var(--line); }
.mt-head-in { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; flex-shrink: 0; }
.logo img { width: 40px; height: 40px; object-fit: contain; }
.mt-seek {
  flex: 1; display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 0 4px 0 12px; background: #f8fafc; transition: .15s;
}
.mt-seek:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(11, 79, 214, .1); }
.mt-seek svg { color: var(--muted); width: 18px; height: 18px; }
.mt-seek input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; min-height: 44px; }
.mt-seek button { border: 0; background: var(--brand); color: #fff; font-weight: 700; border-radius: 9px; min-height: 36px; padding: 0 16px; }
.mt-seek button:hover { background: var(--brand-dk); }
.mt-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mt-wa, .mt-cart {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  font-weight: 700; font-size: 14px; position: relative; border: 1.5px solid var(--line); background: #fff;
}
.mt-wa svg { fill: var(--wa); stroke: none; width: 20px; height: 20px; }
.mt-wa:hover, .mt-cart:hover { border-color: #cbd5e1; background: #f8fafc; }
.mt-cart { background: var(--ink); color: #fff; border-color: var(--ink); }
.mt-cart:hover { background: #1e293b; border-color: #1e293b; }
.mt-cart.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.08); } }
.mt-cart i {
  display: none; position: absolute; top: -7px; right: -7px; background: #ef4444; color: #fff;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; font-size: 11px; font-style: normal; font-weight: 800;
  align-items: center; justify-content: center; border: 2px solid #fff;
}
.mt-nav { border-top: 1px solid var(--line); background: #fff; }
.mt-nav-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mt-nav-in::-webkit-scrollbar { display: none; }
.mt-nav a {
  font-size: 14px; color: var(--ink-2); padding: 12px 12px; white-space: nowrap; font-weight: 600;
  border-bottom: 2px solid transparent;
}
.mt-nav a:hover { color: var(--brand); }
.mt-nav a.on { color: var(--brand); border-bottom-color: var(--brand); }
.mt-nav a.dim { opacity: .45; }

/* ---------- portada ---------- */
.hero {
  min-height: 280px; display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff; position: relative; overflow: hidden; transition: min-height .22s ease;
}
.hero-sz-pequena { min-height: 168px; }
.hero-sz-pequena .hero-inner { padding: 22px 16px; }
.hero-sz-pequena h1 { font-size: clamp(28px, 5vw, 48px); }
.hero-sz-pequena .hero-pill { margin-top: 10px; padding: 6px 14px; font-size: 12px; }
.hero-sz-grande { min-height: 380px; }
.hero-sz-grande .hero-inner { padding: 64px 16px; }
.hero-sz-completa { min-height: calc(100dvh - 140px); }
body.taller .hero-sz-completa { min-height: calc(100dvh - 180px); }
.hero-inner { position: relative; z-index: 2; padding: 48px 16px; }
.hero-hikvision::after, .hero-ezviz::after { z-index: 0; pointer-events: none; }
.hero-kicker { margin: 0; letter-spacing: .18em; font-weight: 800; font-size: 13px; opacity: .9; text-transform: uppercase; }
.hero h1 {
  margin: 8px 0 0; font-size: clamp(38px, 7vw, 76px); font-weight: 800; letter-spacing: -.02em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, .35);
}
.hero-pill {
  display: inline-block; margin-top: 18px; background: rgba(255, 255, 255, .14); color: #fff; border-radius: 999px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .25);
}
.hero-txt { position: relative; display: block; width: fit-content; max-width: 100%; margin: 0 auto; }
.hero-txt.off { display: none !important; }
.hero-txt-x { display: none; }
.hero-kicker.is-empty, .hero h1.is-empty, .hero-pill.is-empty { display: none; }
body.taller .hero-txt { padding: 8px 22px 8px 10px; }
body.taller .hero-txt:hover, body.taller .hero-txt:focus-within { outline: 1px dashed rgba(255, 255, 255, .9); outline-offset: 6px; border-radius: 14px; }
body.taller .hero-txt-x {
  display: flex; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: #111; color: #fff; font-size: 15px; line-height: 1; align-items: center; justify-content: center; z-index: 4; padding: 0;
}
body.taller .hero-kicker.is-empty, body.taller .hero h1.is-empty, body.taller .hero-pill.is-empty { display: inline-block; }
body.taller .hero-kicker, body.taller .hero h1, body.taller .hero-pill { outline: none; cursor: text; min-height: 1em; }
body.taller .hero-kicker:empty::before { content: "Línea pequeña"; opacity: .4; }
body.taller .hero h1:empty::before { content: "Título"; opacity: .4; }
body.taller .hero-pill:empty::before { content: "Frase"; opacity: .55; }
.hero-home, .hero-accesorios { background: radial-gradient(circle at 80% 20%, #1d4ed8 0, transparent 45%), linear-gradient(135deg, #0b1b3a, #111827); }
.hero-hikvision, .hero-ezviz {
  background: linear-gradient(180deg, rgba(20, 16, 12, .35), rgba(20, 16, 12, .55)),
    radial-gradient(circle at 50% 40%, #c4b5a0 0%, transparent 42%), linear-gradient(180deg, #8a7a68, #3f342c);
}
.hero-hikvision::after, .hero-ezviz::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #f8fafc, #94a3b8 45%, #334155 70%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35); top: 18%; left: 50%; transform: translateX(-50%); opacity: .85;
}
.hero-gaming { background: radial-gradient(circle at 20% 30%, #db2777 0%, transparent 35%), radial-gradient(circle at 80% 70%, #22d3ee 0%, transparent 30%), linear-gradient(135deg, #1e1b4b, #0f172a); }
.hero-redes { background: linear-gradient(135deg, #0ea5e9, #1e3a8a); }
.hero-energia { background: linear-gradient(135deg, #f59e0b, #7c2d12); }
.hero-tintas { background: linear-gradient(135deg, #334155, #0f172a); }
.hero.has-cover { background-size: cover; background-position: center; }
.hero.has-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 6, 23, .15), rgba(2, 6, 23, .45)); z-index: 1; }
.hero.has-cover::after { display: none; }
.hero.has-cover.filtro-ninguno::before { display: none; }
.hero.has-cover.filtro-oscuro::before { background: linear-gradient(180deg, rgba(2, 6, 23, .4), rgba(2, 6, 23, .7)); }

/* ---------- catálogo ---------- */
.cat-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; padding: 28px 0 64px; align-items: start; }
.cat-side { position: sticky; top: 140px; max-height: calc(100dvh - 160px); overflow: auto; scrollbar-width: thin; padding-right: 4px; }
.side-head-m { display: none; }
.side-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 10px; margin-bottom: 12px; }
.side-box h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px;
  font-size: 14px; color: var(--ink-2); font-weight: 500;
}
.side-cats a:hover { background: #f1f5f9; }
.side-cats a.on { background: #eaf1ff; color: var(--brand); font-weight: 700; }
.side-cats span, .chk span { font-size: 12px; color: var(--muted); background: #f1f5f9; border-radius: 99px; padding: 1px 8px; font-weight: 600; }
.chk { display: flex; align-items: center; gap: 8px; padding: 6px 2px; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.chk span { margin-left: auto; }
.chk input { width: 17px; height: 17px; accent-color: var(--brand); }
.price-range { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }
.price-range input { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #f8fafc; }
.price-range input:focus { outline: none; border-color: var(--brand); background: #fff; }
.side-clear { width: 100%; min-height: 40px; border: 1px dashed #cbd5e1; background: transparent; border-radius: 10px; font-weight: 600; color: var(--muted); }
.side-clear:hover { color: var(--ink); border-color: var(--ink-2); }
.side-bg { display: none; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a:hover { color: var(--brand); }
.crumbs i { font-style: normal; color: #cbd5e1; }
.crumbs span { color: var(--ink-2); }
.cat-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.cat-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cat-tools { display: flex; gap: 8px; align-items: center; }
.btn-orden, .mt-pick {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 40px; padding: 0 12px 0 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-weight: 700; color: var(--ink); text-align: left;
}
.btn-orden { min-width: 210px; }
.btn-orden svg, .mt-pick svg { width: 18px; height: 18px; color: var(--muted); }
.btn-filtros-m { display: none; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: #fff; font-weight: 700; }
.btn-filtros-hecho { display: none; }
.vista-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.vista-toggle button { border: 0; background: transparent; width: 40px; height: 38px; display: grid; place-items: center; color: var(--muted); }
.vista-toggle button.on { background: var(--ink); color: #fff; }
.vista-toggle svg { width: 17px; height: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chips button { border: 0; background: #eaf1ff; color: var(--brand); font-weight: 600; font-size: 13px; border-radius: 99px; padding: 6px 12px; }

.grid-pro { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

/* ---------- tarjeta ---------- */
.pc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  display: flex; flex-direction: column; position: relative; transition: box-shadow .18s, transform .18s, border-color .18s;
}
.pc:hover { box-shadow: var(--shadow-hi); transform: translateY(-2px); border-color: #d6dde8; }
.pc.retirado { opacity: .5; }
.pc-media { position: relative; aspect-ratio: 1 / 1; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #f1f4f8; }
.pc-media-link { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; }
.pc-media img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .3s ease; }
.pc:hover .pc-media img { transform: scale(1.04); }
.is-edit .pc-media img { padding: 18px; }
.ph { width: 72px; height: 72px; border-radius: 18px; background: #f1f5f9; color: #94a3b8; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 28px; }
.ph.big { width: 140px; height: 140px; font-size: 54px; }
.pc-estado {
  position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 11.5px; font-weight: 700; border-radius: 99px;
  padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px;
}
.pc-estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pc-fotos { position: absolute; bottom: 10px; right: 10px; font-size: 11px; font-weight: 600; background: rgba(15, 23, 42, .7); color: #fff; padding: 3px 8px; border-radius: 99px; }
.st-ok { color: var(--ok); background: var(--ok-bg); }
.st-ultimas { color: var(--warn); background: var(--warn-bg); }
.st-agotado { color: var(--off); background: var(--off-bg); }
.pc-body { padding: 14px 14px 14px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.pc-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.pc-brand { color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-brand.is-cat { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.pc-sku { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.pc-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pc-title a:hover { color: var(--brand); }
.pc-feats { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.pc-feats li { padding-left: 14px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-feats li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: #cbd5e1; }
.pc-price-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.pc-price { font-size: 21px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.pc-price small { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.pc-stock { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 60% { background: #fef08a; border-radius: 4px; } }
.pc-buy { display: flex; gap: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; flex-shrink: 0; }
.qty button { width: 32px; height: 38px; border: 0; background: transparent; font-size: 18px; font-weight: 700; color: var(--ink-2); }
.qty button:hover { color: var(--brand); }
.qty span { min-width: 26px; text-align: center; font-weight: 800; }
.qty.lg button { width: 44px; height: 50px; }
.qty.lg span { min-width: 36px; font-size: 17px; }
.qty.sm button { width: 28px; height: 30px; font-size: 16px; }
.btn-cart {
  flex: 1; min-height: 40px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); border-radius: 10px;
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; transition: .15s;
}
.btn-cart:hover:not(:disabled) { background: var(--ink); color: #fff; }
.btn-cart:disabled { opacity: .4; cursor: not-allowed; }
.btn-cart.lg { min-height: 52px; font-size: 16px; }
.btn-wa {
  width: 100%; min-height: 42px; border: 0; background: var(--wa); color: #fff; border-radius: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .15s;
}
.btn-wa:hover { background: var(--wa-dk); }
.btn-wa.lg { min-height: 54px; font-size: 16px; }
.btn-wa.full { min-height: 50px; font-size: 15px; }

/* vista lista */
.grid-pro.lista { grid-template-columns: 1fr; }
.grid-pro.lista .pc { flex-direction: row; }
.grid-pro.lista .pc-media { width: 200px; flex-shrink: 0; border-bottom: 0; border-right: 1px solid #f1f4f8; }
.grid-pro.lista .pc-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; grid-template-rows: auto auto 1fr auto;
  grid-template-areas: "meta meta" "title buy" "feats wa" "price wa"; column-gap: 24px; row-gap: 8px;
}
.grid-pro.lista .pc-meta { grid-area: meta; }
.grid-pro.lista .pc-title { grid-area: title; min-height: 0; font-size: 16px; align-self: start; }
.grid-pro.lista .pc-feats { grid-area: feats; }
.grid-pro.lista .pc-price-row { grid-area: price; justify-content: flex-start; gap: 14px; margin-top: 0; }
.grid-pro.lista .pc-buy { grid-area: buy; align-self: start; }
.grid-pro.lista .btn-wa { grid-area: wa; align-self: start; }

/* ---------- ficha ---------- */
.ficha-pro { padding: 22px 0 64px; }
.fp-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.fp-main { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; background: #fff; border: 1px solid #f1f4f8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fp-zoom { border: 0; background: transparent; padding: 24px; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.fp-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fp-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.fp-thumb { width: 74px; height: 74px; flex-shrink: 0; border: 2px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; }
.fp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.fp-thumb.on, .fp-thumb:hover { border-color: var(--brand); }
.fp-info { display: flex; flex-direction: column; gap: 14px; }
.fp-info .pc-meta { font-size: 13px; justify-content: flex-start; gap: 14px; }
.fp-info h1 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; letter-spacing: -.02em; }
.fp-stockline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-stockline .pc-stock { font-size: 13px; padding: 5px 10px; }
.fp-live { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.fp-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.fp-price { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1; padding: 6px 0; }
.fp-price small { font-size: 20px; color: var(--ink-2); }
.fp-feats { list-style: none; margin: 0; padding: 14px 16px; background: #f8fafc; border-radius: 12px; font-size: 14px; color: var(--ink-2); display: grid; gap: 6px; }
.fp-feats li { padding-left: 22px; position: relative; }
.fp-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.fp-buy { display: flex; gap: 10px; }
.fp-trust { list-style: none; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fp-trust li { display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); }
.fp-trust b { color: var(--ink); font-size: 13px; }

.fp-tabs { margin-top: 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.fp-tabbar { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.fp-tabbar button { border: 0; background: transparent; padding: 16px 22px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.fp-tabbar button.on { color: var(--ink); border-bottom-color: var(--brand); }
.fp-panel { display: none; padding: 22px 26px 26px; }
.fp-panel.on { display: block; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; max-width: 860px; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
.spec-table th { width: 34%; color: var(--muted); font-weight: 600; background: #fafbfd; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.fp-list { margin: 0; padding-left: 20px; line-height: 1.8; color: var(--ink-2); }
.rel { margin-top: 40px; }
.rel h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 16px; }

/* ---------- carrito ---------- */
.drawer-bg { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 70; backdrop-filter: blur(2px); }
.drawer-bg.on { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(430px, 100%); background: #fff; z-index: 71;
  transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(15, 23, 42, .18);
}
.drawer.on { transform: none; }
.drawer > header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer > header b { font-size: 18px; }
.drawer > header small { color: var(--muted); }
.drawer > header button { width: 38px; height: 38px; border: 0; background: #f1f5f9; border-radius: 10px; font-size: 22px; }
.cart-aviso { margin: 12px 20px 0; background: var(--warn-bg); color: var(--warn); font-size: 13px; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.cart-list { flex: 1; overflow: auto; padding: 8px 20px; }
.cart-empty { display: flex; flex-direction: column; gap: 6px; text-align: center; padding: 60px 10px; color: var(--muted); }
.cart-empty b { color: var(--ink); font-size: 16px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f1f4f8; }
.cart-line.warn { background: linear-gradient(90deg, #fff7ed, transparent); }
.cl-img { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #fff; }
.cl-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cl-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 14px; }
.cl-info b { font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-info small { color: var(--muted); font-size: 12px; }
.cl-info em { font-style: normal; color: var(--warn); font-size: 12px; font-weight: 700; }
.cl-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.cl-del { border: 0; background: none; color: #dc2626; font-size: 12.5px; font-weight: 700; padding: 0; }
.cl-total { font-weight: 800; white-space: nowrap; }
.cart-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); background: #fafbfd; }
.cart-datos { margin-bottom: 12px; font-size: 13px; }
.cart-datos summary { cursor: pointer; font-weight: 700; padding: 4px 0 8px; }
.cart-datos summary small { color: var(--muted); font-weight: 500; }
.cart-datos label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; color: var(--muted); font-weight: 600; }
.cart-datos input, .cart-datos .mt-pick { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; color: var(--ink); font-weight: 500; width: 100%; }
.cart-datos input:focus, .cart-datos .mt-pick:focus { outline: none; border-color: var(--brand); }
.cart-datos .mt-pick { font-weight: 600; }
.cart-foot .total { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; margin: 4px 0 12px; }
.cart-sub { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cart-sub button { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 12px; }

/* ---------- lightbox ---------- */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(2, 6, 23, .92); z-index: 90; align-items: center; justify-content: center; }
.lightbox.on { display: flex; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 86vh; object-fit: contain; background: #fff; border-radius: 12px; padding: 16px; }
.lb-x { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 26px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 32px; }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }
.lb-count { position: absolute; bottom: 18px; color: #cbd5e1; font-size: 13px; }

/* ---------- pie ---------- */
.mt-foot { background: var(--navy); color: #94a3b8; margin-top: 20px; font-size: 14px; }
.mt-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 44px 0 30px; }
.mt-foot-grid > div { display: flex; flex-direction: column; gap: 8px; }
.mt-foot h5 { margin: 0 0 6px; color: #fff; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.mt-foot a:hover { color: #fff; }
.mt-foot p { margin: 8px 0 0; line-height: 1.6; }
.logo-foot { color: #fff; }
.mt-foot-bot { display: flex; justify-content: space-between; border-top: 1px solid rgba(148, 163, 184, .18); padding: 16px 0 24px; font-size: 12.5px; }
.wa-float {
  position: fixed; right: 20px; bottom: 20px; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); z-index: 60;
  display: grid; place-items: center; box-shadow: 0 10px 28px rgba(22, 163, 74, .45); transition: transform .15s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { fill: #fff; stroke: none; width: 30px; height: 30px; }

.empty-box { text-align: center; padding: 48px 16px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--r); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty-box p { margin: 0; }
.empty-box button { border: 0; background: none; color: var(--brand); font-weight: 700; text-decoration: underline; }
.empty-box .btn-cart { flex: none; padding: 0 20px; }
.about { padding: 32px 0 64px; max-width: 760px; line-height: 1.7; }
.about h2 { letter-spacing: -.02em; }
.about .btn-wa { width: auto; padding: 0 22px; }

.ns { padding-bottom: 72px; }
.ns-intro {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: start;
  padding: 48px 0 20px;
}
.ns-copy h2 { margin: 0 0 14px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.03em; line-height: 1.2; }
.ns-copy p { margin: 0 0 12px; color: var(--ink-2); font-size: 16px; }
.ns-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ns-cta .btn-wa { width: auto; padding: 0 18px; }
.ns-yt-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 11px; border: 1.5px solid var(--line); background: #fff; font-weight: 800; color: #b91c1c;
}
.ns-yt-btn:hover { border-color: #b91c1c; background: #fef2f2; }
.ns-yt-btn-dark { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.ns-yt-btn-dark:hover { background: #991b1b; color: #fff; }
.ns-edit-hint { margin: 18px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
body.taller [data-ph].is-empty::before { content: attr(data-ph); opacity: .4; }
body.taller .ns [contenteditable] { border-radius: 8px; }
body.taller .ns [contenteditable]:focus { outline: 1px dashed rgba(11, 79, 214, .45); outline-offset: 4px; }
.ns-facts-wrap { display: grid; gap: 10px; align-content: start; }
.ns-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ns-facts li {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  display: grid; gap: 4px; box-shadow: var(--shadow); position: relative;
}
body.taller .ns-facts li { padding-right: 40px; }
.ns-add {
  width: 100%; min-height: 42px; border: 1.5px dashed var(--line); background: #fff;
  border-radius: 12px; font-weight: 800; color: var(--ink-2);
}
.ns-mini {
  border: 0; border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 800;
  background: rgba(255, 255, 255, .12); color: #fff;
}
.ns-facts .ns-mini-x { position: absolute; top: 8px; right: 8px; color: #b91c1c; background: #fee2e2; }
.ns-frame-vacio {
  display: flex; align-items: center; justify-content: center; min-height: 220px;
  border-radius: 16px; background: rgba(255, 255, 255, .04); color: #94a3b8; font-weight: 700;
}
.ns-pin-ed { display: flex; gap: 6px; padding-left: 106px; }
.ns-facts b { font-size: 15px; }
.ns-facts span { color: var(--muted); font-size: 13.5px; }
.ns-kicker { margin: 0 0 6px; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 800; color: #b91c1c; }
.ns-yt { background: #0b1b3a; color: #e2e8f0; padding: 48px 0 56px; margin-top: 28px; }
.ns-yt-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; margin-bottom: 22px; }
.ns-yt-head h2 { margin: 0; color: #fff; font-size: 28px; letter-spacing: -.02em; }
.ns-yt-head p { margin: 8px 0 0; max-width: 560px; color: #94a3b8; }
.ns-player { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, .9fr); gap: 16px; align-items: stretch; }
.ns-frame { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16/9; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.ns-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ns-pins {
  display: grid; gap: 8px; align-content: start; height: 100%;
  overflow: auto; padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .28) transparent;
}
.ns-pins::-webkit-scrollbar { width: 6px; }
.ns-pins::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.ns-pins::-webkit-scrollbar-track { background: transparent; }
.ns-pins::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .28); border-radius: 99px; }
.ns-pin {
  display: grid; gap: 2px; text-align: left;
  width: 100%; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04);
  color: #fff; border-radius: 12px; padding: 6px;
}
.ns-pin:hover { background: rgba(255, 255, 255, .08); }
.ns-pin.on { border-color: #f87171; background: rgba(185, 28, 28, .28); }
.ns-pin-play {
  display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center;
  width: 100%; border: 0; background: transparent; color: inherit; text-align: left; padding: 0;
}
.ns-pin img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; background: #111; }
.ns-pin span { min-width: 0; }
.ns-pin b { font-size: 13px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ns-pin-ext { color: #fca5a5; font-size: 12px; font-weight: 700; padding-left: 106px; }
.ns-kicker-navy { color: var(--brand); }
.ns-mapa { padding: 48px 0 8px; }
.ns-mapa-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: start; }
.ns-mapa-copy h2 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.03em; }
.ns-mapa-copy > p { margin: 0 0 16px; color: var(--ink-2); }
.ns-mapa-datos { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.ns-mapa-datos li {
  display: grid; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.ns-mapa-datos b { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ns-mapa .btn-wa { width: auto; padding: 0 18px; }
.ns-maps-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 11px; border: 1.5px solid var(--line); background: #fff; font-weight: 800; color: var(--brand);
}
.ns-maps-btn:hover { border-color: var(--brand); background: #eef4ff; }
.ns-maps-btn-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ns-maps-btn-on:hover { background: var(--brand-dk); color: #fff; }
.ns-mapa-card { display: grid; gap: 10px; }
.ns-mapa-frame {
  position: relative; border-radius: 16px; overflow: hidden; background: #dbe4f0;
  min-height: 320px; aspect-ratio: 4/3; box-shadow: var(--shadow-hi); border: 1px solid var(--line);
}
.ns-mapa-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ns-mapa-abrir { font-size: 13.5px; font-weight: 800; color: var(--brand); }
@media (max-width: 900px) {
  .ns-intro, .ns-player, .ns-mapa-in { grid-template-columns: 1fr; }
  .ns-pins { height: auto; }
  .ns-mapa-frame { aspect-ratio: 16/10; min-height: 240px; }
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(80px);
  max-width: min(420px, calc(100% - 32px)); background: #111827; color: #fff;
  padding: 13px 18px; border-radius: 14px; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
  opacity: 0; z-index: 130; pointer-events: none; transition: .22s;
  box-shadow: 0 16px 40px rgba(2, 6, 23, .35); border: 1px solid rgba(255, 255, 255, .08);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- hoja moderna (ordenar / confirmar / elegir) ---------- */
.mt-hoja { display: none; position: fixed; inset: 0; z-index: 120; }
.mt-hoja.on { display: block; }
.mt-hoja-bg { position: absolute; inset: 0; background: rgba(2, 6, 23, .52); backdrop-filter: blur(8px); opacity: 0; transition: opacity .22s; }
.mt-hoja.in .mt-hoja-bg { opacity: 1; }
.mt-hoja-box {
  position: absolute; left: 50%; bottom: 0; width: min(440px, 100%);
  transform: translateX(-50%) translateY(110%);
  transition: transform .28s cubic-bezier(.2, .85, .25, 1);
  background: #1c1c1e; color: #f5f5f7;
  border-radius: 20px 20px 0 0;
  padding: 6px 10px 10px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .4);
  max-height: 88vh; overflow: auto;
}
.mt-hoja.in .mt-hoja-box { transform: translateX(-50%) translateY(0); }
.mt-hoja-handle {
  width: 40px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .28);
  margin: 8px auto 10px;
}
.mt-hoja-titulo { margin: 4px 12px 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #a1a1aa; }
.mt-hoja-cuerpo { display: flex; flex-direction: column; padding: 0 4px; }
.mt-hoja-opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  border: 0; background: transparent; color: #f5f5f7; text-align: left;
  padding: 15px 12px; font-size: 16.5px; font-weight: 500; border-radius: 12px;
}
.mt-hoja-opt:hover, .mt-hoja-opt:focus-visible { background: rgba(255, 255, 255, .06); }
.mt-hoja-radio {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #636366; background: transparent;
}
.mt-hoja-opt.on .mt-hoja-radio {
  border-color: #0a84ff;
  box-shadow: inset 0 0 0 5px #0a84ff;
}
.mt-hoja-txt { margin: 8px 12px 18px; font-size: 18px; font-weight: 650; line-height: 1.35; color: #fff; }
.mt-hoja-lab { display: grid; gap: 6px; margin: 0 12px 12px; color: #e4e4e7; font-size: 13px; font-weight: 700; }
.mt-hoja-inp {
  width: 100%; min-height: 44px; border: 0; border-radius: 12px; padding: 10px 12px;
  background: rgba(255, 255, 255, .08); color: #fff; font: inherit;
}
.mt-hoja-inp:focus { outline: 2px solid #3b82f6; }
textarea.mt-hoja-inp { min-height: 88px; resize: vertical; }
.mt-hoja-foot { display: flex; gap: 8px; padding: 6px 8px 4px; }
.mt-hoja-hecho, .mt-hoja-cancel {
  flex: 1; min-height: 48px; border: 0; border-radius: 12px; font-weight: 800; font-size: 16px; background: transparent; color: #fff;
}
.mt-hoja-cancel { color: #a1a1aa; background: rgba(255, 255, 255, .08); }
.mt-hoja-hecho.peligro { color: #ff453a; }
.mt-hoja-foot:has(.mt-hoja-cancel:not([hidden])) .mt-hoja-hecho {
  background: #0a84ff; color: #fff;
}
.mt-hoja-foot:has(.mt-hoja-cancel:not([hidden])) .mt-hoja-hecho.peligro {
  background: #ff453a; color: #fff;
}
body.hoja-on { overflow: hidden; }
@media (min-width: 761px) {
  .mt-hoja-box {
    bottom: auto; top: 50%;
    transform: translate(-50%, -42%) scale(.97);
    border-radius: 20px; width: min(420px, 92vw);
  }
  .mt-hoja.in .mt-hoja-box { transform: translate(-50%, -50%) scale(1); }
}

/* ---------- editor (taller) ---------- */
.taller-bar { background: #6d28d9; color: #fff; font-size: 13px; position: relative; z-index: 45; }
.taller-bar-in { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-height: 46px; padding: 6px 0; }
.taller-bar a, .taller-portada {
  background: #fff; color: #6d28d9; font-weight: 800; border-radius: 999px; padding: 6px 12px;
  display: inline-flex; align-items: center; border: 0; font: inherit; font-weight: 800;
}
.taller-portada { position: relative; overflow: hidden; }
.taller-portada input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 40px; }
.taller-linea {
  display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 10px;
  border-radius: 999px; background: rgba(0, 0, 0, .22); font-weight: 700; white-space: nowrap;
}
.taller-linea i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); }
.taller-acciones { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.taller-bar a.sec { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.taller-modos { display: inline-flex; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; overflow: hidden; }
.modo-btn { background: transparent; color: #fff; border: 0; border-right: 1px solid rgba(255, 255, 255, .28); padding: 6px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.modo-btn:last-child { border-right: 0; }
.modo-btn.on { background: #fff; color: #6d28d9; }
body.taller .mt-head { top: 0; }
.hero-tools { background: #1e1b4b; color: #fff; font-size: 12.5px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.hero-tools-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 6px 0; }
.ht-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ht-label { opacity: .95; }
.ht-label small { opacity: .65; font-size: 12px; }
.hero-tools .modo-btn.on { color: var(--ink); }
.ht-btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: transparent; color: #fff; font-weight: 700; font-size: 12.5px; cursor: pointer;
}
.ht-btn:hover { background: rgba(255, 255, 255, .12); }
.ht-primary { background: #fff; color: var(--ink); border-color: #fff; }
.ht-primary:hover { background: #e2e8f0; }
.ht-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 40px; }
.ht-mini { display: inline-flex; align-items: center; padding: 0 10px; font-size: 12px; opacity: .7; border-right: 1px solid rgba(255, 255, 255, .28); }
.ht-ajuste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ht-ajuste label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ht-ajuste input[type="range"] { width: 130px; accent-color: #a78bfa; cursor: pointer; }
.ht-ajuste input:disabled { opacity: .35; cursor: not-allowed; }
.hero-ajuste-hint { display: none; }
.hero.ajustando { cursor: grab; touch-action: none; user-select: none; outline: 3px dashed #a78bfa; outline-offset: -3px; }
.hero.ajustando:active { cursor: grabbing; }
.hero.ajustando .hero-inner { pointer-events: none; opacity: .25; }
.hero.ajustando .hero-ajuste-hint {
  display: block; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; pointer-events: none;
  background: rgba(15, 23, 42, .82); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
@media (max-width: 760px) {
  .hero-tools-in { justify-content: center; }
  .ht-ajuste { justify-content: center; }
  .ht-ajuste input[type="range"] { width: 100px; }
  .ht-label { width: 100%; text-align: center; }
  .ht-label small { display: none; }
}
.drop-foto {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px;
  background: rgba(15, 23, 42, .5); color: #fff; font-size: 13px; font-weight: 800; opacity: 0; cursor: pointer; transition: .15s; z-index: 3;
}
.is-edit:hover .drop-foto, .is-edit.uploading .drop-foto { opacity: 1; }
.is-edit.uploading .drop-foto span::after { content: " · subiendo…"; }
.is-edit:hover { transform: none; }
.gal-edit { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #f1f4f8; background: #faf5ff; }
.gal-th { position: relative; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.gal-th img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.gal-th button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: #111; color: #fff; font-size: 12px; line-height: 1; padding: 0; }
.gal-add { height: 42px; padding: 0 10px; border: 1px dashed #a78bfa; border-radius: 8px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: #6d28d9; cursor: pointer; }

.modal-sec { display: none; position: fixed; inset: 0; z-index: 80; }
.modal-sec.on { display: block; }
.modal-sec-bg { position: absolute; inset: 0; background: rgba(2, 6, 23, .55); backdrop-filter: blur(8px); }
.modal-sec-box {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(720px, 100%); max-height: 88vh; overflow: auto;
  background: #1c1c1e; color: #f5f5f7; border-radius: 20px 20px 0 0;
  padding: 6px 18px 18px; padding-bottom: max(18px, env(safe-area-inset-bottom));
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .4);
}
.modal-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.modal-sec-head h3 { margin: 0; font-size: 18px; color: #fff; }
.modal-x { border: 0; background: rgba(255, 255, 255, .1); color: #fff; width: 36px; height: 36px; border-radius: 10px; font-size: 20px; }
.modal-sec-help { font-size: 13px; color: #a1a1aa; line-height: 1.45; margin: 10px 0 14px; }
.sec-list { display: flex; flex-direction: column; gap: 8px; }
.sec-row { display: grid; grid-template-columns: 1.1fr 1.4fr auto auto auto; gap: 8px; align-items: center; border: 1px solid #3a3a3c; background: #2c2c2e; border-radius: 12px; padding: 8px; }
.sec-row input[type="text"] { min-height: 38px; border: 1px solid #3a3a3c; border-radius: 8px; padding: 0 10px; font-size: 13px; width: 100%; background: #1c1c1e; color: #fff; }
.sec-row label { font-size: 12px; color: #d4d4d8; display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.sec-del { border: 0; background: rgba(255, 69, 58, .18); color: #ff8a80; border-radius: 8px; min-height: 36px; padding: 0 10px; font-size: 12px; font-weight: 700; }
.sec-add { margin-top: 10px; border: 1px dashed #3a3a3c; background: #2c2c2e; color: #fff; border-radius: 10px; min-height: 40px; width: 100%; font-weight: 700; }
.modal-sec-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.sec-cancel { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .08); color: #fff; font-weight: 700; }
.sec-save { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: #0a84ff; color: #fff; font-weight: 800; }
@media (min-width: 761px) {
  .modal-sec-box { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 20px; max-height: 84vh; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-side {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(330px, 88vw); max-height: none; z-index: 75; background: var(--bg);
    padding: 0 14px 20px; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 12px 0 40px rgba(15, 23, 42, .18);
  }
  body.filtros-on .cat-side { transform: none; }
  body.filtros-on .side-bg { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 74; }
  .side-head-m { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--bg); padding: 16px 0 12px; z-index: 1; }
  .side-head-m b { font-size: 18px; }
  .side-head-m button { width: 38px; height: 38px; border: 0; background: #fff; border-radius: 10px; font-size: 22px; }
  .btn-filtros-m { display: inline-flex; align-items: center; }
  .btn-filtros-hecho {
    display: block; width: 100%; min-height: 48px; margin-top: 16px;
    border: 0; background: #1c1c1e; color: #fff; border-radius: 14px; font-weight: 800; font-size: 16px;
  }
  .fp-grid { grid-template-columns: 1fr; gap: 22px; padding: 18px; }
  .mt-foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  html, body { font-size: 14px; }
  .shell { width: calc(100% - 24px); }
  .mt-top-in span:first-child { display: none; }
  .mt-top-in { justify-content: center; }
  .mt-head-in { flex-wrap: wrap; gap: 10px; min-height: 0; padding: 10px 0; }
  .logo { font-size: 16px; }
  .logo img { width: 34px; height: 34px; }
  .mt-tools { margin-left: auto; }
  .mt-wa span, .mt-cart span { display: none; }
  .mt-wa, .mt-cart { padding: 0 12px; }
  .mt-seek { order: 3; flex-basis: 100%; max-width: none; }
  .cat-side { top: 0; }
  .cat-head h1 { font-size: 21px; }
  .cat-tools { width: 100%; }
  .btn-orden { flex: 1; min-width: 0; }
  .grid-pro { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pc-body { padding: 10px; gap: 6px; }
  .pc-title { font-size: 13.5px; }
  .pc-feats { display: none; }
  .pc-price { font-size: 17px; }
  .pc-price-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pc-buy { flex-direction: column; }
  .qty { justify-content: space-between; }
  .pc-sku { display: none; }
  .grid-pro.lista .pc { flex-direction: column; }
  .grid-pro.lista .pc-media { width: auto; border-right: 0; }
  .grid-pro.lista .pc-body { display: flex; }
  .grid-pro.lista { grid-template-columns: 1fr; }
  .fp-price { font-size: 32px; }
  .fp-trust { grid-template-columns: 1fr; }
  .fp-panel { padding: 16px; }
  .spec-table th { width: 42%; }
  .spec-table th, .spec-table td { padding: 10px; }
  .mt-foot-grid { grid-template-columns: 1fr; gap: 22px; }
  .wa-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .sec-row { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 36px; }
  .hero-sz-grande { min-height: 260px; }
}

/* ---------- acceso y configuración de la página ---------- */
.pw-body { min-height: 100vh; background: linear-gradient(120deg, #0b1b3a, #1e1b4b) top / 100% 260px no-repeat, var(--bg); padding: 32px 16px; }
.pw-wrap { width: min(860px, 100%); margin: 0 auto; display: grid; gap: 18px; }
.pw-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; color: #fff; padding: 8px 4px 10px; }
.pw-head h1 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.pw-head .pw-sub { color: #cbd5e1; }
.pw-nav { display: flex; gap: 8px; }
.pw-head .pw-btn { color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); }
.pw-head .pw-btn:hover { background: rgba(255, 255, 255, .18); }
.pw-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-hi); padding: 24px; }
.pw-card h2 { margin: 0 0 14px; font-size: 18px; }
.pw-login { width: min(420px, 100%); margin: 8vh auto 0; display: grid; gap: 12px; }
.pw-login h1 { margin: 6px 0 0; font-size: 22px; }
.pw-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.pw-error { margin: 0; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.pw-form { display: grid; gap: 12px; }
.pw-form label, .pw-label { display: grid; gap: 6px; align-content: start; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.pw-label small { font-weight: 500; color: var(--muted); }
.pw-form input, .pw-form select, .pw-input {
  width: 100%; min-height: 44px; border: 1.5px solid var(--line); border-radius: 11px; padding: 0 12px; background: #f8fafc; font-weight: 500;
}
.pw-user-one {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 11px;
  background: #eef4ff; border: 1.5px solid #c7d7fe; color: var(--ink); font-weight: 700;
}
.mt-radios { display: grid; gap: 8px; }
.mt-radio {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px;
  border-radius: 12px; background: #f8fafc; border: 1.5px solid var(--line);
  font-weight: 650; cursor: pointer; color: var(--ink);
}
.mt-radio:has(input:checked) { border-color: var(--brand); background: #eef4ff; }
.mt-radio input { position: absolute; opacity: 0; pointer-events: none; }
.mt-radio-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #94a3b8; background: #fff;
}
.mt-radio:has(input:checked) .mt-radio-dot {
  border-color: #0a84ff; box-shadow: inset 0 0 0 5px #0a84ff;
}
.pw-form input:focus, .pw-input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(11, 79, 214, .1); }
.pw-pass { position: relative; display: block; }
.pw-pass input { padding-right: 88px; }
.pw-pass button {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 32px; padding: 0 12px;
  border: 0; border-radius: 8px; background: #e8eefc; color: var(--brand); font-weight: 700; font-size: 12.5px;
}
.pw-pass button:hover { background: #dbe5fb; }
.pw-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 11px;
  border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.pw-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.pw-btn:disabled { opacity: .6; cursor: wait; }
.pw-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.pw-primary:hover { background: var(--brand-dk); border-color: var(--brand-dk); }
.pw-link { color: var(--brand); font-weight: 600; font-size: 14px; justify-self: center; }
.pw-row { display: flex; gap: 8px; margin-top: 8px; }
.pw-row .pw-input { flex: 1; }
.pw-acciones { justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.pw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pw-estado { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; font-size: 14px; word-break: break-all; }
.pw-estado b { font-size: 15px; }
.pw-estado small { color: var(--muted); word-break: normal; }
.pw-estado.ok { background: var(--ok-bg); border-color: #a7f3d0; }
.pw-estado.ok b { color: var(--ok); }
.pw-estado.off { background: var(--warn-bg); border-color: #fcd9a6; }
.pw-estado.off b { color: var(--warn); }
.pw-hallados { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.pw-hallados button { width: 100%; text-align: left; border: 1.5px dashed #cbd5e1; background: #f8fafc; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; word-break: break-all; }
.pw-hallados button:hover { border-color: var(--brand); color: var(--brand); }
.pw-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.pw-check input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; }
.pw-nota { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .pw-grid { grid-template-columns: 1fr; }
  .pw-row { flex-wrap: wrap; }
}
