/* Catálogo Margoa (P02) · opción 2 "Lo nuevo arriba". Se sirve como adjunto público de Odoo: margoa-catalogo.css */
/* Base común (marca Margoa: blanco con letras y detalles morados) + ficha compartida */
:root {
  --bg: #FFFFFF; --fg: #1F1A24; --muted: #6E6873; --line: #ECE7EF; --soft: #F6F3F8; --p: #4A1D6B; --p-deep: #2C0F40; --p-soft: #F3EDF7; --lav: #C7B8CE;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --holo: linear-gradient(90deg, #FFFFFF 0%, #72B4FF 15%, #FFFFFF 31%, #FF7189 47%, #FFFFFF 61%, #72B4FF 77%, #FF8C9E 90%, #FFFFFF 100%);
  --oro: linear-gradient(90deg, #9A7229 0%, #E6C77E 26%, #FFF0C2 45%, #D1A852 64%, #9A7229 100%);
  --plata: linear-gradient(90deg, #8B919A 0%, #D6DAE0 28%, #FFFFFF 47%, #B7BCC4 66%, #8B919A 100%);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }
.cx-lock, .cx-lock body { overflow: hidden; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.cx-iso { display: inline-block; width: 30px; height: 14px; color: var(--p); } .cx-iso svg { width: 100%; height: 100%; display: block; }
.cx-word { display: inline-flex; align-items: center; gap: 8px; font: 800 15px/1 var(--sans); letter-spacing: .2em; color: var(--p); text-decoration: none; }
.cx-proto { font-size: 11.5px; color: var(--muted); padding-block: 24px 40px; }

/* Placas de rareza (las mismas de la tienda, pequeñas) */
.cx-badge { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 3px; font: 600 8.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #16051F; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .75), 0 1px 3px rgba(22, 5, 31, .16); white-space: nowrap; }
.cx-lim { background: var(--holo); background-size: 220% 100%; } .cx-new { background: var(--oro); } .cx-best { background: var(--plata); }

/* ---------- Ficha (hoja desde abajo en celular, panel a la derecha en computador) ---------- */
.cx-sheet { position: fixed; inset: 0; z-index: 100; }
.cx-scrim { position: absolute; inset: 0; background: rgba(22, 5, 31, .42); opacity: 0; transition: opacity .22s ease; }
.cx-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 94vh; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform .32s cubic-bezier(.32, .72, 0, 1); padding-bottom: env(safe-area-inset-bottom, 0px); }
.cx-sheet.in .cx-scrim { opacity: 1; } .cx-sheet.in .cx-panel { transform: none; }
.cx-x { position: absolute; z-index: 3; top: 10px; right: max(10px, env(safe-area-inset-right, 0px)); width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .92); font-size: 24px; line-height: 40px; text-align: center; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.cx-gal { position: relative; background: var(--soft); }
.cx-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cx-track::-webkit-scrollbar { display: none; }
.cx-track img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 5; max-height: 62vh; object-fit: cover; scroll-snap-align: start; }
.cx-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.cx-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.cx-dot.on { background: #FFFFFF; width: 18px; border-radius: 4px; }
.cx-info { display: grid; gap: 10px; padding: 18px max(18px, env(safe-area-inset-left, 0px)) 22px; }
.cx-tags { display: flex; align-items: center; gap: 10px; }
.cx-brand { font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#cx-name { font: 700 22px/1.2 var(--sans); letter-spacing: -.02em; }
.cx-price { font: 600 18px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--p); }
.cx-sz-h { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-weight: 600; } .cx-sz-h small { color: var(--muted); font-weight: 400; font-size: 12px; }
.cx-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.cx-sz { position: relative; display: grid; place-items: center; align-content: center; min-height: 54px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.cx-sz b { font-size: 14px; } .cx-sz small { font-size: 11px; color: var(--muted); }
.cx-sz i { position: absolute; top: -8px; left: 50%; translate: -50% 0; padding: 1px 6px; border-radius: 999px; background: var(--p); color: #FFFFFF; font: 600 9px/1.5 var(--sans); font-style: normal; white-space: nowrap; }
.cx-sz.on { border-color: var(--p); box-shadow: inset 0 0 0 1.5px var(--p); background: var(--p-soft); }
.cx-sz:disabled { color: #B6AFBB; cursor: not-allowed; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(236, 231, 239, .8) 6px 7px); } .cx-sz:disabled b { text-decoration: line-through; }
.cx-wa { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; margin-top: 8px; border-radius: 999px; background: var(--p); color: #FFFFFF; font: 700 15px/1 var(--sans); text-decoration: none; transition: background-color .2s, opacity .2s; }
.cx-wa svg { width: 22px; height: 22px; } .cx-wa:hover { background: var(--p-deep); }
.cx-wa.off { opacity: .45; pointer-events: none; }
.cx-hint { min-height: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }
@media (min-width: 900px) {
  .cx-panel { left: auto; top: 0; width: min(920px, 92vw); max-height: none; border-radius: 0; transform: translateX(100%); display: grid; grid-template-columns: 1.15fr 1fr; }
  .cx-gal { height: 100vh; } .cx-track { height: 100%; } .cx-track img { aspect-ratio: auto; height: 100%; max-height: none; }
  .cx-info { align-content: center; padding: 40px 36px; }
}
@media (prefers-reduced-motion: reduce) { .cx-panel, .cx-scrim { transition: none; } }

/* ---- Opción 2 ---- */
/* Opción 2 · Lo nuevo arriba: lo que acaba de llegar ocupa la primera pantalla en tarjetas grandes; debajo, todo lo demás */
.hd { padding-block: 16px 6px; display: flex; justify-content: space-between; align-items: center; }
.hd small { font-size: 12px; color: var(--muted); }
.k { font: 400 clamp(40px, 12vw, 96px)/.9 var(--display); text-transform: uppercase; color: var(--p); letter-spacing: .005em; padding-block: 14px 6px; }
.k span { display: block; font: 600 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 8px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 360px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 14px max(16px, env(safe-area-inset-left, 0px)) 6px; scroll-padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.rail::-webkit-scrollbar { display: none; }
.big { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 20px; background: var(--soft); scroll-snap-align: start; text-align: left; }
.big img { width: 100%; height: 100%; object-fit: cover; }
.big::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(22, 5, 31, .7)); }
.big .cx-badge { position: absolute; left: 12px; top: 12px; z-index: 1; }
.big .t { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 14px; color: #FFFFFF; display: grid; gap: 4px; }
.big .t b { font-size: 17px; line-height: 1.25; } .big .t span { font-size: 13px; opacity: .9; }
.sec { display: flex; justify-content: space-between; align-items: baseline; padding-block: 36px 14px; }
.sec h2 { font: 700 22px/1 var(--sans); letter-spacing: -.02em; color: var(--p); }
.tabs { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--soft); }
.tabs button { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: #FFFFFF; color: var(--p); box-shadow: 0 1px 4px rgba(31, 26, 36, .1); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 16px; } }
.it { display: grid; gap: 6px; text-align: left; } .it .ph { aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--soft); }
.it img { width: 100%; height: 100%; object-fit: cover; } .it b { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.it span { font-size: 13px; color: var(--muted); } .it.out img { opacity: .5; }

/* ---- Ajustes para la versión real ---- */
.it .ph { position: relative; } .it .cx-badge { position: absolute; left: 6px; top: 6px; }
.it small { font-size: 12px; color: var(--muted); margin-top: -2px; }
.sec { flex-wrap: wrap; gap: 10px; } .sec h2 small { font: 500 13px var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.foot { display: grid; gap: 6px; justify-items: center; text-align: center; padding-block: 36px calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 13px; }
.foot a { color: var(--p); font-weight: 600; text-decoration: none; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
@media (max-width: 359.98px) { .k { font-size: 38px; } .tabs button { padding: 0 9px; } }

/* Placas que no caben en tarjetas angostas (320 px): se recortan con puntos suspensivos */
.it .cx-badge, .big .cx-badge { max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; }

/* ---- Filtros que salen de las categorías de Odoo (género > tipo > subtipo) ---- */
.filtros { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; display: grid; gap: 8px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 14px; padding: 10px max(16px, env(safe-area-inset-left, 0px)); background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.filtros [hidden] { display: none !important; }
.f-seg { display: inline-flex; justify-self: start; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.f-seg button { flex: none; height: 34px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.f-seg button[aria-pressed="true"] { background: #FFFFFF; color: var(--p); box-shadow: 0 1px 4px rgba(31, 26, 36, .12); }
.f-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.f-seg::-webkit-scrollbar, .f-chips::-webkit-scrollbar { display: none; }
.f-chips button { flex: none; height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.f-chips button[aria-pressed="true"] { background: var(--p); border-color: var(--p); color: #FFFFFF; }
.f-sub button { height: 32px; font-size: 12.5px; font-weight: 500; border-color: transparent; background: var(--soft); }
.f-sub button[aria-pressed="true"] { background: var(--p-soft); border-color: var(--p); color: var(--p); }
.vacio { grid-column: 1 / -1; padding-block: 30px; text-align: center; color: var(--muted); }
.sec { padding-bottom: 8px; }

/* v2026-11-01a */
