/* Ofertas de juegos españoles en v2 (bd/ofertas-v2). Se apoya en fjuego-v2.css, listado-v2.css y taxonomia-v2.css. */

.of-cifras { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.of-cifras a.tx-cifra { color: inherit; text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease; }
.of-cifras a.tx-cifra:hover { transform: translateY(-2px); border-color: rgba(255, 196, 87, 0.5); }
.of-explica { margin: -0.4rem 0 1rem; font-size: 0.8rem; color: #9bc6dc; }

/* Filtros */
.of-tiendas { margin-top: 0 !important; }
.of-filtros { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin-top: 1rem; }
.of-filtros .lv-chips { margin: 0; }

/* Rejilla de tarjetas: 48 por página cuadra con 2, 3, 4, 6 y 8 columnas */
.of-rejilla { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.of-rejilla-destacada { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }

.of-tarjeta { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 0.9rem; overflow: hidden; background: rgba(2, 24, 37, 0.55); border: 1px solid rgba(155, 198, 220, 0.14); transition: border-color 0.2s ease, transform 0.2s ease; }
.of-tarjeta:hover { border-color: rgba(var(--v2-acento-rgb, 57, 192, 255), 0.45); transform: translateY(-2px); }

.of-portada { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; overflow: hidden; background: linear-gradient(160deg, rgba(var(--v2-acento-rgb, 57, 192, 255), 0.12), rgba(2, 24, 37, 0.9)); color: rgba(155, 198, 220, 0.35); font-size: 2rem; text-decoration: none !important; }
.of-portada img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.of-tarjeta:hover .of-portada img { transform: scale(1.04); }
.of-portada::after { content: ""; position: absolute; inset: auto 0 0; height: 35%; background: linear-gradient(transparent, rgba(2, 24, 37, 0.85)); pointer-events: none; }

.of-descuento { position: absolute; z-index: 1; top: 0.55rem; left: 0.55rem; padding: 0.2rem 0.5rem; border-radius: 0.45rem; font-family: "IBMPlexMono", monospace; font-size: 0.95rem; font-weight: bold; color: #021825; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.7); }
.of-d-bajo { background: #9bc6dc; }
.of-d-medio { background: #5cffb1; }
.of-d-alto { background: #ffc457; }
.of-nota { position: absolute; z-index: 1; right: 0.55rem; bottom: 0.55rem; padding: 0.15rem 0.45rem; border-radius: 0.4rem; font-family: "IBMPlexMono", monospace; font-size: 0.75rem; font-weight: bold; color: #fff; background: rgba(2, 24, 37, 0.8); border: 1px solid rgba(155, 198, 220, 0.3); }

.of-datos { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; padding: 0.75rem 0.8rem 0.8rem; min-width: 0; }
.of-titulo { font-weight: bold; font-size: 0.92rem; line-height: 1.25; color: #fff !important; text-decoration: none !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.of-titulo:hover { color: #66ccff !important; }
.of-autor { font-size: 0.75rem; color: #9bc6dc !important; text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-autor:hover { color: #66ccff !important; }
.of-autor i { font-size: 0.68rem; opacity: 0.7; }
.of-generos { font-size: 0.72rem; color: #7fa3b8; }

.of-sellos { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.of-sellos b { padding: 0.1rem 0.4rem; border-radius: 0.35rem; font-size: 0.66rem; font-weight: bold; color: #cdeaf7; background: rgba(155, 198, 220, 0.12); border: 1px solid rgba(155, 198, 220, 0.22); }
.of-s-plus { color: #ffe066 !important; border-color: rgba(255, 224, 102, 0.4) !important; }
.of-s-barata { color: #5cffb1 !important; border-color: rgba(92, 255, 177, 0.4) !important; }

.of-pie { margin-top: auto; padding-top: 0.4rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem; }
.of-tienda { display: flex; align-items: center; gap: 0.35rem; min-width: 0; font-size: 0.68rem; color: #7fa3b8; }
.of-tienda img { flex-shrink: 0; width: 1.3rem; height: 1.3rem; object-fit: contain; border-radius: 0.25rem; }
.of-tienda img.v2-logo-oscuro { filter: invert(1) hue-rotate(180deg); }
.of-tienda span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-precios { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-family: "IBMPlexMono", monospace; }
.of-precios s { font-size: 0.72rem; color: #7fa3b8; }
.of-precios strong { font-size: 1.05rem; color: #5cffb1; }

.of-boton { margin-top: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.45rem 0.6rem; border-radius: 0.55rem; font-size: 0.75rem; font-weight: bold; color: #cdeaf7 !important; text-decoration: none !important; background: rgba(var(--v2-acento-rgb, 57, 192, 255), 0.1); border: 1px solid rgba(var(--v2-acento-rgb, 57, 192, 255), 0.3); transition: background 0.2s ease, color 0.2s ease; }
.of-boton:hover { color: #021825 !important; background: var(--v2-acento, #39c0ff); }
.of-boton i { font-size: 0.65rem; }

/* Destacadas: portada a la izquierda y datos a la derecha */
.of-tarjeta-destacada { flex-direction: row; border-color: rgba(255, 196, 87, 0.3); }
.of-tarjeta-destacada:hover { border-color: rgba(255, 196, 87, 0.6); }
.of-tarjeta-destacada .of-portada { flex: 0 0 42%; aspect-ratio: auto; min-height: 12rem; }
.of-tarjeta-destacada .of-titulo { font-size: 1rem; }
.of-tarjeta-destacada .of-precios strong { font-size: 1.25rem; }

@media (max-width: 1400px) {
    .of-rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .of-rejilla-destacada { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .of-rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .of-cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .of-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
    .of-rejilla-destacada { grid-template-columns: 1fr; }
    .of-filtros { gap: 0.6rem; }
    .of-datos { padding: 0.6rem; }
    .of-pie { flex-direction: column; align-items: stretch; }
    .of-precios { flex-direction: row; align-items: baseline; justify-content: space-between; }
}
