:root {
  /* RefaMarket · estilo iOS con liquid glass (3 dic 2026) · acento naranja original #ff5b14 */
  color-scheme: light dark;
  --ink: #1c1c1e;
  --ink-2: #3a3a3c;
  --muted: #8a8a8e;
  --line: rgba(60, 60, 67, .16);
  --sep: rgba(60, 60, 67, .12);
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-2: #f7f7fa;
  --brand: #ff5b14;
  --brand-2: #ff7a3d;
  --brand-dark: #c2410c;
  --brand-txt: #e64d0a;
  --brand-soft: rgba(255, 91, 20, .12);
  --brand-ink: #ffffff;
  --night: #1c1c1e;
  --night-2: #2c2c2e;
  --ok: #248a3d;
  --ok-soft: rgba(52, 199, 89, .14);
  --warn: #a05a00;
  --warn-soft: rgba(255, 159, 10, .16);
  --bad: #d70015;
  --bad-soft: rgba(255, 59, 48, .12);
  --blue: #e64d0a;
  --r: 22px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -12px rgba(0, 0, 0, .12);
  --glass: rgba(255, 255, 255, .66);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-b: rgba(255, 255, 255, .7);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 0 rgba(255, 255, 255, .25);
  --glass-sh: 0 10px 30px -10px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .06);
  --spring: cubic-bezier(.32, .72, 0, 1);
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: var(--body);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f7; --ink-2: #d1d1d6; --muted: #98989f; --line: rgba(84, 84, 88, .55); --sep: rgba(84, 84, 88, .4);
    --bg: #000000; --card: #1c1c1e; --card-2: #2c2c2e;
    --brand: #ff6a2b; --brand-2: #ff8a52; --brand-dark: #ffb08a; --brand-txt: #ff8a52; --brand-soft: rgba(255, 106, 43, .2);
    --night: #2c2c2e; --night-2: #3a3a3c;
    --ok: #30d158; --ok-soft: rgba(48, 209, 88, .18); --warn: #ffd60a; --warn-soft: rgba(255, 214, 10, .16); --bad: #ff453a; --bad-soft: rgba(255, 69, 58, .18);
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 8px 24px -12px rgba(0, 0, 0, .6);
    --glass: rgba(36, 36, 38, .58); --glass-strong: rgba(36, 36, 38, .8); --glass-b: rgba(255, 255, 255, .12);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(255, 255, 255, .03);
    --glass-sh: 0 12px 34px -10px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.lucide { width: 1.1em; height: 1.1em; stroke-width: 2; vertical-align: -.18em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── encabezado ── */
.top { background: var(--night); color: #fff; }
.top-row { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; flex: none; }
.logo svg { width: 34px; height: 34px; }
.logo b { font: 800 25px/1 var(--display); letter-spacing: -.02em; }
.logo b i { font-style: normal; color: var(--brand); }
.search { flex: 1; display: flex; background: var(--card); border-radius: 10px; overflow: hidden; min-width: 0; }
.search input { flex: 1; min-width: 0; border: 0; padding: 12px 14px; color: var(--ink); outline: none; }
.search button { border: 0; background: var(--brand); color: #fff; padding: 0 18px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.search button:hover { background: var(--brand-dark); }
.top-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.top-link { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: #e9eaec; font-weight: 500; font-size: 14px; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.top-link:hover { background: var(--night-2); color: #fff; }
.top-link.sell { border: 1.5px solid var(--brand); color: #fff; }
.top-link.sell:hover { background: var(--brand); }
.top-sub { border-top: 1px solid #2a2e35; }
.top-sub .wrap { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 6px; padding-bottom: 6px; }
.top-sub .wrap::-webkit-scrollbar { display: none; }
.mi-auto { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--night-2); border: 1px solid #343842; color: #fff; cursor: pointer; font-size: 13.5px; font-weight: 600; white-space: nowrap; margin-right: 8px; }
.mi-auto.set { border-color: var(--brand); }
.mi-auto small { color: #9aa0a9; font-weight: 500; }
.top-sub a.cat { color: #b9bdc4; text-decoration: none; font-size: 13.5px; padding: 7px 10px; border-radius: 8px; white-space: nowrap; }
.top-sub a.cat:hover { color: #fff; background: var(--night-2); }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); color: var(--ink); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); min-width: 210px; padding: 6px; z-index: 50; }
.menu-pop a, .menu-pop button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; text-decoration: none; border: 0; background: none; cursor: pointer; font-size: 14px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

@media (max-width: 760px) {
  .top-row { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 12px; }
  .search { order: 3; flex-basis: 100%; border-radius: 12px; }
  .search input { padding: 13px 14px; }
  .search button { padding: 0 16px; }
  .top-actions { margin-left: auto; }
  .top-link .t { display: none; }
  .top-link.sell { display: none; }          /* en celular "Vender" vive en la barra de abajo */
  .logo b { font-size: 23px; }
  .logo svg { width: 30px; height: 30px; }
}

/* ── botones y formularios ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1.5px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 15px; line-height: 1.2; transition: background .15s, border-color .15s; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover:not(:disabled) { background: var(--brand-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #000; }
.btn-line { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-line:hover:not(:disabled) { border-color: var(--ink-2); }
.btn-ghost { background: none; color: var(--ink-2); padding: 8px 12px; }
.btn-ghost:hover { background: rgba(0, 0, 0, .05); }
.btn-sm { padding: 8px 12px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { padding: 15px 24px; font-size: 16.5px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--bad); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.in { width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--card); outline: none; min-width: 0; }
.in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.in { resize: vertical; min-height: 96px; }
select.in { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b717b' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; flex: none; }
.hint { font-size: 13px; color: var(--muted); }
.err { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 9px; font-size: 14px; }

/* ── tarjetas ── */
.box { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr 1fr; gap: 10px; } }
.card { background: var(--card); border-radius: var(--r); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20, 22, 26, .06), 0 10px 28px rgba(20, 22, 26, .1); }
.card-img { aspect-ratio: 4 / 3; background: #ebe8e2; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .badge { position: absolute; left: 8px; top: 8px; }
.card-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-t { font-size: 14.5px; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-fit { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { font: 700 24px/1.1 var(--display); letter-spacing: -.01em; margin-top: 4px; }
.price sup { font-size: .55em; vertical-align: .55em; margin-left: 1px; }
.ship { font-size: 13px; font-weight: 600; color: var(--ok); display: flex; align-items: center; gap: 5px; }
.ship.paid { color: var(--ink-2); font-weight: 500; }
.loc { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 6px; }
@media (max-width: 520px) { .card-b { padding: 10px; } .price { font-size: 20px; } .card-t { font-size: 13.5px; } }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--card); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.b-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.b-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.b-brand { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; }
.b-dark { background: var(--ink); color: #fff; border-color: transparent; }

.sec { padding: 36px 0; }
.sec-h { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-h h2 { font-size: 28px; }
.sec-h a { color: var(--blue); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .lucide { width: 40px; height: 40px; color: #c3c0b8; margin-bottom: 8px; }
.empty h3 { color: var(--ink); font-size: 22px; margin-bottom: 6px; }

/* ── modal y toast ── */
.modal { position: fixed; inset: 0; background: rgba(15, 17, 20, .55); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal-c { background: var(--card); border-radius: 16px; width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-h h3 { font-size: 24px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 200; pointer-events: none; font-size: 14px; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.toast.bad { background: var(--bad); }

.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, #ebe8e2 25%, #f3f1ec 50%, #ebe8e2 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

/* ── pie ── */
.foot { background: var(--night); color: #9aa0a9; margin-top: 48px; padding: 36px 0 28px; font-size: 14px; }
.foot-g { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot h4 { color: #fff; margin: 0 0 10px; font: 700 16px var(--display); letter-spacing: .02em; text-transform: uppercase; }
.foot a { color: #c9cdd3; text-decoration: none; display: block; padding: 3px 0; }
.foot a:hover { color: #fff; }
.foot .logo { margin-bottom: 10px; }
.foot-b { border-top: 1px solid #2a2e35; margin-top: 26px; padding-top: 18px; font-size: 13px; }
@media (max-width: 700px) { .foot-g { grid-template-columns: 1fr; } }

/* ── estrellas ── */
.stars { display: inline-flex; gap: 1px; font-size: var(--t, 15px); line-height: 1; vertical-align: -1px; }
.stars i { font-style: normal; color: #d9d5cc; }
.stars i.on { color: #f5a400; }
.stars i.half { background: linear-gradient(90deg, #f5a400 50%, #d9d5cc 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rate { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate label { font-size: 36px; line-height: 1; color: #d9d5cc; cursor: pointer; padding: 2px; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: #f5a400; }
.rate input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 6px; }

/* ── pestañas ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 12px 14px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.tab.on { color: var(--ink); border-bottom-color: var(--brand); }
.tab .n { background: var(--brand); color: #fff; font-size: 11.5px; border-radius: 999px; padding: 1px 7px; }

/* ════════════ CELULAR: se comporta como app ════════════ */
html { -webkit-tap-highlight-color: transparent; }
body { -webkit-font-smoothing: antialiased; }
.card:active, .btn:active:not(:disabled), .cat-t:active, .tabbar a:active { transform: scale(.97); }
.card, .btn, .cat-t { transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; }

/* barra de navegación inferior (fixed, nunca sticky: con sticky el toque cae en otro lado) */
.tabbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  body[data-tabbar="no"] { padding-bottom: 0; }
  body[data-tabbar="no"] .tabbar { display: none !important; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 50px;
    font-size: 11px; font-weight: 600; color: #7d838c; text-decoration: none; letter-spacing: .01em; }
  .tabbar a .lucide { width: 23px; height: 23px; stroke-width: 1.9; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.on .lucide { color: var(--brand); stroke-width: 2.3; }
  .tabbar .fab { width: 50px; height: 50px; border-radius: 16px; background: var(--brand); color: #fff; display: grid; place-items: center;
    margin-top: -24px; box-shadow: 0 8px 18px rgba(255, 91, 20, .38); border: 4px solid #fff; }
  .tabbar .fab .lucide { color: #fff !important; width: 24px; height: 24px; stroke-width: 2.4; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body[data-tabbar="no"] .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* iPhone hace zoom si el texto del campo mide menos de 16px */
  .in, .search input, select.in, textarea.in { font-size: 16px; }

  /* ventanas como hoja que sube desde abajo */
  .modal { align-items: end; padding: 0; }
  .modal-c { max-width: none; border-radius: 22px 22px 0 0; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); animation: sube .22s ease-out; }
  .modal-c::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: #d9d6cf; margin: 0 auto 12px; }
  @keyframes sube { from { transform: translateY(40px); opacity: .4; } }

  .sec { padding: 26px 0; }
  .sec-h { margin-bottom: 12px; }
  .sec-h h2 { font-size: 23px; }
  .pad, .box.pad { padding: 16px; }

  /* pie compacto */
  .foot { margin-top: 28px; padding: 26px 0 22px; }
  .foot-g { gap: 18px; }
  .foot-g > div:not(:first-child) { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .foot-g h4 { flex-basis: 100%; margin-bottom: 2px; font-size: 14px; }
  .foot a { padding: 2px 0; font-size: 13.5px; }
  .foot-b { margin-top: 18px; padding-top: 14px; font-size: 12px; }
}

/* carrusel horizontal que se desliza con el dedo (categorías, pasos…) */
.rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 10px; scroll-padding: 0 16px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }

/* selector de dos opciones grandes (Estándar / Automática), como en Lord Colisión */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg2 label { position: relative; cursor: pointer; }
.seg2 input { position: absolute; opacity: 0; pointer-events: none; }
.seg2 span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 10px; border: 1.5px solid var(--line); border-radius: 11px; font-weight: 600; font-size: 15px; background: var(--card); transition: border-color .15s, background .15s; }
.seg2 input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.seg2 input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }

/* ════════════ nivel marketplace: tarjetas, favoritos, carrito, sugerencias ════════════ */
.card { position: relative; }
.card-a { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; }
.fav { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15); display: grid; place-items: center; cursor: pointer; color: #5c616a; z-index: 2; transition: transform .12s, color .15s; }
.fav:hover { color: #e0245e; }
.fav:active { transform: scale(.88); }
.fav .lucide { width: 19px; height: 19px; }
.fav.on { color: #e0245e; }
.fav.on .lucide { fill: currentColor; }
.antes { font-size: 12.5px; color: var(--muted); text-decoration: line-through; margin-top: 4px; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-row .price { margin-top: 0; }
.card-b .antes + .price-row .price { margin-top: 0; }
.card-b > .price-row:first-of-type { margin-top: 4px; }
.off { color: var(--ok); font-weight: 700; font-size: 13.5px; }
.verif { display: inline-flex; align-items: center; gap: 3px; color: var(--blue); font-size: 13px; font-weight: 600; white-space: nowrap; }
.verif .lucide { width: 16px; height: 16px; }

.search-w { position: relative; flex: 1; min-width: 0; display: flex; }
.search-w .search { flex: 1; }
.sug { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); color: var(--ink); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .22); padding: 6px; z-index: 60; max-height: 70vh; overflow-y: auto; }
.sug a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; text-decoration: none; font-size: 14.5px; }
.sug a .lucide { color: var(--muted); }
.sug a em { font-style: normal; color: var(--muted); font-size: 13px; }
.sug a:hover, .sug a.on { background: var(--bg); }

.top-link.ico-only { padding: 9px 10px; position: relative; }
.top-link.ico-only .lucide { width: 21px; height: 21px; }
.dot-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff;
  font: 700 11px/18px var(--body); text-align: center; border: 2px solid var(--night); box-sizing: content-box; }
.ico-n { position: relative; display: inline-flex; }
.tabbar .dot-n { top: -6px; right: -10px; border-color: #fff; }
.menu-h { padding: 10px 12px 8px; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-h small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.menu-s { display: block; padding: 8px 12px 2px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.menu-pop { min-width: 240px; max-height: 80vh; overflow-y: auto; }
.top-sub a.cat.hot { color: #ffb38f; display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 13px; color: #c9cdd3; }
.trust span { display: inline-flex; gap: 6px; align-items: center; }
.trust .lucide { color: var(--brand); }

/* carrusel de tarjetas (similares, ofertas, vistos…) */
.cards-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 220px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 8px; }
.cards-rail > * { scroll-snap-align: start; }
@media (max-width: 760px) {
  .search-w { order: 3; flex-basis: 100%; }
  .top-link.ico-only { display: none; }          /* en celular el carrito está en la barra de abajo */
  .cards-rail { grid-auto-columns: 46%; gap: 10px; margin: 0 -16px; padding: 0 16px 8px; scroll-padding: 0 16px; scrollbar-width: none; }
  .cards-rail::-webkit-scrollbar { display: none; }
  .fav { width: 32px; height: 32px; top: 6px; right: 6px; }
}
#top-cats { display: flex; gap: 4px; align-items: center; flex: none; }

/* ═══════════ RefaMarket · lenguaje iOS 26 / liquid glass (3 dic 2026) ═══════════ */
html { background: var(--bg); }
body { background:
    radial-gradient(900px 520px at 0% -8%, rgba(255, 91, 20, .13), transparent 62%),
    radial-gradient(800px 480px at 100% 4%, rgba(255, 149, 0, .09), transparent 60%),
    var(--bg);
  font: 16px/1.47 var(--body); letter-spacing: -.011em; -webkit-font-smoothing: antialiased; }
::selection { background: var(--brand-soft); color: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.022em; line-height: 1.1; }
a { color: inherit; }
.price { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
.mono, .num { font-variant-numeric: tabular-nums; }

/* vidrio líquido reutilizable */
.glass { background: var(--glass); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  border: .5px solid var(--glass-b); box-shadow: var(--glass-hi), var(--glass-sh); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass, .top, .tabbar, .sug, .menu-pop { background: var(--glass-strong) !important; } }

/* logo: ícono squircle + wordmark */
.logo { gap: 9px; color: var(--ink); }
.logo svg { display: block; width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(255, 91, 20, .35)); }
.logo b { display: none; }
.wm { font: 700 21px/1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.wm .a, .wm .b { all: unset; }
.wm .b { color: var(--brand); }
@media (max-width: 760px) { .wm { font-size: 19px; } .logo svg { width: 30px; height: 30px; } }

/* barra superior de vidrio */
.top { background: var(--glass); color: var(--ink); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  border-bottom: .5px solid var(--line); box-shadow: var(--glass-hi); padding-top: env(safe-area-inset-top); }
.top-sub { border-top: .5px solid var(--sep); }
.search { background: rgba(118, 118, 128, .12); border-radius: 999px; border: .5px solid transparent; transition: background .2s, box-shadow .2s; }
.search:focus-within { background: var(--card); box-shadow: 0 0 0 4px var(--brand-soft); }
.search input { background: transparent; color: var(--ink); padding: 11px 16px; }
.search input::placeholder { color: var(--muted); }
.search button { background: var(--brand); color: #fff; border-radius: 999px; margin: 4px; padding: 0 14px; }
.search button:hover { background: var(--brand-2); }
.top-link { color: var(--ink); border-radius: 999px; }
.top-link:hover { background: rgba(118, 118, 128, .12); color: var(--ink); }
.top-link.sell { border: 0; background: var(--brand); color: #fff; font-weight: 600; padding: 9px 16px; }
.top-link.sell:hover { background: var(--brand-2); color: #fff; }
.mi-auto { background: rgba(118, 118, 128, .12); border: 0; color: var(--ink); border-radius: 999px; font: 600 13.5px var(--body); letter-spacing: -.01em; }
.mi-auto small { color: var(--muted); }
.mi-auto.set { background: var(--brand-soft); color: var(--brand-txt); }
.top-sub a.cat { color: var(--ink-2); border-radius: 999px; font-size: 13.5px; font-weight: 500; }
.top-sub a.cat:hover { color: var(--ink); background: rgba(118, 118, 128, .12); }
.top-sub a.cat.hot { color: var(--brand-txt); }
.dot-n { background: var(--brand); color: #fff; border-color: var(--card); }
.menu-pop, .sug { background: var(--glass-strong); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: .5px solid var(--glass-b); box-shadow: var(--glass-hi), 0 20px 50px -12px rgba(0, 0, 0, .3); border-radius: 18px; color: var(--ink); }
.menu-pop a:hover, .menu-pop button:hover, .sug a:hover, .sug a.on { background: rgba(118, 118, 128, .14); }
.menu-pop a, .menu-pop button, .sug a { border-radius: 11px; }
.menu-pop hr, .menu-h { border-color: var(--sep); }

/* botones píldora con feedback de toque */
.btn { border-radius: 999px; font-weight: 600; letter-spacing: -.01em; transition: transform .35s var(--spring), background .2s, box-shadow .2s; }
.btn:active:not(:disabled), .card:active, .cat-t:active, .chip:active, .fav:active { transform: scale(.97); }
.btn-brand { background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: #fff; border: 0; box-shadow: 0 6px 18px -6px rgba(255, 91, 20, .55), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-brand:hover:not(:disabled) { background: var(--brand-2); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover:not(:disabled) { background: var(--ink-2); }
.btn-line { background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: .5px solid var(--line); color: var(--ink); box-shadow: var(--glass-hi); }
.btn-line:hover:not(:disabled) { border-color: var(--muted); }
.btn-ghost { color: var(--brand-txt); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-lg { padding: 15px 26px; font-size: 17px; }
.btn-sm { border-radius: 999px; }

/* campos estilo iOS */
.field > span { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: -.005em; }
.in { background: var(--card); color: var(--ink); border: .5px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: box-shadow .2s, border-color .2s; }
.in:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
select.in { background-color: var(--card); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238a8a8e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.check input { accent-color: var(--brand); }
.err { border-radius: 12px; }
.hint { color: var(--muted); }

/* segmented control */
.seg2 { gap: 0; background: rgba(118, 118, 128, .12); border-radius: 12px; padding: 2px; }
.seg2 span { border: 0; border-radius: 10px; background: transparent; padding: 9px 8px; font-size: 14.5px; transition: background .3s var(--spring), box-shadow .3s; }
.seg2 input:checked + span { background: var(--card); color: var(--ink); border: 0; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
.seg2 input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }

/* tarjetas */
.box { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); transition: transform .45s var(--spring), box-shadow .3s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .3); }
.card-img { background: var(--card-2); border-radius: 16px; margin: 6px 6px 0; }
.card-img .badge { background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: .5px solid var(--glass-b); color: var(--ink); font-size: 11.5px; }
.card-img .badge.b-ok { color: var(--ok); }
.card-img .badge.b-warn { color: var(--warn); }
.card-t { color: var(--ink); font-weight: 500; }
.card-fit { color: var(--muted); font-size: 12.5px; }
.fav { background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: .5px solid var(--glass-b); color: var(--ink-2); }
.fav.on, .fav:hover { color: #ff2d55; }
.badge { border-radius: 999px; background: rgba(118, 118, 128, .12); border: 0; color: var(--ink-2); }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-brand { background: var(--brand-soft); color: var(--brand-txt); }
.b-dark { background: var(--ink); color: var(--bg); }
.verif { color: var(--brand-txt); }
.ship { color: var(--ok); }
.ship.paid, .loc { color: var(--muted); }
.off { color: var(--ok); }
.antes { color: var(--muted); }
.sec-h h2 { font-size: 26px; }
.sec-h a { color: var(--brand-txt); font-weight: 600; }
.empty { color: var(--muted); }
.empty h3 { color: var(--ink); }
.empty .lucide { color: var(--muted); }
.skel { background: linear-gradient(90deg, var(--card-2) 25%, var(--card) 50%, var(--card-2) 75%); background-size: 200% 100%; border-radius: var(--r); }
.tabs { border-bottom: .5px solid var(--line); }
.tab.on { color: var(--ink); border-bottom-color: var(--brand); }
.tab .n { background: var(--brand); color: #fff; }
.stars i { color: rgba(118, 118, 128, .3); }
.chip { background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: .5px solid var(--glass-b) !important; box-shadow: var(--glass-hi); color: var(--ink); border-radius: 999px; }
.chip.car { background: var(--brand); color: #fff; }

/* hojas que suben desde abajo, con grabber */
.modal { background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal-c { background: var(--card); color: var(--ink); border-radius: 28px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
.toast { background: var(--glass-strong); color: var(--ink); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border: .5px solid var(--glass-b); border-radius: 999px; box-shadow: var(--glass-hi), var(--glass-sh); font-weight: 500; }
.toast.bad { background: var(--bad); color: #fff; }

/* tab bar flotante en cápsula (iOS 26) */
@media (max-width: 760px) {
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 30px; padding: 6px 6px;
    background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%);
    border: .5px solid var(--glass-b); border-top: .5px solid var(--glass-b); box-shadow: var(--glass-hi), 0 16px 40px -12px rgba(0, 0, 0, .35); }
  .tabbar a { min-height: 50px; color: var(--muted); font-size: 10.5px; font-weight: 600; border-radius: 22px; justify-content: center; transition: background .3s var(--spring), color .2s; }
  .tabbar a.on { color: var(--brand-txt); background: rgba(118, 118, 128, .12); }
  .tabbar a.on .lucide { color: var(--brand); }
  .tabbar .fab { width: 46px; height: 32px; border-radius: 999px; margin-top: 0; border: 0; background: linear-gradient(180deg, var(--brand-2), var(--brand)); box-shadow: 0 6px 14px -4px rgba(255, 91, 20, .6); }
  .tabbar .fab .lucide { color: #fff !important; width: 20px; height: 20px; }
  .tabbar a:has(.fab) { gap: 2px; }
  .tabbar .dot-n { border-color: transparent; }
  .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
  .modal-c { border-radius: 28px 28px 0 0; padding-top: 8px; animation: sube .45s var(--spring); }
  .modal-c::before { width: 36px; height: 5px; background: rgba(118, 118, 128, .4); margin-bottom: 14px; }
  .sec-h h2 { font-size: 22px; }
  .card-img { border-radius: 14px; margin: 5px 5px 0; }
}

/* pie */
.foot { background: transparent; color: var(--muted); border-top: .5px solid var(--line); }
.foot h4 { font: 600 13px var(--body); letter-spacing: -.01em; text-transform: none; color: var(--ink); }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--brand-txt); }
.foot-b { border-top: .5px solid var(--sep); }
.trust { color: var(--ink-2); }
.trust .lucide { color: var(--brand); }

/* etiquetas de texto (sin mayúsculas ni monoespaciadas) */
.tag-m { font: 500 13px/1.2 var(--body); letter-spacing: -.005em; color: var(--muted); text-transform: none; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--body); color: var(--brand-txt); letter-spacing: -.01em; text-transform: none; }

/* lista agrupada estilo Ajustes */
.ios-list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ios-row { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 52px; text-decoration: none; color: var(--ink); position: relative; transition: background .2s; }
.ios-row:hover { background: rgba(118, 118, 128, .08); }
.ios-row + .ios-row::before { content: ''; position: absolute; top: 0; right: 0; left: 58px; border-top: .5px solid var(--sep); }
.ios-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.ios-ic .lucide { width: 18px; height: 18px; }
.ios-row .t { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 14px 0; }
.ios-row .chev { color: rgba(118, 118, 128, .55); width: 18px; height: 18px; }

/* aviso honesto de pagos en activación */
.pago-pronto { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-soft); color: var(--ink); border-radius: 16px; padding: 12px 14px; font-size: 14.5px; }
.pago-pronto .lucide { color: var(--brand); margin-top: 2px; }
.pago-pronto b { display: block; }

#rm-intro { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.foot .logo { display: inline-flex; }
