/* Expoferia — línea visual sobria: papel cálido, tinta, azul marino y serif para títulos. */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f3f1ed;
  --ink: #15181d;
  --text: #2a2e35;
  --muted: #6d717a;
  --line: #e6e3de;
  --line-strong: #d5d1ca;
  --primary: #1d5b4c;
  --primary-hover: #154638;
  --primary-ink: #ffffff;
  --accent: #c0612b;
  --gold: #b8892f;
  --sale: #c0512b;
  --tint-green: #e6f0eb;
  --tint-sand: #f8efe2;
  --tint-sky: #e5eef6;
  --tint-rose: #f7e6e0;
  --band: #173f36;
  --band-accent: #e9c77a;
  --brand: #1d5b4c;
  --footer: #0f2a24;
  --footer-line: #22443b;
  --display: var(--serif);
  --wa: #1f8f4e;
  --danger: #a4302a;
  --overlay: rgba(14, 18, 24, .5);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 24, 30, .04), 0 8px 24px rgba(20, 24, 30, .06);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
/* Modo oscuro (opción A). tema.js pone data-mode="dark" según la elección o el sistema */
  :root[data-mode="dark"] { color-scheme: dark;
    --bg: #111317;
    --surface: #181b20;
    --surface-2: #20242a;
    --ink: #f2f1ee;
    --text: #dddcd8;
    --muted: #9a9ea6;
    --line: #2a2f36;
    --line-strong: #3a4049;
    --primary: #5cbf9c;
    --primary-hover: #7bd3b3;
    --primary-ink: #0d1f1a;
    --accent: #e68a55;
    --gold: #d6aa55;
    --sale: #e07a55;
    --tint-green: #1a2a25;
    --tint-sand: #2a2219;
    --tint-sky: #18222c;
    --tint-rose: #2b1d19;
    --band: #12302a;
    --footer: #0b1f1a;
    --wa: #2fa862;
    --danger: #e0756d;
    --overlay: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.95); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.full { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px;
  background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; color: var(--text);
}
.icon-btn:hover, .icon-btn.active { background: var(--surface-2); color: var(--ink); }
.icon-btn .i { width: 20px; height: 20px; }
.count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center;
  background: var(--surface-2); color: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.icon-btn.active .count, .count.has { background: var(--primary); color: var(--primary-ink); }
.count.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.25); } }
.round-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.round-btn:hover { border-color: var(--ink); }
.text-link, .link {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.text-link:hover { color: var(--ink); }

/* Encabezado */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; }
.logo { display: grid; text-decoration: none; line-height: 1.1; }
.logo-name { font-family: var(--display); font-size: 23px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.logo-place { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.search { flex: 1; position: relative; max-width: 520px; }
.search .i { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search input[type=search] {
  width: 100%; height: 42px; padding: 0 14px 0 42px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface-2); outline: none;
}
.search input:focus { background: var(--surface); border-color: var(--line-strong); }
.actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.actions .btn { margin-left: 8px; }

.cats { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 0 12px; white-space: nowrap;
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; color: var(--muted); font-size: 14px;
}
.cat:hover { color: var(--ink); }
.cat.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.cat .i { width: 17px; height: 17px; }

/* Hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 80px 24px 64px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 72px; align-items: center; }
.hero-title { margin: 0 0 20px; font-family: var(--display); font-weight: 500; font-size: clamp(38px, 5vw, 60px); line-height: 1.06; letter-spacing: -0.02em; }
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub { margin: 0 0 32px; font-size: 18px; color: var(--muted); max-width: 560px; }
.hero-search {
  display: flex; align-items: center; gap: 10px; max-width: 580px; height: 60px; padding: 0 8px 0 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.hero-search:focus-within { border-color: var(--ink); }
.hero-search .i { color: var(--muted); width: 20px; height: 20px; }
.hero-search input[type=search] { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; outline: none; font-size: 16px; }
.hero-stats { display: flex; gap: 0; margin: 40px 0 0; }
.hero-stats div { padding: 0 28px; border-left: 1px solid var(--line); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt { font-family: var(--display); font-size: 32px; font-weight: 500; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-stats dd { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.how { border: 1px solid var(--line); border-radius: 18px; padding: 30px; background: var(--bg); }
.how ol { list-style: none; margin: 8px 0 24px; padding: 0; display: grid; gap: 20px; }
.how li { display: flex; gap: 16px; }
.how-n {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); font-family: var(--display); font-size: 16px; color: var(--ink); background: var(--surface);
}
.how li div { display: grid; gap: 2px; }
.how strong { color: var(--ink); font-weight: 600; }
.how li span:not(.how-n) { color: var(--muted); font-size: 14px; }

.trust {
  max-width: 1240px; margin: 0 auto; padding: 22px 24px; list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--line);
}
.trust li { display: flex; gap: 12px; align-items: flex-start; }
.trust .i { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.trust div { display: grid; line-height: 1.35; }
.trust strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.trust span { color: var(--muted); font-size: 13px; }

/* Secciones */
.section { max-width: 1240px; margin: 72px auto 0; padding: 0 24px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.01em; }
.carousel-nav { display: flex; gap: 8px; }

/* Tarjeta de producto (grilla, carrusel y ofertas) */
.card { position: relative; cursor: pointer; display: flex; flex-direction: column; gap: 12px; outline-offset: 4px; }
.card-media {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--line-strong); }
.ph .i { width: 38%; height: 38%; stroke-width: 1; }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em; background: rgba(255,255,255,.94); color: #15181d;
}
.badge .i { width: 13px; height: 13px; }
.badge-feat .i { color: #9a7b3c; fill: #9a7b3c; }
.badge-sale { background: var(--sale); color: #fff; }
.badge-sold { background: #15181d; color: #fff; }
.media-btn {
  position: absolute; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255,255,255,.94); color: #15181d;
  box-shadow: 0 1px 3px rgba(0,0,0,.12); transition: transform .15s, background .15s;
}
.media-btn:hover { transform: scale(1.06); }
.fav { top: 10px; right: 10px; }
.fav.on .i { fill: #b8322f; stroke: #b8322f; }
.add-cart { bottom: 10px; right: 10px; }
.add-cart.on { background: var(--brand); color: #fff; }
.card-body { display: grid; gap: 3px; }
.price-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-size: 17px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.old-price { color: var(--muted); font-size: 13px; }
.card-title { margin: 0; font-size: 14.5px; font-weight: 400; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.meta .i { width: 13px; height: 13px; }
.card.sold .card-media img { filter: grayscale(1); opacity: .6; }
.card.sold .price { color: var(--muted); }

/* Carrusel y fila de ofertas */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 20px) / 4.3); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; outline: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > .card { scroll-snap-align: start; }
.carousel-progress { margin-top: 22px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.carousel-progress span { display: block; height: 100%; width: 25%; background: var(--ink); transition: transform .3s ease, width .3s; }

/* Destacados */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 260px); gap: 20px; }
.feat { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--surface-2); }
.feat-big { grid-column: span 2; grid-row: span 2; }
.feat .card-media { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.feat:hover .card-media img { transform: scale(1.03); }
.feat-info {
  position: absolute; inset: auto 0 0 0; padding: 48px 18px 16px; display: grid; gap: 2px; color: #fff;
  background: linear-gradient(to top, rgba(10,12,16,.82), rgba(10,12,16,0));
}
.feat-info h3 { margin: 0; color: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat-info .price { color: #fff; }
.feat-info .old-price, .feat-info .meta { color: rgba(255,255,255,.75); }
.feat-cat { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.feat-big .feat-info { padding: 80px 28px 24px; }
.feat-big .feat-info h3 { font-family: var(--display); font-size: 28px; line-height: 1.15; white-space: normal; letter-spacing: -0.01em; }
.feat-big .price { font-size: 22px; }

/* Listado */
.layout { max-width: 1240px; margin: 80px auto 0; padding: 0 24px; display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.filters { position: sticky; top: 140px; display: grid; gap: 14px; }
.filters h2 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.filters h2 button { all: unset; display: flex; width: 100%; justify-content: space-between; align-items: center; }
.filters h2 span { display: inline-flex; align-items: center; gap: 8px; }
.caret { display: none; }
label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text); }
label.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 400; cursor: pointer; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }
:where(input:not([type=checkbox], [type=file]), select, textarea) {
  height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-weight: 400; min-width: 0; outline: none;
}
:where(textarea) { height: auto; padding: 10px 12px; resize: vertical; }
:where(input, select, textarea):focus { border-color: var(--ink); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tips { margin-top: 10px; padding: 18px; border-radius: var(--radius); background: var(--surface-2); font-size: 13px; }
.tips h3 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.tips .i { color: var(--accent); }
.tips ul { margin: 0; padding-left: 16px; color: var(--muted); display: grid; gap: 4px; }

.results-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.results-head h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 26px; }
.filter-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; cursor: pointer; font-size: 13px;
}
.filter-pill .i { width: 14px; height: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 36px 22px; }
.empty { text-align: center; padding: 64px 16px; color: var(--muted); }

/* Footer */
.footer { margin-top: 110px; background: #15181d; color: #b9bcc2; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 56px 24px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer .logo-name { color: #fff; }
.footer-brand p { max-width: 360px; margin: 10px 0 0; font-size: 14px; }
.footer h4 { margin: 0 0 12px; color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.footer a, .footer .link { color: #b9bcc2; text-decoration: none; font-weight: 400; }
.footer a:hover, .footer .link:hover { color: #fff; }
.footer-legal { max-width: 1240px; margin: 0 auto; padding: 20px 24px 32px; border-top: 1px solid #2a2f36; font-size: 12.5px; color: #8a8e96; }

/* Diálogos */
.dialog {
  border: 0; border-radius: 18px; padding: 0; width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.dialog::backdrop { background: var(--overlay); backdrop-filter: blur(2px); }
.close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.detail { display: grid; grid-template-columns: 1.1fr 1fr; }
.detail-media { background: var(--surface-2); }
.detail-media .main { aspect-ratio: 1; overflow: hidden; }
.detail-media .main img { width: 100%; height: 100%; object-fit: cover; }
.detail-media .thumbs { display: flex; gap: 8px; padding: 10px; }
.detail-media .thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; cursor: pointer; }
.detail-info { padding: 36px 32px 32px; display: grid; gap: 14px; align-content: start; }
.detail-info h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 28px; line-height: 1.15; padding-right: 36px; }
.detail-price { display: grid; gap: 2px; }
.detail-price .price { font-size: 30px; }
.saving { color: var(--sale); font-size: 13px; font-weight: 500; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 4px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); }
.detail-info p { margin: 0; white-space: pre-line; }
.seller { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink); font-family: var(--display); font-size: 17px;
}
.seller div { display: grid; line-height: 1.35; }
.seller strong { color: var(--ink); }
.demo-note { font-size: 12.5px; color: var(--muted); background: var(--surface-2); padding: 8px 12px; border-radius: var(--radius-sm); }
.detail-actions { display: grid; gap: 8px; }
.detail-actions .btn { height: 48px; }
.owner-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }

.form { padding: 32px; display: grid; gap: 16px; }
.form h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 28px; }
.opt { color: var(--muted); font-weight: 400; }
.form-error { color: var(--danger); margin: 0; min-height: 1em; font-size: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.previews { display: flex; gap: 8px; }
.previews:empty { display: none; }
.previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.feature-opt { align-content: center; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.feature-opt span { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); }
.feature-opt small { color: var(--muted); font-weight: 400; }

/* Carrito */
.drawer {
  margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(460px, 100vw); max-width: 100vw;
  border-radius: 0; display: none; flex-direction: column;
}
.drawer[open] { display: flex; animation: slideIn .3s cubic-bezier(.2,.8,.2,1); }
@keyframes slideIn { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 24px; }
.drawer-head .close { position: static; box-shadow: none; background: var(--surface-2); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.drawer-foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.drawer-foot:empty { display: none; }
.cart-group { flex: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cart-seller { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface-2); }
.cart-seller .avatar { width: 34px; height: 34px; font-size: 15px; }
.cart-seller div { display: grid; line-height: 1.3; }
.cart-seller strong { color: var(--ink); }
.cart-item { display: grid; grid-template-columns: 60px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.cart-item.unavailable { opacity: .55; }
.cart-item.unavailable .cart-item-price { text-decoration: line-through; }
.cart-thumb { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; border: 0; padding: 0; cursor: pointer; background: var(--surface-2); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { display: grid; min-width: 0; font-size: 13px; }
.cart-item-title { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sold-note { color: var(--danger); }
.cart-item-price { font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.remove { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 6px; display: grid; }
.remove:hover { color: var(--danger); }
.cart-group-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.cart-group-foot .btn { height: 38px; padding: 0 14px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total strong { font-family: var(--display); font-weight: 500; font-size: 28px; color: var(--ink); }
.cart-note { margin: 0; font-size: 12.5px; }
.cart-empty { text-align: center; padding: 56px 12px; }
.cart-empty p { margin: 6px 0; }
.cart-empty .btn { margin-top: 18px; }
.cart-empty-icon { width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.cart-empty-icon .i { width: 36px; height: 36px; stroke-width: 1.3; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 50;
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 10px; font-size: 14px;
  opacity: 0; transition: .25s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Responsive */
@media (max-width: 1080px) {
  .rail { grid-auto-columns: calc((100% - 2 * 20px) / 3.3); }
  .lbl { display: none; }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 56px 24px 48px; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); grid-template-rows: 340px 220px 220px; }
  .feat-big { grid-row: span 1; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 56px; }
  .filters { position: static; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .filters h2 button { cursor: pointer; }
  .caret { display: block; transition: transform .15s; }
  .filters:not(.collapsed) .caret { transform: rotate(180deg); }
  .filters.collapsed > :not(h2) { display: none; }
  .filters h2 { margin: 0; }
  .tips { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .detail { grid-template-columns: 1fr; }
  .detail-media .main { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 0; }
  .topbar { position: static; }
  .topbar-inner { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .actions .btn { padding: 0 14px; }
  .icon-btn { padding: 0 8px; }
  .cats { padding: 0 16px; gap: 20px; }
  .hero-inner { padding: 40px 16px 36px; }
  .hero-sub { font-size: 16px; }
  .hero-search { height: 54px; }
  .hero-search .btn { padding: 0 14px; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-stats div { padding: 0 12px; }
  .hero-stats dt { font-size: 26px; }
  .how { padding: 22px; }
  .trust { grid-template-columns: 1fr; gap: 14px; padding: 20px 16px; }
  .section { margin-top: 52px; padding: 0 16px; }
  .carousel-nav { display: none; }
  .rail { grid-auto-columns: 64%; gap: 14px; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: 280px 180px 180px; gap: 12px; }
  .feat-info { padding: 36px 12px 12px; }
  .feat-big .feat-info { padding: 60px 18px 18px; }
  .feat-big .feat-info h3 { font-size: 22px; }
  .layout { padding: 0 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; }
  .price { font-size: 16px; }
  .row { grid-template-columns: 1fr; }
  .form { padding: 24px 20px; }
  .detail-info { padding: 24px 20px; }
  .footer-inner { padding: 44px 16px 24px; }
  .footer-legal { padding: 18px 16px 28px; }
}

/* ---------- Toques de color ---------- */
.hero {
  background:
    radial-gradient(60% 90% at 100% 0%, var(--tint-sand), transparent 70%),
    radial-gradient(55% 80% at 0% 100%, var(--tint-green), transparent 70%),
    var(--surface);
}
.hero-stats dt { color: var(--primary); }
.how { background: var(--surface); box-shadow: var(--shadow); }
.how-n { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.trust .i {
  box-sizing: content-box; width: 20px; height: 20px; padding: 9px; margin-top: 0;
  border-radius: 50%; background: var(--tint-green); color: var(--primary);
}
.trust li:nth-child(2) .i { background: var(--tint-sky); color: #2f6a9a; }
.trust li:nth-child(3) .i { background: var(--tint-sand); color: var(--gold); }
.trust li:nth-child(4) .i { background: var(--tint-rose); color: var(--accent); }

/* Cada categoría con su color */
.cat .i { color: var(--c, var(--muted)); }
.cat.active { border-bottom-color: var(--primary); }

/* Bandas de color para Destacados y Ofertas */
#featuredSection, #offersSection {
  width: calc(100% - 48px); max-width: 1192px; padding: 40px; border-radius: 24px;
}
#featuredSection { background: var(--band); }
#featuredSection h2 { color: #fff; }
#featuredSection .eyebrow { color: var(--band-accent); }
#offersSection { background: var(--tint-sand); }

.badge-feat { background: #fff3d6; color: #6b4a10; }
.badge-feat .i { color: var(--gold); fill: var(--gold); }
.tips { background: var(--tint-green); }
.tips .i { color: var(--primary); }
.cart-seller { background: var(--tint-green); }
.demo-note { background: var(--tint-sand); }
.filter-pill { border-color: var(--accent); color: var(--accent); }
.footer { background: var(--footer); }
.footer-legal { border-top-color: var(--footer-line); }

/* Modo oscuro: detalles */
  [data-mode="dark"] .trust li:nth-child(2) .i { color: #7fb0dc; }
  [data-mode="dark"] .badge-feat { background: #3a2f17; color: #f0d48f; }

@media (max-width: 640px) {
  #featuredSection, #offersSection { width: calc(100% - 24px); padding: 26px 14px; border-radius: 18px; }
}
@media (max-width: 640px) {
  .feat:not(.feat-big) .feat-cat { display: none; }
  .feat:not(.feat-big) .feat-info h3 { font-size: 13.5px; }
  .feat:not(.feat-big) .price { font-size: 15px; }
}

/* ======================================================================
   OPCIÓN B — Azul y mostaza, títulos en sans moderna (Plus Jakarta Sans)
   Se activa con <html data-theme="b">
   ====================================================================== */
:root[data-theme="b"] {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --ink: #0f1b2e;
  --text: #27324a;
  --muted: #66708a;
  --line: #e1e6ef;
  --line-strong: #cdd5e3;
  --primary: #1f4e8c;
  --primary-hover: #173d6e;
  --primary-ink: #ffffff;
  --brand: #1f4e8c;
  --accent: #a87600;
  --gold: #e0a106;
  --sale: #d14b2a;
  --tint-green: #e6f2ec;
  --tint-sand: #fff4d6;
  --tint-sky: #e6effb;
  --tint-rose: #fdebe6;
  --band: #142c52;
  --band-accent: #ffc83d;
  --footer: #0d1d38;
  --footer-line: #1f3357;
  --display: "Plus Jakarta Sans", var(--sans);
}
/* Opción B en modo oscuro */
  :root[data-theme="b"][data-mode="dark"] { color-scheme: dark;
    --bg: #0e1420;
    --surface: #151d2b;
    --surface-2: #1c2638;
    --ink: #eef2f8;
    --text: #d5dcea;
    --muted: #93a0b8;
    --line: #263248;
    --line-strong: #34425c;
    --primary: #7fb0f0;
    --primary-hover: #a3c7f5;
    --primary-ink: #0b1424;
    --accent: #f2c14e;
    --gold: #f2c14e;
    --sale: #ff8a66;
    --tint-green: #15261f;
    --tint-sand: #2a2412;
    --tint-sky: #16233a;
    --tint-rose: #2b1a17;
    --band: #10223f;
    --footer: #0a1527;
  }

[data-theme="b"] :is(.section-head h2, .results-head h2, .detail-info h2, .form h2, .drawer-head h2, .feat-big .feat-info h3, .hero-stats dt, .cart-total strong, .how-n, .avatar) {
  font-weight: 700; letter-spacing: -0.025em;
}
[data-theme="b"] .logo-name { font-weight: 800; letter-spacing: -0.03em; }
[data-theme="b"] .hero-title { font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
[data-theme="b"] .hero-title em {
  font-style: normal; color: var(--ink);
  background: linear-gradient(transparent 60%, #ffd45c 60%, #ffd45c 90%, transparent 90%);
  padding: 0 .05em;
}
[data-theme="b"] #btnPublish { background: #ffc83d; color: #0f1b2e; font-weight: 600; }
[data-theme="b"] #btnPublish:hover { background: #ffb800; }
[data-theme="b"] .badge { border-radius: 99px; }
[data-theme="b"] .card-media, [data-theme="b"] .feat { border-radius: 16px; }

  [data-mode="dark"][data-theme="b"] .hero-title em { background: linear-gradient(transparent 60%, rgba(255, 200, 61, .45) 60%, rgba(255, 200, 61, .45) 90%, transparent 90%); }


/* Selector de opción de diseño (solo para comparar en el prototipo) */
.theme-switch {
  position: fixed; left: 16px; bottom: 16px; z-index: 40;
  display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px;
  background: var(--ink); color: var(--bg); border-radius: 99px; font-size: 12.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.theme-switch button {
  border: 0; cursor: pointer; height: 30px; padding: 0 12px; border-radius: 99px;
  background: transparent; color: inherit; font-weight: 600; opacity: .7;
}
.theme-switch button.on { background: var(--bg); color: var(--ink); opacity: 1; }

/* ---------- Aviso de borrador (tienda) ---------- */
.draft-bar { background: var(--tint-sand); color: var(--ink); text-align: center; font-size: 13.5px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.draft-bar a { font-weight: 600; }
.avatar .i { width: 20px; height: 20px; }
#btnContact .i { width: 18px; height: 18px; }

/* ---------- Panel de administración ---------- */
.admin .topbar { position: sticky; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; display: grid; gap: 28px; }
.admin-block h2, .admin-list-head h2 { margin: 0 0 14px; font-family: var(--display); font-weight: 500; font-size: 24px; }
[data-theme="b"] .admin-block h2, [data-theme="b"] .admin-list-head h2 { font-weight: 700; letter-spacing: -0.02em; }
.admin-list-head h2 .muted { font-family: var(--sans); font-size: 14px; font-weight: 400; margin-left: 6px; }

.publish-card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 22px 24px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.publish-status { display: flex; gap: 14px; align-items: flex-start; }
.publish-status strong { color: var(--ink); font-size: 16px; }
.publish-status p { margin: 2px 0 0; font-size: 14px; }
.status-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; }
.status-dot.ok { background: #2f9e6a; box-shadow: 0 0 0 4px color-mix(in srgb, #2f9e6a 20%, transparent); }
.status-dot.dirty { background: #e0a106; box-shadow: 0 0 0 4px color-mix(in srgb, #e0a106 25%, transparent); }
.publish-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.file-btn { cursor: pointer; font-size: 15px; color: var(--ink); }
.how-publish { font-size: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.how-publish summary { cursor: pointer; color: var(--ink); font-weight: 500; }
.how-publish ol { margin: 10px 0; padding-left: 20px; display: grid; gap: 6px; }
.how-publish p { margin: 0; font-size: 13px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .92em; }

.shop-form { display: grid; grid-template-columns: 1fr 1fr 1.3fr auto; gap: 12px; align-items: end; }

.admin-list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.admin-list-head h2 { margin: 0; }
.admin-filters { display: flex; gap: 10px; }
.admin-filters .search { width: 240px; }
.admin-list { display: grid; gap: 10px; margin-top: 14px; }
.admin-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto auto; gap: 16px; align-items: center;
  padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer;
  transition: border-color .15s;
}
.admin-row:hover { border-color: var(--line-strong); }
.admin-row.is-sold { opacity: .6; }
.admin-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-info { display: grid; min-width: 0; }
.admin-info strong { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.admin-info .muted { font-size: 13px; }
.admin-price { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.admin-price strong { color: var(--ink); }
.admin-toggles { display: flex; gap: 6px; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 500;
}
.chip-toggle .i { width: 14px; height: 14px; }
.chip-toggle.on.feat { background: #fff3d6; border-color: #e7c574; color: #6b4a10; }
.chip-toggle.on.feat .i { fill: var(--gold); color: var(--gold); }
.chip-toggle.on.sold { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.photos-field { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0; display: grid; gap: 12px; }
.photos-field legend { font-size: 12.5px; font-weight: 500; padding: 0 6px; }
.photo-list { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-item { position: relative; width: 110px; height: 110px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .badge { position: absolute; left: 6px; bottom: 6px; }
.photo-cover { position: absolute; left: 6px; bottom: 6px; border: 0; border-radius: 6px; padding: 3px 7px; font-size: 11px; background: rgba(255,255,255,.92); color: #15181d; cursor: pointer; }
.photo-remove { top: 6px; right: 6px; width: 28px; height: 28px; }
.photo-remove .i { width: 14px; height: 14px; }
.photo-empty { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.photo-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.url-add { flex: 1; display: flex; gap: 8px; min-width: 240px; }
.url-add input { flex: 1; }
.toggles { display: grid; gap: 8px; }
.form-actions .spacer { flex: 1; }

@media (max-width: 760px) {
  .admin-main { padding: 20px 16px 64px; }
  .shop-form { grid-template-columns: 1fr; }
  .admin-filters { width: 100%; }
  .admin-filters .search { flex: 1; width: auto; }
  .admin-row { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "thumb info edit" "thumb price price" "toggles toggles toggles"; row-gap: 8px; }
  .admin-thumb { grid-area: thumb; width: 56px; height: 56px; }
  .admin-info { grid-area: info; }
  .admin-price { grid-area: price; text-align: left; }
  .admin-toggles { grid-area: toggles; }
  .admin-row > .round-btn { grid-area: edit; }
  .admin .actions .btn-outline { display: none; }
}

/* ======================================================================
   OPCIÓN D — Nórdica clara: blanco hueso, beige, azul pizarra y rosa arcilla.
   Todo en Manrope, esquinas muy redondeadas, sin bandas oscuras. Siempre clara.
   ====================================================================== */
:root[data-theme="d"] {
  color-scheme: light;
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f1ece4;
  --ink: #23303b;
  --text: #3a4651;
  --muted: #7a848d;
  --line: #ece7df;
  --line-strong: #ddd6cb;
  --primary: #4a6a85;
  --primary-hover: #3d5970;
  --primary-ink: #ffffff;
  --brand: #4a6a85;
  --accent: #b9775f;
  --gold: #c99a4a;
  --sale: #cf7c62;
  --wa: #3f9b6e;
  --danger: #b5483c;
  --tint-green: #edf2ee;
  --tint-sand: #f5efe7;
  --tint-sky: #eaf0f5;
  --tint-rose: #f8ece6;
  --band: #eef2f5;
  --band-accent: #4a6a85;
  --footer: #f1ece4;
  --footer-line: #e2dbd0;
  --overlay: rgba(35, 48, 59, .35);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(35, 48, 59, .03), 0 8px 24px rgba(35, 48, 59, .05);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Manrope", system-ui, sans-serif;
}

/* Tipografía liviana y geométrica */
[data-theme="d"] body { font-size: 15.5px; }
[data-theme="d"] .logo-name { font-weight: 700; font-size: 22px; letter-spacing: -0.03em; }
[data-theme="d"] .hero-title { font-weight: 600; font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -0.035em; }
[data-theme="d"] .hero-title em { font-style: normal; color: var(--primary); }
[data-theme="d"] :is(.section-head h2, .results-head h2, .detail-info h2, .form h2, .drawer-head h2, .admin-block h2, .admin-list-head h2, .feat-big .feat-info h3) { font-weight: 600; letter-spacing: -0.03em; }
[data-theme="d"] :is(.hero-stats dt, .cart-total strong) { font-weight: 600; letter-spacing: -0.03em; color: var(--primary); }
[data-theme="d"] .eyebrow { letter-spacing: .14em; font-weight: 600; }
[data-theme="d"] .price { font-weight: 700; }

/* Formas: todo redondeado, botones píldora */
[data-theme="d"] .btn, [data-theme="d"] .icon-btn, [data-theme="d"] .filter-pill { border-radius: 999px; }
[data-theme="d"] .btn { padding: 0 22px; }
[data-theme="d"] :where(input:not([type=checkbox], [type=file]), select, textarea) { border-radius: 14px; border-color: var(--line); background: var(--bg); }
[data-theme="d"] .hero-search { border-radius: 999px; border-color: var(--line); padding-left: 22px; }
[data-theme="d"] .card-media { border-radius: 22px; }
[data-theme="d"] .feat { border-radius: 26px; }
[data-theme="d"] .dialog { border-radius: 28px; }
[data-theme="d"] .detail-media .main img { border-radius: 0; }
[data-theme="d"] .badge { border-radius: 999px; padding: 0 10px; }
[data-theme="d"] .media-btn { box-shadow: none; }
[data-theme="d"] .cart-group, [data-theme="d"] .admin-row, [data-theme="d"] .publish-card { border-radius: 22px; }

/* Inicio: degradé suave beige y celeste, sin contrastes fuertes */
[data-theme="d"] .hero {
  background:
    radial-gradient(60% 90% at 100% 0%, var(--tint-rose), transparent 70%),
    radial-gradient(55% 80% at 0% 100%, var(--tint-sky), transparent 70%),
    var(--bg);
  border-bottom: 0;
}
[data-theme="d"] .how { border: 0; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
[data-theme="d"] .how-n { background: var(--tint-sky); border: 0; color: var(--primary); font-weight: 700; }
[data-theme="d"] .trust { border-top: 0; }
[data-theme="d"] .trust .i { background: var(--tint-sky); color: var(--primary); }
[data-theme="d"] .trust li:nth-child(2) .i { background: var(--tint-rose); color: var(--accent); }
[data-theme="d"] .trust li:nth-child(3) .i { background: var(--tint-sand); color: #a07a3c; }
[data-theme="d"] .trust li:nth-child(4) .i { background: var(--tint-green); color: #4f7a5e; }

/* Categorías como píldoras suaves */
[data-theme="d"] .cats { gap: 8px; padding-top: 2px; padding-bottom: 12px; }
[data-theme="d"] .cat { border: 0; border-radius: 999px; padding: 8px 14px; background: transparent; }
[data-theme="d"] .cat:hover { background: var(--surface-2); }
[data-theme="d"] .cat.active { background: var(--tint-sky); color: var(--primary); font-weight: 600; }
[data-theme="d"] .cat .i { color: color-mix(in srgb, var(--c) 65%, #fff); }
[data-theme="d"] .topbar { border-bottom-color: transparent; box-shadow: 0 1px 0 var(--line); }

/* Bandas claras (sin fondos oscuros) */
[data-theme="d"] #featuredSection { background: var(--band); border-radius: 32px; }
[data-theme="d"] #featuredSection h2 { color: var(--ink); }
[data-theme="d"] #offersSection { background: var(--tint-rose); border-radius: 32px; }
[data-theme="d"] .badge-feat { background: rgba(255,255,255,.95); color: var(--primary); }
[data-theme="d"] .badge-feat .i { color: var(--gold); fill: var(--gold); }
[data-theme="d"] .badge-sold { background: var(--ink); }
[data-theme="d"] .add-cart.on { background: var(--primary); }
[data-theme="d"] .tips { border-radius: 22px; }

/* Pie de página claro */
[data-theme="d"] .footer { color: var(--muted); }
[data-theme="d"] .footer .logo-name, [data-theme="d"] .footer h4 { color: var(--ink); }
[data-theme="d"] .footer a, [data-theme="d"] .footer .link { color: var(--muted); }
[data-theme="d"] .footer a:hover, [data-theme="d"] .footer .link:hover { color: var(--ink); }
[data-theme="d"] .footer-legal { color: var(--muted); }
[data-theme="d"] .theme-switch { background: var(--primary); color: #fff; }
[data-theme="d"] .theme-switch button.on { background: #fff; color: var(--primary); }

/* Ajustes comunes de títulos (todas las opciones) */
.section-head h2, .results-head h2 { line-height: 1.15; }
.text-link, #resultsCount { white-space: nowrap; }
.results-head { flex-wrap: wrap; row-gap: 4px; }

/* ======================================================================
   SLIDER DEL INICIO (estilo Mercado Libre)
   ====================================================================== */
[data-theme] .hero, .hero { background: none; border-bottom: 0; }
.slider {
  position: relative; overflow: hidden; height: clamp(380px, 40vw, 500px);
  background: var(--surface-2); user-select: none; touch-action: pan-y;
}
.slider-track { display: flex; height: 100%; transition: transform .65s cubic-bezier(.22, .8, .2, 1); will-change: transform; }
.banner { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }
.banner-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 12, 16, .8) 0%, rgba(10, 12, 16, .55) 38%, rgba(10, 12, 16, 0) 72%);
}
.banner-content {
  position: relative; z-index: 1; max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 24px 70px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; color: #fff;
}
.banner .eyebrow { color: rgba(255, 255, 255, .82); }
.banner-title {
  margin: 0 0 14px; max-width: 640px; color: #fff; font-family: var(--display);
  font-size: clamp(32px, 4.6vw, 58px); font-weight: 500; line-height: 1.04; letter-spacing: -0.02em;
}
.banner-text { margin: 0 0 26px; max-width: 480px; font-size: 17px; color: rgba(255, 255, 255, .86); }
.banner-cta { height: 50px; padding: 0 24px; font-size: 15.5px; }
.banner-cta .i { width: 18px; height: 18px; }
[data-theme="b"] .banner-title { font-weight: 800; letter-spacing: -0.035em; }
[data-theme="d"] .banner-title { font-weight: 600; letter-spacing: -0.035em; }

/* Fundido inferior hacia la página, como en Mercado Libre */
.slider::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

/* Flechas laterales: aparecen al pasar el mouse */
.slider-arrow {
  position: absolute; top: 44%; translate: 0 -50%; z-index: 2; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer; background: rgba(255, 255, 255, .95); color: #15181d;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18); opacity: 0; transition: opacity .2s, transform .2s;
}
.slider-arrow .i { width: 22px; height: 22px; }
.slider-arrow.prev { left: 24px; }
.slider-arrow.next { right: 24px; }
.slider:hover .slider-arrow, .slider:focus-within .slider-arrow { opacity: 1; }
.slider-arrow:hover { transform: scale(1.06); }

/* Puntitos */
.slider-dots { position: absolute; left: 0; right: 0; bottom: 74px; z-index: 2; display: flex; justify-content: center; gap: 8px; }
.slider-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; cursor: pointer; background: rgba(255, 255, 255, .55); transition: width .3s, background .3s; }
.slider-dot[aria-selected="true"] { width: 26px; background: #fff; }
.slider.single .slider-arrow, .slider.single .slider-dots { display: none; }

/* Tarjeta de confianza montada sobre el borde del slider */
.hero .trust {
  position: relative; z-index: 3; width: calc(100% - 48px); max-width: 1192px; margin: -58px auto 0; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15, 20, 30, .08);
}

@media (hover: none) {
  .slider-arrow { display: none; }
}
@media (max-width: 960px) {
  .hero .trust { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .slider { height: 460px; }
  .banner::after { background: linear-gradient(0deg, rgba(10, 12, 16, .88) 0%, rgba(10, 12, 16, .5) 52%, rgba(10, 12, 16, .05) 85%); }
  .banner-content { justify-content: flex-end; padding: 0 20px 96px; }
  .banner-text { font-size: 15px; margin-bottom: 18px; }
  .banner-cta { height: 46px; }
  .slider-dots { bottom: 62px; }
  .hero .trust { width: calc(100% - 24px); margin-top: -44px; padding: 14px; gap: 12px; }
  .hero .trust span { display: none; }
  .hero .trust strong { font-size: 13px; }
  .hero .trust .i { padding: 7px; width: 18px; height: 18px; }
}

/* Carruseles con tarjetas enteras (sin tarjetas cortadas en el borde) */
.rail {
  grid-auto-columns: calc((100% - 3 * 20px) / 4);
  padding: 6px 6px 12px; margin: -6px -6px 0; scroll-padding-inline: 6px;
}
@media (max-width: 1080px) {
  .rail { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
}
@media (max-width: 640px) {
  .rail { grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; }
  .carousel-nav { display: flex; }
  .carousel-nav .round-btn { width: 36px; height: 36px; }
}

/* ======================================================================
   SEO: tarjetas con enlace real, preguntas frecuentes y página de producto
   ====================================================================== */
/* Todo el ancho de la tarjeta es clicable gracias al enlace del título */
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card .media-btn, .feat .media-btn { z-index: 2; }
.card .badges, .feat .badges { z-index: 2; }
.feat-info { z-index: 1; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible), .feat:has(.card-link:focus-visible) { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 14px; }
.detail-permalink { font-size: 13.5px; justify-self: start; }
.detail-permalink .i { width: 14px; height: 14px; }

/* Preguntas frecuentes */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; align-items: start; }
.faq-intro p { margin: 0 0 12px; font-size: 16px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 18px; }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--muted); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0 0 16px; color: var(--text); }

/* Página de producto */
.pp { max-width: 1240px; margin: 0 auto; padding: 24px 24px 0; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb [aria-current] { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pp-detail { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--surface); }
.pp-detail .detail-info h1 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
[data-theme="b"] .pp-detail .detail-info h1 { font-weight: 800; letter-spacing: -0.03em; }
[data-theme="d"] .pp-detail .detail-info h1 { font-weight: 600; letter-spacing: -0.03em; }
.pp-detail .detail-media .main img { width: 100%; height: 100%; object-fit: cover; }
.pp-detail .thumbs img { cursor: default; }
.pp-sold { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--tint-rose); color: var(--ink); font-size: 14px; }
.pp-related { padding: 0; }
.product-page .footer { margin-top: 80px; }

/* Panel: formulario de la tienda con más campos */
.shop-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shop-form .span-all { grid-column: 1 / -1; }
.shop-form > .btn { justify-self: start; }

/* ---------- Ajustes responsive ---------- */
/* Las columnas del detalle nunca se ensanchan por un texto o botón largo */
.detail { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.detail-actions .btn { white-space: normal; text-align: center; height: auto; min-height: 48px; padding-top: 10px; padding-bottom: 10px; line-height: 1.3; }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
.detail-info p, .faq-list p, .faq-intro p { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
.grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ======================================================================
   GALERÍA DE FOTOS DEL PRODUCTO
   ====================================================================== */
.gallery { display: grid; outline: none; }
.gallery-main { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); touch-action: pan-y; user-select: none; }
.gallery-track { display: flex; height: 100%; transition: transform .35s cubic-bezier(.22, .8, .2, 1); }
.gallery-track > img, .gallery-track > .ph { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.gallery-main > img, .gallery-main > .ph { width: 100%; height: 100%; object-fit: cover; }
.gallery-arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #15181d; box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  opacity: 0; transition: opacity .2s;
}
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }
.gallery:hover .gallery-arrow, .gallery:focus-within .gallery-arrow { opacity: 1; }
@media (hover: none) { .gallery-arrow { opacity: 1; width: 36px; height: 36px; } }
.gallery-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 3px 10px; border-radius: 99px;
  background: rgba(10, 12, 16, .65); color: #fff; font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.gallery .thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; scrollbar-width: none; }
.gallery .thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: none; width: 64px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: var(--surface-2); opacity: .7; transition: opacity .15s, border-color .15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb[aria-current="true"] { border-color: var(--primary); opacity: 1; }
@media (max-width: 860px) { .gallery-main { aspect-ratio: 4 / 3; } }

/* Segunda foto al pasar el mouse por la tarjeta */
.card-media .alt-photo { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
@media (hover: hover) { .card:hover .card-media .alt-photo { opacity: 1; } }

/* ---------- Página de políticas ---------- */
.policies { max-width: 820px; }
.policies h1 { margin: 0 0 10px; font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; color: var(--ink); }
[data-theme="b"] .policies h1, [data-theme="d"] .policies h1 { font-weight: 700; letter-spacing: -0.03em; }
.policies-lead { color: var(--muted); font-size: 17px; margin: 0 0 28px; }
.policies section { padding: 22px 0; border-top: 1px solid var(--line); }
.policies h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 19px; color: var(--ink); }
.policies h2 .i { color: var(--accent); width: 20px; height: 20px; }
.policies section p { margin: 0; overflow-wrap: anywhere; }
.policies .regret { background: var(--tint-sand); border: 0; border-radius: var(--radius); padding: 22px; margin: 8px 0; }
.policies .regret .btn { margin-top: 14px; }

/* ---------- Panel: secciones del formulario de la tienda ---------- */
.form-section { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.form-section .opt { font-weight: 400; font-size: 13px; }
.no-ads { color: var(--sale); font-weight: 600; }
.policies .notice { background: var(--tint-sky); border: 0; border-radius: var(--radius); padding: 22px; margin-bottom: 8px; }
.seller .muted a { color: inherit; }

/* Categorías debajo del slider, arriba de "Recién ingresados" */
.cats-home { margin-top: 40px; padding-top: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.cats-home + .section { margin-top: 40px; }
[data-theme="d"] .cats-home { border-bottom: 0; }
@media (max-width: 640px) {
  .cats-home { margin-top: 28px; }
  .cats-home + .section { margin-top: 28px; }
}
@media (max-width: 1080px) {
  .cats-home { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 40px; }
}

/* Productos de la categoría elegida (debajo de la barra) */
.cat-results {
  width: calc(100% - 48px); max-width: 1192px; margin-top: 28px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.cat-results .section-head { margin-bottom: 18px; }
.cat-results .empty { padding: 24px 0 8px; }
.cat-results.appear { animation: catIn .35s ease; }
@keyframes catIn { from { opacity: 0; transform: translateY(10px); } }
.cats-home { scroll-margin-top: 90px; }
@media (max-width: 640px) {
  .cat-results { width: calc(100% - 24px); padding: 18px 12px; border-radius: 18px; }
  .cats-home { scroll-margin-top: 8px; }
}
.cat-results + .section { margin-top: 40px; }
@media (max-width: 640px) { .cat-results + .section { margin-top: 28px; } }

/* ======================================================================
   CATEGORÍAS GRANDES (tarjetas con ícono en círculo de color)
   ====================================================================== */
.cats-title { margin-top: 56px; }
.cats-title .section-head { margin-bottom: 0; }
.cats-home {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px;
  margin-top: 20px; padding: 0 24px; border-bottom: 0; overflow: visible;
  -webkit-mask-image: none; mask-image: none;
}
.cats-home .cat {
  flex-direction: column; justify-content: center; gap: 10px; min-height: 128px; padding: 18px 8px 16px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 500; line-height: 1.25; text-align: center; white-space: normal;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.cats-home .cat .i {
  box-sizing: content-box; width: 28px; height: 28px; padding: 14px; border-radius: 50%;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--surface)); stroke-width: 1.7;
}
.cats-home .cat:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 24, 30, .08); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); background: var(--surface); }
.cats-home .cat.active {
  border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, var(--surface)); font-weight: 600;
  box-shadow: 0 0 0 1px var(--c), 0 10px 24px rgba(20, 24, 30, .08);
}
.cats-home .cat.active .i { background: var(--c); color: #fff; }
[data-theme="d"] .cats-home .cat { border-radius: 24px; border-color: transparent; background: var(--surface); box-shadow: var(--shadow); }

@media (max-width: 1080px) {
  .cats-home { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-right: 24px; }
}
@media (max-width: 640px) {
  .cats-title { margin-top: 40px; }
  .cats-home { gap: 8px; padding: 0 16px; margin-top: 16px; }
  .cats-home .cat { min-height: 104px; padding: 14px 4px 12px; gap: 8px; font-size: 12.5px; border-radius: 16px; }
  .cats-home .cat .i { width: 22px; height: 22px; padding: 11px; }
}

/* ======================================================================
   MENÚ SUPERIOR (Ofertas · Preguntas · Ayuda · Cuenta)
   ====================================================================== */
.utilbar { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; position: relative; z-index: 25; }
.utilbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.util-links { display: flex; align-items: center; gap: 22px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.util-links::-webkit-scrollbar { display: none; }
.util-links a, .util-links button, .util-account > button {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); text-decoration: none; font-size: 13px;
}
.util-links a:hover, .util-links button:hover, .util-account > button:hover { color: var(--ink); }
.util-links .i { width: 15px; height: 15px; color: var(--accent); }
.util-account { display: flex; align-items: center; gap: 8px; color: var(--muted); flex: none; }
.util-account .util-strong { color: var(--primary); font-weight: 600; }

.account-menu { position: relative; }
.account-toggle { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; cursor: pointer; color: var(--ink); font-weight: 500; font-size: 13px; padding: 0; }
.account-toggle .i { width: 14px; height: 14px; }
.account-avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-size: 12px; font-weight: 700; }
.account-pop {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; padding: 6px; display: grid;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 20, 30, .14);
}
.account-pop[hidden] { display: none; }
.account-pop button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; color: var(--text); font-size: 14px; text-align: left; }
.account-pop button:hover { background: var(--surface-2); color: var(--ink); }
.account-pop .i { width: 16px; height: 16px; color: var(--muted); }

/* Diálogos de ayuda y cuenta */
.help-dialog, .account-dialog { width: min(560px, calc(100vw - 32px)); }
.help-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.help-steps strong { color: var(--ink); }
.help-note { margin: 0; font-size: 13.5px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.help-actions { display: grid; gap: 8px; }
.help-actions .btn { white-space: normal; height: auto; min-height: 46px; text-align: center; }
.account-sub { margin: 8px 0 0; }
.account-hint { margin: -4px 0 0; font-size: 13px; text-align: center; }
.account-switch { margin: 0; text-align: center; font-size: 14px; }
.signup-only { display: grid; gap: 16px; }
.signup-only[hidden] { display: none; }
.account-sent { text-align: center; justify-items: center; }
.account-sent h2 { margin: 0; }
.account-sent p { margin: 0; max-width: 380px; }
.sent-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-green); color: var(--primary); }
.sent-icon .i { width: 32px; height: 32px; }
#authSubmit:disabled { opacity: .6; cursor: not-allowed; }

/* Mis pedidos */
.order-head { justify-content: space-between; }
.order-total { font-family: var(--display); font-size: 20px; color: var(--ink); }
.order-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }

@media (max-width: 640px) {
  .utilbar-inner { padding: 0 12px; gap: 10px; }
  .util-links { gap: 14px; }
  .util-links .i { display: none; }
}
.util-account a { font-size: 13px; text-decoration: none; }
.util-account a:hover { color: var(--ink); }
@media (max-width: 640px) {
  .util-long, .util-account > span, .util-account > [data-auth="signup"] { display: none; }
}

/* ======================================================================
   BOTONES DE CUENTA (menú superior)
   ====================================================================== */
.utilbar-inner { height: 46px; }
.util-account { gap: 8px; }
.util-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600;
  text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.util-btn .i { width: 15px; height: 15px; color: var(--primary); }
.util-btn:hover { border-color: var(--primary); text-decoration: none !important; box-shadow: 0 2px 8px rgba(15, 20, 30, .08); }
.util-btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.util-btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
[data-theme="b"] .util-btn-primary { background: #ffc83d; border-color: #ffc83d; color: #0f1b2e; }
[data-theme="b"] .util-btn-primary:hover { background: #ffb800; border-color: #ffb800; }
.util-account .util-btn:hover { text-decoration: none; }
@media (max-width: 640px) {
  .utilbar-inner { height: 44px; }
  .util-btn { height: 28px; padding: 0 11px; }
}

/* ======================================================================
   PIE DE PÁGINA
   ====================================================================== */
.footer { margin-top: 110px; background: var(--footer); color: rgba(255, 255, 255, .72); position: relative; }
[data-theme="d"] .footer { color: var(--muted); }
.footer a, .footer .link { color: inherit; text-decoration: none; transition: color .15s; }
.footer a:hover, .footer .link:hover { color: #fff; }
[data-theme="d"] .footer a:hover, [data-theme="d"] .footer .link:hover { color: var(--ink); }

/* Franja de invitación, montada sobre el borde superior del pie */
.footer-cta { padding: 0 24px; }
.footer-cta-inner {
  max-width: 1192px; margin: 0 auto; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 32px 40px;
  border-radius: 24px; color: var(--ink);
  background: linear-gradient(120deg, var(--tint-green), var(--tint-sand));
  border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(15, 20, 30, .12);
}
.footer-cta-inner h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.01em; color: var(--ink); }
[data-theme="b"] .footer-cta-inner h2, [data-theme="d"] .footer-cta-inner h2 { font-weight: 700; letter-spacing: -0.025em; }
.footer-cta-inner p { margin: 0; color: var(--text); max-width: 560px; }
.footer-cta-inner .eyebrow { margin-bottom: 6px; }
.footer .footer-cta-btn { flex: none; height: 50px; padding: 0 22px; color: #fff; }
.footer .footer-cta-btn:hover { color: #fff; }
.footer-cta + .footer-inner { margin-top: -30px; }

.footer-inner { max-width: 1240px; margin: 0 auto; padding: 24px 24px 44px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand .logo-name { display: block; color: #fff; font-size: 26px; }
[data-theme="d"] .footer-brand .logo-name { color: var(--ink); }
.footer-place { display: block; margin-top: 2px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.footer-brand p { max-width: 340px; margin: 14px 0 18px; font-size: 14px; line-height: 1.6; }
.footer-badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.footer-badges li { display: flex; align-items: center; gap: 10px; }
.footer-badges .i, .footer-contact .i { width: 17px; height: 17px; color: var(--band-accent); flex: none; }
[data-theme="d"] .footer-badges .i, [data-theme="d"] .footer-contact .i { color: var(--primary); }
.footer h4 { margin: 4px 0 16px; color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
[data-theme="d"] .footer h4 { color: var(--ink); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.footer-contact li, .footer-contact a { display: flex; align-items: flex-start; gap: 10px; }

.footer-bottom { border-top: 1px solid var(--footer-line); }
.footer-bottom-inner { max-width: 1240px; margin: 0 auto; padding: 18px 24px 6px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; }
.footer-bottom-inner p { margin: 0; }
.to-top {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--footer-line); background: transparent; color: inherit; font-size: 13px;
}
.to-top .i { width: 14px; height: 14px; transform: rotate(90deg); }
.to-top:hover { border-color: currentColor; }
.footer .footer-legal { max-width: 1240px; margin: 0 auto; padding: 8px 24px 32px; border-top: 0; font-size: 12px; line-height: 1.6; opacity: .62; }
.footer .footer-legal a { text-decoration: none; }

@media (max-width: 960px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer { margin-top: 120px; }
  .footer-cta { padding: 0 12px; }
  .footer-cta-inner { flex-direction: column; align-items: flex-start; padding: 24px 20px; gap: 18px; transform: translateY(-40%); }
  .footer .footer-cta-btn { width: 100%; }
  .footer-cta + .footer-inner { margin-top: -40px; }
  .footer-inner { padding: 20px 16px 32px; gap: 28px 20px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; padding: 16px 16px 4px; }
  .footer .footer-legal { padding: 8px 16px 28px; }
}
@media (max-width: 640px) {
  .footer-inner > div:last-child { grid-column: 1 / -1; }
}
/* La tarjeta de invitación sube sobre el borde con margen negativo (sin dejar hueco debajo) */
.footer-cta-inner { transform: none; margin-top: -70px; }
.footer-cta + .footer-inner { margin-top: 0; padding-top: 48px; }
@media (max-width: 640px) {
  .footer { margin-top: 100px; }
  .footer-cta-inner { transform: none; margin-top: -56px; }
  .footer-cta + .footer-inner { margin-top: 0; padding-top: 36px; }
}
.footer { display: flow-root; } /* evita que el margen negativo de la tarjeta "arrastre" al pie */

/* Botones de cuenta: más especificidad que la regla genérica del menú (que les quitaba borde y relleno) */
.utilbar-inner { height: 52px; }
.util-account { gap: 12px; }
.util-account .util-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 18px; border-radius: 99px; box-sizing: border-box;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-size: 13.5px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 20, 30, .05);
}
.util-account .util-btn .i { width: 16px; height: 16px; color: var(--primary); }
.util-account .util-btn:hover { border-color: var(--primary); color: var(--ink); text-decoration: none; box-shadow: 0 3px 10px rgba(15, 20, 30, .1); }
.util-account .util-btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.util-account .util-btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
[data-theme="b"] .util-account .util-btn-primary { background: #ffc83d; border-color: #ffc83d; color: #0f1b2e; }
[data-theme="b"] .util-account .util-btn-primary:hover { background: #ffb800; border-color: #ffb800; }
.util-account .util-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 640px) {
  .utilbar-inner { height: 48px; }
  .util-account .util-btn { height: 34px; padding: 0 14px; font-size: 13px; }
}
@media (max-width: 640px) {
  .util-account .util-btn[data-auth="signup"] { display: none; }
}

/* Aviso "no hace falta cuenta" en la ayuda */
.help-free { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--tint-green); color: var(--ink); font-size: 14px; }
.help-free .i { flex: none; width: 18px; height: 18px; color: var(--primary); margin-top: 1px; }

/* Distintivo de zona exclusiva en el menú superior */
.util-zone {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 99px;
  background: var(--tint-green); color: var(--primary); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.util-zone .i { width: 14px; height: 14px; }
.utilbar-inner { justify-content: flex-start; }
.util-zone { margin-left: auto; }
.util-account { margin-left: 16px; }
@media (max-width: 900px) {
  .util-zone { display: none; }
  .util-account { margin-left: auto; }
}

/* ======================================================================
   COTIZADOR CON IA (cotizar.html)
   ====================================================================== */
.cotizar-page { max-width: 1100px; }
.cot-hero { text-align: center; max-width: 720px; margin: 8px auto 32px; }
.cot-hero h1 { margin: 0 0 12px; font-family: var(--display); font-weight: 500; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); }
[data-theme="b"] .cot-hero h1, [data-theme="d"] .cot-hero h1 { font-weight: 700; letter-spacing: -0.03em; }
.cot-hero > p:not(.eyebrow) { margin: 0 auto; color: var(--muted); font-size: 17px; max-width: 600px; }
.cot-steps { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin: 22px 0 0; padding: 0; font-size: 14px; color: var(--ink); font-weight: 500; }
.cot-steps li { display: flex; align-items: center; gap: 8px; }
.cot-steps span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-size: 13px; font-weight: 700; }

.cot-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: 720px; margin: 0 auto; }
.cot-form { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 28px; }
.cot-form.is-loading { opacity: .85; }
.cot-form.is-loading .cot-submit { cursor: progress; }
.cot-hint { margin: 0; font-size: 13px; }
.cot-soon { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--tint-sand); color: var(--ink); font-size: 14px; }
.cot-submit { height: 52px; font-size: 16px; }
.cot-submit:disabled { opacity: .85; }
.cot-legal { margin: 0; font-size: 12.5px; text-align: center; }

.cot-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 28px; display: grid; gap: 12px; animation: catIn .35s ease; }
.cot-card h2 { margin: 0; font-family: var(--display); font-size: 26px; color: var(--ink); }
.cot-card h3 { margin: 10px 0 0; font-size: 14px; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; }
.cot-label { margin: 0; color: var(--muted); font-size: 14px; }
.cot-price { margin: -4px 0 0; font-family: var(--display); font-size: clamp(40px, 6vw, 56px); font-weight: 600; color: var(--primary); line-height: 1.05; font-variant-numeric: tabular-nums; }
.cot-range-bar { position: relative; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--tint-green), var(--primary)); }
.cot-range-bar span { position: absolute; top: 50%; width: 18px; height: 18px; translate: -50% -50%; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.cot-range-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cot-confidence { justify-self: start; padding: 4px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.cot-confidence-alta { background: var(--tint-green); color: var(--primary); }
.cot-confidence-media { background: var(--tint-sand); color: #8a6414; }
.cot-confidence-baja { background: var(--tint-rose); color: var(--sale); }
.cot-summary { margin: 0; font-size: 16px; color: var(--ink); }
.cot-factors { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text); }
.cot-comparables { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cot-comparables li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
.cot-comparables a { color: var(--ink); overflow-wrap: anywhere; }
.cot-comparables li > span { flex: none; font-weight: 600; color: var(--ink); white-space: nowrap; }
.cot-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 600; }
.cot-notes { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.cot-disclaimer { margin: 0; font-size: 12.5px; color: var(--muted); }
.cot-card .btn { justify-self: start; }
.cot-card-no h2 { font-size: 24px; }

/* Enlace al cotizador en el menú y en el pie */
.util-links .util-cot { color: var(--primary); font-weight: 600; }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.footer .footer-cta-actions .btn-outline { height: 50px; padding: 0 20px; background: var(--surface); color: var(--ink); }
.footer .footer-cta-actions .btn-outline:hover { color: var(--ink); }

@media (max-width: 640px) {
  .cot-form, .cot-card { padding: 20px 16px; border-radius: 18px; }
  .cot-comparables li { flex-direction: column; gap: 4px; }
  .footer-cta-actions { width: 100%; }
  .footer-cta-actions .btn { width: 100%; }
}
@media (max-width: 640px) {
  /* En el celular el menú superior prioriza el cotizador; las preguntas siguen en el pie y en Ayuda */
  .util-links a[href$="#preguntas"] { display: none; }
}

/* Botón de compartir por WhatsApp */
.btn-share .i { color: var(--wa); }
.btn-share:hover { border-color: var(--wa); }

/* Categorías: se reparten solas según cuántas haya (en el celular, 3 por fila) */
.cats-home { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
@media (max-width: 1080px) { .cats-home { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); } }
@media (max-width: 640px) { .cats-home { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Comisiones ---------- */
.commission-table { width: 100%; max-width: 460px; margin: 12px 0; border-collapse: collapse; font-size: 15px; }
.commission-table th, .commission-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.commission-table th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.commission-table td:last-child, .commission-table th:last-child { text-align: right; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.cot-net { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--tint-green); }
.cot-net-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.cot-net-total { padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); color: var(--ink); font-size: 16px; }
.cot-net-total strong { font-size: 20px; color: var(--primary); }
.cot-net-note { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.cot-net-note a { color: var(--primary); }
.admin-commission { display: block; font-size: 12px; }
.commission-preview { margin: -6px 0 0; font-size: 13.5px; color: var(--muted); }
.commission-preview strong { color: var(--ink); }

/* ---------- Reservado ---------- */
.badge-reserved { background: var(--gold); color: #fff; }
.card.reserved .card-media img { opacity: .78; }
.pp-reserved { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--tint-sand); color: var(--ink); font-size: 14px; }
.chip-toggle.on.reserved { background: var(--tint-sand); border-color: var(--gold); color: var(--ink); }

/* ---------- Lo que revisamos ---------- */
.inspection { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--tint-green); display: grid; gap: 8px; }
.detail-info .inspection-title { margin: 0; display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); font-size: 14.5px; }
.inspection-title .i { width: 17px; height: 17px; color: var(--primary); }
.inspection-title .muted { font-weight: 400; font-size: 13px; }
.inspection ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; font-size: 14px; }
.inspection li { display: flex; align-items: flex-start; gap: 7px; color: var(--ink); }
.inspection li .i { width: 16px; height: 16px; margin-top: 2px; flex: none; color: var(--primary); stroke-width: 2.4; }

/* ---------- Productos similares en la ficha ---------- */
.detail-similar { padding: 26px 32px 32px; border-top: 1px solid var(--line); }
.detail-similar h3 { margin: 0 0 16px; font-family: var(--display); font-weight: 500; font-size: 22px; color: var(--ink); }
.detail-similar .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; }
@media (max-width: 760px) {
  .detail-similar { padding: 22px 16px 24px; }
  .detail-similar .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- ¿No encontrás lo que buscás? ---------- */
.ask-box { display: grid; justify-items: center; gap: 10px; padding: 48px 16px; }
.ask-box p { margin: 0; max-width: 46ch; }
.ask-box .ask-title { font-size: 18px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ask-box .btn { margin-top: 6px; }

/* ---------- Redes en el pie ---------- */

/* ---------- Panel: medidas y revisión ---------- */
.dims-field, .checks-field { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0; display: grid; gap: 12px; }
.dims-field legend, .checks-field legend { font-size: 12.5px; font-weight: 500; padding: 0 6px; }
.dims-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.check-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.checks-date { max-width: 220px; }

/* Botón de WhatsApp: texto siempre blanco (en la opción D el pie pintaba los enlaces de gris) */
.btn-wa, .btn-wa:hover, .footer a.btn-wa, .footer a.btn-wa:hover,
[data-theme="d"] .btn-wa, [data-theme="d"] .footer a.btn-wa, [data-theme="d"] .footer a.btn-wa:hover { color: #fff; }

/* ---------- Panel: pestañas Productos / Datos de la tienda ---------- */
.admin-tabs { display: flex; gap: 4px; box-shadow: inset 0 -1px var(--line); margin-bottom: -12px; overflow-x: auto; overflow-y: hidden; }
.admin-tabs [role="tab"] {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px;
  border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.admin-tabs [role="tab"] .i { width: 17px; height: 17px; }
.admin-tabs [role="tab"]:hover { color: var(--ink); }
.admin-tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--primary); }
.admin-tabs [role="tab"]:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 6px 6px 0 0; }

/* ---------- Panel: aviso de revisar precio (4 meses sin venderse) ---------- */
.stale-alert { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius); background: var(--tint-sand); border: 1px solid var(--gold); color: var(--ink); }
.stale-alert > .i { width: 22px; height: 22px; flex: none; color: var(--gold); }
.stale-alert p { margin: 0; flex: 1; font-size: 14.5px; }
.stale-alert .btn { flex: none; }
.admin-row.is-stale { border-color: var(--gold); }
.stale-tag { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--gold); }
.stale-tag .i { width: 14px; height: 14px; }
.stale-ok { border: 1px solid var(--gold); background: var(--surface); color: var(--ink); border-radius: 99px; height: 24px; padding: 0 10px; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.stale-ok:hover { background: var(--tint-sand); }
@media (max-width: 640px) { .stale-alert { flex-wrap: wrap; } }

/* ======================================================================
   OPCIÓN E — Terracota: crema, terracota y oliva. Títulos en Fraunces
   (serif cálida) y texto en DM Sans. Aire de feria de barrio. Siempre clara.
   ====================================================================== */
:root[data-theme="e"] {
  color-scheme: light;
  --bg: #fbf6ee;
  --surface: #fffdf9;
  --surface-2: #f3eadc;
  --ink: #2b211b;
  --text: #463a31;
  --muted: #85776a;
  --line: #eadfce;
  --line-strong: #dccdb7;
  --primary: #b4532a;
  --primary-hover: #93421f;
  --primary-ink: #ffffff;
  --brand: #b4532a;
  --accent: #6b7a3a;
  --gold: #c08a2e;
  --sale: #b4532a;
  --wa: #2f8a4f;
  --danger: #a3352b;
  --tint-green: #eef0de;
  --tint-sand: #f7e9d3;
  --tint-sky: #e9eee6;
  --tint-rose: #f6e2d6;
  --band: #3d4a22;
  --band-accent: #f2c57c;
  --footer: #2b211b;
  --footer-line: #45372d;
  --overlay: rgba(43, 33, 27, .45);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(43, 33, 27, .05), 0 10px 26px rgba(43, 33, 27, .07);
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, serif;
}
[data-theme="e"] :is(.section-head h2, .results-head h2, .detail-info h2, .form h2, .drawer-head h2, .admin-block h2, .admin-list-head h2, .feat-big .feat-info h3, .banner-title, .footer-cta-inner h2, .pp-detail .detail-info h1, .policies h1, .cot-hero h1) { font-weight: 600; letter-spacing: -0.015em; }
[data-theme="e"] .logo-name { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
[data-theme="e"] .eyebrow { color: var(--accent); letter-spacing: .12em; font-weight: 700; }
[data-theme="e"] .price { font-weight: 700; color: var(--ink); }
[data-theme="e"] .btn { border-radius: 12px; font-weight: 600; }
[data-theme="e"] .card-media { border-radius: 14px; }
[data-theme="e"] .feat { border-radius: 20px; }
[data-theme="e"] .badge { border-radius: 8px; }
[data-theme="e"] .badge-feat { background: #fff4dc; color: #7a4a12; }
[data-theme="e"] .cat.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
[data-theme="e"] .utilbar { background: var(--band); border-bottom: 0; color: #e9e3d2; }
[data-theme="e"] .utilbar a, [data-theme="e"] .utilbar button { color: #e9e3d2; }
[data-theme="e"] .utilbar .util-zone { background: rgba(255, 255, 255, .12); border-color: transparent; color: #f2e9d6; }
[data-theme="e"] .utilbar .util-btn { background: transparent; border-color: rgba(255, 255, 255, .35); }
[data-theme="e"] #offersSection { background: var(--tint-rose); }
[data-theme="e"] .footer-cta { background: var(--primary); }
[data-theme="e"] .theme-switch { background: var(--primary); color: #fff; }
[data-theme="e"] .theme-switch button.on { background: #fff; color: var(--primary); }

/* ======================================================================
   OPCIÓN F — Noche: grafito oscuro con acento lima. Títulos en
   Space Grotesk. Moderna y premium. Siempre oscura.
   ====================================================================== */
:root[data-theme="f"] {
  color-scheme: dark;
  --bg: #121417;
  --surface: #1a1d21;
  --surface-2: #22262b;
  --ink: #f3f4f1;
  --text: #d4d7d2;
  --muted: #8d938c;
  --line: #2a2e33;
  --line-strong: #3a3f45;
  --primary: #c6f36b;
  --primary-hover: #d7ff8a;
  --primary-ink: #13160f;
  --brand: #c6f36b;
  --accent: #ffb86b;
  --gold: #f3c969;
  --sale: #ff7a59;
  --wa: #2fa862;
  --danger: #ff7b72;
  --tint-green: #1d2a17;
  --tint-sand: #2b2416;
  --tint-sky: #18232c;
  --tint-rose: #2e1d18;
  --band: #1f2a14;
  --band-accent: #c6f36b;
  --footer: #0c0d0f;
  --footer-line: #22262b;
  --overlay: rgba(0, 0, 0, .65);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);
}
[data-theme="f"] :is(.section-head h2, .results-head h2, .detail-info h2, .form h2, .drawer-head h2, .admin-block h2, .admin-list-head h2, .feat-big .feat-info h3, .banner-title, .footer-cta-inner h2, .pp-detail .detail-info h1, .policies h1, .cot-hero h1) { font-weight: 600; letter-spacing: -0.03em; }
[data-theme="f"] .logo-name { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; }
[data-theme="f"] .eyebrow { color: var(--primary); letter-spacing: .14em; }
[data-theme="f"] .price { font-weight: 700; }
[data-theme="f"] .btn { border-radius: 10px; font-weight: 600; }
[data-theme="f"] .btn-outline { border-color: var(--line-strong); color: var(--ink); }
[data-theme="f"] .card-media { border-radius: 12px; }
[data-theme="f"] .badge-feat { background: var(--primary); color: var(--primary-ink); }
[data-theme="f"] .badge-feat .i { color: var(--primary-ink); fill: var(--primary-ink); }
[data-theme="f"] .badge-sold { background: #000; }
[data-theme="f"] .cat.active { color: var(--primary); border-bottom-color: var(--primary); }
[data-theme="f"] .topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); }
[data-theme="f"] #featuredSection { background: var(--surface); border: 1px solid var(--line); }
[data-theme="f"] #offersSection { background: var(--tint-rose); }
[data-theme="f"] .media-btn { background: rgba(18, 20, 23, .78); color: #fff; }
[data-theme="f"] .theme-switch { background: var(--primary); color: var(--primary-ink); }
[data-theme="f"] .theme-switch button.on { background: var(--primary-ink); color: var(--primary); }

/* ======================================================================
   OPCIÓN G — Editorial: blanco y negro, esquinas rectas, rojo solo para
   ofertas. Todo en Archivo. Estilo revista. Siempre clara.
   ====================================================================== */
:root[data-theme="g"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --ink: #0a0a0a;
  --text: #262626;
  --muted: #6b6b6b;
  --line: #e4e4e1;
  --line-strong: #0a0a0a;
  --primary: #0a0a0a;
  --primary-hover: #333333;
  --primary-ink: #ffffff;
  --brand: #0a0a0a;
  --accent: #e0301e;
  --gold: #b38420;
  --sale: #e0301e;
  --wa: #1f8f4e;
  --danger: #c4261a;
  --tint-green: #f1f4f0;
  --tint-sand: #f6f3ec;
  --tint-sky: #f0f2f4;
  --tint-rose: #fbeeec;
  --band: #0a0a0a;
  --band-accent: #ffffff;
  --footer: #0a0a0a;
  --footer-line: #2a2a2a;
  --overlay: rgba(0, 0, 0, .55);
  --radius: 0px;
  --radius-sm: 0px;
  --shadow: none;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo", system-ui, sans-serif;
}
[data-theme="g"] :is(.section-head h2, .results-head h2, .detail-info h2, .form h2, .drawer-head h2, .admin-block h2, .admin-list-head h2, .feat-big .feat-info h3, .banner-title, .footer-cta-inner h2, .pp-detail .detail-info h1, .policies h1, .cot-hero h1) { font-weight: 800; letter-spacing: -0.035em; }
[data-theme="g"] .logo-name { font-weight: 900; letter-spacing: -0.04em; text-transform: uppercase; }
[data-theme="g"] .eyebrow { color: var(--ink); letter-spacing: .18em; font-weight: 700; }
[data-theme="g"] .price { font-weight: 800; }
[data-theme="g"] :is(.btn, .icon-btn, .filter-pill, .badge, .card-media, .feat, .dialog, .chip-toggle, .util-btn, .hero-search, .tips, .how, .publish-card, .admin-row, .cart-group, #featuredSection, #offersSection, .inspection, .pp-reserved, .pp-sold, .stale-alert, .theme-switch, .theme-switch button) { border-radius: 0; }
[data-theme="g"] :where(input:not([type=checkbox], [type=file]), select, textarea) { border-radius: 0; }
[data-theme="g"] .btn { text-transform: uppercase; letter-spacing: .06em; font-size: 13px; font-weight: 700; }
[data-theme="g"] .btn-outline { border: 1.5px solid var(--ink); }
[data-theme="g"] .card-media { border: 1px solid var(--line); }
[data-theme="g"] .badge { background: #fff; border: 1px solid var(--ink); }
[data-theme="g"] .badge-sale { background: var(--sale); border-color: var(--sale); }
[data-theme="g"] .badge-sold { background: var(--ink); }
[data-theme="g"] .badge-reserved { background: var(--gold); border-color: var(--gold); }
[data-theme="g"] .badge-feat { background: var(--ink); color: #fff; border-color: var(--ink); }
[data-theme="g"] .badge-feat .i { color: #fff; fill: #fff; }
[data-theme="g"] .cat.active { border-bottom: 2px solid var(--ink); font-weight: 700; }
[data-theme="g"] .topbar { border-bottom: 2px solid var(--ink); }
[data-theme="g"] #offersSection { background: var(--surface-2); }
[data-theme="g"] :is(.search, .search input, .cat, .util-zone, .stale-ok) { border-radius: 0; }

/* ---------- Etiquetas «Nuevo» y «Bajó de precio» ---------- */
.badge-new { background: var(--primary); color: var(--primary-ink); }
.badge-drop { background: #fff; color: var(--sale); box-shadow: inset 0 0 0 1px var(--sale); }
.badge-drop .i { color: var(--sale); }
.price-drop { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--sale); }
.price-drop .i { width: 15px; height: 15px; }

/* ---------- Barra fija con precio y «Consultar» (solo en el celular) ---------- */
.buy-bar { display: none; }
@media (max-width: 760px) {
  .buy-bar {
    position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
  }
  .buy-bar-price { display: grid; line-height: 1.2; min-width: 0; }
  .buy-bar-price .price { font-size: 20px; }
  .buy-bar-price .muted { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buy-bar .btn { flex: none; height: 46px; }
  /* Página de producto: la barra queda pegada abajo de la pantalla */
  .product-page .buy-bar { position: fixed; left: 0; right: 0; }
  .product-page:has(.buy-bar) { padding-bottom: 72px; }
}

/* ======================================================================
   MODO CLARO / OSCURO para las opciones que antes tenían uno solo.
   tema.js pone <html data-mode="light|dark"> (elección guardada o la del sistema).
   ====================================================================== */
:root[data-theme="d"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #161b20;
  --surface: #1d242b;
  --surface-2: #252e36;
  --ink: #eef1f3;
  --text: #cfd6dc;
  --muted: #8f9aa4;
  --line: #2c353e;
  --line-strong: #3a4550;
  --primary: #8fb3d1;
  --primary-hover: #a9c6df;
  --primary-ink: #12181e;
  --brand: #8fb3d1;
  --accent: #e0a58d;
  --gold: #e0b765;
  --sale: #ec9a7f;
  --wa: #3fae7a;
  --danger: #f08a7e;
  --tint-green: #1c2a24;
  --tint-sand: #2a251e;
  --tint-sky: #1c2833;
  --tint-rose: #2e2420;
  --band: #1d2730;
  --band-accent: #8fb3d1;
  --footer: #12171c;
  --footer-line: #252e36;
  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
:root[data-theme="e"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #1a1512;
  --surface: #221c18;
  --surface-2: #2b241f;
  --ink: #f5ede3;
  --text: #ddd2c5;
  --muted: #a39383;
  --line: #3a3029;
  --line-strong: #4a3e35;
  --primary: #e07a4c;
  --primary-hover: #ec9369;
  --primary-ink: #1a1512;
  --brand: #e07a4c;
  --accent: #b6c47a;
  --gold: #e0b05a;
  --sale: #e88a5f;
  --wa: #3fae6a;
  --danger: #f08070;
  --tint-green: #232a17;
  --tint-sand: #2f2619;
  --tint-sky: #1f2620;
  --tint-rose: #33231b;
  --band: #2a3318;
  --band-accent: #f2c57c;
  --footer: #120e0c;
  --footer-line: #2b241f;
  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 26px rgba(0, 0, 0, .3);
}
[data-mode="dark"][data-theme="e"] .badge-feat { background: #3a2c17; color: #f2d39a; }
:root[data-theme="g"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #0b0b0b;
  --surface: #121212;
  --surface-2: #1c1c1c;
  --ink: #f5f5f3;
  --text: #dcdcd8;
  --muted: #9a9a96;
  --line: #2a2a2a;
  --line-strong: #f5f5f3;
  --primary: #f5f5f3;
  --primary-hover: #d6d6d2;
  --primary-ink: #0b0b0b;
  --brand: #f5f5f3;
  --accent: #ff4a36;
  --gold: #e0b04a;
  --sale: #ff4a36;
  --wa: #2fa862;
  --danger: #ff6b5e;
  --tint-green: #161a15;
  --tint-sand: #1d1a14;
  --tint-sky: #15181b;
  --tint-rose: #251412;
  --band: #1c1c1c;
  --band-accent: #ffffff;
  --footer: #000000;
  --footer-line: #2a2a2a;
  --overlay: rgba(0, 0, 0, .7);
}
[data-mode="dark"][data-theme="g"] .badge-feat { color: #0b0b0b; }
[data-mode="dark"][data-theme="g"] .badge-feat .i { color: #0b0b0b; fill: #0b0b0b; }
[data-mode="dark"][data-theme="g"] .badge { color: #0b0b0b; }
:root[data-theme="f"][data-mode="light"] {
  color-scheme: light;
  --bg: #f6f7f2;
  --surface: #ffffff;
  --surface-2: #eceee6;
  --ink: #15170f;
  --text: #33362d;
  --muted: #6f7468;
  --line: #e2e5da;
  --line-strong: #cfd3c5;
  --primary: #4f7d00;
  --primary-hover: #426900;
  --primary-ink: #ffffff;
  --brand: #4f7d00;
  --accent: #c46a12;
  --gold: #b8892f;
  --sale: #d9542f;
  --wa: #1f8f4e;
  --danger: #b5372c;
  --tint-green: #edf3e0;
  --tint-sand: #f7efdc;
  --tint-sky: #e8eef2;
  --tint-rose: #f8e8e2;
  --band: #1f2a14;
  --band-accent: #c6f36b;
  --footer: #15170f;
  --footer-line: #2a2e24;
  --overlay: rgba(21, 23, 15, .45);
  --shadow: 0 1px 2px rgba(21, 23, 15, .05), 0 10px 26px rgba(21, 23, 15, .07);
}
[data-mode="light"][data-theme="f"] .media-btn { background: rgba(255, 255, 255, .92); color: var(--ink); }
[data-mode="light"][data-theme="f"] .eyebrow { color: var(--primary); }

/* ---------- Botón sol / luna ---------- */
.mode-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0;
}
.mode-toggle:hover { border-color: var(--primary); color: var(--primary); }
.mode-toggle .i { width: 17px; height: 17px; }
.mode-toggle .i-sun { display: none; }
[data-mode="dark"] .mode-toggle .i-sun { display: block; }
[data-mode="dark"] .mode-toggle .i-moon { display: none; }
.utilbar .mode-toggle { width: 30px; height: 30px; }
[data-theme="e"] .utilbar .mode-toggle { background: transparent; border-color: rgba(255, 255, 255, .35); color: #f2e9d6; }
[data-theme="g"] .mode-toggle { border-radius: 0; }
/* En la barra superior va entre la zona y la cuenta */
.utilbar-inner > .util-zone { order: 1; }
.utilbar-inner > .mode-toggle { order: 2; margin-left: 12px; }
.utilbar-inner > .util-account { order: 3; }
@media (max-width: 900px) { .utilbar-inner > .mode-toggle { margin-left: auto; } }

/* ---------- Redes en el pie: botones redondos con el color de cada red al pasar el mouse ---------- */
.footer-follow { margin-top: 20px; display: grid; gap: 10px; }
.footer-follow[hidden] { display: none; }
.footer-follow-title { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.footer .footer-social { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; }
.footer .footer-social li { display: block; margin: 0; }
.footer .social-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: color-mix(in srgb, currentColor 12%, transparent); color: inherit;
  transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.social-btn .i { width: 20px; height: 20px; stroke-width: 1.8; }
[data-theme] .footer a.social-btn:hover, [data-theme] .footer a.social-btn:focus-visible { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.footer .social-instagram:hover, .footer .social-instagram:focus-visible { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.footer .social-facebook:hover, .footer .social-facebook:focus-visible { background: #1877f2; }
[data-theme="g"] .footer .social-btn { border-radius: 0; }

/* ======================================================================
   Panel: vendidos ocultos / borrados y dashboard de métricas
   ====================================================================== */
.admin-row.is-hidden { opacity: .55; }
.hidden-tag { color: var(--muted); font-weight: 600; }
.bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.bulk-actions:not(:has(.btn:not([hidden]))) { display: none; }
.btn-danger-outline { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger-outline:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); border-color: var(--danger); }
.sold-fields { padding: 12px; border-radius: var(--radius-sm); background: var(--tint-sand); }

.dash { display: grid; gap: 18px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-head h2 { margin: 0; }
.dash-period { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.dash-period select { min-width: 190px; }
#dashBody { display: grid; gap: 18px; }

/* Indicadores */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.kpi { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-value { font-family: var(--display); font-size: 26px; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-note { font-size: 12.5px; color: var(--muted); }
.kpi-note .link { padding: 0; font-size: inherit; color: var(--primary); text-decoration: underline; }
.kpis-main .kpi:first-child { background: var(--tint-green); border-color: transparent; }
.kpis-main .kpi:first-child .kpi-value { font-size: 32px; }
.delta { font-weight: 600; color: var(--ink); }
.delta.up::first-letter { color: var(--primary); }
.delta.down::first-letter { color: var(--danger); }
.dash-note { margin: 0; font-size: 13px; }

/* Tarjetas */
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dash-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-card { display: grid; gap: 10px; align-content: start; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.dash-card h3 { margin: 0; font-size: 16px; color: var(--ink); }
.dash-desc { margin: -6px 0 4px; font-size: 13px; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-actions .btn { height: 36px; font-size: 13px; }
.dash-empty { margin: 0; padding: 18px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: 14px; text-align: center; }

/* Barras por mes: una sola serie, color del tema, valor en la barra más alta y el resto al pasar el mouse */
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 200px; padding-top: 22px; border-bottom: 1px solid var(--line-strong); }
.bar-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.bar-track { position: relative; min-height: 0; }
.bar { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 26px); border-radius: 4px 4px 0 0; background: var(--primary); outline-offset: 2px; transition: opacity .15s; }
.bar.is-zero { height: 0; }
.bars:hover .bar:not(:hover) { opacity: .55; }
.bar-value { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 600; color: var(--ink); white-space: nowrap; pointer-events: none; }
.bar-x { padding-top: 6px; font-size: 11.5px; color: var(--muted); text-align: center; text-transform: capitalize; }
.bar[data-tip]:hover::after, .bar[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 500;
  white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.bar-col:first-child .bar[data-tip]::after { left: 0; transform: none; }
.bar-col:last-child .bar[data-tip]::after { left: auto; right: 0; transform: none; }

/* Tablas */
.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 10px; border-bottom: 1px solid var(--line); color: var(--text); vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-table td .i { width: 16px; height: 16px; vertical-align: -3px; color: var(--muted); }
.hbar { position: relative; display: flex; align-items: center; gap: 8px; min-width: 140px; }
.hbar span { display: block; height: 10px; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--primary); }
.hbar em { font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }

/* Rankings */
.dash-rank { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 8px; }
.dash-rank li { counter-increment: r; display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.dash-rank li::before { content: counter(r); flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.dash-rank span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.dash-rank strong { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 860px) {
  .dash-grid, .dash-grid-3 { grid-template-columns: 1fr; }
  .dash-card { overflow-x: auto; }
  .bars { gap: 3px; height: 170px; }
  .bar-x { font-size: 10.5px; }
}

/* ---------- Panel: publicar en grupos de Facebook ---------- */
.fb-dialog { width: min(640px, calc(100vw - 32px)); }
.fb-dialog h2 { padding-right: 40px; }
.fb-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--text); }
#fbText { font: 14px/1.5 var(--sans); white-space: pre-wrap; }
.fb-warn { margin: -6px 0 0; font-size: 13px; color: var(--danger); }
.fb-label { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.fb-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-photo { display: block; width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.fb-photo img { width: 100%; height: 100%; object-fit: cover; }
.fb-photo:hover { border-color: var(--primary); }
.fb-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fb-groups li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.fb-groups .btn { flex: none; height: 38px; font-size: 13.5px; }
.fb-group-name { display: grid; gap: 2px; min-width: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.fb-group-name > .i { display: none; }
.fb-done { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--primary); }
.fb-done .i { width: 14px; height: 14px; }
.fb-groups li.fb-none { display: block; color: var(--muted); font-size: 14px; }
.fb-none .link { color: var(--primary); text-decoration: underline; padding: 0; font: inherit; }
.fb-tip { margin: 0; font-size: 13px; }
@media (max-width: 520px) { .fb-groups li { flex-direction: column; align-items: stretch; } }

/* ======================================================================
   AJUSTES RESPONSIVE (todas las pantallas, desde 320 px)
   ====================================================================== */

/* Ningún campo ni grupo de campos puede ser más ancho que su contenedor */
fieldset { min-width: 0; }
:where(input, select, textarea) { min-width: 0; max-width: 100%; }
.row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.url-add { min-width: min(240px, 100%); }
img, svg, video { max-width: 100%; }

/* Etiquetas de las tarjetas: se acomodan al lado del corazón, nunca debajo */
.card .badges, .feat .badges { right: 54px; }

@media (max-width: 640px) {
  .row { grid-template-columns: minmax(0, 1fr); }

  /* Botones con texto largo: bajan de renglón en vez de salirse de la pantalla */
  .btn { white-space: normal; text-align: center; line-height: 1.25; height: auto; min-height: 42px; padding-top: 8px; padding-bottom: 8px; }
  .media-btn, .round-btn, .icon-btn { white-space: nowrap; }

  /* Diálogos: casi a pantalla completa, con los márgenes justos */
  .dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .dialog .form { padding: 22px 16px; }
  .close { top: 10px; right: 10px; }

  /* Selector de diseño (prototipo): más chico para no tapar productos */
  .theme-switch { left: 8px; bottom: 8px; padding: 3px 3px 3px 9px; font-size: 11.5px; }
  .theme-switch button { height: 26px; padding: 0 8px; }
}

/* Barra superior: en celulares chicos quedan solo «Cotizá tu usado», el modo y la cuenta
   (Ofertas, Preguntas y Ayuda siguen en el pie de página) */
@media (max-width: 520px) {
  .util-links > :not(.util-cot) { display: none; }
  .util-links { overflow: visible; }
}

/* ---------- Panel ---------- */
@media (max-width: 760px) {
  .admin-filters { flex-wrap: wrap; }
  .admin-filters .search { flex: 1 1 100%; order: -1; }
  .admin-filters select { flex: 1 1 100%; }
  .admin-toggles { flex-wrap: wrap; }
  .bulk-actions .btn { flex: 1 1 auto; }

  /* Pestañas del panel: las tres entran sin deslizar */
  .admin-tabs [role="tab"] { flex: 1 1 0; justify-content: center; padding: 0 8px; gap: 6px; font-size: 14px; }
  .dash-head { align-items: stretch; }
  .dash-period { flex: 1 1 100%; }
  .dash-period select { width: 100%; }
  .dash-card-head .dash-actions { width: 100%; }
  .dash-actions .btn { flex: 1 1 auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px 14px; }
  .kpi-value { font-size: 20px; }
  .kpis-main .kpi:first-child { grid-column: 1 / -1; }
  .kpis-main .kpi:first-child .kpi-value { font-size: 28px; }
  .dash-card { padding: 16px 14px; }
  .dims-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
}
@media (max-width: 420px) {
  .admin-tabs [role="tab"] .i { display: none; }
  .admin .topbar-inner { gap: 8px; }
  .admin .logo-place { display: none; }
  .admin .actions .btn-primary { padding: 0 12px; }
}

/* Tablas del dashboard: en pantallas angostas se deslizan de costado dentro de su tarjeta */
.dash-card:has(.dash-table) { overflow-x: auto; }
.dash-table { min-width: 520px; }

/* Ajustes finales de pantallas chicas */
.form { grid-template-columns: minmax(0, 1fr); }
.dims-row { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
.section-head { flex-wrap: wrap; row-gap: 8px; }
.tab-short { display: none; }
@media (max-width: 640px) {
  .url-add { flex: 1 1 100%; min-width: 0; }
  .photo-add .file-btn { flex: 1 1 100%; }
}
@media (max-width: 420px) {
  .tab-full { display: none; }
  .tab-short { display: inline; }
}
.photos-field, .dims-field, .checks-field { grid-template-columns: minmax(0, 1fr); }
.url-add input { width: 0; }
@media (max-width: 640px) {
  .dialog { max-width: calc(100vw - 16px); }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1 1 auto; }
  .form-actions .spacer { display: none; }
  .form-actions .btn-danger { order: 3; flex-basis: 100%; }
}
/* Casillas con aclaración: la aclaración va debajo, alineada con el texto */
label.check { flex-wrap: wrap; row-gap: 2px; }
label.check input { flex: none; }
@media (max-width: 640px) {
  label.check .opt { flex-basis: 100%; padding-left: 26px; font-size: 13px; }
}
@media (max-width: 640px) {
  label.check { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: start; }
  label.check input { margin-top: 3px; }
  label.check .opt { grid-column: 2; padding-left: 0; }
}

/* ---------- Panel: datos privados del vendedor ---------- */
.seller-field { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 14px; margin: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); background: var(--surface-2); }
.seller-field legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 0 6px; color: var(--ink); }
.seller-field legend .i { width: 15px; height: 15px; color: var(--primary); }
.private-tag { padding: 1px 8px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.seller-note { margin: -4px 0 0; font-size: 12.5px; }
.seller-wa { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 4px; border-radius: 50%; background: var(--wa); color: #fff; vertical-align: middle; }
.seller-wa .i { width: 13px; height: 13px; color: #fff; }
[data-theme="g"] :is(.seller-field, .private-tag, .seller-wa) { border-radius: 0; }

/* Las ventanas emergentes solo se desplazan hacia abajo (el contenido ya entra a lo ancho) */
.dialog { overflow-x: hidden; }

/* ---------- Panel: tarjetita del vendedor en la lista ---------- */
.seller-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.seller-avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--tint-green); color: var(--primary); font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.seller-info { display: grid; gap: 2px; min-width: 0; }
.admin-info .seller-info strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seller-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--muted); }
.seller-meta > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.seller-meta .i { width: 13px; height: 13px; flex: none; }
.seller-acts { display: flex; gap: 6px; }
.seller-act {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  transition: border-color .15s, color .15s, background .15s;
}
.seller-act .i { width: 15px; height: 15px; }
.seller-act:hover { border-color: var(--primary); color: var(--primary); }
.seller-act.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.seller-act.wa:hover { filter: brightness(.95); color: #fff; }
.seller-missing {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: 12.5px; font-weight: 600; justify-self: start;
}
.seller-missing .i { width: 14px; height: 14px; }
[data-theme="g"] :is(.seller-card, .seller-avatar, .seller-act, .seller-missing) { border-radius: 0; }
@media (max-width: 420px) {
  .seller-card { grid-template-columns: auto minmax(0, 1fr); }
  .seller-acts { grid-column: 1 / -1; }
  .seller-act { flex: 1; width: auto; border-radius: 99px; }
}
/* La tarjeta del vendedor va en su propio renglón, a lo ancho de la fila (debajo del título) */
.admin-row > .seller-card, .admin-row > .seller-missing { grid-column: 2 / -1; margin-top: -6px; }
.admin-row > .seller-card { justify-self: start; width: min(100%, 560px); }
@media (max-width: 760px) {
  .admin-row { grid-template-areas: "thumb info edit" "thumb price price" "toggles toggles toggles" "seller seller seller"; }
  .admin-row > .seller-card, .admin-row > .seller-missing { grid-area: seller; margin-top: 0; }
  .admin-row > .seller-card { width: 100%; }
}
.seller-act .act-label { display: none; }
@media (max-width: 420px) {
  .seller-act { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; font-size: 13px; font-weight: 500; }
  .seller-act .act-label { display: inline; }
}

/* ---------- Logo Expoferia (símbolo i-logo en icons.js; toma el color de cada diseño y del modo oscuro) ---------- */
.logo-mark { display: block; height: 32px; width: 158px; fill: currentColor; stroke: none; flex: none; }
.logo .logo-place { margin-top: 3px; }
.footer-brand .logo-mark { height: 40px; width: 197px; margin-bottom: 6px; }
.admin .logo-mark { height: 28px; width: 138px; }
@media (max-width: 640px) {
  .logo-mark { height: 27px; width: 133px; }
  .footer-brand .logo-mark { height: 34px; width: 168px; }
}
/* Bajada del logo («Venta de productos usados»): en minúscula y del mismo ancho que el logo */
.logo .logo-place { font-size: 11px; letter-spacing: .01em; text-transform: lowercase; white-space: nowrap; }
@media (max-width: 640px) { .logo .logo-place { font-size: 9.5px; } }

/* Logo en dos tonos según el diseño: la bolsa con el color principal y el nombre con el color del texto.
   En el pie (fondo oscuro) la bolsa toma el color de acento del diseño. */
.logo-mark { --logo-text: currentColor; --logo-icon: var(--primary); }
.footer .logo-mark { --logo-icon: var(--band-accent); }

/* ---------- Datos del producto (Estado, Garantía, Factura…) en un recuadro de color ---------- */
/* Toma un tinte suave del color principal de cada diseño, así combina con todas las plantillas y con el modo oscuro */
.facts {
  gap: 0 18px; margin: 4px 0; padding: 6px 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}
.facts dt, .facts dd { padding: 9px 0; border-top: 1px solid color-mix(in srgb, var(--primary) 12%, transparent); }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
.facts dt { font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--primary) 70%, var(--ink)); }
.facts dd { font-weight: 500; }
[data-theme="g"] .facts { border-radius: 0; border-color: var(--ink); background: var(--surface-2); }
[data-theme="g"] .facts dt { color: var(--ink); }
@media (max-width: 420px) {
  .facts { padding: 4px 12px; column-gap: 12px; }
}
.facts dt, .facts dd { line-height: 21px; }

/* ---------- «Leer más» en la ficha del producto ---------- */
.read-more { display: grid; gap: 6px; }
.read-more-body { display: grid; gap: 14px; }
.read-more-body > p { margin: 0; }
.read-more.clamped:not(.open) .read-more-body {
  max-height: 150px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.read-more-btn {
  justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0;
  border: 0; background: none; color: var(--primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.read-more-btn[hidden] { display: none; }
.read-more-btn .i { width: 16px; height: 16px; transition: transform .2s; }
.read-more.open .read-more-btn .i { transform: rotate(180deg); }
.read-more-btn:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Panel: WhatsApp con chatbot ---------- */
.wa-intro { margin: 10px 0 18px; max-width: 680px; }
.wa-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; }
.wa-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.wa-badge[data-estado="open"] { background: var(--tint-green); color: var(--wa); }
.wa-badge[data-estado="connecting"] { background: var(--tint-sand); color: var(--gold); }
.wa-badge[data-estado="close"], .wa-badge[data-estado="sin-crear"], .wa-badge[data-estado="error"] { background: var(--tint-rose); color: var(--danger); }
.wa-config { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
.wa-config .span-2 { grid-column: auto; }
.wa-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wa-box:has(.wa-qr[hidden]) { grid-template-columns: minmax(0, 1fr); }
/* El QR siempre sobre blanco, también en modo oscuro: si no, la cámara no lo lee */
.wa-qr { padding: 12px; border-radius: var(--radius-sm); background: #fff; line-height: 0; }
.wa-qr img { width: 264px; height: 264px; image-rendering: pixelated; }
.wa-info { display: grid; gap: 14px; align-content: start; }
.wa-msg { margin: 0; font-size: 16px; color: var(--ink); }
.wa-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text); }
.wa-code { display: grid; gap: 10px; }
.wa-code-num { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 30px; font-weight: 700; letter-spacing: .12em; color: var(--ink); }
.wa-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) {
  .wa-config { grid-template-columns: minmax(0, 1fr); }
  .wa-config > .btn { justify-self: stretch; }
  .wa-box { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 18px; }
  .wa-qr { justify-self: center; }
  .wa-qr img { width: min(264px, 70vw); height: auto; aspect-ratio: 1; }
  .wa-actions .btn { flex: 1 1 100%; }
}

/* ======================================================================
   OPCIÓN H — Vivo: blanco y gris claro, naranja intenso y azul profundo.
   Títulos en Montserrat. Botones naranjas con texto azul (más contraste
   que naranja con blanco). Pie y destacados en azul con íconos naranjas.
   ====================================================================== */
:root[data-theme="h"] {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eaeef5;
  --ink: #0a1a3a;
  --text: #22304b;
  --muted: #5d6a82;
  --line: #dfe5ee;
  --line-strong: #c7d0de;
  --primary: #1546b8;
  --primary-hover: #0f379a;
  --primary-ink: #ffffff;
  --brand: #ff7a1a;
  --orange: #ff7a1a;
  --orange-hover: #ff8f3d;
  --on-orange: #0a1a3a;
  --accent: #e3560a;
  --gold: #f5a300;
  --sale: #e5233b;
  --wa: #14a44d;
  --danger: #c81e32;
  --tint-green: #e3f6ea;
  --tint-sand: #fff0e3;
  --tint-sky: #e4ecff;
  --tint-rose: #ffe7e9;
  --band: #0a1f4d;
  --band-accent: #ff8a2a;
  --footer: #0a1733;
  --footer-line: #1d2d52;
  --overlay: rgba(6, 14, 32, .55);
  --shadow: 0 1px 2px rgba(10, 26, 58, .05), 0 10px 28px rgba(10, 26, 58, .08);
  --display: "Montserrat", var(--sans);
}
:root[data-theme="h"][data-mode="dark"] {
  color-scheme: dark;
  --bg: #0a1224;
  --surface: #101b33;
  --surface-2: #17243f;
  --ink: #f1f4fa;
  --text: #d3dbea;
  --muted: #94a1ba;
  --line: #22314f;
  --line-strong: #31436a;
  --primary: #6d9dff;
  --primary-hover: #93b6ff;
  --primary-ink: #081430;
  --accent: #ff8a3d;
  --sale: #ff5a6e;
  --wa: #2fc06a;
  --danger: #ff6b7c;
  --tint-green: #10291c;
  --tint-sand: #2e1d0e;
  --tint-sky: #142246;
  --tint-rose: #2f1419;
  --band: #0d1d42;
  --footer: #060e20;
  --footer-line: #18264a;
  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
[data-theme="h"] :is(.section-head h2, .results-head h2, .detail-info h2, .form h2, .drawer-head h2, .admin-block h2, .admin-list-head h2, .feat-big .feat-info h3, .banner-title, .footer-cta-inner h2, .pp-detail .detail-info h1, .policies h1, .cot-hero h1, .hero-title) { font-weight: 800; letter-spacing: -0.03em; }
[data-theme="h"] .hero-title em { font-style: normal; color: var(--accent); }
[data-theme="h"] .logo-name { font-weight: 800; letter-spacing: -0.03em; }
[data-theme="h"] .eyebrow { font-weight: 700; letter-spacing: .14em; }
[data-theme="h"] .price { font-weight: 800; }
[data-theme="h"] .btn { font-weight: 700; }
[data-theme="h"] .btn-primary { background: var(--orange); color: var(--on-orange); }
[data-theme="h"] .btn-primary:hover { background: var(--orange-hover); }
[data-theme="h"] .btn-outline { border-color: var(--ink); }
[data-theme="h"] .topbar { box-shadow: inset 0 -3px 0 var(--orange); border-bottom: 0; }
[data-theme="h"] .badge-feat { background: var(--orange); color: var(--on-orange); }
[data-theme="h"] .badge-feat .i { color: var(--on-orange); fill: var(--on-orange); }
[data-theme="h"] #featuredSection { background: var(--band); }
[data-theme="h"] .trust .i, [data-theme="h"] .how-n { color: var(--accent); }
[data-theme="h"] .footer h4 { color: #fff; letter-spacing: .1em; }
[data-theme="h"] .theme-switch button.on { background: var(--orange); color: var(--on-orange); }
