/* =====================================================================
   TIENDA OFICIAL — grid de categorías + lista de items
   El listado de items reusa .shop-potion-card del bazar.
   ===================================================================== */

/* ── Grid de categorías ──────────────────────────────────────────────── */
/* 2026-05-10: con 9 categorías (post-Equipo Normal), 4-cols dejaba una huérfana
   abajo (4+4+1). Cambiado a 3-cols → 3+3+3 perfecto. En mobile (2-cols) la
   última card span 2 cols si el total es impar (evita el "agujero" abajo). */
.oshop-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* PC: 3 columnas */
  gap: 14px;
  margin-top: 12px;
}
/* Si el total es impar en 3-cols (7, 10, 13...), la última card span las 3 cols
   para no quedar sola. Aplica solo cuando es la única en su fila. */
.oshop-cat-grid > .oshop-cat-card:last-child:nth-child(3n+1) {
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .oshop-cat-grid { grid-template-columns: repeat(2, 1fr); }
  /* En 2-cols (9 cats): última huérfana ocupa ambas columnas */
  .oshop-cat-grid > .oshop-cat-card:last-child:nth-child(3n+1),
  .oshop-cat-grid > .oshop-cat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
.oshop-cat-card {
  --accent: #e9b963;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), rgba(20,12,40,0.85));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-align: center;
  font-family: inherit;
  color: inherit;
  position: relative;
  overflow: hidden;
  min-height: 110px;
}
.oshop-cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%);
  pointer-events: none;
}
.oshop-cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(0,0,0,0.45),
              0 0 14px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* === Race category cards (2026-05-08) === */
.oshop-cat-card.is-race-cat {
  padding-top: 28px; /* espacio para badge superior */
}
.oshop-cat-race-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: 'Cinzel', serif;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  background: linear-gradient(135deg, rgba(184,132,255,0.85), rgba(122,76,240,0.85));
  color: #fff;
  border-radius: 99px;
  box-shadow: 0 2px 6px rgba(184,132,255,0.4);
  white-space: nowrap;
  pointer-events: none;
}
.oshop-cat-card.is-my-race {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent),
              0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}
.oshop-cat-card.is-my-race::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%);
  pointer-events: none;
}
.oshop-cat-mine-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  font-family: 'Cinzel', serif;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 2px 7px;
  background: linear-gradient(135deg, #6cd99c, #2a8b5e);
  color: #052015;
  border-radius: 99px;
  box-shadow: 0 0 10px rgba(63,214,146,0.55);
  white-space: nowrap;
  pointer-events: none;
}
.oshop-cat-card.is-my-race .oshop-cat-race-badge {
  /* mover el race badge al borde inferior cuando hay 'Mi Raza' arriba */
  top: auto;
  bottom: -8px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #000));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 50%, transparent);
}

/* Banner "Equipo de tu raza" */
.oshop-race-mine-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(63,214,146,0.10), rgba(63,214,146,0.04));
  border: 1px solid rgba(63,214,146,0.4);
  border-radius: 10px;
  color: #6cd99c;
  font-size: 12px;
  font-weight: 600;
}
.oshop-race-mine-banner i { font-size: 16px; }
.oshop-cat-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  border: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 26px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 35%, transparent));
}
.oshop-cat-body {
  min-width: 0;
  position: relative;
  z-index: 1;
}
.oshop-cat-name {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: #f5e6c8;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.oshop-cat-count {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-mono, monospace);
}

/* ── Botón "Volver a Categorías" ─────────────────────────────────────── */
.oshop-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  background: rgba(15,8,30,0.7);
  border: 1px solid rgba(233,185,99,0.3);
  border-radius: 999px;
  color: #d8d4e8;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  margin: 4px 0 12px;
  transition: all 0.15s;
}
.oshop-back-btn:hover {
  border-color: rgba(233,185,99,0.6);
  color: #f4e4be;
  background: rgba(40,28,82,0.85);
}
.oshop-back-btn i { font-size: 14px; }

/* ── Race Equipment: sub-tabs por raza (2026-05-08) ───────────────────── */
.oshop-race-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}
.oshop-race-tab {
  flex: 1 1 calc(33% - 6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #aaa3c2;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
}
.oshop-race-tab i { font-size: 14px; }
.oshop-race-tab:hover {
  background: rgba(255,255,255,0.04);
  color: #f4e4be;
}
.oshop-race-tab.active {
  background: linear-gradient(180deg, rgba(192,132,252,0.2), rgba(192,132,252,0.06));
  border-color: rgba(192,132,252,0.55);
  color: #d8b4ff;
  box-shadow: 0 2px 10px rgba(192,132,252,0.2);
}
.oshop-race-tab.is-mine::before {
  content: '';
  position: absolute;
  top: 4px; right: 4px;
  width: 6px; height: 6px;
  background: #5fd684;
  border-radius: 50%;
  box-shadow: 0 0 6px #5fd684;
}
.oshop-race-tab.active.is-mine {
  border-color: rgba(95,214,132,0.5);
}
.oshop-race-mine-badge {
  font-size: 8.5px;
  padding: 1px 5px;
  background: rgba(95,214,132,0.18);
  border: 1px solid rgba(95,214,132,0.5);
  border-radius: 99px;
  color: #6cd99c;
  letter-spacing: 0.06em;
  margin-left: 2px;
}

/* Banner de "raza ajena" */
.oshop-race-locked-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(255,138,76,0.06);
  border: 1px solid rgba(255,138,76,0.3);
  border-radius: 10px;
  color: #ffb380;
  font-size: 12px;
  font-weight: 600;
}
.oshop-race-locked-banner i { font-size: 16px; }

/* Pill de slot dentro del card */
.oshop-race-slot-pill {
  display: inline-block;
  padding: 1px 7px;
  background: rgba(192,132,252,0.12);
  border: 1px solid rgba(192,132,252,0.35);
  border-radius: 99px;
  color: #c39dff;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
  text-transform: capitalize;
}

.oshop-item-desc {
  margin: 0 0 12px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: #b8b1d4;
}

@media (max-width: 720px) {
  .oshop-race-tab { flex: 1 1 calc(50% - 6px); }
}
@media (max-width: 420px) {
  .oshop-race-tab { flex: 1 1 100%; }
}

/* Mobile cat grid — 2 columnas, layout horizontal compacto */
@media (max-width: 720px) {
  .oshop-cat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .oshop-cat-card {
    flex-direction: row;
    text-align: left;
    padding: 11px 12px;
    gap: 10px;
    min-height: 0;
    align-items: center;
    justify-content: flex-start;
  }
  .oshop-cat-icon { width: 44px; height: 44px; font-size: 22px; border-radius: 50%; }
  .oshop-cat-name { font-size: 13.5px; }
  .oshop-cat-count { font-size: 10.5px; }
}
@media (max-width: 380px) {
  .oshop-cat-grid { grid-template-columns: 1fr; }
}

/* ── Sección "Artículos más vendidos" ───────────────────────────────── */
.oshop-section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 22px 0 10px;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: #f5e6c8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.oshop-section-title i {
  font-size: 18px;
  color: #ff7676;
  filter: drop-shadow(0 0 6px rgba(255,118,118,0.5));
}
.oshop-featured-card { margin-top: 0 !important; }

/* ── Grids más cómodas dentro de la Tienda Oficial ────────────────
   El bazar tenía minmax(220px, 1fr) lo que metía 5+ columnas en PC y
   se apretaba el botón sobre el texto. Auto-fit con minmax mayor:
   - PC ancho: 3-4 columnas (según espacio)
   - Tablet: 2-3 columnas
   - Mobile: 1 columna
   No forzamos columnas fijas — el navegador acomoda según ancho real. */
.oshop-featured-card .shop-potions-grid,
.oshop-items-card .shop-potions-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.oshop-featured-card,
.oshop-items-card {
  padding: 16px 14px;
}
@media (max-width: 720px) {
  .oshop-featured-card .shop-potions-grid,
  .oshop-items-card .shop-potions-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Card más holgada — el botón nunca se solapa con el nombre ───── */
.oshop-featured-card .shop-potion-card,
.oshop-items-card .shop-potion-card {
  padding: 12px;
  gap: 12px;
  align-items: center;
}
.oshop-featured-card .shop-potion-info,
.oshop-items-card .shop-potion-info {
  min-width: 0;                       /* permite truncar nombre largo */
}
.oshop-featured-card .shop-potion-name,
.oshop-items-card .shop-potion-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* El bloque de "buys" (botón) se queda fijo a la derecha y no compite con el texto */
.oshop-featured-card .shop-potion-buys,
.oshop-items-card .shop-potion-buys {
  flex-shrink: 0;
  margin-left: auto;
}
.oshop-featured-card .shop-potion-buy,
.oshop-items-card .shop-potion-buy {
  white-space: nowrap;
  padding: 7px 12px;
}
/* 2026-05-13: precio con descuento del Mercader en la Tienda Oficial */
.oshop-featured-card .shop-potion-buy.has-disc,
.oshop-items-card .shop-potion-buy.has-disc {
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 4px 12px 6px;
  line-height: 1.05;
  position: relative;
}
.oshop-featured-card .shop-potion-buy.has-disc::after,
.oshop-items-card .shop-potion-buy.has-disc::after {
  content: '−' attr(data-disc);
  position: absolute;
  top: -7px;
  right: -7px;
  background: linear-gradient(135deg, #5fd684, #3aa869);
  color: #062409;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 99px;
  border: 2px solid var(--gold-dark, #7a5e10);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.3px;
}
.oshop-featured-card .oshop-price-old,
.oshop-items-card .oshop-price-old {
  font-size: 10px;
  opacity: 0.55;
  text-decoration: line-through;
  font-weight: 700;
  margin-bottom: 1px;
}
.oshop-featured-card .oshop-price-line,
.oshop-items-card .oshop-price-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.oshop-featured-card .oshop-price-line i,
.oshop-items-card .oshop-price-line i {
  font-size: 12px;
}
.oshop-featured-card .oshop-price-final,
.oshop-items-card .oshop-price-final {
  font-size: 13px;
  font-weight: 800;
}

/* ── Race item modal: breakdown del descuento (2026-05-13) ──────────── */
.oshop-race-disc-breakdown {
  background: linear-gradient(135deg, rgba(95,214,132,0.08), rgba(58,168,105,0.04));
  border: 1px solid rgba(95,214,132,0.25);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.oshop-race-disc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}
.oshop-race-disc-lbl {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.oshop-race-disc-lbl i { font-size: 12px; }
.oshop-race-disc-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
}
.oshop-race-disc-old {
  text-decoration: line-through;
  opacity: 0.6;
}
.oshop-race-disc-saving .oshop-race-disc-lbl,
.oshop-race-disc-saving .oshop-race-disc-val {
  color: #5fd684;
}

/* ── Override del .shop-potion-icon para items no-poción ─────────────
   El bazar usa colores verdes asumiendo pociones; acá tenemos todo tipo
   de items, así que coloreamos por rareza y dejamos el bg neutro. */
.oshop-featured-card .shop-potion-icon,
.shop-potions-grid .shop-potion-icon {
  background: rgba(0,0,0,0.5);
  border: 1.5px solid rgba(255,255,255,0.1);
  color: var(--gold, #e9b963);
}
.shop-potion-card.r-common    .shop-potion-icon { color: #c4c4d0; border-color: rgba(180,180,200,0.4); }
.shop-potion-card.r-uncommon  .shop-potion-icon { color: #5fd684; border-color: rgba(95,214,132,0.5); }
.shop-potion-card.r-rare      .shop-potion-icon { color: #5aa6ff; border-color: rgba(90,166,255,0.5); }
.shop-potion-card.r-epic      .shop-potion-icon { color: #b884ff; border-color: rgba(184,132,255,0.55); }
.shop-potion-card.r-legendary .shop-potion-icon { color: #ffaa50; border-color: rgba(255,170,80,0.55); box-shadow: 0 0 10px rgba(255,170,80,0.2); }
.shop-potion-card.r-mythic    .shop-potion-icon { color: #ff5a78; border-color: rgba(255,90,120,0.55); box-shadow: 0 0 10px rgba(255,90,120,0.22); }

/* Asegurar que tanto iconos FA como Phosphor se vean */
.shop-potion-icon > i { font-size: 22px; line-height: 1; }

/* ============================================================
   PACKS — grid de cards CUADRADAS y grandes (solo en categoría Packs)
   Override la grid de items normal para esta vista.
   ============================================================ */
.oshop-packs-card .shop-potions-grid.oshop-packs-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
@media (min-width: 1280px) {
  .oshop-packs-card .shop-potions-grid.oshop-packs-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-width: 720px) {
  .oshop-packs-card .shop-potions-grid.oshop-packs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}
@media (max-width: 380px) {
  .oshop-packs-card .shop-potions-grid.oshop-packs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.oshop-pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 10px 12px;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, rgba(28,18,55,0.95), rgba(15,8,30,0.99));
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
  text-align: center;
}
.oshop-pack-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.5);
}
/* Color de borde + glow por rareza */
.oshop-pack-card.r-uncommon  { border-color: rgba(95,214,132,0.55);  box-shadow: 0 0 14px rgba(95,214,132,0.18) inset; }
.oshop-pack-card.r-rare      { border-color: rgba(90,166,255,0.6);   box-shadow: 0 0 16px rgba(90,166,255,0.22) inset; }
.oshop-pack-card.r-epic      { border-color: rgba(184,132,255,0.6);  box-shadow: 0 0 18px rgba(184,132,255,0.24) inset; }
.oshop-pack-card.r-legendary { border-color: rgba(255,170,80,0.7);   box-shadow: 0 0 22px rgba(255,170,80,0.28) inset; }
.oshop-pack-card.r-mythic    { border-color: rgba(255,90,120,0.7);   box-shadow: 0 0 22px rgba(255,90,120,0.28) inset; }
.oshop-pack-card:hover.r-uncommon  { box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 22px rgba(95,214,132,0.35) inset; }
.oshop-pack-card:hover.r-rare      { box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 26px rgba(90,166,255,0.4) inset; }
.oshop-pack-card:hover.r-epic      { box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 28px rgba(184,132,255,0.4) inset; }
.oshop-pack-card:hover.r-legendary { box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 32px rgba(255,170,80,0.45) inset; }
.oshop-pack-card:hover.r-mythic    { box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 32px rgba(255,90,120,0.5) inset; }

/* Glow radial detrás del icono según rareza */
.oshop-pack-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, currentColor 0%, transparent 55%);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
.oshop-pack-card.r-uncommon  { color: #5fd684; }
.oshop-pack-card.r-rare      { color: #5aa6ff; }
.oshop-pack-card.r-epic      { color: #b884ff; }
.oshop-pack-card.r-legendary { color: #ffaa50; }
.oshop-pack-card.r-mythic    { color: #ff5a78; }
.oshop-pack-card > * { position: relative; z-index: 1; }

/* Chip de descuento esquina sup-derecha */
.oshop-pack-disc-corner {
  position: absolute;
  top: 8px; right: 8px;
  background: linear-gradient(180deg, #5fd684, #3fa869);
  color: #0a2412;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(95,214,132,0.45);
}

/* Icono grande del pack */
.oshop-pack-icon-big {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55);
  border: 2px solid currentColor;
  border-radius: 16px;
  font-size: 32px;
  color: currentColor;
  filter: drop-shadow(0 0 14px currentColor);
  margin-top: 4px;
}

/* Pill de rareza */
.oshop-pack-rarity {
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid currentColor;
  background: rgba(0,0,0,0.45);
}
.oshop-pack-rarity.r-uncommon  { color: #5fd684; }
.oshop-pack-rarity.r-rare      { color: #5aa6ff; }
.oshop-pack-rarity.r-epic      { color: #b884ff; }
.oshop-pack-rarity.r-legendary { color: #ffaa50; }
.oshop-pack-rarity.r-mythic    { color: #ff5a78; }

/* Título "Pack · 5 items" */
.oshop-pack-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #c0b8d8;
  letter-spacing: 0.02em;
}

/* Línea de oro pasivo (compacta) */
.oshop-pack-goldgen {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 13.5px;
  font-weight: 800;
  color: #ffd766;
  background: rgba(245,210,125,0.1);
  border: 1px solid rgba(245,210,125,0.35);
  border-radius: 8px;
  padding: 4px 9px;
}
.oshop-pack-goldgen i { color: #f5d27d; font-size: 13px; }
.oshop-pack-goldgen small {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,215,102,0.7);
  margin-left: -1px;
}
.oshop-pack-goldgen-spacer { height: 26px; }  /* altura igual al chip para alinear cards */

/* Botón de comprar */
.oshop-pack-cta {
  width: 100%;
  font-size: 13px;
  padding: 8px 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.oshop-pack-cta i { font-size: 13px; }

/* Mobile compacto */
@media (max-width: 720px) {
  .oshop-pack-card { padding: 12px 8px 10px; gap: 6px; }
  .oshop-pack-icon-big { width: 52px; height: 52px; font-size: 26px; border-radius: 13px; }
  .oshop-pack-rarity { font-size: 10px; padding: 2px 8px; }
  .oshop-pack-title { font-size: 10.5px; }
  .oshop-pack-goldgen { font-size: 12px; padding: 3px 7px; }
  .oshop-pack-goldgen-spacer { height: 22px; }
  .oshop-pack-cta { font-size: 12px; padding: 7px 8px; }
}

/* Packs — chip de descuento dentro del card (legacy, si volvés a usarlo) */
.oshop-pack-disc {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(95,214,132,0.16);
  color: #5fd684;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* Packs — modal info box */
.oshop-pack-info {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  padding: 10px 12px;
  margin: 0 0 10px;
  text-align: left;
}
.oshop-pack-info-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f5e6c8;
  margin-bottom: 6px;
}
.oshop-pack-info-title i { color: #6cd4ff; font-size: 13px; }
.oshop-pack-info-list {
  margin: 0; padding-left: 16px;
  font-size: 12px; line-height: 1.55;
  color: #d8d4e8;
}
.oshop-pack-info-list li { margin-bottom: 2px; }
.oshop-pack-info-list b { color: #f4e4be; }
.oshop-pack-stats-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a59bbf;
  text-align: center;
  margin: 4px 0 6px;
}
/* La img del item (cuando hay) llena el círculo sin teñir */
.shop-potion-img {
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.18));
}

/* También fija el fondo del icono de categoría: si no hay color-mix soporte
   asegurar que sea visible */
.oshop-cat-icon > i { font-size: 26px; line-height: 1; }

/* ── Modal de compra ──────────────────────────────────────────────────── */
.oshop-modal {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.oshop-modal.is-open { opacity: 1; pointer-events: auto; }
.oshop-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,2,12,0.78);
  backdrop-filter: blur(8px);
}
.oshop-modal-content {
  position: relative;
  width: min(92vw, 460px);
  background: linear-gradient(180deg, rgba(28,18,55,0.99), rgba(15,8,30,1));
  border: 1.5px solid rgba(233,185,99,0.45);
  border-radius: 16px;
  padding: 0;
  text-align: center;
  transform: scale(0.94) translateY(8px);
  transition: transform 0.2s ease;
  color: #e8e6f0;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Corner accents decorativos — esquinas con líneas doradas en L */
.oshop-modal-content::before,
.oshop-modal-content::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 1.5px solid rgba(233,185,99,0.55);
  pointer-events: none;
  z-index: 3;
}
.oshop-modal-content::before {
  top: 8px; left: 8px;
  border-right: 0; border-bottom: 0;
  border-radius: 5px 0 0 0;
}
.oshop-modal-content::after {
  bottom: 8px; right: 8px;
  border-left: 0; border-top: 0;
  border-radius: 0 0 5px 0;
}
.oshop-modal-hero,
.oshop-modal-footer { position: relative; }
/* 2026-05-30: solo 2 corner accents (top-left + bottom-right) — los otros
   2 (top-right cerca del X, bottom-left cerca de Comprar) chocaban con UI. */
.oshop-modal-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
  background:
    radial-gradient(60% 100% at 0% 50%, rgba(233,185,99,0.10) 0%, transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 70%);
}
.oshop-modal-hero-info { flex: 1; min-width: 0; }
/* Section label tipo "ARMA ━━━" arriba del nombre */
.oshop-sec-label {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Cinzel', serif; font-size: 10.5px;
  font-weight: 800; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold, #e9b963);
  text-shadow: 0 0 8px rgba(233,185,99,0.25);
  margin: 0 0 5px;
  opacity: 0.95;
}
.oshop-sec-label i { color: var(--gold, #e9b963); font-size: 13px; }
.oshop-sec-label::after {
  content: ""; flex: 1; height: 1px; max-width: 56px;
  background: linear-gradient(90deg, var(--gold, #e9b963), transparent);
}
.oshop-modal-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.oshop-modal-footer {
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.oshop-modal.is-open .oshop-modal-content { transform: scale(1) translateY(0); }
.oshop-modal-content.r-uncommon  { border-color: rgba(95,214,132,0.55); box-shadow: 0 0 22px rgba(95,214,132,0.15); }
.oshop-modal-content.r-rare      { border-color: rgba(90,166,255,0.6);  box-shadow: 0 0 22px rgba(90,166,255,0.15); }
.oshop-modal-content.r-epic      { border-color: rgba(184,132,255,0.6); box-shadow: 0 0 22px rgba(184,132,255,0.15); }
.oshop-modal-content.r-legendary { border-color: rgba(255,170,80,0.7);  box-shadow: 0 0 26px rgba(255,170,80,0.18); }
.oshop-modal-content.r-mythic    { border-color: rgba(255,90,120,0.7);  box-shadow: 0 0 26px rgba(255,90,120,0.2); }
.oshop-modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  border: 1px solid rgba(233,185,99,0.4);
  background: rgba(15,8,30,0.85);
  color: #e8e6f0;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.oshop-modal-close:hover { background: rgba(233,185,99,0.2); }
.oshop-modal-icbox {
  width: 88px; height: 88px;
  margin: 0;
  flex-shrink: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.04) 0%, rgba(0,0,0,0.7) 100%);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.oshop-modal-icbox::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 14px;
  background: inherit;
  filter: blur(14px);
  opacity: 0.6;
  z-index: -1;
}
.oshop-modal-icbox > i,
.oshop-modal-icbox > iconify-icon { font-size: 48px; color: var(--gold, #e9b963); }
.oshop-modal-icbox iconify-icon { display: block; }
.oshop-modal-icbox .item-modal-img-real {
  width: 100%; height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.oshop-modal-icbox.rb-uncommon  { border-color: rgba(80,200,120,0.5); }
.oshop-modal-icbox.rb-rare      { border-color: rgba(80,160,255,0.5); }
.oshop-modal-icbox.rb-epic      { border-color: rgba(170,100,255,0.5); }
.oshop-modal-icbox.rb-legendary { border-color: rgba(255,170,80,0.5); }
.oshop-modal-icbox.rb-mythic    { border-color: rgba(255,80,120,0.55); }
.oshop-modal-name {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 800;
  color: #f4e4be;
  margin-bottom: 6px;
  text-shadow: 0 0 12px currentColor;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.oshop-modal-name.r-uncommon  { color: #5fd684; }
.oshop-modal-name.r-rare      { color: #5aa6ff; }
.oshop-modal-name.r-epic      { color: #b884ff; }
.oshop-modal-name.r-legendary { color: #ffaa50; }
.oshop-modal-name.r-mythic    { color: #ff5a78; }
.oshop-modal-meta {
  display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-start;
  margin-bottom: 0;
}
.oshop-modal-desc {
  font-size: 12.5px;
  color: #a59bbf;
  line-height: 1.5;
  text-align: center;
  margin: 10px 0 0;
  padding: 8px 4px 0;
  border-top: 1px dashed rgba(255,255,255,0.07);
  font-style: italic;
}

/* 2026-05-30: Groups con section headers (COMBATE ━━━, VITALES ━━━, ATRIBUTOS ━━━) */
.oshop-stats-group {
  margin-bottom: 10px;
}
.oshop-stats-group:last-child { margin-bottom: 0; }
.oshop-stats-group .oshop-sec-label {
  margin: 0 0 7px;
  font-size: 10px;
}
.oshop-stats-group .oshop-sec-label::after {
  max-width: 80px;
}

/* Grid de stats — 2 columnas */
.oshop-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
}

/* 2026-05-30: Buffs card en shop modal — unificado a paleta gold/neutral
   (antes era purple → demasiada variedad de colores con el resto del modal) */
.oshop-modal-body .item-buffs-card {
  background: linear-gradient(180deg, rgba(233,185,99,0.08), rgba(0,0,0,0.18));
  border: 1px solid rgba(233,185,99,0.32);
  border-left: 3px solid rgba(233,185,99,0.7);
  box-shadow: none;
  padding: 10px 12px;
}
.oshop-modal-body .item-buffs-header {
  color: var(--gold, #e9b963);
  text-shadow: 0 0 8px rgba(233,185,99,0.25);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  margin-bottom: 8px;
}
.oshop-modal-body .item-buffs-header i { color: var(--gold, #e9b963); }
.oshop-modal-body .item-buff-row {
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.05);
}
.oshop-modal-body .item-buff-icon {
  background: rgba(233,185,99,0.14);
  color: var(--gold, #e9b963);
  border: 1px solid rgba(233,185,99,0.28);
}
.oshop-modal-body .item-buff-val {
  color: var(--gold, #e9b963);
}

/* Descuento Mercader — verde antes, ahora gold sutil */
.oshop-disc-block {
  background: rgba(233,185,99,0.06) !important;
  border-color: rgba(233,185,99,0.30) !important;
}
.oshop-disc-block > div:last-child {
  color: var(--gold, #e9b963) !important;
}
.oshop-race-disc-breakdown {
  background: rgba(233,185,99,0.05);
  border: 1px solid rgba(233,185,99,0.25);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.oshop-race-disc-row {
  display: flex; justify-content: space-between;
  font-size: 12px;
}
.oshop-race-disc-row + .oshop-race-disc-row { margin-top: 4px; }
.oshop-race-disc-saving { color: var(--gold, #e9b963); }
.oshop-race-disc-old { opacity: 0.6; text-decoration: line-through; }
.oshop-stat-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: #e8e6f0;
  min-height: 30px;
  text-align: left;
  letter-spacing: 0.01em;
}
.oshop-stat-cell i {
  font-size: 14px;
  color: var(--gold, #e9b963);
  opacity: 0.85;
  flex-shrink: 0;
}
/* HP/MP mantienen identidad cromática para legibilidad rápida */
.oshop-stat-cell.is-hp i { color: #ff7676; opacity: 1; }
.oshop-stat-cell.is-mp i { color: #6cd4ff; opacity: 1; }
.oshop-stat-cell {
  background: rgba(255,255,255,0.025);
}
.oshop-stat-cell:hover {
  border-color: rgba(233,185,99,0.30);
  background: rgba(233,185,99,0.05);
}
.oshop-qty-row {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 auto 12px;
  background: rgba(15,8,30,0.7);
  border: 1px solid rgba(233,185,99,0.3);
  border-radius: 10px;
  padding: 4px;
}
.oshop-qty-btn {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: rgba(40,28,82,0.7);
  border: 1px solid rgba(233,185,99,0.3);
  color: #f4e4be;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
}
.oshop-qty-btn:hover { background: rgba(233,185,99,0.2); }
.oshop-qty-input {
  width: 50px;
  background: transparent;
  border: none;
  color: #f4e4be;
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}
.oshop-qty-input::-webkit-inner-spin-button,
.oshop-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Precio + "Tienes" en una sola fila limpia */
.oshop-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(108,212,255,0.06);
  border: 1px solid rgba(108,212,255,0.25);
  border-radius: 10px;
  margin-bottom: 10px;
}
.oshop-price-total {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 22px;
  font-weight: 800;
  color: #e6f7ff;
  line-height: 1;
}
.oshop-price-total i {
  font-size: 19px;
  color: #6cd4ff;
  filter: drop-shadow(0 0 6px rgba(108,212,255,0.5));
}
.oshop-price-have {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.oshop-have-lbl {
  color: #a59bbf;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 9.5px;
  font-weight: 700;
}
.oshop-have-val {
  display: inline-flex; align-items: center; gap: 4px;
  color: #e6f7ff;
  font-weight: 700;
  font-size: 12.5px;
  font-family: var(--font-mono, monospace);
}
.oshop-have-val i { color: #6cd4ff; font-size: 11px; }
.oshop-buy-btn { letter-spacing: 0.05em; }

/* Banner compacto de oro pasivo — versión minimal, una línea */
.oshop-goldgen-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 0 0 10px;
  background: linear-gradient(90deg, rgba(245,210,125,0.18), rgba(245,210,125,0.06));
  border: 1px solid rgba(245,210,125,0.45);
  border-radius: 9px;
  cursor: help;
}
.oshop-goldgen-ic {
  font-size: 18px;
  color: #f5d27d;
  filter: drop-shadow(0 0 6px rgba(245,210,125,0.5));
}
.oshop-goldgen-amount {
  font-family: var(--font-mono, monospace);
  font-size: 17px;
  font-weight: 800;
  color: #ffd766;
}
.oshop-goldgen-unit {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255,215,102,0.75);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .oshop-modal-hero { padding: 18px 14px 12px; }
  .oshop-modal-body { padding: 12px 14px; }
  .oshop-modal-footer { padding: 12px 14px 14px; }
  .oshop-modal-icbox { width: 92px; height: 92px; }
  .oshop-modal-icbox > i,
  .oshop-modal-icbox > iconify-icon { font-size: 46px; }
  .oshop-modal-name { font-size: 17px; }
  .oshop-price-total { font-size: 20px; }
  /* 2026-05-26: mobile usaba 1 columna → modal larguísimo en celular cuando un
     item tenía 8+ stats. Mantenemos 2 columnas y compactamos las cells. */
  .oshop-stats-grid { grid-template-columns: 1fr 1fr; gap: 5px 6px; }
  .oshop-stat-cell { padding: 5px 8px; font-size: 11.5px; min-height: 26px; gap: 5px; }
  .oshop-stat-cell i { font-size: 12px; }
}

/* Pantallas muy angostas (< 340px): fallback a 1 columna para que no se rompa */
@media (max-width: 339px) {
  .oshop-stats-grid { grid-template-columns: 1fr; }
}
