/* Homepage showcase (template-parts/home-showcase.php): platforms, top 8 podium, offer lanes.
   Entrances are keyframes armed by home-showcase.js (.omega-show-motion on <html>); idle loops
   pause off screen (.is-off) and on hover. Reduced motion or no JS: final state, no loops. */

/* ======================= Elegí tu plataforma ======================= */
.omega-plat { background: #fff; }

.omega-plat__grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.omega-plat__tile {
  --c1: #003791;
  --c2: #0070d1;
  background: radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--c2) 85%, #fff 15%), transparent 60%), linear-gradient(150deg, var(--c2), var(--c1));
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(7, 0, 0, 0.14);
  color: #fff;
  isolation: isolate;
  min-height: 300px;
  overflow: hidden;
  position: relative;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 300ms ease;
}

.omega-plat__tile--nintendo { --c1: #8a000b; --c2: #e60012; }
.omega-plat__tile--xbox { --c1: #0b3d0b; --c2: #107c10; }


.omega-plat__tile { container-type: inline-size; }

/* Centred tile: the platform name is the big, solid lettering. */
.omega-plat__body {
  align-content: center;
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  min-height: 100%;
  padding: 1.8rem 1.4rem 2rem;
  position: relative;
  text-align: center;
}

.omega-plat__count { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; margin: 0; opacity: 0.85; text-transform: uppercase; }
.omega-plat__count b { font-size: 1rem; }

.omega-plat__name {
  font-size: 3.2rem;
  font-size: min(14cqi, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0.1rem 0 0.15rem;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}
.omega-plat__link { color: #fff; text-decoration: none; }
.omega-plat__link:hover, .omega-plat__link:focus-visible { color: #fff; }
.omega-plat__link::after { border-radius: 22px; content: ""; inset: 0; position: absolute; z-index: 1; }
.omega-plat__link:focus-visible::after { outline: 3px solid #fff; outline-offset: -4px; }

.omega-plat__line { font-size: 0.92rem; line-height: 1.45; margin: 0; max-width: 24rem; opacity: 0.9; }

.omega-plat__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  position: relative;
  z-index: 2;
}

.omega-plat__links a {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 750;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
}

.omega-plat__links a small { font-weight: 900; opacity: 0.75; }
.omega-plat__links a:hover, .omega-plat__links a:focus-visible { background: #fff; color: var(--c1); transform: translateY(-2px); }

.omega-plat__pulse {
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  inset: 0 -60%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  z-index: 3;
}

@media (hover: hover) and (pointer: fine) {
  .omega-plat__tile:hover { box-shadow: 0 26px 56px color-mix(in srgb, var(--c2) 45%, transparent); transform: translateY(-6px); }
}

/* ======================= Los más vendidos ======================= */
.omega-top {
  background: radial-gradient(circle at 50% 0%, rgba(218, 12, 12, 0.22), transparent 45%), linear-gradient(180deg, #0b0101, #050000);
  color: #fff;
}

.omega-top .omega-section-heading h2 { color: #fff; }
.omega-top .omega-section-heading a { color: #ff6b6b; }

.omega-top__list {
  counter-reset: none;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.omega-top__item {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: grid;
  grid-column: span 3;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  position: relative;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 300ms ease, box-shadow 300ms ease;
}

/* Podium: #2, #1, #3 across the first row, #1 tallest. */
.omega-top__item.is-podium { grid-column: span 5; }
.omega-top__item.is-rank-1 { border-color: rgba(255, 211, 106, 0.55); box-shadow: 0 0 60px rgba(255, 211, 106, 0.12); order: 2; }
.omega-top__item.is-rank-2 { order: 1; }
.omega-top__item.is-rank-3 { order: 3; }
.omega-top__item:not(.is-podium) { order: 4; }

.omega-top__rank {
  color: transparent;
  font-size: clamp(4.5rem, 8vw, 7rem);
  font-weight: 900;
  left: 0.6rem;
  letter-spacing: -0.06em;
  line-height: 0.85;
  pointer-events: none;
  position: absolute;
  top: 0.4rem;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.35);
  z-index: 1;
}

.omega-top__item.is-rank-1 .omega-top__rank { -webkit-text-stroke-color: #ffd36a; }
.omega-top__item:not(.is-podium) .omega-top__rank { font-size: 3.6rem; }

.omega-top__media {
  align-items: center;
  display: flex;
  height: 200px;
  justify-content: center;
  padding: 1rem 1rem 0.4rem 2.4rem;
  position: relative;
  z-index: 2;
}

.omega-top__item.is-podium .omega-top__media { height: 260px; }
.omega-top__item.is-rank-1 .omega-top__media { height: 300px; }

.omega-top__media img {
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.6));
  height: auto;
  max-height: 100%;
  max-width: 100%;
  width: auto;
}

.omega-top__media.is-plate img {
  background: radial-gradient(circle at 50% 38%, #fff, #e7e6ec 80%);
  border-radius: 16px;
  filter: none;
  padding: 6%;
}

.omega-top__shine {
  inset: 1rem 1rem 0.4rem 2.4rem;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
}

.omega-top__shine::before {
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.5) 50%, transparent 62%);
  content: "";
  inset: 0 -60%;
  opacity: 0;
  position: absolute;
}

.omega-top__info {
  align-content: end;
  display: grid;
  gap: 0.35rem;
  padding: 0.6rem 1rem 1rem;
  position: relative;
  z-index: 2;
}

.omega-top__badge { color: #ffd36a; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; margin: 0; text-transform: uppercase; }
.omega-top__name { font-size: 0.95rem; font-weight: 800; line-height: 1.25; margin: 0; }
.omega-top__item.is-podium .omega-top__name { font-size: 1.1rem; }
.omega-top__name a { color: #fff; text-decoration: none; }
.omega-top__name a:hover { color: #ffd36a; }
.omega-top__price { color: #fff; font-size: 1.15rem; font-weight: 900; }
.omega-top__price del { color: rgba(255, 255, 255, 0.5); font-size: 0.75em; }
.omega-top__price ins { text-decoration: none; }

.omega-top .omega-top__info .button {
  background: var(--omega-red);
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  margin-top: 0.3rem;
  padding: 0.6rem 0.8rem;
  text-align: center;
}

.omega-top .omega-top__info .button:hover { background: #ff2a2a; }
.omega-top .omega-top__info .added_to_cart { color: #ffd36a; font-size: 0.8rem; }

@media (hover: hover) and (pointer: fine) {
  .omega-top__item:hover { border-color: rgba(255, 255, 255, 0.3); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5); transform: translateY(-6px); }
  .omega-top__item:hover .omega-top__media img { transform: scale(1.05); }
  .omega-top__media img { transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1); }
}

/* ======================= Ofertas ======================= */
.omega-offers { background: #f5f4f6; overflow: hidden; }
.omega-offers .omega-section-heading { margin-bottom: 1.4rem; }

.omega-offers__lane {
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  overflow: hidden;
  padding-block: 0.5rem;
}

.omega-offers__lane + .omega-offers__lane { margin-top: 0.6rem; }

.omega-offers__track { display: flex; width: max-content; }

.omega-offers__set {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0 0.5rem;
}

.omega-tag {
  align-items: center;
  background: #fff;
  border: 1px solid var(--omega-border);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(7, 0, 0, 0.06);
  color: var(--omega-text);
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 0.8rem 1.1rem 0.8rem 0.8rem;
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  width: 320px;
}

.omega-tag:hover, .omega-tag:focus-visible { border-color: var(--omega-red); box-shadow: 0 16px 34px rgba(218, 12, 12, 0.15); color: var(--omega-text); transform: translateY(-4px); }

.omega-tag__img { align-items: center; display: flex; height: 110px; justify-content: center; }
.omega-tag__img img { filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.25)); height: auto; max-height: 100%; max-width: 100%; width: auto; }

.omega-tag__body { display: grid; gap: 0.2rem; }
.omega-tag__pct { background: var(--omega-red); border-radius: 999px; color: #fff; font-size: 0.75rem; font-weight: 900; justify-self: start; padding: 0.15rem 0.55rem; }
.omega-tag__name { display: -webkit-box; font-size: 0.9rem; font-weight: 800; line-height: 1.25; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.omega-tag__prices del { color: var(--omega-muted); font-size: 0.8rem; }
.omega-tag__prices ins { color: var(--omega-red); font-size: 1.1rem; font-weight: 900; text-decoration: none; }
.omega-tag__save { color: var(--omega-success); font-size: 0.75rem; font-weight: 800; }

/* ======================= Motion ======================= */
.omega-show-motion [data-omega-show] .omega-plat__tile,
.omega-show-motion [data-omega-show] .omega-top__item { animation: omega-show-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both paused; animation-delay: calc(var(--i, var(--r, 0)) * 90ms); }
.omega-show-motion [data-omega-show] .omega-top__rank { animation: omega-show-rank 900ms cubic-bezier(0.3, 1.4, 0.5, 1) both paused; animation-delay: calc(var(--r, 0) * 90ms + 200ms); }
.omega-show-motion [data-omega-show] .omega-plat__links li { animation: omega-show-pop 420ms cubic-bezier(0.3, 1.6, 0.5, 1) both paused; animation-delay: calc(var(--i, 0) * 90ms + 400ms + var(--c, 0) * 60ms); }
.omega-show-motion [data-omega-show].is-in .omega-plat__tile,
.omega-show-motion [data-omega-show].is-in .omega-top__item,
.omega-show-motion [data-omega-show].is-in .omega-top__rank,
.omega-show-motion [data-omega-show].is-in .omega-plat__links li { animation-play-state: running; }
.omega-show-motion [data-omega-show].is-done .omega-plat__tile,
.omega-show-motion [data-omega-show].is-done .omega-top__item,
.omega-show-motion [data-omega-show].is-done .omega-top__rank,
.omega-show-motion [data-omega-show].is-done .omega-plat__links li { animation: none; }

/* Idle: a light pulse travels tile to tile; #1 floats and shines; the offer lanes drift. */
.omega-show-motion .omega-plat.is-done .omega-plat__pulse { animation: omega-show-pulse 4.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 1.5s); }
.omega-show-motion .omega-top.is-done .is-rank-1 .omega-top__media img { animation: omega-show-float 5s ease-in-out infinite; }
.omega-show-motion .omega-top.is-done .omega-top__shine::before { animation: omega-show-shine 4.5s ease-in-out infinite; animation-delay: calc(var(--r, 0) * 0.7s + 0.5s); }
.omega-show-motion .omega-offers__track { animation: omega-show-drift var(--dur, 70s) linear infinite; }
.omega-show-motion .omega-offers__lane.is-reverse .omega-offers__track { animation-direction: reverse; }
.omega-show-motion .omega-offers__lane:hover .omega-offers__track,
.omega-show-motion .omega-offers__lane.is-held .omega-offers__track,
.omega-show-motion [data-omega-show].is-off .omega-offers__track,
.omega-show-motion [data-omega-show].is-off .omega-plat__pulse,
.omega-show-motion [data-omega-show].is-off .omega-top__media img,
.omega-show-motion [data-omega-show].is-off .omega-top__shine::before { animation-play-state: paused; }

@keyframes omega-show-rise { from { opacity: 0; transform: translateY(34px) scale(0.97); } }
@keyframes omega-show-rank { from { opacity: 0; transform: translateY(-20px) scale(1.6); } }
@keyframes omega-show-pop { from { opacity: 0; transform: scale(0.5); } }
@keyframes omega-show-pulse { 0% { opacity: 0; transform: translateX(-60%); } 15% { opacity: 1; } 40%, 100% { opacity: 0; transform: translateX(60%); } }
@keyframes omega-show-float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
@keyframes omega-show-shine { 0% { opacity: 0; transform: translateX(-60%); } 12% { opacity: 1; } 45%, 100% { opacity: 0; transform: translateX(60%); } }
@keyframes omega-show-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ======================= Responsive ======================= */
@media (max-width: 1024px) {
  .omega-plat__grid { grid-template-columns: 1fr; }
  .omega-plat__tile { min-height: 230px; }
  .omega-top__list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .omega-top__item.is-podium { grid-column: span 2; }
  .omega-top__item { grid-column: span 3; }
}

@media (max-width: 640px) {
  .omega-top__list { gap: 0.8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .omega-top__item, .omega-top__item.is-podium { grid-column: span 1; }
  .omega-top__item.is-rank-1 { grid-column: span 2; order: 0; }
  .omega-top__item.is-rank-2 { order: 1; }
  .omega-top__item.is-rank-3 { order: 2; }
  .omega-top__media, .omega-top__item.is-podium .omega-top__media { height: 170px; padding-left: 1.6rem; }
  .omega-top__item.is-rank-1 .omega-top__media { height: 240px; }
  .omega-top__rank, .omega-top__item:not(.is-podium) .omega-top__rank { font-size: 3.2rem; }
  .omega-top__name, .omega-top__item.is-podium .omega-top__name { font-size: 0.85rem; }
  .omega-tag { grid-template-columns: 76px minmax(0, 1fr); width: 270px; }
  .omega-tag__img { height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .omega-plat *, .omega-top *, .omega-offers * { animation: none !important; transition: none !important; }
  .omega-offers__lane { overflow-x: auto; }
}
