/* Tienda Ingame: encabezado expandido + lista de productos (1 Vitrina · 2 Menú · 3 Estantes). */
html.q5-on #storeScreen .ig-head, html.q5-on #productsGrid { display: none !important; }
.q5 {
  --q5-line: rgba(255, 255, 255, .09);
  --q5-glass: rgba(18, 15, 28, .72);
  --q5-card: rgba(255, 255, 255, .035);
  --q5-muted: #b9b2c6;
  --q5-faint: #8d86a0;
  --q5-acc: #a855f7;
  --q5-acc2: #7c3aed;
  --q5-acc-soft: rgba(168, 85, 247, .16);
  --q5-acc-ink: #dcc4ff;
  --q5-grad: linear-gradient(135deg, #a855f7, #7c3aed);
  display: flex; flex-direction: column; gap: 18px; margin: 0 0 28px; color: #f5f2fa;
}
.q5 { container: q5 / inline-size; }
.q5 section:not(.q5-guide) { padding: 0; }
.q5 h1, .q5 h2, .q5 h3, .q5 p { margin: 0; }
.q5 button { font-family: inherit; cursor: pointer; }
.q5 button:focus-visible, .q5 input:focus-visible, .q5 select:focus-visible { outline: 2px solid #d8b8ff; outline-offset: 2px; }

/* ---------- encabezado ---------- */
.q5-hero { position: relative; height: 360px; border-radius: 28px; overflow: hidden; background: #120f1c; box-shadow: 0 0 0 1px var(--q5-line), 0 40px 80px -50px rgba(124, 58, 237, .8); }
.q5-hero-img { position: absolute; inset: 0; background: center 30%/cover no-repeat; }
.q5-hero-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 8, 16, .55) 0%, rgba(10, 8, 16, .1) 55%, transparent), linear-gradient(0deg, rgba(10, 8, 16, .5), transparent 45%); }
.q5-back { position: absolute; top: 16px; left: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 11px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(10, 8, 16, .72); color: #fff; font-size: 13.5px; font-weight: 600; }
.q5-back svg { width: 17px; height: 17px; }
.q5-back:hover { background: rgba(10, 8, 16, .75); }
.q5-hero-copy { position: absolute; left: 22px; bottom: 22px; z-index: 1; width: min(540px, calc(100% - 44px)); padding: 22px 26px; border-radius: 22px; background: linear-gradient(160deg, rgba(24, 19, 36, .9), rgba(14, 11, 22, .88)); border: 1px solid rgba(255, 255, 255, .08); }
.q5-eyebrow { display: inline-flex; padding: 4px 11px; border-radius: 999px; background: var(--q5-acc-soft); color: var(--q5-acc-ink); font-size: 12.5px; font-weight: 700; }
.q5-hero-copy h1 { margin-top: 10px; font: 800 46px/1.02 'Archivo', 'Inter', system-ui, sans-serif; letter-spacing: -.04em; text-wrap: balance; }
.q5-hero-copy p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--q5-muted); }
.q5-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.q5-stats span { padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 13.5px; color: var(--q5-muted); }
.q5-stats b { color: #fff; font-weight: 800; }
.q5-stats small { font-size: 10px; font-weight: 700; color: #fff; }

/* ---------- animación de apertura ---------- */
.q5-ghost { position: fixed; z-index: 9000; background: #120f1c center 30%/cover no-repeat; pointer-events: none; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
@keyframes q5up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- así se compra ---------- */
.q5-guide { padding: 20px 22px; border-radius: 24px; background: rgba(17, 14, 26, .82); border: 1px solid var(--q5-line); }
.q5-guide-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.q5-guide[data-collapsed] .q5-guide-h { margin: 0; }
.q5-guide-h h2 { font: 800 20px 'Archivo', 'Inter', sans-serif; letter-spacing: -.02em; }
.q5-guide-tg { padding: 6px 12px; border: 0; border-radius: 999px; background: none; color: var(--q5-muted); font-size: 13.5px; font-weight: 600; }
.q5-guide-tg:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.q5-guide-b { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.q5-guide-b[hidden] { display: none; }
.q5-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: q5s; }
.q5-steps li { position: relative; padding-left: 44px; counter-increment: q5s; }
.q5-steps li::before { content: counter(q5s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--q5-grad); color: #fff; font-weight: 800; font-size: 14px; }
.q5-steps b { display: block; font-size: 14.5px; }
.q5-steps span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--q5-muted); }
.q5-deliv { padding: 14px 16px; border-radius: 18px; background: rgba(124, 58, 237, .12); border: 1px solid rgba(168, 85, 247, .24); }
.q5-deliv h3 { font-size: 13.5px; font-weight: 800; }
.q5-deliv ul { margin: 8px 0 0; padding-left: 16px; font-size: 13px; line-height: 1.45; color: var(--q5-muted); }
.q5-deliv li + li { margin-top: 6px; }
.q5-deliv li::marker { color: var(--q5-acc); }
.q5-deliv b { color: #fff; }

/* ---------- herramientas ---------- */
.q5-tools { display: flex; gap: 10px; align-items: center; }
.q5-search { position: relative; flex: 1; min-width: 0; }
.q5-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--q5-faint); pointer-events: none; }
.q5-search input, .q5-sel select { width: 100%; height: 46px; border: 1px solid var(--q5-line); border-radius: 14px; background: rgba(255, 255, 255, .04); color: #fff; font: 500 14.5px inherit; font-family: inherit; }
.q5-search input { padding: 0 14px 0 42px; }
.q5-search input::placeholder { color: var(--q5-faint); }
.q5-sel { position: relative; flex: 0 0 auto; }
.q5-sel select { appearance: none; -webkit-appearance: none; padding: 0 38px 0 14px; }
.q5-sel select option { background: #16121f; }
.q5-sel svg { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--q5-faint); pointer-events: none; }
.q5-cartbtn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border: 1px solid var(--q5-line); border-radius: 14px; background: rgba(255, 255, 255, .04); color: #fff; font-size: 14px; font-weight: 600; }
.q5-cartbtn svg { width: 18px; height: 18px; }
.q5-cartn { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 12px; line-height: 22px; text-align: center; }
.q5-cartbtn.has .q5-cartn { background: var(--q5-acc); }
@media (min-width: 1041px) { .q5-cartbtn { display: none; } }
.q5-cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.q5-cats::-webkit-scrollbar { display: none; }
.q5-cats[hidden] { display: none; }
.q5-cats button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid var(--q5-line); border-radius: 999px; background: rgba(255, 255, 255, .03); color: #e8e3f0; font-size: 13.5px; font-weight: 600; }
.q5-cats button em { font-style: normal; font-size: 12px; color: var(--q5-faint); }
.q5-cats button[aria-pressed="true"] { background: #fff; border-color: #fff; color: #120f1c; }
.q5-cats button[aria-pressed="true"] em { color: #6b6478; }
.q5-note { display: flex; align-items: center; gap: 8px; margin-top: -6px; font-size: 12.5px; color: var(--q5-faint); }
.q5-note svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------- piezas comunes de los productos ---------- */
.q5-list { display: flex; flex-direction: column; gap: 30px; }
.q5-sec { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.q5-sec h2 { font: 800 22px 'Archivo', 'Inter', sans-serif; letter-spacing: -.02em; }
.q5-sec > span { font-size: 13px; color: var(--q5-faint); }
.q5-item { position: relative; display: flex; min-width: 0; border-radius: 18px; background: var(--q5-card); border: 1px solid var(--q5-line); transition: border-color .2s, background .2s, transform .2s; }
.q5-item:hover { border-color: rgba(168, 85, 247, .45); background: rgba(168, 85, 247, .06); }
.q5-item.is-in { border-color: rgba(168, 85, 247, .6); background: rgba(168, 85, 247, .09); }
.q5-pic { --pad: 10px; position: relative; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 35%, rgba(168, 85, 247, .22), rgba(255, 255, 255, .02) 70%); }
.q5-pic img { position: absolute; inset: var(--pad); width: calc(100% - 2 * var(--pad)); height: calc(100% - 2 * var(--pad)); object-fit: contain; }
.q5-mono { display: grid; place-items: center; width: 100%; height: 100%; font: 800 28px 'Archivo', sans-serif; color: var(--q5-acc-ink); }
.q5-info { min-width: 0; }
.q5-info h3 { font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q5-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.q5-badges:empty { display: none; }
.q5-b { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #d9d3e3; font-size: 11px; font-style: normal; font-weight: 700; letter-spacing: .02em; }
.q5-b-hot { background: rgba(249, 115, 22, .16); color: #fdba74; }
.q5-b-gift { background: rgba(236, 72, 153, .16); color: #f9a8d4; }
.q5-b-pop { background: var(--q5-acc-soft); color: var(--q5-acc-ink); }
.q5-b-trade { background: rgba(34, 211, 238, .12); color: #a5f3fc; }
.q5-price { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.q5-price b { font: 800 19px 'Archivo', 'Inter', sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.q5-price small { font-size: 10.5px; font-weight: 700; color: var(--q5-faint); }
.q5-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 0; border-radius: 12px; background: #fff; color: #120f1c; font-size: 14px; font-weight: 700; transition: transform .15s, background .15s; }
.q5-add svg { width: 16px; height: 16px; }
.q5-add:hover { background: #ede4ff; }
.q5-add:active { transform: scale(.96); }
.q5-step { display: inline-flex; align-items: center; height: 40px; border-radius: 12px; background: var(--q5-grad); color: #fff; }
.q5-step button { display: grid; place-items: center; width: 38px; height: 40px; border: 0; background: none; color: #fff; }
.q5-step button svg { width: 16px; height: 16px; }
.q5-step output { min-width: 22px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.q5-empty { display: flex; flex-direction: column; gap: 6px; padding: 40px 20px; border-radius: 20px; border: 1px dashed var(--q5-line); text-align: center; color: var(--q5-muted); }
.q5-empty b { color: #fff; font-size: 17px; }

/* ---------- 1 · Vitrina: tarjetas con imagen protagonista ---------- */
.q5-list[data-lista="1"] .q5-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.q5-list[data-lista="1"] .q5-item { flex-direction: column; padding: 10px; }
.q5-list[data-lista="1"] .q5-pic { --pad: 14px; aspect-ratio: 1; border-radius: 13px; }
.q5-list[data-lista="1"] .q5-info { flex: 1; padding: 12px 4px 0; }
.q5-list[data-lista="1"] .q5-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 4px 2px; }
.q5-list[data-lista="1"] .q5-add span { display: none; }
.q5-list[data-lista="1"] .q5-add { width: 40px; padding: 0; }
.q5-list[data-lista="1"] .q5-item:hover { transform: translateY(-2px); }
.q5-list[data-lista="1"] .q5-buy { flex-wrap: wrap; row-gap: 10px; }
.q5-list[data-lista="1"] .q5-item.is-in .q5-ctl { flex: 1 1 100%; }
.q5-list[data-lista="1"] .q5-item.is-in .q5-step { width: 100%; justify-content: space-between; }
.q5-list[data-lista="1"] .q5-step output { flex: 1; }

/* ---------- 2 · Menú: filas compactas en dos columnas ---------- */
.q5-list[data-lista="2"] .q5-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.q5-list[data-lista="2"] .q5-item { align-items: center; gap: 14px; padding: 10px 12px 10px 10px; }
.q5-list[data-lista="2"] .q5-pic { --pad: 6px; width: 64px; height: 64px; border-radius: 12px; }
.q5-list[data-lista="2"] .q5-info { flex: 1; }
.q5-list[data-lista="2"] .q5-buy { display: flex; align-items: center; gap: 12px; }

/* ---------- 3 · Estantes: una fila deslizable por categoría ---------- */
.q5-list[data-lista="3"] .q5-sec { margin-bottom: 12px; }
.q5-arrows { display: flex; gap: 6px; margin-left: auto; }
.q5-arrows button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--q5-line); border-radius: 50%; background: rgba(255, 255, 255, .04); color: #fff; }
.q5-arrows button:hover { background: rgba(255, 255, 255, .1); }
.q5-arrows svg { width: 17px; height: 17px; }
.q5-list[data-lista="3"] .q5-rows { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.q5-list[data-lista="3"] .q5-item { flex-direction: column; scroll-snap-align: start; overflow: hidden; }
.q5-list[data-lista="3"] .q5-pic { --pad: 16px; aspect-ratio: 4 / 3; }
.q5-list[data-lista="3"] .q5-info { flex: 1; padding: 12px 14px 0; }
.q5-list[data-lista="3"] .q5-buy { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px 14px; }
.q5-list[data-lista="3"] .q5-add, .q5-list[data-lista="3"] .q5-step { width: 100%; justify-content: space-between; }
.q5-list[data-lista="3"] .q5-add { justify-content: center; }
.q5-list[data-lista="3"] .q5-step output { flex: 1; }

/* ---------- según el ancho real de la columna (el carrito ocupa la derecha en PC) ---------- */
@container q5 (max-width: 900px) {
  .q5-hero { height: 340px; }
  .q5-hero-copy { padding: 18px 22px; }
  .q5-hero-copy h1 { font-size: 38px; }
  .q5-guide-b { grid-template-columns: 1fr; }
  .q5-tools { flex-wrap: wrap; }
  .q5-search { flex: 1 1 100%; }
  .q5-sel { flex: 1 1 0; min-width: 0; }
  .q5-list[data-lista="2"] .q5-rows { grid-template-columns: 1fr; }
}
@container q5 (max-width: 600px) {
  .q5-hero { height: 400px; border-radius: 22px; }
  .q5-hero-img { bottom: 40%; }
  .q5-hero-img::after { background: linear-gradient(0deg, #120f1c 0%, transparent 60%); }
  .q5-hero-copy { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 18px; border-radius: 18px; }
  .q5-hero-copy h1 { font-size: 34px; }
  .q5-hero-copy p { font-size: 14px; }
  .q5-back { top: 12px; left: 12px; }
  .q5-guide { padding: 16px; border-radius: 20px; }
  .q5-steps { grid-template-columns: 1fr; gap: 12px; }
  .q5-cartbtn span { display: none; }
  .q5-sel select { padding: 0 30px 0 12px; font-size: 14px; }
  .q5-sel svg { right: 9px; }
  .q5-sel:first-of-type { flex-grow: 1.6; }
  .q5-sec h2 { font-size: 19px; }
  .q5-list[data-lista="1"] .q5-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .q5-list[data-lista="1"] .q5-item { padding: 8px; }
  .q5-list[data-lista="1"] .q5-info h3 { font-size: 14px; }
  .q5-list[data-lista="1"] .q5-price b { font-size: 16px; }
  .q5-list[data-lista="2"] .q5-pic { width: 56px; height: 56px; }
  .q5-list[data-lista="2"] .q5-buy { flex-direction: column; align-items: flex-end; gap: 6px; }
  .q5-list[data-lista="2"] .q5-add span { display: none; }
  .q5-list[data-lista="2"] .q5-add { width: 40px; padding: 0; }
  .q5-list[data-lista="3"] .q5-rows { grid-auto-columns: 168px; gap: 10px; }
  .q5-list[data-lista="3"] .q5-arrows { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .q5-item, .q5-add { transition: none; }
}

/* ---------- rendimiento: las secciones fuera de pantalla no se dibujan hasta acercarse ---------- */
.q5-group { content-visibility: auto; contain-intrinsic-size: auto 640px; }
.q5-ghost { will-change: left, top, width, height; }

/* ---------- barra del carrito en el celular ---------- */
.q5-mbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 900; display: flex; align-items: center; gap: 12px; padding: 9px 9px 9px 11px; border: 1px solid rgba(168, 85, 247, .45); border-radius: 18px; background: rgba(18, 15, 28, .94); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .85); color: #fff; font-family: inherit; text-align: left; cursor: pointer; animation: q5bar .35s cubic-bezier(.2, .8, .2, 1); }
.q5-mbar[hidden] { display: none; }
.q5-mbar:focus-visible { outline: 2px solid #d8b8ff; outline-offset: 3px; }
.q5-mbar-ic { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #a855f7, #7c3aed); }
.q5-mbar-ic svg { width: 20px; height: 20px; }
.q5-mbar-n { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #fff; color: #120f1c; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }
.q5-mbar-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.q5-mbar-t small { font-size: 12px; color: #b9b2c6; }
.q5-mbar-t b { font: 800 17px 'Archivo', 'Inter', sans-serif; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q5-mbar-go { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; height: 42px; padding: 0 14px; border-radius: 12px; background: #fff; color: #120f1c; font-size: 14px; font-weight: 700; white-space: nowrap; }
.q5-mbar-go svg { width: 16px; height: 16px; }
.q5-mbar.bump .q5-mbar-ic { animation: q5bump .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes q5bump { 40% { transform: scale(1.14); } }
@keyframes q5bar { from { opacity: 0; transform: translateY(20px); } }
@media (max-width: 1099px) { .q5 { padding-bottom: 76px; } }
@media (min-width: 1100px) { .q5-mbar { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .q5-mbar, .q5-mbar.bump .q5-mbar-ic { animation: none; } }

.q5-item { contain: layout paint style; }
