/* =========================================
   NOVEDADES SECTION POP-ART REDESIGN (BOOM REFERENCE)
   Target: .home-novedades (Front Page)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Fredoka+One&display=swap');

/* 1. SECCIÓN PRINCIPAL (.home-novedades) */
.home-novedades {
    /* Fondo CYAN estilo referencia */
    background-color: #29B6F6 !important;
    /* Cyan vibrante similar a la ref */
    color: #1a1a1a;
    position: relative;
    padding-top: 8rem !important;
    /* Más espacio arriba para la explosión */
    padding-bottom: 8rem !important;
    border-bottom: 8px solid #111 !important;
    overflow: hidden !important;
    z-index: 1;
}

/* Base Halftone (Puntos sobre el Cyan) */
.home-novedades {
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.3) 2px, transparent 2px),
        /* Puntos Claros */
        radial-gradient(rgba(18, 127, 229, 0.4) 3px, transparent 3.5px) !important;
    /* Puntos Azules oscuros */
    background-size: 20px 20px, 20px 20px !important;
    background-position: 0 0, 10px 10px !important;
}

/* 2. CAPA EXPLOSIÓN ROJA "JAGGED" (::before) */
/* Usamos clip-path para hacer picos afilados como la imagen */
.home-novedades::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(5deg);
    width: 140%;
    height: 140%;
    background-color: #ED1A24;
    /* Rojo Intenso */

    /* Forma de estrella explosiva irregular */
    clip-path: polygon(20% 0%, 35% 30%, 50% 0%, 65% 30%, 80% 0%,
            75% 40%, 100% 20%, 85% 50%, 100% 60%, 80% 65%,
            100% 90%, 65% 75%, 50% 100%, 35% 75%, 0% 90%,
            20% 65%, 0% 60%, 15% 50%, 0% 30%, 25% 40%);

    pointer-events: none;
    z-index: -2;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    /* No funciona con clip-path, usaremos drop-shadow en filter abajo si soportado */
    filter: drop-shadow(10px 10px 0px #111);
    /* Sombra dura negra */
}

/* 3. CAPA RAYOS/ELEMENTOS (::after) */
/* Rayos amarillos simples */
.home-novedades::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        /* Rayo 1 Izq */
        linear-gradient(45deg, transparent 45%, #F1C40F 45%, #F1C40F 55%, transparent 55%),
        /* Rayo 2 Der */
        linear-gradient(-45deg, transparent 45%, #F1C40F 45%, #F1C40F 55%, transparent 55%);
    background-size: 300px 300px;
    background-position: 10% 20%, 90% 80%;
    background-repeat: no-repeat;
    opacity: 0.8;
    pointer-events: none;
    z-index: -1;
    display: none;
    /* Simplificado: Oculto si ensucia, activado si se quiere más caos */
}


/* =========================================
   ELEMENTOS INTERNOS (UI)
   ========================================= */

/* TÍTULO "DESTACADOS" SOBRE NUBE (H2) */
.home-novedades h2 {
    font-family: 'Bangers', cursive !important;
    font-size: 5rem !important;
    color: #1a1a1a !important;
    text-shadow: none !important;
    /* Quitamos sombra texto para usar la nube */
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    position: relative;
    z-index: 10;
    transform: rotate(-2deg);
    display: inline-block;
    padding: 3rem 5rem !important;
    /* Espacio para la nube */
    margin: -2rem 0 2rem 0 !important;
}

/* NUBE BLANCA DETRÁS DEL TÍTULO (H2::before) */
.home-novedades h2::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: -1;

    /* Forma de Nube compuesta por radial gradients en mask o clip-path? 
       Mejor: Usar multiples radial-gradients background y filter para el borde */
    background-image:
        radial-gradient(circle, #fff 50%, transparent 55%),
        radial-gradient(circle, #fff 50%, transparent 55%);
    /* Simplificado: Una elipse con borde "burbujeante" es difícil en CSS puro exacto.
           Usaremos la técnica de border-radius irregular + box-shadow */

    background-color: #fff;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    border: 6px solid #111;
    box-shadow:
        10px 10px 0 #000,
        inset 0 0 20px rgba(0, 0, 0, 0.1) !important;
    /* Textura dentro */
}

/* Puntos halftone DENTRO de la nube (h2::after) */
.home-novedades h2::after {
    content: "";
    position: absolute;
    inset: 10px;
    z-index: -1;
    background-image: radial-gradient(#111 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.3;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    /* Match shape */
}

/* CARDS DE PRODUCTO */
.home-novedades a[href*="product"],
.home-novedades .type-product a {
    background-color: #ffffff !important;
    border: 5px solid #1a1a1a !important;
    /* Borde más grueso */
    box-shadow: 12px 12px 0px 0px #1a1a1a !important;
    /* Sombra negra sólida */
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    position: relative;
    z-index: 10;
}

/* Hover Card */
.home-novedades a[href*="product"]:hover {
    transform: scale(1.05) rotate(2deg) !important;
    box-shadow: 15px 15px 0px 0px #F39314 !important;
    /* Sombra Naranja */
    z-index: 20;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .home-novedades {
        padding-top: 6rem !important;
    }

    .home-novedades h2 {
        font-size: 3rem !important;
        padding: 2rem 3rem !important;
    }

    .home-novedades::before {
        width: 200%;
        height: 100%;
    }

    /* Ajuste explosión */
}