/* =============================================================================
   Klose · Design system (Mobile-First)
   ============================================================================= */
:root {
  /* Identidad Klose: monocroma, tomada del logo (wordmark con percha) */
  --brand: #111111;
  --brand-600: #333333;
  --brand-50: #f3f2ef;
  --on-brand: #ffffff;
  --accent: #0e7a5f;           /* verde "protección": confianza / pago seguro */
  --accent-50: #e7f4ef;
  --ink: #171717;
  --ink-2: #4d4d4d;
  --muted: #757575;
  --line: #e8e8e8;
  --bg: #ffffff;
  --bg-2: #f5f5f5;
  --surface: #ffffff;
  --ok: #1a7f4b;
  --ok-bg: #e5f4ec;
  --warn: #9a6200;
  --warn-bg: #fdf1dc;
  --danger: #c4302b;
  --danger-bg: #fbe7e6;
  --info: #155eaa;
  --info-bg: #e5effa;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .06);
  --nav-h: 60px;
  --header-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2f2f2; --ink-2: #c9c9c9; --muted: #9a9a9a; --line: #2c2c2c;
    --bg: #121212; --bg-2: #1c1c1c; --surface: #1a1a1a; --brand: #f5f5f5; --brand-600: #dddddd; --brand-50: #232323; --on-brand: #111111; --accent: #4cc39b; --accent-50: #12301f;
    --ok-bg: #12301f; --warn-bg: #33270f; --danger-bg: #3a1716; --info-bg: #13253a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f2f2f2; --ink-2: #c9c9c9; --muted: #9a9a9a; --line: #2c2c2c;
  --bg: #121212; --bg-2: #1c1c1c; --surface: #1a1a1a; --brand: #f5f5f5; --brand-600: #dddddd; --brand-50: #232323; --on-brand: #111111; --accent: #4cc39b; --accent-50: #12301f;
  --ok-bg: #12301f; --warn-bg: #33270f; --danger-bg: #3a1716; --info-bg: #13253a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 600; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 16px; height: 16px; }

/* ---------- Layout de la app ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 1200px; margin: 0 auto; background: var(--bg); min-width: 0; overflow-x: clip; }
.topbar > * { min-width: 0; }
.topbar .logo, .topbar .icon-btn { flex: none; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; font-size: 1.45rem; letter-spacing: -.5px; color: var(--brand); }
.topbar .title { font-weight: 700; font-size: 1.05rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.main { flex: 1; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.page { padding: 16px; }
.section { padding: 16px; border-bottom: 8px solid var(--bg-2); }
.section:last-child { border-bottom: 0; }

/* ---------- Navegación inferior (tipo app nativa) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bg); border-top: 1px solid var(--line);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: .7rem; position: relative;
}
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a.active .icon { stroke-width: 2.2; }
.bottom-nav .sell-btn .icon { background: var(--brand); color: var(--on-brand); border-radius: 50%; padding: 5px; width: 32px; height: 32px; }
.bottom-nav .dot { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: .62rem; display: flex; align-items: center; justify-content: center; }

/* ---------- Búsqueda y chips ---------- */
.search-bar { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; background: var(--bg-2); border-radius: 8px; padding: 0 12px; height: 40px; color: var(--muted); }
.search-bar > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-bar input { border: 0; background: transparent; outline: none; flex: 1; height: 100%; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--bg); border-radius: 20px;
  padding: 6px 14px; font-size: .88rem; white-space: nowrap; color: var(--ink);
}
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Grid de artículos (2 columnas móvil) ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 10px; padding: 0 16px 16px; }
.card { min-width: 0; color: var(--ink); position: relative; display: block; }
.card-img { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); position: relative; }
.card-img img, .card-img .ph { width: 100%; height: 100%; object-fit: cover; }
.card .fav {
  position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 3px;
  background: rgba(255, 255, 255, .92); color: #333; border: 0; border-radius: 16px; padding: 4px 8px; font-size: .75rem;
}
.card .fav .icon { width: 16px; height: 16px; }
.card .fav.on { color: var(--danger); }
.card .fav.on .icon { fill: currentColor; }
.card-seller { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.card-body { padding-top: 6px; }
.price { font-weight: 700; font-size: 1rem; }
.price-incl { font-size: .78rem; color: var(--brand); display: flex; align-items: center; gap: 3px; }
.price-incl .icon { width: 13px; height: 13px; }
.meta { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-sold { position: absolute; left: 8px; top: 8px; background: var(--ink); color: var(--bg); font-size: .7rem; padding: 2px 8px; border-radius: 4px; }

.ph { display: flex; align-items: center; justify-content: center; color: rgba(0, 0, 0, .25); font-size: 2.4rem; font-weight: 800; }
.skeleton .card-img, .sk-line { background: linear-gradient(90deg, var(--bg-2), var(--line), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
.sk-line { height: 12px; border-radius: 4px; margin-top: 8px; }
.sk-line.short { width: 60%; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Detalle de artículo ---------- */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: var(--bg-2); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery > * { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 5; object-fit: cover; max-height: 70vh; }
.detail-price { font-size: 1.5rem; font-weight: 700; }
.attr-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.attr-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.attr-table td:first-child { color: var(--muted); width: 42%; }
.seller-row { display: flex; align-items: center; gap: 12px; }
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 25;
  background: var(--bg); border-top: 1px solid var(--line); padding: 10px 16px; display: flex; gap: 10px;
}
.protection { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-50); border-radius: var(--radius-lg); padding: 12px; font-size: .86rem; }
.protection .icon { color: var(--brand); }

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; white-space: nowrap; transition: background .15s, opacity .15s;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-600); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--on-brand); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-outline.loading::after { border-color: var(--brand); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { border: 0; background: transparent; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; position: relative; color: var(--ink); }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn .dot { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--danger); color: #fff; font-size: .62rem; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

form { margin: 0; }
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: .85rem; color: var(--ink-2); margin-bottom: 4px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); outline: none; transition: border-color .15s;
}
.field textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack > * + * { margin-top: 10px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- Listas, tarjetas de panel, badges ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); background: var(--bg); width: 100%; text-align: left; border-left: 0; border-right: 0; border-top: 0; }
.list-item .thumb { width: 56px; height: 70px; border-radius: var(--radius); overflow: hidden; flex: none; background: var(--bg-2); }
.list-item .thumb img, .list-item .thumb .ph { width: 100%; height: 100%; object-fit: cover; font-size: 1.2rem; }
.list-item .body { flex: 1; min-width: 0; }
.list-item .body .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item.unread { background: var(--brand-50); }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; width: 100%; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.menu-item .icon { color: var(--ink-2); }

.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 10px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--bg-2); color: var(--muted); }

.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; }
.stat .k { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 1.35rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat.brand { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.stat.brand .k { color: var(--on-brand); opacity: .8; }
.stat.frozen .v { color: var(--danger); }
.breakdown { width: 100%; border-collapse: collapse; font-size: .92rem; }
.breakdown td { padding: 6px 0; }
.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown tr.total td { font-weight: 700; border-top: 1px solid var(--line); padding-top: 10px; }

.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; background: var(--bg); position: sticky; top: var(--header-h); z-index: 15; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; padding: 12px 14px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--ink); border-bottom-color: var(--brand); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 12px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); border: 2px solid var(--bg); }
.timeline li:first-child::before { background: var(--brand); }

.chat { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.bubble { max-width: 80%; padding: 8px 12px; border-radius: 16px; background: var(--bg-2); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { background: var(--brand); color: var(--on-brand); align-self: flex-end; }
.bubble.admin { background: var(--warn-bg); }
.bubble small { display: block; opacity: .7; font-size: .7rem; margin-top: 2px; }
.composer { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); background: var(--bg); }
.composer input { flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 21px; padding: 0 16px; background: var(--surface); }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; object-fit: cover; }
.avatar-sm { width: 22px; height: 22px; font-size: .7rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.6rem; }
.stars { display: inline-flex; align-items: center; color: #f5a623; }
.stars .icon { width: 14px; height: 14px; }
.stars .icon.on { fill: currentColor; }
.stars small { color: var(--muted); }

.empty { text-align: center; padding: 48px 24px; }
.empty-icon { width: 56px; height: 56px; color: var(--line); margin-bottom: 8px; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid .slot { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--bg-2); }
.photo-grid .slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .add { border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--brand); font-size: .8rem; background: transparent; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Sheet modal y toast ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0); z-index: 50; display: flex; align-items: flex-end; justify-content: center; transition: background .2s; }
.sheet-backdrop.open { background: rgba(0, 0, 0, .45); }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92dvh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .22s ease-out; }
.sheet-backdrop.open .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 4px 16px; }
.sheet-head h3 { margin: 0; }
.sheet-body { padding: 8px 16px calc(16px + var(--safe-b)); overflow-y: auto; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 22px; font-size: .9rem; opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

.auth-wrap { max-width: 420px; margin: 0 auto; padding: 24px 16px; }
.auth-hero { text-align: center; padding: 24px 0 16px; }
.auth-hero .logo { font-size: 2.4rem; }
.demo-accounts { background: var(--bg-2); border-radius: var(--radius-lg); padding: 12px; font-size: .82rem; }
.demo-accounts button { border: 0; background: transparent; color: var(--brand); padding: 4px 0; display: block; text-align: left; }

.sandbox-banner { background: var(--warn-bg); color: var(--warn); font-size: .8rem; padding: 8px 12px; border-radius: var(--radius); display: flex; gap: 8px; align-items: center; }
.cashea-card { border-radius: var(--radius-lg); padding: 20px; background: linear-gradient(135deg, #1b1464, #3b2bbf); color: #fff; }
.cashea-card .amount { font-size: 2rem; font-weight: 800; }

/* ---------- Paneles (vendedor/admin/cliente) ---------- */
.panel-layout { display: flex; flex-direction: column; min-height: 100dvh; }
.side-nav { display: none; }

/* ---------- Tablet / escritorio ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(5, 1fr); gap: 24px 16px; }
  .bottom-nav { left: 50%; transform: translateX(-50%); max-width: 1200px; }
  .cta-bar { position: static; border: 0; padding: 16px 0; }
  .item-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; padding: 16px; }
  .item-layout .gallery > * { border-radius: var(--radius-lg); }
  .panel-layout { flex-direction: row; }
  .side-nav { display: flex; flex-direction: column; width: 240px; flex: none; border-right: 1px solid var(--line); padding: 16px 0; position: sticky; top: 0; height: 100dvh; }
  .side-nav .logo { padding: 0 20px 16px; }
  .side-nav button { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border: 0; background: transparent; color: var(--ink-2); text-align: left; font-weight: 500; }
  .side-nav button.active { color: var(--brand); background: var(--brand-50); }
  .panel-layout .tabs { display: none; }
  .panel-layout ~ .bottom-nav { display: none; }
  .panel-layout .main { padding-bottom: 32px; }
  .panel-layout .main { max-width: 1000px; }
}

/* =============================================================================
   Sitio web de escritorio (estilo vinted.es) + banner principal
   ============================================================================= */
.site-header, .cat-nav, .site-footer { display: none; }
.site-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Banner principal (móvil: imagen arriba, tarjeta debajo) */
.hero { position: relative; margin-bottom: 8px; }
.hero-img { height: 190px; background: #cfe6e3 url("../img/hero.svg") center / cover no-repeat; }
.hero-card { background: var(--bg); padding: 16px; border-bottom: 8px solid var(--bg-2); }
.hero-card h1 { font-size: 1.3rem; font-weight: 600; margin-bottom: 14px; }
.hero-link { display: block; text-align: center; margin-top: 12px; font-size: .9rem; text-decoration: underline; }
.home-title { padding-bottom: 4px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; }
.toolbar h2 { margin: 0; font-size: 1.1rem; }

.ask-btn { width: 44px; padding: 0; flex: none; }
.ask-btn .desk-label { display: none; }

.how h1 { font-size: 1.6rem; margin-bottom: 20px; }
.how h2 { margin-top: 24px; }
.how-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.how-step { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.how-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }

@media (min-width: 640px) {
  .how-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  /* Cabecera */
  .site-header { display: block; position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-header .site-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
  .site-header .logo { font-size: 1.9rem; }
  .site-search { flex: 1; display: flex; height: 40px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
  .site-search-scope { border: 0; background: transparent; padding: 0 12px; border-right: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; }
  .site-search-input { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--muted); }
  .site-search-input input { flex: 1; border: 0; background: transparent; outline: none; height: 100%; }
  .site-actions { display: flex; align-items: center; gap: 6px; }
  .site-actions .btn { height: 36px; }
  .site-actions .btn-primary { margin-left: 8px; }
  .site-avatar { margin: 0 4px; display: inline-flex; }

  /* Menú de categorías con megamenú */
  .cat-nav { display: block; background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 64px; z-index: 39; }
  .cat-list { list-style: none; display: flex; gap: 4px; margin: 0 auto; }
  .cat-item { position: relative; }
  .cat-item > a { display: block; padding: 12px 12px; color: var(--ink-2); font-size: .92rem; border-bottom: 2px solid transparent; }
  .cat-item:hover > a, .cat-item:focus-within > a { color: var(--ink); border-bottom-color: var(--brand); }
  .mega { display: none; position: absolute; left: 0; top: 100%; min-width: 420px; background: var(--bg); border: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow); padding: 16px; }
  .cat-item:hover .mega, .cat-item:focus-within .mega { display: block; }
  .mega-all { display: block; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
  .mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
  .mega-grid a { padding: 6px 0; color: var(--ink-2); font-size: .9rem; }
  .mega-grid a:hover, .mega-all:hover { color: var(--brand); }

  /* En escritorio la navegación es la cabecera: fuera barra inferior y topbar de inicio/búsqueda */
  .bottom-nav { display: none; }
  .main { padding-bottom: 32px; }
  body[data-page="home"] .topbar, body[data-page="search"] .topbar { display: none; }
  body[data-page="home"] .main > .chips, body[data-page="search"] .main > .chips:first-child { display: none; }
  .topbar { position: static; border-bottom: 0; }
  .toast { bottom: 24px; }

  /* Banner principal */
  .hero { margin: 0 0 16px; }
  .hero-img { height: 440px; border-radius: 0; }
  .app { max-width: none; }
  .main > *:not(.hero) { max-width: 1200px; margin-left: auto; margin-right: auto; }
  .hero-card { position: absolute; left: max(32px, calc((100vw - 1200px) / 2 + 16px)); top: 50%; transform: translateY(-50%); width: 360px; border-radius: 8px; border: 0; padding: 28px; box-shadow: var(--shadow); }
  .hero-card h1 { font-size: 1.75rem; line-height: 1.2; margin-bottom: 20px; }
  .home-title { padding-top: 24px; font-size: 1.35rem; }

  /* Ficha de artículo: CTA dentro de la columna lateral */
  .item-layout { max-width: 1200px; margin: 0 auto; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); align-items: start; }
  .item-layout .gallery { border-radius: var(--radius-lg); }
  .cta-bar { position: static; flex-direction: column-reverse; gap: 8px; padding: 0 16px 16px; border: 0; }
  .cta-bar .btn { width: 100%; }
  .ask-btn { width: 100%; padding: 0 18px; }
  .ask-btn .desk-label { display: inline; }

  /* Pie de página */
  .site-footer { display: block; border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 32px; padding: 32px 0 16px; }
  .footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .site-footer h4 { font-size: .95rem; margin-bottom: 10px; }
  .site-footer ul { list-style: none; margin: 0; padding: 0; }
  .site-footer li a { display: block; padding: 4px 0; color: var(--ink-2); font-size: .9rem; }
  .site-footer li a:hover { color: var(--brand); }
  .footer-bottom { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
}

@media (min-width: 960px) {
  .cta-bar .btn { flex: none; height: 44px; }
  .item-layout .gallery > * { aspect-ratio: auto; height: min(78vh, 760px); max-height: none; width: 100%; object-fit: contain; background: var(--bg-2); }
  .app > .topbar { max-width: 1200px; width: 100%; margin: 0 auto; }
  body[data-page="item"] .topbar { display: none; }
  .item-layout { padding-top: 24px; }
}
@media (min-width: 960px) {
  body[data-page="search"] .main > .chips { padding-top: 16px; }
}

/* =============================================================================
   v1.2 · Portada tipo vinted.es, filtros inteligentes, outfits, búsqueda por foto
   ============================================================================= */
.desk-only { display: none !important; }
.link-btn { border: 0; background: none; color: var(--brand); font-size: .85rem; text-decoration: underline; padding: 4px; }
.btn-white { background: #fff; color: #111; border-color: #fff; }

/* Secciones de portada */
.home-section { padding: 8px 0 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 16px 10px; }
.section-head h2 { margin: 0; font-size: 1.15rem; }
.section-head a { font-size: .9rem; font-weight: 600; }

.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 12px; overflow-x: auto; padding: 0 16px 6px; scrollbar-width: none; }
.tiles::-webkit-scrollbar { display: none; }
.tile { color: var(--ink); }
.tile-img { aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-2); }
.tile-img img, .tile-img .ph { width: 100%; height: 100%; object-fit: cover; }
.tile-name { font-weight: 600; font-size: .92rem; margin-top: 6px; }
.tile-sub { font-size: .78rem; color: var(--muted); }

.brands { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 12px; overflow-x: auto; padding: 0 16px 6px; scrollbar-width: none; }
.brands::-webkit-scrollbar { display: none; }
.brand-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px; color: var(--ink); background: var(--surface); }
.brand-card:hover { border-color: var(--brand); }
.brand-thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex: none; background: var(--bg-2); }
.brand-thumb img, .brand-thumb .ph { width: 100%; height: 100%; object-fit: cover; font-size: 1.2rem; }
.brand-name { font-weight: 700; }

.mid-banner { margin: 16px 0; background: #f3e9df; display: flex; flex-direction: column; color: #171717; }
.mid-banner-img { height: 170px; background: #f3e9df url("../img/banner-protect.svg") center / cover no-repeat; }
.mid-banner-text { padding: 16px; }
.mid-banner-text h2 { font-size: 1.3rem; }
.mid-banner-text p { color: #4d4d4d; }

.smart-tools { display: grid; gap: 12px; padding: 0 16px; }
.smart-card { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; color: var(--ink); background: var(--surface); }
.smart-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.smart-card h3 { margin-bottom: 4px; }
.smart-card p { margin: 0; font-size: .88rem; }
.chip-smart { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); border-color: var(--brand); }

.badge-sim { position: absolute; left: 8px; top: 8px; background: var(--brand); color: var(--on-brand); font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 12px; }

/* Búsqueda + facetas */
.search-layout { display: block; }
.toolbar { flex-wrap: wrap; }
.sort-box select { height: 34px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; background: var(--surface); font-size: .85rem; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.active-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-50); border-color: var(--brand); color: var(--brand); }
.active-chip .icon { width: 14px; height: 14px; }
.swatch { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, .15); flex: none; }
.swatch.lg { width: 30px; height: 30px; }
.swatch-chip { display: inline-flex; align-items: center; gap: 6px; }
.swatch-chip small { color: var(--muted); }
.swatch-chip.active small { color: inherit; }
.color-strip { padding-top: 0; }
.facet-panel { padding: 0 0 8px; }
.facet { border-bottom: 1px solid var(--line); padding: 4px 0; }
.facet summary { cursor: pointer; font-weight: 700; padding: 10px 0; list-style: none; display: flex; justify-content: space-between; }
.facet summary::-webkit-details-marker { display: none; }
.facet summary::after { content: "▾"; color: var(--muted); }
.facet[open] summary::after { content: "▴"; }
.facet-body { padding-bottom: 10px; }
.facet-list { list-style: none; margin: 0; padding: 0; }
.facet-list.sub { padding-left: 12px; border-left: 2px solid var(--line); margin: 2px 0 6px 6px; }
.facet-opt { display: flex; width: 100%; justify-content: space-between; border: 0; background: none; padding: 7px 4px; color: var(--ink-2); text-align: left; border-radius: 4px; }
.facet-opt:hover { background: var(--bg-2); }
.facet-opt.on { color: var(--brand); font-weight: 700; }
.facet-opt small, .facet-check small { color: var(--muted); }
.facet-check { display: flex; align-items: center; gap: 8px; padding: 6px 2px; cursor: pointer; font-size: .92rem; }
.facet-check input { accent-color: var(--brand); width: 16px; height: 16px; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 4px; }
.swatch-opt { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; padding: 4px 0; font-size: .74rem; color: var(--ink-2); border-radius: 6px; }
.swatch-opt small { color: var(--muted); font-size: .68rem; }
.swatch-opt.on .swatch { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand); }
.swatch-opt.on { color: var(--brand); font-weight: 700; }
.price-form { display: flex; gap: 6px; }
.price-form input { width: 100%; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; background: var(--surface); }
.facet-tools { display: grid; gap: 8px; padding-top: 14px; }

/* Ficha: ruta de navegación y bloques inferiores */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 16px; font-size: .85rem; color: var(--muted); }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.crumb-current { color: var(--muted); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-back { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 4px 10px 4px 6px; margin-right: 6px; font-weight: 600; color: var(--ink); }
.crumb-back:hover { border-color: var(--brand); color: var(--brand); }
.item-below { padding-bottom: 16px; }
.look-section { background: var(--brand-50); margin: 8px 0; padding: 8px 0 16px; }
.look-section > div:last-child { padding: 0 16px; }
.look-row { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.look-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--brand); display: block; margin-bottom: 4px; }

/* Arma tu outfit */
.outfit-intro h1, .visual-intro h1 { font-size: 1.5rem; }
.occasions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
.occasion { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-lg); padding: 12px; color: var(--ink); }
.occasion .how-icon { width: 36px; height: 36px; margin-bottom: 4px; }
.occasion small { font-size: .78rem; }
.occasion.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-50); background: var(--brand-50); }
.outfit-controls { align-items: center; }
.outfit-controls input { width: 110px; height: 34px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; background: var(--surface); }
.segmented { display: inline-flex; border: 1px solid var(--brand); border-radius: 18px; overflow: hidden; }
.segmented button { border: 0; background: transparent; padding: 7px 16px; color: var(--brand); font-weight: 600; }
.segmented button.on { background: var(--brand); color: var(--on-brand); }
.outfit-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.outfit-head h2 { margin: 0; }
.outfit-total { font-size: 1.25rem; }
.outfit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
.outfit-slot { min-width: 0; }
.outfit-slot.anchor .card-img { box-shadow: 0 0 0 2px var(--brand); }
.outfit-empty { aspect-ratio: 4 / 5; border: 2px dashed var(--line); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px; color: var(--muted); font-size: .85rem; }
.fit-note { font-size: .74rem; color: var(--warn); background: var(--warn-bg); border-radius: 4px; padding: 2px 6px; margin-top: 4px; display: inline-block; }
.reasons { list-style: none; margin: 4px 0 0; padding: 0; font-size: .76rem; color: var(--ink-2); }
.reasons li { display: flex; gap: 4px; align-items: center; }
.reasons .icon { width: 12px; height: 12px; color: var(--ok); }
.alts { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.alt { width: 38px; height: 46px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; padding: 0; background: var(--bg-2); }
.alt img, .alt .ph { width: 100%; height: 100%; object-fit: cover; font-size: .8rem; }
.alt:hover { border-color: var(--brand); }

/* Busca por foto */
.dropzone { display: block; border: 2px dashed var(--line); border-radius: var(--radius-lg); padding: 24px; text-align: center; cursor: pointer; background: var(--bg-2); transition: border-color .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-50); }
.visual-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.visual-preview img { max-height: 260px; border-radius: var(--radius); object-fit: contain; }
.detected { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detected .chip { display: inline-flex; align-items: center; gap: 6px; }

/* Pie de página (estructura vinted.es) */
.footer-main { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.footer-col h4 { font-size: .95rem; margin-bottom: 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li a { display: block; padding: 4px 0; color: var(--ink-2); font-size: .9rem; }
.footer-col li a:hover { color: var(--brand); }
.footer-apps { display: flex; flex-direction: column; gap: 10px; }
.socials { display: flex; gap: 10px; margin-bottom: 4px; }
.social { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); font-weight: 700; font-size: .8rem; background: var(--bg); }
.social:hover { color: var(--brand); border-color: var(--brand); }
.store-badge { display: inline-flex; align-items: center; gap: 8px; background: #111; color: #fff; border-radius: 8px; padding: 6px 14px; width: 170px; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge small { font-size: .65rem; opacity: .8; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .8rem; }
.footer-legal a { color: var(--ink-2); }
.footer-legal a:hover { color: var(--brand); }
.footer-legal .muted { margin-left: auto; }
.info-page { max-width: 760px; }
.info-page h1 { font-size: 1.6rem; }

@media (min-width: 640px) {
  .smart-tools { grid-template-columns: repeat(3, 1fr); }
  .occasions { grid-template-columns: repeat(4, 1fr); }
  .outfit-grid { grid-template-columns: repeat(3, 1fr); }
  .tiles { grid-auto-columns: 160px; }
}

@media (min-width: 960px) {
  .desk-only { display: block !important; }
  .mob-only { display: none !important; }
  .site-search-cam { display: inline-flex; align-items: center; padding: 0 14px; color: var(--ink-2); border-left: 1px solid var(--line); }
  .site-search-cam:hover { color: var(--brand); }
  .cat-smart > a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand) !important; font-weight: 600; }

  .home-section { padding: 16px 0 24px; }
  .section-head { padding: 8px 16px 14px; }
  .section-head h2 { font-size: 1.35rem; }
  .tiles { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: auto; overflow: visible; }
  .brands { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; }
  .mid-banner { flex-direction: row; align-items: stretch; max-width: 1168px !important; border-radius: var(--radius-lg); overflow: hidden; margin: 24px auto; }
  .mid-banner-img { flex: 1.1; height: auto; min-height: 280px; }
  .mid-banner-text { flex: 1; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
  .mid-banner-text h2 { font-size: 1.8rem; }

  .search-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; padding: 16px 16px 0; }
  .search-layout .facets { position: sticky; top: 124px; align-self: start; max-height: calc(100vh - 140px); overflow-y: auto; padding-right: 4px; }
  .search-main .page { padding-left: 0; padding-right: 0; }
  .search-main .grid { padding: 0 0 16px; grid-template-columns: repeat(4, 1fr); }

  .breadcrumb { max-width: 1200px; margin: 0 auto; padding: 16px 16px 0; }
  body[data-page="item"] .item-layout { padding-top: 12px; }
  .item-below { max-width: 1200px; margin: 0 auto; }
  .look-section { border-radius: var(--radius-lg); }
  .look-row { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: auto; }

  .outfit-grid { grid-template-columns: repeat(6, 1fr); }
  .occasions { grid-template-columns: repeat(7, 1fr); }

  .site-footer { background: var(--bg); }
  .footer-main { grid-template-columns: repeat(3, 1fr) 1.2fr; }
  .footer-apps { align-items: flex-start; }
}

@media (min-width: 960px) {
  .app { min-height: calc(100dvh - 113px - 260px); }
}

/* =============================================================================
   v1.3 · Identidad de marca Klose, paneles profesionales y experiencia de compra
   ============================================================================= */
:root { --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; --radius-xl: 16px; }
body { font-family: var(--font); letter-spacing: .1px; }
h1, h2, h3 { letter-spacing: -.2px; }
a { color: var(--ink); }
a:hover { color: var(--ink-2); }
.price-incl { color: var(--accent); }
.protection { background: var(--accent-50); }
.protection .icon { color: var(--accent); }
.badge-sim { background: var(--ink); color: var(--bg); }
.chip.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn-outline { color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--bg-2); }
.btn-primary:hover { background: var(--brand-600); }
.section-head a, .link-btn { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tab.active { border-bottom-color: var(--brand); }
.how-icon { background: var(--bg-2); color: var(--ink); }

/* Logo (wordmark con percha) */
.logo { display: inline-flex; align-items: center; line-height: 0; flex: none; }
.logo-img { width: auto; height: 30px; }
.logo-sm .logo-img { height: 26px; }
.logo-md .logo-img { height: 34px; }
.logo-lg .logo-img { height: 72px; }
.logo-on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-on-light { display: none; }
  :root:not([data-theme="light"]) .logo-on-dark { display: block; }
}
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }
.auth-hero .logo { margin-bottom: 8px; }

/* Banners con fotografía real */
.hero-img { background: #dfe4e8 url("../demo/real/hero.jpg") 70% center / cover no-repeat; height: 220px; }
.mid-banner { background: #efe9e3; }
.mid-banner-img { background: #efe9e3 url("../demo/real/banner-compras.jpg") center / cover no-repeat; }

/* Badges App Store / Google Play + modal */
.store-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.store-badge { display: inline-flex; align-items: center; gap: 8px; height: 46px; width: auto; min-width: 150px; padding: 0 14px 0 10px;
  background: #000; color: #fff; border: 1px solid #a6a6a6; border-radius: 9px; text-align: left; cursor: pointer; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.store-badge:hover { background: #1a1a1a; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.05; }
.store-badge small { font-size: .62rem; letter-spacing: .2px; }
.store-badge b { font-size: 1.12rem; font-weight: 600; letter-spacing: -.2px; }
.store-glyph { width: 24px; height: 24px; flex: none; }
.soon { text-align: center; padding: 8px 4px 4px; }
.soon-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 12px; box-shadow: var(--shadow); }
.soon-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-2); border-radius: 20px; padding: 4px 12px; font-size: .82rem; font-weight: 600; }
.soon-tag .store-glyph { width: 16px; height: 16px; color: var(--ink); }
.soon h2 { font-size: 1.6rem; margin: 12px 0 6px; }
.app-band { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--brand); color: var(--on-brand); border-radius: var(--radius-xl); padding: 24px; margin: 8px 16px 24px; }
.app-band h2 { margin: 0 0 4px; }
.app-band p { margin: 0; opacity: .8; }

/* ---------------- Paneles ---------------- */
.pnl { display: flex; min-height: 100dvh; background: var(--bg-2); }
.pnl-side { display: none; }
.pnl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-bottom: calc(64px + var(--safe-b)); }
.pnl-head { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.pnl-head-top { display: flex; align-items: center; gap: 6px; padding: 8px 12px; min-height: 52px; }
.pnl-head-user { display: inline-flex; margin-left: 4px; }
.pnl-crumbs { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.pnl-crumbs a { color: var(--muted); }
.pnl-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.pnl-crumbs .cur { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pnl-crumbs .sep { opacity: .5; }
.pnl-head-main { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 4px 16px 14px; }
.pnl-title { font-size: 1.35rem; margin: 0; }
.pnl-subtitle { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.pnl-subtitle:empty { display: none; }
.pnl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pnl-main { padding: 16px; display: flex; flex-direction: column; gap: 16px; max-width: 1240px; width: 100%; }
.pnl-main > .list, .pnl-main > .tabs { background: var(--bg); border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; }

.pnl-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(60px + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--bg); border-top: 1px solid var(--line); }
.pnl-tabbar a, .pnl-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem;
  color: var(--muted); border: 0; background: none; position: relative; }
.pnl-tabbar .active { color: var(--ink); font-weight: 600; }
.pnl-tabbar .dot { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--danger); color: #fff; font-size: .6rem; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.pnl-drawer { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0); pointer-events: none; transition: background .2s; }
.pnl-drawer.open { background: rgba(0, 0, 0, .45); pointer-events: auto; }
.pnl-drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 320px); background: var(--bg); transform: translateX(-100%);
  transition: transform .22s ease-out; display: flex; flex-direction: column; overflow-y: auto; }
.pnl-drawer.open .pnl-drawer-panel { transform: none; }
.pnl-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 18px; }

.pnl-brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 12px; }
.pnl-area { font-size: .72rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.pnl-user { padding: 4px 12px 8px; }
.pnl-user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-lg); background: var(--bg-2); color: var(--ink); }
.pnl-user-card b { display: block; font-size: .92rem; }
.pnl-user-card small { color: var(--muted); font-size: .76rem; }
.pnl-user-card:hover { color: var(--ink); background: var(--line); }
.pnl-nav { display: flex; flex-direction: column; padding: 4px 10px; gap: 2px; }
.pnl-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 14px 10px 4px; font-weight: 600; }
.pnl-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: .93rem; }
.pnl-item .icon { width: 20px; height: 20px; }
.pnl-item:hover { background: var(--bg-2); color: var(--ink); }
.pnl-item.active { background: var(--brand); color: var(--on-brand); }
.pnl-count { background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.pnl-item.active .pnl-count { background: var(--on-brand); color: var(--brand); }
.pnl-side-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.pnl-link { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); background: none; border: 0; text-align: left; font-size: .9rem; }
.pnl-link:hover { background: var(--bg-2); color: var(--ink); }

/* Tarjetas, KPIs y tablas de panel */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.pcard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.pcard-head h2 { font-size: 1.02rem; margin: 0; }
.pcard-body { padding: 14px 16px 16px; }
.pcard-body > .list { margin: -14px -16px -16px; }
.pcard-body > .table-wrap { margin: 0 -16px -16px; }
.pgrid { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; min-width: 0; }
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.kpi-value { font-size: 1.5rem; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-note { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.kpi-dark { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.kpi-dark .kpi-label, .kpi-dark .kpi-note { color: var(--on-brand); opacity: .75; }
.kpi-danger .kpi-value { color: var(--danger); }
.kpi-ok .kpi-value { color: var(--accent); }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.todo-list li:last-child a { border-bottom: 0; }
.todo-list .todo-n { min-width: 34px; height: 34px; border-radius: 10px; background: var(--bg-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.todo-list .todo-n.hot { background: var(--brand); color: var(--on-brand); }
.int-head { display: flex; align-items: center; gap: 12px; }
.int-logo { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; flex: none; }
.int-logo.cashea { background: linear-gradient(135deg, #1b1464, #3b2bbf); }
.int-logo.zoom { background: linear-gradient(135deg, #e30613, #f15a24); }
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 12px; font-size: .88rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: .4px; }
.mode-pill.sandbox { background: var(--warn-bg); color: var(--warn); }
.mode-pill.live { background: var(--ok-bg); color: var(--ok); }
.status-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.status-strip .st { flex: 1 1 110px; background: var(--bg-2); border-radius: 10px; padding: 10px 12px; }
.status-strip .st b { display: block; font-size: 1.2rem; }
.status-strip .st span { font-size: .78rem; color: var(--muted); }
.table td .thumb-sm { width: 36px; height: 44px; border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; background: var(--bg-2); }
.table td .thumb-sm img, .table td .thumb-sm .ph { width: 100%; height: 100%; object-fit: cover; font-size: .7rem; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--bg-2); }
.store-card { display: flex; align-items: center; gap: 14px; }
.store-card .avatar { width: 56px; height: 56px; border-radius: 14px; }

/* Gráfico de columnas */
.chart { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { stroke: var(--ink-2); stroke-width: 1; opacity: .4; }
.chart-tick { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-label { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--font); }
.chart-bar { fill: var(--ink); transition: opacity .12s; }
.chart-hit { fill: transparent; }
.chart-col { outline: none; cursor: default; }
.chart-col:hover .chart-bar, .chart-col.hover .chart-bar, .chart-col:focus .chart-bar { opacity: .72; }
.chart-col:focus-visible .chart-hit { stroke: var(--ink); stroke-width: 1; }
.chart-tip { position: absolute; top: 0; transform: translate(-50%, -110%); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: 8px; padding: 6px 10px; font-size: .8rem; pointer-events: none; opacity: 0; transition: opacity .1s; white-space: nowrap; display: flex; flex-direction: column; }
.chart-tip.show { opacity: 1; }
.chart-tip b { font-size: .95rem; }
.chart-tip span { color: var(--muted); }
.chart-table { margin-top: 8px; font-size: .85rem; }
.chart-table summary { cursor: pointer; color: var(--muted); }

/* ---------------- Carrito multi-tienda y checkout ---------------- */
.co { padding: 16px; display: grid; gap: 16px; }
.co-steps { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); padding: 4px 0 2px; overflow-x: auto; }
.co-steps .stp { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.co-steps .stp b { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; }
.co-steps .stp.on { color: var(--ink); font-weight: 600; }
.co-steps .stp.on b { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.co-steps .line { flex: 1; min-width: 16px; height: 1px; background: var(--line); }
.co-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.co-block-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.co-block-head .avatar { width: 40px; height: 40px; border-radius: 10px; }
.co-block-head h3 { margin: 0; font-size: 1rem; }
.co-block-head small { color: var(--muted); }
.co-block-body { padding: 14px 16px; }
.co-item { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.co-item:last-child { border-bottom: 0; }
.co-item .thumb { width: 64px; height: 80px; border-radius: 8px; overflow: hidden; flex: none; background: var(--bg-2); }
.co-item .thumb img, .co-item .thumb .ph { width: 100%; height: 100%; object-fit: cover; }
.ship-opts { display: grid; gap: 8px; }
.ship-opt { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.ship-opt input { accent-color: var(--brand); width: 18px; height: 18px; }
.ship-opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ship-opt .grow small { display: block; color: var(--muted); }
.zoom-mark { font-weight: 800; color: #e30613; letter-spacing: -.3px; }
.cashea-mark { font-weight: 800; background: linear-gradient(135deg, #1b1464, #3b2bbf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.addr-opts { display: grid; gap: 8px; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.summary h3 { margin-bottom: 10px; }
.cashea-plan { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 12px 0; font-size: .86rem; }
.cashea-plan .row { justify-content: space-between; }
.sum-note { font-size: .78rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; }
.sum-note .icon { width: 16px; height: 16px; flex: none; color: var(--accent); }
.cart-badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; border-radius: 9px; background: var(--brand); color: var(--on-brand); font-size: .64rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* Seguimiento de pedido (stepper) */
.stepper { display: flex; align-items: flex-start; gap: 0; margin: 6px 0 2px; }
.stepper .s { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: .7rem; color: var(--muted); position: relative; }
.stepper .s::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stepper .s:first-child::before { display: none; }
.stepper .s i { width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); z-index: 1; margin-bottom: 4px; }
.stepper .s.done { color: var(--ink); }
.stepper .s.done i { background: var(--brand); border-color: var(--brand); }
.stepper .s.done::before { background: var(--brand); }
.stepper .s.cur i { box-shadow: 0 0 0 4px var(--bg-2); }
.stepper .s.alert i { background: var(--danger); border-color: var(--danger); }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; color: var(--ink); display: block; }
.order-card:hover { color: var(--ink); border-color: var(--ink-2); }
.order-card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .85rem; }
.order-card-body { display: flex; gap: 12px; padding: 12px 14px; align-items: center; }
.order-card-body .thumb { width: 64px; height: 80px; border-radius: 8px; overflow: hidden; flex: none; background: var(--bg-2); }
.order-card-body .thumb img, .order-card-body .thumb .ph { width: 100%; height: 100%; object-fit: cover; }
.order-card-foot { padding: 0 14px 12px; }
.success-hero { text-align: center; padding: 24px 16px 8px; }
.success-hero .ok-ring { width: 72px; height: 72px; border-radius: 50%; background: var(--accent-50); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.success-hero .ok-ring .icon { width: 36px; height: 36px; stroke-width: 2.5; }

@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .pgrid.two { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .hero-img { height: 460px; background-position: 65% 30%; }
  .pnl-side { display: flex; flex-direction: column; width: 264px; flex: none; background: var(--bg); border-right: 1px solid var(--line);
    position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
  .pnl-body { padding-bottom: 0; }
  .pnl-tabbar, .pnl-menu-btn { display: none; }
  .pnl-head-top { padding: 10px 24px; }
  .pnl-head-main { padding: 4px 24px 18px; }
  .pnl-title { font-size: 1.6rem; }
  .pnl-main { padding: 24px; }
  .pgrid.main-side { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); align-items: start; }
  .co { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
  .co > .co-main { display: grid; gap: 16px; }
  .co .summary { position: sticky; top: 132px; }
  body[data-page="cart"] .topbar, body[data-page="checkoutReturn"] .topbar { display: none; }
  .app-band { max-width: 1168px; margin: 8px auto 32px; padding: 32px 40px; }
}

/* v1.3 · utilidades */
.icon.flip { transform: rotate(180deg); }
.add-cart-wrap { padding: 0 16px 8px; }
.add-cart { justify-content: center; color: var(--ink-2); }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; margin: 0 auto 12px; }
.pnl-main .page { padding: 0; }
.pnl-main .section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.pnl-main > .chips { padding: 0; }
.pcard .kpis { grid-template-columns: repeat(2, 1fr); }
.pcard .kpi { background: var(--bg-2); border-color: transparent; }
.pcard .kpi-dark { background: var(--brand); }

/* =============================================================================
   v1.4 · Paridad visual con vinted.es (color, tipografía, cabecera, tarjetas,
   catálogo con filtros desplegables, ficha de producto) + botón "Instalar app"
   ============================================================================= */
:root {
  --brand: #111111; --brand-600: #333333; --brand-50: #f3f2ef; --on-brand: #ffffff;
  --accent: #111111; --accent-50: #f3f2ef;
  --ink: #171717; --ink-2: #4d4d4d; --muted: #757575; --line: #e5e5e5; --bg-2: #f2f2f2;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --brand: #f5f5f5; --brand-600: #dddddd; --brand-50: #232323; --on-brand: #111111; --accent: #f5f5f5; --accent-50: #232323; }
}
:root[data-theme="dark"] { --brand: #f5f5f5; --brand-600: #dddddd; --brand-50: #232323; --on-brand: #111111; --accent: #f5f5f5; --accent-50: #232323; }
body { font-family: var(--font); font-size: 14px; letter-spacing: 0; }
h1, h2, h3 { letter-spacing: 0; }
.btn { border-radius: 4px; font-weight: 500; }
.btn-outline { color: var(--brand); border-color: var(--brand); background: var(--bg); }
.btn-outline:hover { background: var(--brand-50); }
.btn-xs { height: 30px; padding: 0 10px; font-size: 13px; }
.section-head a, .link-btn { color: var(--brand); text-decoration: none; font-weight: 500; }
.section-head h2 { font-weight: 600; }
.how-icon { background: var(--brand-50); color: var(--brand); }
.icon.xs { width: 14px; height: 14px; }
.icon.flip-r { transform: rotate(-90deg); }

/* ---------- Cabecera (escritorio) ---------- */
.site-header .site-inner { height: 56px; gap: 16px; }
.site-header .logo-md .logo-img { height: 30px; }
.site-search { display: none; }
.vs-search { flex: 1; display: flex; align-items: stretch; height: 36px; background: var(--bg-2); border-radius: 6px; min-width: 0; }
.vs-scope { border: 0; background: transparent; padding: 0 10px; color: var(--ink-2); font-size: 14px; border-right: 1px solid #d6d6d6; margin: 6px 0; cursor: pointer; }
.vs-input { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--muted); min-width: 0; }
.vs-input input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 100%; font-size: 14px; color: var(--ink); }
.vs-cam { color: var(--brand); display: inline-flex; }
.site-actions { gap: 8px; }
.site-actions .btn-primary { margin-left: 0; }
.help-btn { color: var(--ink-2); }
.lang-btn { border: 0; background: none; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-2); padding: 0 4px; }
.cat-nav .cat-item > a { font-size: 14px; color: var(--ink-2); padding: 10px 12px; }
.cat-nav .cat-item:hover > a { color: var(--ink); border-bottom-color: var(--brand); }
.cat-smart > a { color: var(--ink-2) !important; font-weight: 400; }

/* ---------- Cabecera móvil ---------- */
.topbar.vs-topbar { border-bottom: 0; gap: 4px; }
.vs-mob-search { padding: 4px 16px 6px; }
.vs-search-mob { height: 40px; }
.vs-pills { padding: 8px 16px 12px; }
.vs-pills .chip { border-color: #ccc; color: var(--ink-2); background: var(--bg); }
.vs-pills .chip.active { background: var(--bg); color: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.mobile-menu .btn { margin-bottom: 8px; }
.mm-title { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 16px 0 6px; }
.mm-link { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }

/* ---------- Portada ---------- */
.hero-card h1 { font-weight: 400; font-size: 1.45rem; line-height: 1.3; }
.hero-link { color: var(--brand); text-decoration: none; font-weight: 500; }
.vs-wrap { max-width: 1200px; margin: 0 auto; }
.info-bar { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 6px 6px 6px 16px; font-size: 13px; color: var(--ink-2); background: var(--bg); margin: 4px 0 8px; }

/* ---------- Tarjeta de artículo (feed) ---------- */
.card-img { border-radius: 4px; }
.card .fav { background: rgba(255, 255, 255, .95); color: var(--ink-2); padding: 3px 8px; font-size: 12px; right: 8px; bottom: 8px; }
.card-body { padding-top: 8px; line-height: 1.35; }
.card-brand { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { font-size: 12.5px; color: var(--muted); }
.card .price { font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.card .price-incl { font-size: 14px; font-weight: 500; color: var(--brand); display: flex; align-items: center; gap: 2px; }
.incl-tag { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 400; }
.price-incl .icon { width: 13px; height: 13px; }

/* ---------- Catálogo con filtros desplegables ---------- */
.catalog { padding-top: 12px; }
.vs-h1 { font-size: 1.5rem; font-weight: 500; margin: 4px 0 16px; }
.vf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.vf-wrap { position: relative; }
.vf-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 14px; border: 1px solid #ccc; border-radius: 18px; background: var(--bg); color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.vf-pill:hover { border-color: var(--ink-2); }
.vf-pill.active { border-color: var(--brand); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.vf-pill.open .icon { transform: rotate(180deg); }
.vf-pop { position: absolute; top: 44px; left: 0 !important; z-index: 35; min-width: 300px; max-height: 380px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .14); padding: 6px 0; }
.vf-list { list-style: none; margin: 0; padding: 0; }
.vf-sub { list-style: none; margin: 0; padding: 0 0 0 14px; }
.vf-opt { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--ink); cursor: pointer; font-size: 14px; }
.vf-opt:hover { background: var(--bg-2); }
.vf-opt.on { color: var(--brand); font-weight: 600; }
.vf-opt small { color: var(--muted); }
.vf-opt input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.vf-price { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px; }
.vf-price label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.vf-price input { height: 38px; border: 1px solid #ccc; border-radius: 4px; padding: 0 10px; background: var(--surface); }
.vf-price .btn { grid-column: 1 / -1; }
.vf-smart { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 18px; color: var(--brand); font-size: 14px; border: 1px dashed var(--brand); }
.vf-active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 0 0; }
.vf-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border-radius: 16px; border: 1px solid #ccc; background: var(--bg-2); color: var(--ink); font-size: 14px; }
.vs-sublinks { columns: 2; column-gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.vs-sublinks a { display: block; color: var(--brand); font-size: 14px; line-height: 26px; }
.vs-sublinks a.on { font-weight: 700; }
.vs-count { display: flex; justify-content: space-between; align-items: center; padding: 16px 0 8px; font-size: 14px; color: var(--ink-2); }
.vs-count .muted { display: inline-flex; align-items: center; gap: 4px; }
.vs-results .grid { padding-left: 0; padding-right: 0; }

/* ---------- Ficha de producto ---------- */
.vi-layout { display: block; padding: 0 0 16px; }
.vi-gallery { position: relative; display: grid; grid-template-columns: 1fr; gap: 4px; }
.vi-gallery.multi { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.vi-ph { border: 0; padding: 0; background: var(--bg-2); overflow: hidden; cursor: zoom-in; display: block; }
.vi-ph img, .vi-ph .ph { width: 100%; height: 100%; object-fit: cover; }
.vi-gallery .vi-ph.main { aspect-ratio: 4 / 5; }
.vi-gallery.multi .vi-ph.main { grid-row: 1 / 3; }
.vi-gallery:not(.multi) .vi-ph.main img { object-fit: contain; }
.vi-fav { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .95); color: var(--ink-2); border-radius: 16px; padding: 4px 10px; font-size: 13px; }
.vi-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 16px; font-size: 14px; color: var(--muted); }
.vi-crumbs a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.vi-crumbs .cur { color: var(--muted); }
.vi-right { display: grid; gap: 12px; padding: 0 12px; }
.vi-box { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
.vi-title { font-size: 1.15rem; font-weight: 500; margin: 0 0 2px; line-height: 1.35; }
.vi-sub { font-size: 14px; color: var(--ink-2); }
.vi-link { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.vi-price { font-size: 14px; color: var(--muted); margin-top: 14px; }
.vi-incl { font-size: 1.35rem; font-weight: 600; color: var(--brand); line-height: 1.2; }
.vi-incl-note { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--brand); }
.vi-state { margin-top: 10px; font-size: 13px; color: var(--danger); }
.vi-state.ok { color: var(--ink-2); }
.vi-details { display: grid; grid-template-columns: 42% 1fr; gap: 8px 12px; margin: 16px 0 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.vi-details dt { color: var(--muted); }
.vi-details dd { margin: 0; }
.vi-details dd .vi-link { text-decoration: none; }
.vi-desc { font-size: 14px; color: var(--ink-2); white-space: pre-wrap; margin: 14px 0; }
.vi-ship { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.vi-cta { display: grid; gap: 8px; margin-top: 4px; }
.vi-cta .btn { height: 44px; }
.vi-safe { display: flex; gap: 12px; align-items: flex-start; }
.vi-safe-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.vi-safe b { display: block; font-size: 15px; font-weight: 600; }
.vi-safe p { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 6px; }
.vi-seller { padding: 0 16px; }
.vi-seller-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.vi-seller-row:last-child { border-bottom: 0; }
.vi-seller-row b { font-weight: 600; font-size: 15px; }
.vi-legal { font-size: 12px; color: var(--muted); line-height: 1.6; padding: 0 4px; }
.vi-legal a { color: var(--muted); text-decoration: underline; }
.vi-cta-mob { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 8px; padding: 10px 16px calc(10px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line); }
.vi-cta-mob .btn { height: 44px; }
body[data-page="item"] .bottom-nav { display: none; }
body[data-page="item"] .main { padding-bottom: 90px; }
.viewer-img { aspect-ratio: 4 / 5; background: var(--bg-2); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.viewer-img img, .viewer-img .ph { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Botón flotante "Instalar app" ---------- */
.install-fab { position: fixed; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 45; display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 30px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); padding: 4px; animation: fab-in .3s ease-out; }
@keyframes fab-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.install-main { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 6px 4px 4px; color: var(--ink); text-align: left; cursor: pointer; }
.install-main img { width: 40px; height: 40px; border-radius: 10px; }
.install-text { display: flex; flex-direction: column; line-height: 1.2; }
.install-text b { font-size: 14px; }
.install-text small { font-size: 11.5px; color: var(--muted); }
.install-main .icon { color: var(--brand); margin-left: 4px; }
.install-close { border: 0; background: var(--bg-2); color: var(--ink-2); width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-right: 4px; cursor: pointer; }
body[data-page="item"] .install-fab { bottom: calc(80px + var(--safe-b)); }
.ins-help { text-align: center; }
.ins-steps { list-style: none; padding: 0; margin: 16px 0; text-align: left; display: grid; gap: 12px; }
.ins-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.ins-steps .icon { vertical-align: middle; color: var(--brand); }
.ins-n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; font-size: 13px; }

@media (min-width: 640px) {
  .vs-sublinks { columns: 3; }
}

@media (min-width: 960px) {
  .hero-img { height: 520px; }
  .hero-card { width: 340px; padding: 24px; border-radius: 4px; box-shadow: none; }
  .vs-wrap.page { padding-left: 16px; padding-right: 16px; }
  .catalog .grid, .vs-results .grid { grid-template-columns: repeat(5, 1fr); gap: 24px 16px; }
  .vs-sublinks { columns: 4; }
  .vi-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; max-width: 1200px; margin: 0 auto; padding: 24px 16px; align-items: start; }
  .vi-crumbs { padding: 12px 0 0; }
  .vi-right { padding: 0; position: sticky; top: 112px; }
  .vi-gallery .vi-ph.main { aspect-ratio: auto; min-height: 560px; max-height: 640px; }
  .vi-gallery:not(.multi) .vi-ph.main { height: 620px; }
  .vi-cta-mob { display: none; }
  body[data-page="item"] .main { padding-bottom: 32px; }
  .install-fab { display: none; bottom: 24px; right: 24px; }
  body.can-install .install-fab { display: flex; }
}
.vi-seller .avatar { width: 48px; height: 48px; font-size: 1.1rem; }
body[data-page="item"] .install-fab { display: none; }
.vi-member-sec { padding-top: 8px; }
.vi-member-sec .section-head { padding-left: 16px; padding-right: 16px; }
@media (min-width: 960px) { .vi-member-sec .section-head { padding-left: 0; padding-right: 0; } .vi-member { grid-template-columns: repeat(4, 1fr) !important; padding: 0 !important; gap: 20px 12px !important; } body[data-page="item"].can-install .install-fab { display: flex; } }

/* v1.5 · Página de categoría idéntica a vinted.es/catalog */
body[data-page="search"] .vs-pills { display: none; }
.vc-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); padding: 6px 0 8px; }
.vc-crumbs a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.vc-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vc-titlebar .vs-h1 { margin: 0 0 14px; font-size: 1.45rem; font-weight: 500; }
.desk-flex { display: none !important; }
.desk-inline { display: none; }
.vf-mobile { margin-bottom: 14px; gap: 6px; }
.vf-active { justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.vf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-clear { color: var(--brand); font-size: 13px; font-weight: 500; white-space: nowrap; padding-top: 8px; }
.vf-chip { background: var(--bg-2); border-color: var(--bg-2); }
.vs-sublinks { columns: 2; column-gap: 24px; padding: 14px 4px; }
.vs-sublinks a { font-size: 13px; line-height: 25px; }
.vs-count { padding: 18px 0 14px; }
.vc-help { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.vc-help .icon { width: 24px; height: 24px; }
.vf-sheet { display: grid; }
.vf-sec { border-bottom: 1px solid var(--line); }
.vf-sec summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 2px; font-weight: 600; cursor: pointer; }
.vf-sec summary::-webkit-details-marker { display: none; }
.vf-sec summary::after { content: "›"; transform: rotate(90deg); color: var(--muted); font-size: 18px; }
.vf-sec[open] summary::after { transform: rotate(-90deg); }
.vf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-left: 8px; margin-right: auto; }
.vf-sec .vf-opt { padding: 10px 2px; }
.vf-sec .vf-price { padding: 4px 0 14px; }

/* Tienda destacada (bloque de vendedor "Pro") */
.vc-featured { grid-column: 1 / -1; padding: 8px 0 4px; }
.vc-feat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 12px; }
.vc-feat-user { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.vc-feat-user .avatar { width: 48px; height: 48px; }
.vc-feat-user b { font-size: 16px; font-weight: 600; }
.vc-pro { font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; }
.vc-feat-row { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 10px; overflow-x: auto; scrollbar-width: none; background: var(--bg-2); padding: 12px; border-radius: 4px; }
.vc-feat-row::-webkit-scrollbar { display: none; }

@media (min-width: 640px) {
  .vs-sublinks { columns: 3; }
  .vc-feat-row { grid-auto-columns: 30%; }
}
@media (min-width: 960px) {
  .desk-flex { display: flex !important; }
  .desk-inline { display: inline; }
  .vf-mobile { display: none; }
  .vc-titlebar .vs-h1 { margin-bottom: 18px; }
  .vf-row { padding-bottom: 16px; }
  .vs-sublinks { columns: 4; }
  .vc-feat-row { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); grid-auto-columns: auto; overflow: visible; padding: 16px; }
}

/* v1.6 · Categorías y marcas populares como etiquetas de texto (vinted.es) */
.tag-boxes { display: grid; gap: 16px; padding: 8px 16px 24px; }
.tag-box { border: 1px solid var(--line); border-radius: 4px; padding: 24px; background: var(--bg); }
.tag-box h2 { font-size: 1.25rem; font-weight: 500; margin: 0 0 18px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 4px; padding: 9px 9px; font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.2; }
.tag:hover { border-color: var(--ink-2); color: var(--ink); }
.tag-sep { color: var(--brand); font-weight: 600; }
@media (min-width: 960px) { .tag-boxes { grid-template-columns: 1fr 1fr; gap: 24px; padding: 16px 16px 32px; } .tag-box { padding: 32px; } }
