/* Plantilla "arcade": oscura y gamer, títulos condensados en mayúsculas, esquinas cortadas. Estándar: docs/tienda-estandar-ux.md */
/* Globales del socio (--ng-*, core/settings.json) con los valores propios de la plantilla de respaldo. */
.ar {
  --accent: var(--ng-accent, #ff4d2e); --on-accent: var(--ng-accent-text, #0b0b0d);
  --bg: var(--ng-bg, #0a0a0c); --panel: var(--ng-surface, #141418);
  --text: var(--ng-text, #f2f2f4); --muted: var(--ng-muted, #a3a3ad);
  --panel-2: color-mix(in srgb, var(--panel) 90%, var(--text));
  --line: color-mix(in srgb, var(--panel) 82%, var(--text));
  --line-2: color-mix(in srgb, var(--panel) 62%, var(--text));
  --danger: #ff8a7a;
  --fd: var(--ng-font-heading, 'Saira Condensed', 'Arial Narrow', sans-serif);
  --fb: var(--ng-font-body, 'Barlow', system-ui, sans-serif);
  --cut: 14px; --r: var(--ng-radius, 2px); --ratio: var(--ng-cover-ratio, 616 / 353); --head: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font-family: var(--fb); font-size: calc(16px * var(--ng-scale, 1)); line-height: 1.5; color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}
body:has(.ar) { background: var(--ng-bg, #0a0a0c); }
.ar[data-card="recta"] { --cut: 0px; }
.ar ::selection { background: var(--accent); color: var(--on-accent); }
:where(.ar) a { color: inherit; text-decoration: none; }
.ar :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ar svg { flex: none; }
.ar-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ar-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 14px; font-weight: 700; }
.ar-skip:focus { left: 8px; }
html.ar-lock { overflow: hidden; }
.ar-wrap { width: 100%; max-width: var(--ng-container, 1280px); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .ar-wrap { padding: 0 24px; } }
@media (min-width: 1280px) { .ar-wrap { padding: 0 32px; } }
.ar-main { flex: 1; outline: none; }

/* Tipografía */
.ar-h1, .ar-h2, .ar-h3, .ar-hx-title, .ar-game-name, .ar-name, .ar-btn, .ar-add, .ar-nav a, .ar-rank, .ar-total, .ar-tag, .ar-404, .ar-sheet-nav a, .ar-foot h2, .ar-price {
  font-family: var(--fd); letter-spacing: .01em;
}
.ar-h1, .ar-h2, .ar-h3, .ar-hx-title, .ar-game-name, .ar-name, .ar-btn, .ar-add, .ar-nav a, .ar-total, .ar-tag, .ar-sheet-nav a, .ar-foot h2 { text-transform: uppercase; }
.ar-h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1; margin: 0; text-wrap: balance; }
.ar-h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; }
.ar-h3 { font-size: 22px; font-weight: 700; line-height: 1.1; margin: 0; }
.ar-h1, .ar-h2, .ar-h3, .ar-muted, .ar-hx-title { overflow-wrap: anywhere; }
.ar-muted { color: var(--muted); margin: 0; }
.ar-small { font-size: 14px; }
.ar-center { justify-self: center; text-align: center; }
.ar-price { font-weight: 700; font-size: 20px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ar-price-lg { font-size: 26px; font-weight: 800; }
.ar-price-xl { font-size: clamp(36px, 4vw, 46px); font-weight: 800; }

/* Botones: primario relleno, secundario contorno, terciario enlace */
.ar-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); border-radius: var(--r);
  font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: .03em; cursor: pointer; white-space: nowrap; text-align: center;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .1s;
}
.ar-btn:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); border-color: color-mix(in srgb, var(--accent) 86%, #fff); }
.ar-btn:active { transform: translateY(1px); }
.ar-btn:disabled, .ar-add:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.ar-btn-2 { background: transparent; color: var(--text); border-color: var(--line-2); }
.ar-btn-2:hover { background: var(--panel-2); border-color: var(--text); }
.ar-btn-lg { min-height: 52px; font-size: 20px; padding: 0 26px; }
.ar-btn-block { width: 100%; }
.ar-btn.is-loading::before { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ar-spin .7s linear infinite; }
@keyframes ar-spin { to { transform: rotate(360deg); } }
.ar-link { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); cursor: pointer; }
.ar-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.ar-iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; position: relative;
  background: transparent; color: var(--text); border: 0; border-radius: var(--r); cursor: pointer; transition: background-color .15s;
}
.ar-iconbtn:hover { background: var(--panel-2); }

/* Campos */
.ar-input {
  width: 100%; min-height: 44px; padding: 0 14px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r); font-size: 16px; transition: border-color .15s;
}
.ar-input::placeholder { color: var(--muted); }
.ar-input:hover { border-color: color-mix(in srgb, var(--line-2) 50%, var(--text)); }
.ar-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ar-input[aria-invalid="true"] { border-color: var(--danger); }
.ar-input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1); }
.ar-select { min-height: 44px; padding: 0 12px; background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 15px; cursor: pointer; }
.ar-field-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }

/* Anuncio */
.ar-ann {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; text-align: center;
  background: var(--ng-announcement-bg, var(--accent)); color: var(--ng-announcement-text, var(--on-accent));
  font-family: var(--fd); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 15px;
}
a.ar-ann:hover { text-decoration: underline; }

/* Encabezado */
.ar-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.2) blur(8px); }
html[data-ng-sticky="0"] .ar-head { position: relative; }
.ar-head-in { display: flex; align-items: center; gap: 8px; min-height: var(--head); }
.ar-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; margin-right: auto; }
.ar-logo { height: var(--ng-logo-height, 32px); width: auto; max-width: 180px; object-fit: contain; }
.ar-logo.is-plated { background: #f2f2f4; padding: 4px 8px; border-radius: 3px; box-sizing: content-box; }
/* Móvil: el nombre se achica con el ancho y, si aún no entra (fuentes anchas como Playfair), pasa a 2 líneas. */
.ar-name { font-size: clamp(16px, 4.6vw, 24px); font-weight: 800; line-height: 1.05; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
.ar-nav { display: none; }
.ar-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 18px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; }
.ar-nav a:hover { color: var(--text); }
.ar-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.ar-head-acts { display: flex; align-items: center; gap: 2px; }
.ar-hs { position: relative; display: none; }
.ar-hs .ar-input { padding-left: 42px; background: var(--panel); }
.ar-head.is-searching .ar-hs { display: block; order: 10; flex-basis: 100%; padding-bottom: 12px; }
.ar-head.is-searching .ar-head-in { flex-wrap: wrap; }
.ar-acct { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 10px; background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; border-radius: var(--r); cursor: pointer; }
.ar-acct:hover { background: var(--panel-2); }
.ar-acct-txt { display: none; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--fd); font-weight: 800; font-size: 16px; }
.ar-acct-wrap { position: relative; }
.ar-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 45; min-width: 200px; padding: 6px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 12px 32px rgb(0 0 0 / .45); }
.ar-menu a, .ar-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: var(--r); }
.ar-menu a:hover, .ar-menu button:hover { background: var(--panel-2); }
.ar-badge {
  position: absolute; top: 2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent); font: 700 11px/16px var(--fb); text-align: center; border: 2px solid var(--bg); box-sizing: content-box; pointer-events: none;
}
@media (min-width: 768px) {
  .ar-hs { display: block; flex: 1; max-width: 560px; min-width: 320px; margin: 0 8px; }
  .ar-searchbtn { display: none; }
  .ar-head.is-searching .ar-hs { flex-basis: auto; padding: 0; order: 0; }
  .ar-head.is-searching .ar-head-in { flex-wrap: nowrap; }
  .ar-acct-txt { display: inline; }
  .ar-brand { margin-right: 0; }
  .ar-name { display: block; font-size: 24px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
  .ar-head-acts { margin-left: auto; }
}
@media (min-width: 1024px) {
  .ar-menubtn { display: none; }
  .ar-nav { display: flex; gap: 4px; margin-left: 12px; }
  .ar-hs { margin: 0 auto; }
  .ar-head-acts { margin-left: 0; }
}

/* Sugerencias de búsqueda */
.ar-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; max-height: min(70vh, 520px); overflow: auto; padding: 6px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 16px 40px rgb(0 0 0 / .5); }
.ar-head.is-searching .ar-sugg { top: calc(100% - 6px); }
.ar-sugg-item { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r); }
.ar-sugg-item img { width: 72px; aspect-ratio: 616 / 353; object-fit: cover; background: var(--panel-2); }
.ar-sugg-name { font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ar-sugg-item .ar-price { font-size: 17px; }
.ar-sugg-item:hover, .ar-sugg-item[aria-selected="true"], .ar-sugg-all:hover, .ar-sugg-all[aria-selected="true"] { background: var(--panel-2); }
.ar-sugg-all { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 4px; border-top: 1px solid var(--line); font-weight: 600; color: var(--accent); }
.ar-sugg-msg { margin: 0; padding: 14px 12px; color: var(--muted); }

/* Tarjeta de juego */
.ar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .ar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) {
  .ar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ar[data-density="compacta"] .ar-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ar-grid.ar-cols { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
}
@media (min-width: 1440px) { .ar-grid:not(.ar-cols) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ar-card {
  position: relative; display: flex; flex-direction: column; background: var(--panel); container-type: inline-size;
  border: 1px solid transparent; border-radius: var(--r);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.ar-cover { aspect-ratio: var(--ratio); overflow: hidden; background: var(--panel-2); }
.ar-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.ar-card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 12px 12px 12px; }
.ar-card-name { margin: 0; font-family: var(--fb); font-size: 16px; font-weight: 600; line-height: 1.3; min-height: 2.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ar-card-link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.ar-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.ar-slot { position: relative; z-index: 1; display: inline-flex; }
.ar-slot.is-big { display: block; width: 100%; }
@media (hover: hover) {
  .ar-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
  .ar-card:hover .ar-cover img { transform: scale(1.04); }
}
.ar-card:focus-within { border-color: var(--line-2); }
html[data-ng-card="borde"] .ar-card { border-color: var(--line-2); }
html[data-ng-card="sombra"] .ar-card { box-shadow: 0 10px 28px rgb(0 0 0 / .4); clip-path: none; }
html[data-ng-card="sin_marco"] .ar-card { background: transparent; }
html[data-ng-card="sin_marco"] .ar-card-body { padding-inline: 0; }
.ar-add {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); border-radius: var(--r);
  font-size: 16px; font-weight: 700; letter-spacing: .03em; cursor: pointer; white-space: nowrap; transition: background-color .15s, transform .1s;
}
.ar-add:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); }
.ar-add:active { transform: translateY(1px); }
.ar-add.is-in { background: transparent; color: var(--accent); }
.ar-add.is-in:hover { background: var(--panel-2); }
@container (max-width: 230px) {
  .ar-add { padding: 0; width: 44px; }
  .ar-add span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ar-card-body { padding: 10px; }
  .ar-card-body .ar-price { font-size: 18px; }
}

/* Carrusel */
.ar-rail { position: relative; }
.ar-rail-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 12px) / 2.15); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 4px;
}
.ar-rail-track::-webkit-scrollbar { display: none; }
.ar-rail-track > * { scroll-snap-align: start; }
@media (min-width: 640px) { .ar-rail-track { grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; } }
@media (min-width: 1024px) { .ar-rail-track { grid-auto-columns: calc((100% - 48px) / 4); } .ar[data-density="compacta"] .ar-rail-track { grid-auto-columns: calc((100% - 64px) / 5); } }
.ar-rail-btn {
  position: absolute; top: calc(50% - 22px); z-index: 2; display: none; place-items: center; width: 44px; height: 44px;
  background: var(--text); color: var(--bg); border: 0; border-radius: 50%; cursor: pointer; box-shadow: 0 6px 20px rgb(0 0 0 / .5); transition: opacity .2s;
}
.ar-rail-btn.is-prev { left: -14px; } .ar-rail-btn.is-next { right: -14px; }
.ar-rail-btn:disabled { opacity: 0; pointer-events: none; }
@media (min-width: 1024px) and (hover: hover) { .ar-rail-btn { display: grid; } }

/* Ranking (estilo lista) */
.ar-chart { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 32px; }
@media (min-width: 1024px) { .ar-chart { grid-template-columns: 1fr 1fr; } }
.ar-chart-row {
  display: grid; grid-template-columns: 36px 88px minmax(0, 1fr) auto; grid-template-areas: "rank img name slot" "rank img price slot";
  align-items: center; column-gap: 12px; row-gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.ar-chart.no-rank .ar-chart-row { grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "img name slot" "img price slot"; }
.ar-rank { grid-area: rank; font-size: 34px; font-weight: 800; line-height: 1; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.ar-chart-row:nth-child(-n+3) .ar-rank { color: var(--text); }
.ar-chart-row img { grid-area: img; width: 88px; aspect-ratio: var(--ratio); object-fit: cover; background: var(--panel-2); }
.ar-chart-name { grid-area: name; align-self: end; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ar-chart-name:hover { color: var(--accent); }
.ar-chart-row .ar-price { grid-area: price; align-self: start; font-size: 18px; }
.ar-chart-row .ar-slot { grid-area: slot; }
@media (max-width: 639px) {
  .ar-chart-row { grid-template-columns: 28px 72px minmax(0, 1fr) auto; column-gap: 10px; }
  .ar-chart-row img { width: 72px; }
  .ar-rank { font-size: 26px; }
  .ar-chart-row .ar-add { width: 44px; padding: 0; }
  .ar-chart-row .ar-add span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Secciones de portada */
.ar-s { padding: 36px 0; }
.ar-s[data-ng-padding="compacto"] { padding: 20px 0; }
.ar-s[data-ng-padding="amplio"] { padding: 64px 0; }
@media (min-width: 1024px) { .ar-s { padding: 48px 0; } .ar-s[data-ng-padding="amplio"] { padding: 88px 0; } }
.ar-s[data-ng-background="superficie"] { background: var(--panel); }
.ar-s[data-ng-background="superficie"] .ar-card { background: var(--panel-2); }
.ar-s[data-ng-background="acento"] { background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.ar-s-hero { padding-top: 24px; }
.ar-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ar-more { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding-left: 8px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ar-more:hover { color: var(--accent); }

/* Portada: hero */
.ar-hx { position: relative; display: grid; overflow: hidden; border-radius: var(--r); background: var(--panel); min-height: 360px; }
.ar-hx[data-h="baja"] { min-height: 260px; } .ar-hx[data-h="alta"] { min-height: 480px; }
@media (min-width: 1024px) { .ar-hx { min-height: 440px; } .ar-hx[data-h="baja"] { min-height: 320px; } .ar-hx[data-h="alta"] { min-height: 600px; } }
.ar-hx-txt { position: relative; z-index: 1; display: grid; align-content: end; justify-items: start; gap: 16px; padding: 28px 22px; max-width: 760px; }
@media (min-width: 768px) { .ar-hx-txt { padding: 48px; } }
.ar-hx-title { font-size: clamp(42px, 7vw, 92px); font-weight: 800; line-height: .92; margin: 0; max-width: 14ch; text-wrap: balance; }
.ar-hx-sub { margin: 0; font-size: clamp(17px, 1.6vw, 20px); color: color-mix(in srgb, var(--text) 82%, transparent); max-width: 46ch; }
.ar-hx-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ar-hx-text { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 44px), calc(100% - 44px) 100%, 0 100%); }
.ar-hx-text::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(-55deg, transparent 0 22px, color-mix(in srgb, var(--text) 4%, transparent) 22px 23px);
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}
.ar-hx-text::after { content: ""; position: absolute; right: 0; bottom: 0; width: 120px; height: 120px; background: var(--accent); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.ar-hx[data-align="centro"] .ar-hx-txt { justify-items: center; text-align: center; margin: 0 auto; }
.ar-hx[data-align="derecha"] .ar-hx-txt { justify-items: end; text-align: right; margin-left: auto; }
.ar-hx[data-align="centro"] .ar-hx-title { margin-inline: auto; }
.ar-hx-media { position: absolute; inset: 0; }
.ar-hx-media img { width: 100%; height: 100%; object-fit: cover; }
.ar-hx-shade { position: absolute; inset: 0; background: linear-gradient(0deg, #000 0%, rgb(0 0 0 / .55) 55%, rgb(0 0 0 / .2) 100%); }
.ar-hx-bg .ar-hx-title { color: #fff; } .ar-hx-bg .ar-hx-sub { color: rgb(255 255 255 / .86); }
.ar-hx-side { grid-template-columns: 1fr; }
.ar-hx-side .ar-hx-media { position: relative; aspect-ratio: 4 / 3; }
@media (min-width: 768px) {
  .ar-hx-side { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .ar-hx-side .ar-hx-media { aspect-ratio: auto; order: 2; }
  .ar-hx-side .ar-hx-txt { align-content: center; }
}

/* Portada: llamado y buscador */
.ar-cta { display: grid; gap: 20px; padding: 28px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.ar-cta-txt { display: grid; gap: 8px; }
.ar-cta-txt p { margin: 0; color: var(--muted); font-size: 17px; max-width: 56ch; }
@media (min-width: 768px) { .ar-cta { grid-template-columns: 1fr auto; align-items: center; padding: 36px 40px; } }
.ar-bigsearch { display: grid; gap: 14px; }
.ar-bigsearch-row { position: relative; display: flex; gap: 8px; }
.ar-bigsearch .ar-input { min-height: 56px; padding-left: 44px; font-size: 18px; }
.ar-bigsearch .ar-btn { min-height: 56px; }

/* Buscar y catálogo */
.ar-results { padding-top: 28px; padding-bottom: 24px; }
.ar-res-head { display: grid; gap: 16px; margin-bottom: 24px; }
.ar-res-head .ar-muted { margin-top: 6px; }
@media (min-width: 1024px) { .ar-res-head { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px) auto; align-items: end; } }
.ar-res-form { position: relative; display: flex; gap: 8px; }
.ar-res-form .ar-input { padding-left: 42px; }
.ar-sort { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }

/* Ficha del juego */
.ar-game { padding-bottom: 32px; }
.ar-crumbs { display: flex; align-items: center; gap: 4px; padding: 16px 0; color: var(--muted); font-size: 14px; min-width: 0; }
.ar-crumbs a { white-space: nowrap; } .ar-crumbs a:hover { color: var(--text); text-decoration: underline; }
.ar-crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ar-game-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
  .ar-game-grid { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "media buy" "info buy"; gap: 24px 40px; }
  .ar-game-media { grid-area: media; } .ar-buybox { grid-area: buy; position: sticky; top: calc(var(--head) + 20px); align-self: start; } .ar-game-info { grid-area: info; }
  html[data-ng-sticky="0"] .ar-buybox { top: 20px; }
}
.ar-gal-main { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel); border-radius: var(--r); }
.ar-gal-main img { width: 100%; height: 100%; object-fit: cover; }
.ar-gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px;
  background: rgb(10 10 12 / .7); color: #fff; border: 0; border-radius: 50%; cursor: pointer; transition: background-color .15s;
}
.ar-gal-nav:hover { background: rgb(10 10 12 / .9); }
.ar-gal-nav.is-prev { left: 10px; } .ar-gal-nav.is-next { right: 10px; }
.ar-gal-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding: 3px; }
.ar-gal-th { flex: none; width: 112px; aspect-ratio: 16 / 9; padding: 0; border: 0; background: var(--panel); cursor: pointer; opacity: .55; border-radius: var(--r); overflow: hidden; transition: opacity .15s; }
.ar-gal-th img { width: 100%; height: 100%; object-fit: cover; }
.ar-gal-th:hover { opacity: .9; }
.ar-gal-th[aria-current="true"] { opacity: 1; outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 639px) { .ar-gal-th { width: 88px; } }
.ar-buybox { display: grid; gap: 16px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); }
.ar-game-name { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; line-height: .98; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.ar-game-meta { margin: -6px 0 0; color: var(--muted); font-size: 15px; }
.ar-buy-price { padding-top: 4px; }
.ar-guar { list-style: none; margin: 4px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.ar-guar li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.4; }
.ar-guar svg { color: var(--accent); margin-top: 1px; }
.ar-guar b { display: block; color: var(--text); font-size: 15px; font-weight: 600; }
.ar-tag { justify-self: start; display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 14px; font-weight: 700; border-radius: var(--r); }
.ar-tag.is-ok { color: #6ee7a0; border-color: color-mix(in srgb, #6ee7a0 40%, transparent); }
.ar-block { margin-top: 40px; }
.ar-game-info .ar-block:first-child { margin-top: 16px; }
.ar-block > .ar-h2 { margin-bottom: 16px; }
.ar-desc { max-width: 72ch; color: color-mix(in srgb, var(--text) 86%, var(--bg)); font-size: 17px; line-height: 1.65; }
.ar-desc p { margin: 0 0 14px; }
.ar-req { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--panel); border-radius: var(--r); }
.ar-req th, .ar-req td { text-align: left; vertical-align: top; padding: 12px 16px; }
.ar-req thead th { font-family: var(--fd); font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line-2); }
.ar-req tbody tr + tr { border-top: 1px solid var(--line); }
.ar-req tbody th { width: 24%; color: var(--muted); font-weight: 600; }
.ar-req td { overflow-wrap: anywhere; }
@media (max-width: 639px) {
  .ar-req thead { display: none; }
  .ar-req tr { display: grid; gap: 4px; padding: 12px 14px; }
  .ar-req th, .ar-req td { padding: 0; width: auto; }
  .ar-req td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
}
.ar-buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: center; gap: 14px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line-2);
}
.ar-buybar .ar-slot { flex: 1; }
/* El hueco de la barra fija va al final de la página (tras el pie), no solo de main: si no, tapa el copyright. */
.ar:has(.ar-main.has-buybar) { padding-bottom: 84px; }
@media (min-width: 1024px) { .ar-buybar { display: none; } .ar:has(.ar-main.has-buybar) { padding-bottom: 0; } }

/* Carrito */
.ar-lines { list-style: none; margin: 0; padding: 0; }
.ar-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ar-line img { width: 96px; aspect-ratio: var(--ratio); object-fit: cover; background: var(--panel-2); }
.ar-line-txt { display: grid; gap: 6px; min-width: 0; }
.ar-line-name { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
a.ar-line-name:hover { color: var(--accent); }
.ar-rm { color: var(--muted); } .ar-rm:hover { color: var(--text); }
.ar-lines-sm .ar-line { grid-template-columns: 1fr auto; padding: 10px 0; }
.ar-cartpage { padding-top: 28px; padding-bottom: 48px; }
.ar-cartpage > .ar-h1 { margin-bottom: 20px; }
.ar-cart-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) { .ar-cart-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; } .ar-cart-grid .ar-sum { position: sticky; top: calc(var(--head) + 20px); } }
.ar-sum { display: grid; gap: 16px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.ar-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 20px; font-weight: 700; }
.ar-total small { font-family: var(--fb); font-size: 14px; font-weight: 400; color: var(--muted); text-transform: none; }
.ar-ack { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; line-height: 1.45; }
.ar-ack input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.ar-payinfo { padding: 14px 16px; background: var(--panel-2); border-radius: var(--r); white-space: pre-line; }
.ar-payinfo h3 { margin: 0 0 6px; font-family: var(--fd); text-transform: uppercase; font-size: 17px; }
.ar-payinfo p { margin: 4px 0 0; color: var(--muted); }
.ar-payinfo-item { display: flex; gap: 12px; align-items: flex-start; }
.ar-payinfo-item + .ar-payinfo-item { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ar-payinfo-item img { width: 112px; height: auto; flex: none; border-radius: var(--r); background: #fff; }

/* Paneles laterales (menú y carrito) */
.ar-scrim { position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / .62); }
.ar-sheet {
  position: fixed; top: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; width: min(420px, calc(100vw - 32px));
  background: var(--bg); transition: transform .28s var(--ease); box-shadow: 0 0 48px rgb(0 0 0 / .6);
}
.ar-sheet-r { right: 0; border-left: 1px solid var(--line-2); transform: translateX(100%); }
.ar-sheet-l { left: 0; border-right: 1px solid var(--line-2); transform: translateX(-100%); width: min(340px, calc(100vw - 48px)); }
.ar-sheet.is-open { transform: none; }
.ar-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--head); padding: 0 8px 0 20px; border-bottom: 1px solid var(--line); }
.ar-sheet-body { flex: 1; overflow-y: auto; padding: 0 20px 20px; display: grid; align-content: start; gap: 16px; }
.ar-sheet-body .ar-sum { padding: 16px 0 0; background: none; border: 0; }
.ar-sheet-body .ar-line { grid-template-columns: 80px minmax(0, 1fr) auto; }
.ar-sheet-body .ar-line img { width: 80px; }
.ar-sheet-nav { display: grid; padding: 8px 0; overflow-y: auto; }
.ar-sheet-nav a { display: flex; align-items: center; min-height: 52px; padding: 0 20px; font-size: 22px; font-weight: 700; }
.ar-sheet-nav a:hover, .ar-sheet-nav a[aria-current="page"] { color: var(--accent); }
.ar-sheet-nav a.is-minor { min-height: 44px; font-family: var(--fb); font-size: 15px; font-weight: 500; text-transform: none; color: var(--muted); }
.ar-sheet-nav a.is-minor:first-of-type, .ar-sheet-nav a:not(.is-minor) + .is-minor { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }

/* Cuenta */
.ar-auth { display: grid; justify-items: center; padding-top: 48px; padding-bottom: 64px; }
.ar-auth-card { width: 100%; max-width: 420px; display: grid; gap: 22px; padding: 28px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); }
@media (min-width: 640px) { .ar-auth-card { padding: 36px 32px; } }
.ar-auth-card form { display: grid; gap: 16px; }
.ar-field { display: grid; gap: 6px; }
.ar-field label { font-size: 14px; font-weight: 600; }
.ar-input-wrap { position: relative; }
.ar-input-wrap .ar-input { background: var(--bg); }
.ar-input-wrap:has(.ar-pwtoggle) .ar-input { padding-right: 48px; }
.ar-pwtoggle { position: absolute; right: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; color: var(--muted); cursor: pointer; }
.ar-pwtoggle:hover { color: var(--text); }
.ar-hint { margin: 0; font-size: 13px; color: var(--muted); }
.ar-err { margin: 0; color: var(--danger); font-size: 14px; }
.ar-auth-links { display: grid; gap: 10px; justify-items: center; text-align: center; color: var(--muted); font-size: 15px; }
.ar-auth-links p { margin: 0; }
.ar-auth-done { text-align: center; justify-items: center; }

/* Mis juegos y legal */
.ar-lib { padding-top: 28px; padding-bottom: 48px; }
.ar-lib .ar-res-head { grid-template-columns: 1fr; }
@media (min-width: 768px) { .ar-lib .ar-res-head { grid-template-columns: 1fr auto; } }
.ar-lib-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-lib .ar-block > .ar-h2 { margin-bottom: 16px; }
.ar-lib .ar-line { grid-template-columns: 96px minmax(0, 1fr) auto; }
.ar-state { font-size: 14px; color: var(--muted); }
.ar-state.is-ok { color: #6ee7a0; }
.ar-act-hd { display: flex; align-items: center; gap: 14px; }
.ar-act-hd .ar-ok-ico { flex: none; width: 48px; height: 48px; }
.ar-act-hd > div { min-width: 0; display: grid; gap: 4px; }

/* Mi cuenta: tarjetas (2 columnas en desktop) */
.ar-acc { padding-top: 28px; padding-bottom: 48px; }
.ar-acc .ar-res-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.ar-acc-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .ar-acc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ar-acc-card { min-width: 0; display: grid; gap: 16px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.ar-acc-card form { display: grid; gap: 14px; }
.ar-acc-card form .ar-btn { justify-self: start; }
.ar-acc-now { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ar-devs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ar-devs li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); }
.ar-dev-txt { display: grid; min-width: 0; color: var(--text); }
.ar-dev-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-dev-txt small { color: var(--muted); font-size: 13px; }
@media (max-width: 599px) { .ar-copies .ar-line { grid-template-columns: 80px minmax(0, 1fr); } .ar-copies .ar-line img { width: 80px; } .ar-copies .ar-btn { grid-column: 1 / -1; } }
.ar-legal { max-width: 760px; padding: 32px 0 56px; }
.ar-legal .ar-h1 { margin-bottom: 24px; }

/* Estados vacíos, error, 404 */
.ar-empty { display: grid; justify-items: center; gap: 16px; text-align: center; padding-top: 72px; padding-bottom: 72px; }
.ar-empty-sm { padding: 32px 0; }
.ar-empty-sm .ar-muted { max-width: 44ch; }
.ar-empty-ico { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--panel); color: var(--muted); }
.ar-404 { font-size: clamp(96px, 16vw, 160px); font-weight: 800; line-height: .85; color: var(--accent); }

/* Carga */
.ar-loading { padding-top: 32px; padding-bottom: 32px; }
.ar-skel .ar-cover, .ar-skel .ar-card-body span, .ar-skel-game .ar-skel { background: linear-gradient(90deg, var(--panel-2) 0 40%, color-mix(in srgb, var(--panel-2) 80%, var(--text)) 50%, var(--panel-2) 60% 100%) 0 0 / 300% 100%; animation: ar-shimmer 1.4s linear infinite; }
.ar-skel .ar-card-body span { display: block; height: 14px; border-radius: 2px; }
.ar-skel .ar-card-body span + span { width: 50%; height: 20px; margin-top: 8px; }
.ar-skel-game { display: grid; gap: 24px; padding-top: 56px; padding-bottom: 40px; }
.ar-skel-game .ar-skel { aspect-ratio: 16 / 9; border-radius: var(--r); }
.ar-skel-game .ar-skel + .ar-skel { aspect-ratio: auto; height: 380px; }
@media (min-width: 1024px) { .ar-skel-game { grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; } }
@keyframes ar-shimmer { to { background-position: -150% 0; } }

/* Aviso y diálogo del pedido */
.ar-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--r);
  background: var(--text); color: var(--bg); font-weight: 600; box-shadow: 0 10px 30px rgb(0 0 0 / .5);
  opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s, transform .25s var(--ease); pointer-events: none;
}
.ar-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ar-toast.is-err { background: var(--danger); color: #1a0705; }
@media (max-width: 1023px) { .ar:has(.has-buybar) .ar-toast { bottom: 96px; } }
.ar-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .68); overflow: hidden; }
.ar-dialog { width: 100%; max-width: 460px; max-height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); }
@media (min-width: 480px) { .ar-dialog { padding: 28px; } }
.ar-dialog > * { min-width: 0; }
.ar-dialog .ar-h1 { font-size: clamp(24px, 6vw, 32px); }
.ar-dialog .ar-h2 { font-size: clamp(20px, 5vw, 24px); line-height: 1.1; }
.ar-dialog p { margin: 0; overflow-wrap: anywhere; }
.ar-dialog .ar-btn, .ar-acc .ar-btn { white-space: normal; line-height: 1.15; padding-top: 10px; padding-bottom: 10px; overflow-wrap: anywhere; }
.ar-ok-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.ar-modal-acts { display: grid; gap: 10px; }

/* Pie */
.ar-foot { margin-top: 56px; padding: 48px 0 28px; background: var(--panel); border-top: 1px solid var(--line); }
.ar-foot-cols { display: grid; gap: 32px; }
@media (min-width: 640px) { .ar-foot-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .ar-foot-cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.ar-foot-brand { display: grid; gap: 12px; align-content: start; }
.ar-foot-brand p { margin: 0; color: var(--muted); max-width: 40ch; }
.ar-foot h2 { margin: 0 0 10px; font-size: 15px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.ar-foot nav a { display: flex; align-items: center; min-height: 36px; font-size: 15px; overflow-wrap: anywhere; }
.ar-foot nav a:hover { color: var(--accent); }
.ar-social { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-social .ar-iconbtn { border: 1px solid var(--line-2); }
.ar-social .ar-iconbtn:hover { border-color: var(--text); }
.ar-copy { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .ar-card, .ar-cover img, .ar-sheet, .ar-toast { transition: none; }
  .ar-card:hover { transform: none; }
}

/* Scroll infinito: "Cargando…" solo mientras se pide la tanda siguiente */
.ar-more-load { display: flex; justify-content: center; min-height: 44px; margin: 28px 0 8px; color: var(--muted); }
.ar-more-load span { visibility: hidden; }
.ar-more-load.is-busy span { visibility: visible; }
.ar-results .ar-block { margin-top: 8px; }
