/*
 * WooCommerce — Product Category
 * Hero Immersiva (Immersive)
 */

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~                     HERO IMMERSIVA                            ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

.bpc-category-hero-immersive {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background-color: var(--bspc-bg-white);

    height: 260px;

    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 40px;

    transform: translateZ(0);
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/*
 * Fix overflow on mobile: la hero immersiva usa 100vw e margini negativi
 * per estendersi oltre il contenitore su desktop. Su schermi piccoli
 * questo causa uno scroll orizzontale fastidioso. Qui forziamo
 * larghezza e margini a valori normali su mobile per prevenire l'overflow.
 */
@media (max-width: 767px) {
    .bpc-category-hero-immersive {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        /* Assicura che l'immagine non abbia bordi arrotondati su mobile */
        border-radius: 0;
    }
}

@media (min-width: 768px) {
    .bpc-category-hero-immersive {
        height: 420px;
        margin-bottom: 50px;
    }
}

.bpc-hero-bg-wrapper {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

/* Fallback se non esiste un'immagine di hero. */
.bpc-hero-bg-wrapper.bpc-hero-fallback-gradient {
    background: radial-gradient(circle at 20% 10%, rgba(0,113,227,0.10), rgba(245,245,247,1) 70%);
}

/* Immagine (nitida + slow zoom) */
.bpc-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    opacity: 1;
    display: block;
    animation: bpcHeroSlowZoom 10s ease-out forwards;
    will-change: transform;
}

/* Optional background video (MP4 loop). Poster uses the hero image.
   The overlay remains above the video for readability. */
.bpc-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    z-index: 1;
    pointer-events: none;
}

/* Overlay: lascia vedere l'immagine ma sfuma in basso verso lo sfondo pagina */
.bpc-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.2) 0%,
        rgba(245,245,247,0.6) 70%,
        rgba(245,245,247,1) 100%
    );
}

.bpc-hero-inner {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    padding: 0 20px;
    margin-top: -20px;

    text-shadow: 0 2px 10px rgba(255,255,255,0.8);

    animation: bpcHeroFadeUp 0.8s var(--bspc-ease-apple) forwards;
}

.bpc-hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 5px 0 0;
    color: var(--bspc-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .bpc-hero-title {
        font-size: 3.5rem;
        margin-top: 10px;
    }
}

/* Animazioni */
/* [Theme Architect] Prefisso keyframes per evitare collisioni cross-template. */
@keyframes bpcHeroSlowZoom {
    from { transform: scale(1.1); }
    to   { transform: scale(1.0); }
}

@keyframes bpcHeroFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}



/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~                     BADGES (SEO/UX)                           ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

.bpc-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    justify-content: center;
}

.bpc-hero-badge-item {
    margin: 0;
    padding: 0;
}

.bpc-hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid var(--bspc-border-subtle);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: var(--bspc-shadow-sm);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--bspc-text-primary);
}

.bpc-hero-badge.is-brand { border-color: rgba(16, 185, 129, 0.35); }
.bpc-hero-badge.is-category { border-color: rgba(59, 130, 246, 0.35); }
.bpc-hero-badge.is-segment { border-color: rgba(99, 102, 241, 0.35); }
