/* KAMI México · tienda tipo app (oscura, tarjetas redondeadas, botones en píldora). Reglas en DESIGN.md.
   Los nombres --paper (fondo) e --ink (texto) se conservan de la versión clara; aquí el fondo es oscuro y el texto claro. */
:root {
  --paper: oklch(0.17 0.012 255);
  --paper-2: oklch(0.22 0.012 255);
  --paper-3: oklch(0.27 0.013 255);
  --ink: oklch(0.97 0.004 85);
  --ink-2: oklch(0.88 0.005 85);
  --muted: oklch(0.73 0.012 255);
  --line: oklch(0.31 0.012 255);
  --accent: oklch(0.74 0.16 45);
  --accent-soft: oklch(0.28 0.05 45);
  --danger: oklch(0.68 0.19 25);
  /* nombres que usa comun/base.css */
  --bg: var(--paper); --surface: var(--paper-2); --surface-2: var(--paper-3); --text: var(--ink);
  --line-strong: var(--paper-3); --on-accent: var(--paper); --focus: var(--ink); --hint: var(--accent); --disc: var(--accent);
  --font-body: 'Epilogue', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --drawer-title: 700 22px/1 var(--font-body);
  --btn-radius: 999px; --size-radius: 999px;
  --r: 18px; --r-sm: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1280px;
  --gut: 16px;
  color-scheme: dark;
}
@media (min-width: 760px) { :root { --gut: 32px; } }

body { font-size: 16px; line-height: 1.5; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.display { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; line-height: .92; letter-spacing: .005em; }
.caps { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 600; }

/* ---------- Botones (píldora) ---------- */
.btn { min-height: 52px; padding: 0 26px; font-size: 15px; font-weight: 600; letter-spacing: 0; transition: background .2s, color .2s, border-color .2s; }
.btn:active { transform: scale(.98); }
.btn-accent, .btn-ink, .btn-paper { background: var(--ink); color: var(--paper); }
.btn-accent:hover, .btn-ink:hover, .btn-paper:hover { filter: none; background: var(--ink-2); }
.btn-line { background: transparent; color: var(--ink); border: 1.5px solid var(--paper-3); }
.btn-line:hover { border-color: var(--ink); }
.size { width: 52px; min-width: 52px; height: 52px; padding: 0; border: 0; background: var(--paper-3); color: var(--ink); font-size: 14px; font-weight: 600; }
.size:hover { background: oklch(0.33 0.013 255); }
.size[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Barra superior y encabezado ---------- */
.promo { background: var(--paper-2); color: var(--ink); text-align: center; padding: 8px var(--gut); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.promo b { color: var(--accent); font-weight: 600; }
.hdr { position: sticky; top: 0; z-index: 40; background: color-mix(in oklch, var(--paper) 92%, transparent); backdrop-filter: blur(12px); }
.hdr .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo { font-family: var(--font-display); font-size: 30px; line-height: 1; letter-spacing: .02em; text-decoration: none; }
.nav { display: flex; gap: 24px; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.hdr-act { margin-left: auto; display: flex; gap: 4px; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; text-decoration: none; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 22px; height: 22px; }
.count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--paper); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.menu-btn { display: none; }
@media (max-width: 899px) { .nav { display: none; } .menu-btn { display: grid; margin-right: -8px; } .hdr .wrap { gap: 8px; } }
.mnav { position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(340px, 86%); background: var(--paper); padding: 12px var(--gut) 24px; transform: translateX(-100%); transition: transform .42s var(--ease); display: flex; flex-direction: column; gap: 4px; }
.mnav.on { transform: none; }
.mnav .drawer-close { align-self: flex-end; }
.mnav a { padding: 14px 16px; border-radius: var(--r-sm); font-size: 18px; font-weight: 600; text-decoration: none; }
.mnav a:hover, .mnav a[aria-current="page"] { background: var(--paper-2); }

/* ---------- Búsqueda ---------- */
.search { display: none; }
.search.on { display: block; }
.search .wrap { padding-block: 4px 12px; }
.search input { width: 100%; height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--paper-2); font-size: 16px; }
.search input:focus { outline: 2px solid var(--ink); outline-offset: 0; }

/* ---------- Rejilla y tarjeta (nombre y precio sobre la foto) ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.bleed { margin-inline: 0; }
.pc { min-width: 0; }
.pc-top { position: relative; border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.pc-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.pc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s linear, transform .6s var(--ease); }
.pc-media .alt { opacity: 0; }
@media (hover: hover) { .pc:hover .pc-media .alt { opacity: 1; } }
.pc-media::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(to top, oklch(0.12 0.01 255 / .9), transparent); pointer-events: none; }
.pc-tag { position: absolute; z-index: 1; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 700; }
.pc-plus { position: absolute; z-index: 2; right: 6px; top: 6px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: oklch(0.12 0.01 255 / .55); backdrop-filter: blur(8px); color: var(--ink); }
.pc-plus svg { width: 18px; height: 18px; }
.pc-info { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 12px 14px 14px; pointer-events: none; }
.pc-name { font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; pointer-events: auto; }
.pc-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.pc-meta span:last-child { color: var(--muted); }
.quick { position: absolute; z-index: 3; left: 6px; right: 6px; bottom: 6px; padding: 12px; border-radius: 14px; background: var(--paper-2); box-shadow: 0 12px 30px oklch(0 0 0 / .45); display: none; }
.quick.on { display: block; }
.quick p { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.quick p button { min-height: 44px; min-width: 44px; margin: -12px -8px -12px 0; border: 0; background: none; padding: 0 8px; font-size: 13px; color: var(--muted); }
.quick .sizes { gap: 6px; flex-wrap: nowrap; justify-content: space-between; }
.quick .size { flex: 1; width: auto; min-width: 0; height: 44px; font-size: 12px; }
@media (hover: hover) and (min-width: 900px) {
  .pc:hover .quick, .pc:focus-within .quick { display: block; }
  .quick p button { display: none; }
}

/* ---------- Secciones ---------- */
.sec { padding-block: 28px; }
@media (min-width: 900px) { .sec { padding-block: 48px; } }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.sec-head h2 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); font-weight: 700; }
.sec-head a { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; padding: 8px 0; }
.sec-head a:hover { color: var(--ink); }

/* ---------- Filtros (píldoras) ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
@media (max-width: 899px) { .tabs { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 40px; } }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--paper-2); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; }
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Pie ---------- */
.ftr { margin-top: 32px; background: oklch(0.13 0.01 255); color: var(--ink); padding: 48px 0 120px; font-size: 14px; overflow: hidden; }
@media (min-width: 900px) { .ftr { padding-bottom: 40px; } }
.ftr .wrap { display: grid; gap: 36px; }
.ftr .cols { display: grid; gap: 28px; }
@media (min-width: 760px) { .ftr .cols { grid-template-columns: 2fr 1fr 1fr; gap: 40px; } }
.ftr h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ftr a { text-decoration: none; }
.ftr a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ftr p { color: var(--muted); max-width: 40ch; }
.ftr li.nolink { color: var(--muted); }
.ftr .mark { font-family: var(--font-display); font-size: clamp(6rem, 30vw, 22rem); line-height: .78; letter-spacing: -.01em; color: var(--paper-2); }

/* ---------- Carrito ---------- */
.drawer { border-left: 0; border-radius: 22px 0 0 22px; }
.line img, .up-item img { border-radius: 10px; }
.qty { border-radius: 999px; }
.qty button { width: 44px; height: 44px; }
.up-item { border-radius: 14px; }
.up-item button { border-radius: 999px; font-size: 13px; }
.meter { border-radius: 4px; height: 5px; }
.toast { border-radius: 999px; }
