/**
 * Desarrollado por Iñaki Serrano para Webcomunica.solutions
 * MASTER.CSS - Hoja de estilos principal de ChollosComics.com
 */


/* ─── RESET Y BASE ──────────────────────────────────────── */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a2e;
    background: #f5f5f7;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* ─── CONTENEDOR ─────────────────────────────────────────── */

.contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ─── CABECERA ───────────────────────────────────────────── */

.cabecera {
    background: #1a1a2e;
    padding: 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cabecera .contenedor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* Logo */
.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-texto {
    color: #ffffff;
}

.logo-acento {
    color: #e63946;
}

/* Navegación */
.nav-principal {
    display: flex;
    gap: 24px;
}

.nav-principal a {
    color: #a8a8b3;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-principal a:hover {
    color: #ffffff;
}


/* ─── DROPDOWN CATEGORÍAS ────────────────────────────────── */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a2e;
    border: 1px solid #2d2d44;
    border-radius: 0 0 6px 6px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 200;
    padding: 6px 0;
}

.nav-dropdown-menu.abierto {
    display: block;
}

.nav-dropdown-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    color: #c8c8d0;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover {
    background: #2d2d44;
    color: #ffffff;
}

.nav-cat-total {
    font-size: 0.75rem;
    color: #6c6c80;
    background: #2d2d44;
    padding: 2px 8px;
    border-radius: 10px;
}

.nav-dropdown-menu a:hover .nav-cat-total {
    background: #3d3d54;
}


/* ─── HERO ───────────────────────────────────────────────── */

.hero {
    position: relative;
    padding: 80px 20px;
    text-align: center;
    overflow: hidden;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fondo con imagen de cómics */
.hero-fondo {
    position: absolute;
    inset: 0;
    background: url('../img/fondo.jpg') center center / cover no-repeat;
    filter: brightness(0.3);
    z-index: 0;
}

.hero-contenido {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: #c8c8d0;
    margin-bottom: 28px;
}

/* Botón Telegram */
.boton-telegram {
    display: inline-block;
    background: #e63946;
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.2s;
}

.boton-telegram:hover {
    background: #c52d39;
    transform: translateY(-1px);
}


/* ─── TICKER DE BLOG ─────────────────────────────────────── */

.ticker-seccion {
    display: flex;
    align-items: stretch;
    background: #1a1a2e;
    overflow: hidden;
    border-bottom: 2px solid #e63946;
}

.ticker-etiqueta {
    background: #e63946;
    color: #ffffff;
    padding: 12px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    z-index: 2;
    position: relative;
}

.ticker-etiqueta::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    bottom: 0;
    width: 10px;
    background: linear-gradient(to right, #e63946, transparent);
    z-index: 3;
}

.ticker-contenedor {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-cinta {
    display: flex;
    animation: ticker-scroll 40s linear infinite;
    white-space: nowrap;
}

.ticker-cinta:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    color: #c8c8d0;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.ticker-item:hover {
    color: #e63946;
}

.ticker-bullet {
    color: #e63946;
    margin-right: 10px;
    font-size: 0.7rem;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 480px) {
    .ticker-etiqueta {
        padding: 10px 12px;
        font-size: 0.65rem;
    }
    .ticker-item {
        font-size: 0.8rem;
        padding: 10px 16px;
    }
}


/* ─── SECCIONES ──────────────────────────────────────────── */

.ofertas-seccion {
    padding: 40px 0;
}

.seccion-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e63946;
    display: inline-block;
}

.sin-ofertas {
    text-align: center;
    color: #6c6c80;
    padding: 60px 0;
    font-size: 1.05rem;
}

.sin-ofertas a {
    color: #e63946;
    font-weight: 600;
}


/* ─── FILTRO DE IDIOMA ────────────────────────────────────── */

.filtro-idioma {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.filtro-boton {
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #e8e8ec;
    color: #4a4a5a;
    transition: background 0.2s, color 0.2s;
}

.filtro-boton:hover {
    background: #d0d0d8;
}

.filtro-boton.filtro-activo {
    background: #1a1a2e;
    color: #ffffff;
}


/* ─── GRID DE OFERTAS ────────────────────────────────────── */

.ofertas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}


/* ─── TARJETA DE OFERTA ──────────────────────────────────── */

.oferta-tarjeta {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.oferta-tarjeta:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Badge de descuento */
.oferta-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    z-index: 2;
}

.descuento-mega {
    background: #c52d39;
}

.descuento-alto {
    background: #e63946;
}

.descuento-medio {
    background: #d4652e;
}

.descuento-bajo {
    background: #6c6c80;
}

/* Pegatina de idioma */
.oferta-idioma {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.idioma-espanol {
    background: #2d8a4e;
    color: #ffffff;
}

.idioma-ingles {
    background: #2563ab;
    color: #ffffff;
}

.idioma-otro {
    background: #6c6c80;
    color: #ffffff;
}

/* Imagen */
.oferta-imagen-enlace {
    display: block;
    background: #f0f0f2;
    padding: 20px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oferta-imagen {
    max-height: 220px;
    width: auto;
    object-fit: contain;
}

/* Info */
.oferta-info {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.oferta-titulo {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.oferta-titulo a {
    color: #1a1a2e;
    transition: color 0.2s;
}

.oferta-titulo a:hover {
    color: #e63946;
}

.oferta-resena {
    font-size: 0.85rem;
    color: #6c6c80;
    margin-bottom: 12px;
    line-height: 1.5;
    flex-grow: 1;
}

/* Precios */
.oferta-precios {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.precio-original {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
}

.precio-actual {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e63946;
}

/* Botón comprar */
.boton-comprar {
    display: block;
    text-align: center;
    background: #1a1a2e;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
    margin-top: auto;
}

.boton-comprar:hover {
    background: #2d2d44;
}


/* ─── DETALLE DE OFERTA ──────────────────────────────────── */

.oferta-detalle {
    padding: 40px 0;
}

.oferta-detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.oferta-detalle-imagen {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.oferta-detalle-imagen img {
    max-height: 450px;
    margin: 0 auto;
    object-fit: contain;
}

.oferta-detalle-titulo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 12px 0 20px;
    line-height: 1.3;
}

.oferta-detalle-precios {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.precio-original-grande {
    font-size: 1.1rem;
    color: #999;
    text-decoration: line-through;
}

.precio-actual-grande {
    font-size: 2rem;
    font-weight: 700;
    color: #e63946;
}

.ahorro {
    font-size: 0.9rem;
    color: #2d8a4e;
    font-weight: 600;
    background: #e8f5e9;
    padding: 4px 10px;
    border-radius: 4px;
}

.oferta-detalle-resena {
    background: #f8f8fa;
    border-left: 3px solid #e63946;
    padding: 20px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 24px;
}

.oferta-detalle-resena p {
    color: #3a3a4e;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Pegatina idioma en detalle */
.oferta-idioma-detalle {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.boton-comprar-grande {
    display: block;
    text-align: center;
    background: #e63946;
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: background 0.2s, transform 0.2s;
    margin-bottom: 12px;
}

.boton-comprar-grande:hover {
    background: #c52d39;
    transform: translateY(-1px);
}

.oferta-aviso {
    font-size: 0.8rem;
    color: #999;
    text-align: center;
}


/* ─── CATEGORÍAS ─────────────────────────────────────────── */

.categorias-seccion {
    padding: 40px 0;
}

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.categoria-tarjeta {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s, transform 0.2s;
    text-align: center;
}

.categoria-tarjeta:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.categoria-tarjeta h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.categoria-tarjeta p {
    font-size: 0.85rem;
    color: #6c6c80;
}


/* ─── BLOG ───────────────────────────────────────────────── */

.blog-seccion {
    padding: 40px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.blog-tarjeta {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s, transform 0.2s;
}

.blog-tarjeta:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.blog-imagen-enlace {
    display: block;
    overflow: hidden;
    max-height: 200px;
}

.blog-imagen {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-tarjeta:hover .blog-imagen {
    transform: scale(1.03);
}

.blog-info {
    padding: 20px;
}

.blog-fecha {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-titulo {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 8px 0;
    line-height: 1.4;
}

.blog-titulo a {
    color: #1a1a2e;
    transition: color 0.2s;
}

.blog-titulo a:hover {
    color: #e63946;
}

.blog-extracto {
    font-size: 0.9rem;
    color: #6c6c80;
    line-height: 1.5;
    margin-bottom: 12px;
}

.blog-leer-mas {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e63946;
}

.blog-leer-mas:hover {
    color: #c52d39;
}


/* ─── ARTÍCULO DETALLE ───────────────────────────────────── */

.articulo-detalle {
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
}

.articulo-cabecera {
    margin-bottom: 24px;
}

.articulo-categoria {
    display: inline-block;
    background: #e8e8ec;
    color: #4a4a5a;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.articulo-titulo {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 12px 0 8px;
    line-height: 1.3;
}

.articulo-autor {
    font-size: 0.85rem;
    color: #999;
}

.articulo-imagen-principal {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.articulo-imagen-principal img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.articulo-contenido {
    font-size: 1rem;
    line-height: 1.8;
    color: #2a2a3e;
}

.articulo-contenido h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 32px 0 12px;
}

.articulo-contenido h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 24px 0 10px;
}

.articulo-contenido p {
    margin-bottom: 16px;
}

.articulo-contenido ul,
.articulo-contenido ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.articulo-contenido li {
    margin-bottom: 6px;
}

.articulo-contenido strong {
    color: #1a1a2e;
}

.articulo-etiquetas {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e8e8ec;
}

.etiqueta {
    display: inline-block;
    background: #f0f0f2;
    color: #4a4a5a;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 6px;
    margin-bottom: 6px;
}


/* ─── PAGINACIÓN ─────────────────────────────────────────── */

.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 20px 0;
}

.paginacion-enlace {
    background: #1a1a2e;
    color: #fff;
    padding: 8px 18px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

.paginacion-enlace:hover {
    background: #2d2d44;
}

.paginacion-actual {
    font-size: 0.85rem;
    color: #6c6c80;
}


/* ─── PÁGINAS LEGALES ────────────────────────────────────── */

.pagina-legal {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 0;
}

.pagina-legal h1 {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.pagina-legal h2 {
    font-size: 1.2rem;
    margin: 24px 0 8px;
}

.pagina-legal p {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #3a3a4e;
}


/* ─── PIE DE PÁGINA ──────────────────────────────────────── */

.pie {
    background: #1a1a2e;
    color: #a8a8b3;
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.85rem;
}

.pie p {
    margin-bottom: 6px;
}

.pie-enlaces a {
    color: #c8c8d0;
    transition: color 0.2s;
}

.pie-enlaces a:hover {
    color: #ffffff;
}

.separador {
    margin: 0 8px;
    color: #444;
}

.pie-afiliado {
    font-size: 0.75rem;
    color: #6c6c80;
    margin-top: 10px;
}


/* ─── RESPONSIVE ─────────────────────────────────────────── */

/* Tablets */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero {
        padding: 60px 20px;
        min-height: 260px;
    }

    .oferta-detalle-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ofertas-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }

    .precio-actual-grande {
        font-size: 1.6rem;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .cabecera .contenedor {
        flex-direction: column;
        height: auto;
        padding: 12px 20px;
        gap: 8px;
    }

    .nav-principal {
        gap: 16px;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .ofertas-grid {
        grid-template-columns: 1fr;
    }

    .oferta-detalle-titulo {
        font-size: 1.2rem;
    }
}
