/* San Barber seller catalog: shared styles. Tokens live in tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, select, label { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.display { font-family: var(--font-display); font-weight: 800; }
.muted { color: var(--muted); }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: 0.5px; }
.caption { font-size: 12px; color: var(--muted); }
.icon { flex-shrink: 0; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 16px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none; text-align: center;
}
.btn:hover { color: var(--text); }
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-outline { border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--muted); }
.btn-ok { background: var(--ok-bg); color: var(--ok); font-weight: 700; border: 0; }
.btn-ok:hover { color: var(--ok); filter: brightness(1.15); }
.btn-wa { background: var(--wa); color: var(--on-wa); font-weight: 700; font-size: 16px; border: 0; }
.btn-wa:hover { color: var(--on-wa); filter: brightness(1.05); }
.btn-link { color: var(--accent); font-weight: 600; }
.btn-link:hover { color: var(--accent-hover); }
.btn-lg { min-height: 56px; border-radius: var(--r-btn); font-size: 16px; width: 100%; }
.btn-md { min-height: 52px; border-radius: var(--r-btn); font-size: 15px; width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; border-radius: var(--r-sm); font-size: 13px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--line); color: var(--disabled); border-color: var(--line); filter: none;
}
.icon-btn {
  width: var(--tap); height: var(--tap); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-input); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--text); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Inputs --------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; }
.field-hint { font-size: 12px; color: var(--muted); }
.input, .select {
  height: var(--tap); width: 100%; border-radius: var(--r-input);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 0 12px; font-size: 14px;
}
.input::placeholder { color: var(--disabled); }
.input:focus, .select:focus { border-color: var(--line-strong); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.search {
  display: flex; align-items: center; gap: 8px; height: var(--tap);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input);
  padding: 0 12px; color: var(--muted);
}
.search:focus-within { border-color: var(--line-strong); }
.search input {
  flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: none;
  color: var(--text); font-size: 14px;
}
.search input::placeholder { color: var(--disabled); }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }

/* --- Banners, badges, toasts --------------------------------------------- */
.banner {
  border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.45;
  display: flex; flex-direction: column; gap: 8px;
}
.banner-bad { background: var(--bad-bg); color: var(--bad); }
.banner-warn { background: var(--warn-bg); color: var(--warn); }
.banner ul { margin: 0; padding-left: 18px; }
.badge {
  display: inline-flex; align-items: center; align-self: flex-start;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--line); color: var(--muted); white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-accent { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 60; max-width: calc(100% - 32px);
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px;
  padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.toast.is-bad { background: var(--bad-bg); color: var(--bad); }

/* --- Empty, error and skeleton states ----------------------------------- */
.state {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 40px 12px; text-align: center; color: var(--muted); font-size: 14px;
  line-height: 1.5;
}
.state strong { color: var(--text); font-size: 16px; }
.skeleton { background: var(--surface-2); border-radius: 8px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* --- Phone page shell --------------------------------------------------- */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; }
.narrow { width: 100%; max-width: 560px; margin: 0 auto; }
.head-line { border-bottom: 1px solid var(--line-soft); }
.topbar { padding: 20px var(--pad) 12px; display: flex; flex-direction: column; gap: 14px; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head {
  padding: 20px var(--pad); display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.page-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.page-sub { font-size: 12px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* --- Catalog (S1) ------------------------------------------------------- */
/* Header: brand + web store + order icon; seller line; search and chips stick. */
.cat-top { padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 14px; }
.brand-row { display: flex; align-items: center; gap: 8px; }
.brand-row .wordmark { margin-right: auto; }
.seller-hero { display: flex; align-items: center; gap: 12px; min-width: 0; }
.seller-hero .stack { gap: 0; min-width: 0; }
.seller-hero .who {
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%;
  font-size: 28px; line-height: 1.05; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.online { display: inline-flex; align-items: center; gap: 6px; }
.online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--wa); }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 24px;
}
.avatar-sm { width: 36px; height: 36px; font-size: 16px; background: var(--tab-on); color: var(--text); }
.web-link {
  font-size: 12px; font-weight: 600; text-decoration: none; color: var(--text);
  border: 1px solid var(--line-strong); padding: 0 12px; border-radius: var(--r-pill);
  min-height: 36px; display: inline-flex; align-items: center; white-space: nowrap; position: relative;
}
.web-link::after { content: ""; position: absolute; inset: -4px 0; }
.web-link:hover { color: var(--text); border-color: var(--muted); }
.cart-icon {
  position: relative; width: 44px; height: 44px; border-radius: 22px; flex-shrink: 0;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-icon .n {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--accent); color: var(--on-accent); border: 2px solid var(--bg);
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}

.cat-sticky {
  position: sticky; top: 0; z-index: 15; background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.cat-tools { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.chips {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -12px; padding: 0 12px;
  overscroll-behavior-x: contain; min-height: 36px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); position: relative;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip::after { content: ""; position: absolute; inset: -4px 0; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-outline { background: transparent; border-color: var(--line-strong); }
.chip-outline[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip-select select {
  position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px;
}
.chip-select:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Section heads */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 22px 12px 10px; }
.sec-title { font-family: var(--font-display); font-weight: 800; font-stretch: 82%; font-size: 22px; line-height: 1.1; }
.sec-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-link {
  background: transparent; border: 0; color: var(--accent); font-size: 13px; font-weight: 600;
  min-height: 36px; padding: 0; position: relative;
}
.sec-link::after { content: ""; position: absolute; inset: -4px; }
.results-head { padding: 22px 12px 4px; display: flex; flex-direction: column; gap: 10px; }
.results-head .sec-head { padding: 0; }
.filters-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 2px; }

/* Grid: always 3 per row; the catalog is a phone-width column on every screen (Javier, 2026-11-12). */
.grid {
  padding: 10px 12px 120px; display: grid; gap: 8px; align-content: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 600px) {
  .cat-top, .cat-tools, .grid, .sec-head, .results-head { padding-left: var(--pad); padding-right: var(--pad); }
}

/* Card: soft surface holding a white photo tile, name and price. */
.card {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px;
}
.card-media { position: relative; aspect-ratio: 1; border-radius: 10px; background: #fff; overflow: hidden; }
.card-open {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent;
  border-radius: inherit;
}
.card-open:focus-visible { outline-offset: -2px; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 7%; }
.card-media .no-photo {
  display: flex; height: 100%; align-items: center; justify-content: center;
  font-size: 11px; color: #71717A; text-align: center; padding: 8px;
}
.card.is-out .card-media img { opacity: 0.38; filter: grayscale(1); }
.tag {
  position: absolute; top: 6px; left: 6px; z-index: 1; pointer-events: none;
  font-size: 10px; font-weight: 800; letter-spacing: 0.3px; padding: 3px 7px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent);
}
.tag.is-out { background: #18181B; color: #F4F4F5; }
.card-body { display: flex; flex-direction: column; gap: 3px; padding: 2px 5px 6px; cursor: pointer; }
.card-title {
  font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(12px * 1.3 * 2); overflow-wrap: anywhere;
}
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 5px; }
.price {
  font-family: var(--font-display); font-weight: 800; font-stretch: 78%;
  font-size: 17px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text);
}
.card.is-out .price { color: var(--muted); }
.price-from { font-size: 10px; color: var(--muted); font-weight: 600; }
.price-old { font-size: 11px; color: var(--muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }

/* Add control on the photo: "+" button, then a gold "− n +" counter. */
.card-ctl { position: absolute; right: 5px; bottom: 5px; z-index: 2; }
.add-fab {
  width: 34px; height: 34px; border-radius: 17px; border: 0; position: relative;
  background: #111; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 16px;
  transition: background-color 150ms ease, color 150ms ease;
}
.add-fab::after { content: ""; position: absolute; inset: -5px; }
.add-fab.in-cart { background: var(--accent); color: var(--on-accent); }
.qty-pill {
  display: flex; align-items: center; height: 34px; border-radius: 17px;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.qty-pill button {
  width: 30px; height: 34px; border: 0; background: transparent; color: inherit;
  font-size: 18px; font-weight: 700; position: relative; padding: 0;
}
.qty-pill button::after { content: ""; position: absolute; inset: -5px 0; }
.qty-pill .n {
  min-width: 16px; text-align: center; font-variant-numeric: tabular-nums;
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 16px;
}
.more-row { grid-column: 1 / -1; display: flex; justify-content: center; padding-top: 8px; }
.skeleton-card { aspect-ratio: 0.7; border-radius: 14px; }

/* Product sheet */
.sheet { max-height: 92vh; overflow: auto; }
.sheet-media {
  aspect-ratio: 1; max-height: 40vh; margin: 0 auto; width: 100%;
  background: #fff; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.sheet-media img { width: 100%; height: 100%; object-fit: contain; padding: 5%; }
.sheet-title { font-size: 16px; font-weight: 600; line-height: 1.35; }
.sheet-price .price { font-size: 30px; }
.sheet-price .price-old { font-size: 14px; }
.sheet-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.option[aria-pressed="true"] { border-color: var(--accent); background: var(--surface-2); }

/* Order bar: last product photo, count + total, and the gold "Ver pedido". */
.cart-bar {
  position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 20;
  max-width: 560px; margin: 0 auto;
  animation: rise 200ms ease-out;
}
.cart-bar .bar {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); text-align: left;
}
.bar-thumb {
  width: 46px; height: 46px; border-radius: 12px; background: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.bar-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.bar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bar-info .lbl { font-size: 12px; color: var(--muted); }
.bar-info .total {
  font-family: var(--font-display); font-weight: 800; font-stretch: 78%; font-size: 22px; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.bar-go {
  min-height: 46px; padding: 0 16px; border-radius: 13px; flex-shrink: 0;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Order ticket (sent view): the order code as a torn-off stub. */
.ticket {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px;
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
}
.ticket::before { left: -10px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -10px; clip-path: inset(0 50% 0 0); }
.ticket .lbl { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.ticket .code {
  font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 30px;
  letter-spacing: 0.5px; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums;
}
.ticket .for { text-align: right; font-size: 12px; color: var(--muted); }
.ticket .for b { display: block; color: var(--text); font-size: 14px; }

/* Cart (S1) */
.list { padding: 16px var(--pad); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.line {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.line.is-bad { border-color: var(--bad); }
.thumb {
  width: 56px; height: 56px; border-radius: var(--r-sm); background: var(--surface-2);
  flex-shrink: 0; object-fit: cover; overflow: hidden;
}
img.thumb { background: #fff; object-fit: contain; }
.line-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line-title { font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.line-sub { font-size: 13px; color: var(--muted); }
.line-warn { font-size: 12px; color: var(--bad); font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.stepper button {
  width: var(--tap); height: var(--tap); border-radius: var(--r-input);
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 18px;
}
.stepper output, .stepper .qty { min-width: 22px; text-align: center; font-weight: 700; }
.total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 4px 0; border-top: 1px solid var(--line-soft); margin-top: 6px;
}
.total-row .label { font-size: 14px; color: var(--muted); }
.total-row .amount { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.footer-bar {
  padding: 12px var(--pad) 20px; display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--line-soft); background: var(--bg);
  position: sticky; bottom: 0;
}

/* Sent (S1) */
.sent { padding: 28px var(--pad) 20px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.headline { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.15; }
.lead { font-size: 14px; color: var(--muted); line-height: 1.5; }
.chat {
  background: var(--wa-chat); border: 1px solid var(--wa-chat-line); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column;
}
.bubble {
  align-self: flex-end; max-width: 88%; background: var(--wa-bubble); color: var(--wa-text);
  border-radius: 12px 12px 2px 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45;
  white-space: pre-line; overflow-wrap: anywhere;
}
.actions-end { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* Variant sheet and modals (native <dialog>) */
dialog {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 0; border-radius: 16px; max-width: min(480px, calc(100% - 32px));
  width: 100%;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
.sheet {
  margin: auto auto 0; max-width: 560px; width: 100%;
  border-radius: 16px 16px 0 0; border-bottom: 0;
}
.dialog-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.25; }
.options { display: flex; flex-direction: column; gap: 8px; }
.option {
  min-height: var(--tap); padding: 10px 14px; border-radius: var(--r-input);
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
  font-weight: 600;
}
.option:hover:not(:disabled) { border-color: var(--accent); }
.option:disabled { color: var(--disabled); border-color: var(--line); }
.option .opt-price { font-family: var(--font-display); font-weight: 800; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* --- Login (S2) ----------------------------------------------------------- */
.auth {
  width: 100%; max-width: 420px; margin: 0 auto; padding: 48px var(--pad) 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.auth form { display: flex; flex-direction: column; gap: 16px; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 52px; }
.password-wrap .icon-btn {
  position: absolute; right: 0; top: 0; border: 0; background: transparent; color: var(--muted);
}

/* --- Seller panel (S3) ---------------------------------------------------- */
.panel-head { padding: 20px var(--pad) 0; display: flex; flex-direction: column; gap: 16px; }
.hello { display: flex; flex-direction: column; gap: 2px; }
.hello .name { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-summary);
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
}
.summary .label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; }
.summary .figure { font-family: var(--font-display); font-weight: 800; font-size: 36px; color: var(--accent); line-height: 1.1; }
.summary .detail { font-size: 13px; color: var(--muted); }
.row-actions { display: flex; gap: 8px; }
.row-actions .btn-primary { flex: 1; min-height: 48px; }
.row-actions .btn-outline { min-height: 48px; }
.catalog-link { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tabs { display: flex; gap: 6px; background: var(--surface); border-radius: 12px; padding: 4px; }
.tab {
  flex: 1 1 0; min-height: 40px; border: 0; border-radius: 9px; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--muted); padding: 0 4px;
}
.tab[aria-selected="true"] { background: var(--tab-on); color: var(--text); }
.orders { padding: 12px var(--pad) 20px; display: flex; flex-direction: column; gap: 10px; }
.order {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-code { font-weight: 700; font-size: 14px; }
.order-total { font-family: var(--font-display); font-weight: 800; font-size: 18px; white-space: nowrap; }
.order-items { font-size: 13px; color: var(--text-2); line-height: 1.4; overflow-wrap: anywhere; }
.order-actions { display: flex; gap: 8px; }
.order-actions .btn-ok { flex: 1; }
.order-skeleton { height: 132px; border-radius: var(--r-card); }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.products-section {
  padding: 8px var(--pad) 40px; display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 24px;
}
.vis-row {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.vis-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--surface); border-radius: 10px; padding: 3px; }
.segmented button {
  min-height: 38px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 600;
}
.segmented button[aria-pressed="true"] { background: var(--tab-on); color: var(--text); }
.segmented button[data-v="hidden"][aria-pressed="true"] { background: var(--line-strong); }
.segmented button[data-v="sold_out"][aria-pressed="true"] { background: var(--bad-bg); color: var(--bad); }

/* --- Manual sale (S4) ----------------------------------------------------- */
.form-main { padding: 16px var(--pad); display: flex; flex-direction: column; gap: 16px; flex: 1; }
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid #1F1F23;
}
.pick-row .info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-row .name { font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.pick-row .sub { font-size: 12px; color: var(--muted); }
.pick-row.is-selected .name { color: var(--accent-hover); }
.pick-row .stepper button { background: var(--surface); }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 8px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; width: 100%;
}
.switch-row .stack .t { font-size: 14px; font-weight: 600; }
.track {
  width: 48px; height: 28px; border-radius: 14px; flex-shrink: 0; position: relative;
  background: var(--line-strong); transition: background-color 150ms ease;
}
.track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 11px; background: #fff; transition: left 150ms ease;
}
.switch-row[aria-checked="true"] .track { background: var(--switch-on); }
.switch-row[aria-checked="true"] .track::after { left: 23px; }
.success { padding: 28px var(--pad) 20px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.check-circle {
  width: 56px; height: 56px; border-radius: 28px; background: var(--ok-bg); color: var(--ok);
  display: flex; align-items: center; justify-content: center;
}
.success .text { font-size: 15px; color: var(--text-2); line-height: 1.5; }

/* --- Admin (S5) ----------------------------------------------------------- */
.admin-top { border-bottom: 1px solid var(--line-soft); }
.admin-top .wrap {
  padding: 18px var(--pad); display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
}
.brand-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand-line .wordmark { font-size: 20px; }
.brand-line .sub { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 0 14px; min-height: var(--tap); display: inline-flex; align-items: center; border-radius: var(--r-sm);
}
.nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav a:hover { color: var(--text); }
.admin-main { padding: 28px var(--pad) 48px; display: flex; flex-direction: column; gap: 28px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.admin-head h1 { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.15; }
.admin-head .sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.control { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.control .select { min-width: 160px; }
.control .input-rate { width: 100px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.seller-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-summary);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.seller-card.is-off { opacity: 0.6; }
.seller-card .who { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.seller-card .big { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--accent); line-height: 1.1; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; color: var(--muted); }
.kpis div { display: flex; flex-direction: column; gap: 2px; }
.kpis b { color: var(--text); font-weight: 600; font-size: 14px; }
.totals-line { font-size: 14px; color: var(--muted); }
.totals-line b { color: var(--text); }
.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters .select, .filters .search { height: 40px; width: auto; font-size: 13px; }
.filters .search { min-width: 240px; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.orders-table { min-width: 860px; }
.products-table { min-width: 780px; }
th {
  background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600;
  text-align: left; padding: 12px 16px; white-space: nowrap;
}
td { padding: 12px 16px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
td.num, th.num { text-align: right; }
td.dim { color: var(--muted); }
td.strong { font-weight: 600; }
td.nowrap { white-space: nowrap; }
td .small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cell-input { height: 36px; width: 110px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 10px; font-size: 13px; }
.cell-select { height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 10px; font-size: 13px; }
.price-cell { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.panel-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.secret {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 14px;
}
.secret code { font-size: 16px; font-weight: 700; letter-spacing: 0.5px; color: var(--text); }
.sellers-list { display: flex; flex-direction: column; }
.seller-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-top: 1px solid var(--line-soft);
}
.seller-row .stack .t { font-weight: 700; }
.seller-row .row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pager { display: flex; justify-content: center; gap: 8px; padding-top: 4px; }

@media (max-width: 600px) {
  .admin-head h1 { font-size: 24px; }
  .brand-line .sub { border-left: 0; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.total-row.flat { border-top: 0; padding-top: 0; margin-top: 0; }

/* --- Typography refinements (2026-11-12) -------------------------------------
   Money and names use condensed Archivo, like a price ticket on the counter. */
.wordmark { letter-spacing: 1px; }
.price, .order-total, .total-row .amount, .summary .figure, .seller-card .big,
.option .opt-price, .kpis b, td.num { font-variant-numeric: tabular-nums; }
.total-row .amount { font-stretch: 78%; font-size: 28px; }
.option .opt-price { font-stretch: 80%; font-size: 16px; }
.hello .name { font-stretch: 80%; font-size: 28px; line-height: 1.05; }
.summary { gap: 4px; padding: 18px 18px 16px; }
.summary .figure { font-stretch: 75%; font-size: 48px; line-height: 1; margin: 2px 0 4px; }
.order-total { font-stretch: 78%; font-size: 21px; }
.order-code { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 17px; letter-spacing: 0.3px; }
.headline { font-stretch: 85%; }
.ticket + .stack .headline { font-size: 24px; }
.auth .wordmark { font-size: 26px; }
.auth .page-title { font-size: 24px; font-stretch: 85%; }
.admin-head h1 { font-stretch: 82%; font-size: 34px; }
.seller-card .big { font-stretch: 75%; font-size: 38px; line-height: 1; }
.section-title { font-stretch: 85%; }
@media (max-width: 600px) { .admin-head h1 { font-size: 28px; } }
.skel-line { display: inline-block; width: 90%; height: 0.9em; border-radius: 4px; vertical-align: middle; }
.skel-line.short { width: 55%; }

/* --- Light theme adjustments (Javier, 2026-11-12) ---------------------------
   Gold stays as a fill; gold text and focus rings use --accent-ink for contrast. */
a, .btn-link, .sec-link, .eyebrow { color: var(--accent-ink); }
a:hover, .btn-link:hover { color: var(--text); }
:focus-visible { outline-color: var(--accent-ink); }
.chip-select:focus-within { outline-color: var(--accent-ink); }
.web-link, .web-link:hover { color: var(--text); }
.btn-outline, .btn-outline:hover { color: var(--text); }
.btn-primary:hover { background: var(--accent-hover); }
.search input::-webkit-search-cancel-button { filter: none; }
.toast { box-shadow: var(--shadow-lg); }
dialog { box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(18, 18, 20, 0.45); }
.badge { background: var(--surface-2); }
.avatar-sm { background: var(--surface-2); }

/* Catalog */
.head-line, .cat-sticky { background: var(--bg); }
.search { background: var(--surface); box-shadow: var(--shadow-sm); }
.chip { box-shadow: var(--shadow-sm); }
.chip-outline { background: var(--surface); box-shadow: none; }
.card { box-shadow: var(--shadow-sm); }
.card-media { background: #fff; }
.add-fab { box-shadow: 0 2px 8px rgba(18, 18, 20, 0.22); }
.qty-pill { box-shadow: 0 2px 8px rgba(18, 18, 20, 0.18); }
.cart-bar .bar { box-shadow: var(--shadow-lg); border-color: var(--line); }
.cart-icon { background: var(--surface); border-color: var(--line); }
.ticket { box-shadow: var(--shadow-sm); }
.ticket .code { color: var(--accent-ink); }
.option[aria-pressed="true"] { border-color: var(--accent-ink); background: #FFF8EA; }
.option:hover:not(:disabled) { border-color: var(--accent-ink); }
.line, .order, .summary, .seller-card, .panel-box, .switch-row { box-shadow: var(--shadow-sm); }
.stepper button { background: var(--surface); }

/* Panels */
.summary .figure, .seller-card .big { color: var(--accent-ink); }
.tabs { background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--surface); box-shadow: var(--shadow-sm); }
.segmented { background: var(--surface-2); }
.segmented button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-sm); }
.segmented button[data-v="hidden"][aria-pressed="true"] { background: var(--text); color: var(--surface); }
.pick-row { border-bottom-color: var(--line-soft); }
.pick-row.is-selected .name { color: var(--accent-ink); }
.track::after { box-shadow: 0 1px 2px rgba(18, 18, 20, 0.25); }
.secret code { color: var(--text); }

/* Admin */
.admin-top { background: var(--surface); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.table-box { background: var(--surface); box-shadow: var(--shadow-sm); }
th { background: var(--surface-2); }
.cell-input, .cell-select { background: var(--surface); }

/* --- Catalog: phone column, sections by category and brands (2026-11-12) --- */
.catalog-page .wrap { max-width: 640px; }
.catalog-page .cart-bar { max-width: 620px; }
@media (min-width: 640px) {
  .catalog-page { background: var(--surface-2); }
  .catalog-page #view-catalog, .catalog-page #view-cart, .catalog-page #view-sent, .catalog-page #view-down {
    width: 100%; max-width: 640px; margin: 0 auto; background: var(--bg);
    box-shadow: 0 0 0 1px var(--line);
  }
  .catalog-page .cat-sticky, .catalog-page .footer-bar { background: var(--bg); }
}
#overview { padding-bottom: 110px; }
.ov-section .grid { padding-top: 0; padding-bottom: 4px; }
.ov-section .sec-head { padding-bottom: 10px; }
.ov-section .sec-head .stack { gap: 1px; }
.sec-link { display: inline-flex; align-items: center; gap: 4px; }
.sec-skel { width: 140px; height: 22px; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  background: transparent; border: 0; padding: 0; min-height: 32px; position: relative;
  color: var(--accent-ink); font-size: 13px; font-weight: 600;
}
.back-link::after { content: ""; position: absolute; inset: -6px -4px; }
.results-head .sec-head { align-items: flex-end; }
.card-brand {
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 13px;
}

/* Brand chip and brand strip */
.chip-brand { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip-brand[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-brand .chev { font-size: 10px; margin-left: 2px; }
.brand-rail {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 12px 2px;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain;
}
.brand-rail::-webkit-scrollbar { display: none; }
.brand-tile {
  flex: 0 0 auto; min-width: 116px; min-height: 64px; padding: 10px 14px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
  text-align: left; color: var(--text);
}
.brand-tile.skeleton { border: 0; box-shadow: none; }
.bt-name {
  font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 17px; line-height: 1.1;
  letter-spacing: 0.3px; white-space: nowrap;
}
.bt-count { font-size: 11px; color: var(--muted); }
.brand-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.brand-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 600; text-align: left;
}
.brand-item[aria-pressed="true"] { border-color: var(--accent-ink); background: #FFF8EA; }
.bi-count { font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- Admin on phones: compact header, scrolling tabs, tables as cards ------- */
@media (max-width: 720px) {
  .admin-top .wrap { padding: 12px 16px 0; gap: 8px; flex-direction: column; align-items: stretch; }
  .brand-line { gap: 2px 12px; }
  .brand-line .sub { border-left: 0; padding-left: 0; font-size: 12px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 10px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex-shrink: 0; }
  .nav .icon-btn { margin-left: auto; }
  .admin-main { padding: 20px 16px 48px; gap: 22px; }
  .admin-head h1 { font-size: 28px; }
  .controls { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .control .select, .control .input-rate { width: 100%; min-width: 0; }
  #export { grid-column: 1 / -1; min-height: 48px; }
  .cards { grid-template-columns: 1fr; }
  .filters { width: 100%; }
  .filters .select, .filters .search { flex: 1 1 150px; min-width: 0; width: auto; }

  .table-box { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .orders-table, .products-table { min-width: 0; }
  .table-box table, .table-box tbody, .table-box tr, .table-box td { display: block; }
  .table-box thead { display: none; }
  .table-box tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
  }
  .table-box td { padding: 0; border: 0; }

  .orders-table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px;
    grid-template-areas: "code total" "date date" "seller source" "items items" "status action";
  }
  .c-code { grid-area: code; font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 18px; }
  .c-total { grid-area: total; font-family: var(--font-display); font-weight: 800; font-stretch: 78%; font-size: 20px; }
  .c-date { grid-area: date; font-size: 12px; }
  .c-date .small { display: inline; margin-left: 6px; }
  .c-seller { grid-area: seller; font-size: 13px; font-weight: 600; }
  .c-source { grid-area: source; font-size: 12px; text-align: right; }
  .c-items { grid-area: items; font-size: 13px; color: var(--text-2); padding: 6px 0 4px !important; }
  .c-status { grid-area: status; align-self: center; }
  .c-action { grid-area: action; text-align: right; }

  .products-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .products-table tr.is-variant { margin-top: -4px; }
  .p-name { grid-column: 1 / -1; font-size: 14px; }
  .products-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    font-size: 11px; font-weight: 600; color: var(--muted);
  }
  .products-table td.num { text-align: left; }
  .p-novis { display: none !important; }
  .cell-input, .cell-select { width: 100%; height: 40px; }
  .price-cell { width: 100%; }

  .form-grid { grid-template-columns: 1fr; }
  .seller-row .row-btns { width: 100%; }
  .seller-row .row-btns .btn { flex: 1 1 auto; }
}
.card-media.skeleton { background: var(--surface-2); }
@media (max-width: 720px) {
  .admin-top .wrap { flex-wrap: nowrap; }
  .nav { min-width: 0; }
}
/* Status badges keep their colors over the light-theme default badge. */
.badge.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge.badge-accent { background: var(--accent); color: var(--on-accent); }
