/* ==========================================================================
   category-banner.css - Bright Premium Category Hero
   ========================================================================== */

/* Hide the Topbar globally on category pages */
body.category-page .topbar {
    display: none !important;
}

/* --- Bright, Eye-Pleasing Colors (Great contrast for white headers) --- */
.cat-color-azure {
    /* Elegant, vibrant ocean blue */
    --cat-bg-color: #0284c7; 
}

.cat-color-coral {
    /* Warm, appealing terracotta/coral */
    --cat-bg-color: #e17055; 
}

.cat-color-jade {
    /* Rich, premium emerald green */
    --cat-bg-color: #059669; 
}

/* --- Hero Section & Seamless Gradient Fade --- */
.category-hero {
    position: relative;
    width: 100%;
    /* Extra top padding so the header sits nicely over the solid color */
    padding-top: clamp(100px, 12vw, 140px); 
    padding-bottom: var(--space-4);
    
    /* 
       THE SEAMLESS GRADIENT:
       - 0% to 55%: Solid bright color (Header and Title stay highly visible)
       - 55% to 100%: Smoothly dissolves into total transparency to merge with the page below
    */
    background: linear-gradient(
        to bottom, 
        var(--cat-bg-color) 0%, 
        var(--cat-bg-color) 55%, 
        rgba(255, 255, 255, 0) 100% 
    );
    overflow: hidden;
}

/* Force Flexbox Row Layout */
.cat-hero-inner {
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: space-between;
    min-height: 220px;
}

/* --- Left Side: Category Name --- */
.cat-hero-content {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    /* Pushes text slightly up to keep it safely inside the solid colored area */
    margin-top: -40px; 
}

.cat-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    /* White text ensures it pops beautifully against the bright colors */
    color: #ffffff; 
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Subtle shadow for extra readability */
}

/* --- Right Side: Transparent Product Image --- */
.cat-hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end; 
    align-items: center;
}

.cat-png-img {
    width: 100%;
    max-width: 380px; 
    height: auto;
    object-fit: contain;
    /* Elegant drop shadow to make the PNG pop */
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.2));
    animation: floatPNG 6s ease-in-out infinite;
}

/* Smooth 3D Floating Animation */
@keyframes floatPNG {
    0% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0) rotate(-2deg); }
}


/* ==========================================================================
   RESPONSIVE OVERRIDES (Maintains Left/Right split on mobile)
   ========================================================================== */

@media (max-width: 991px) {
    .category-hero {
        padding-top: 110px;
    }
    
    .cat-png-img {
        max-width: 280px;
    }
}

@media (max-width: 767px) {
    .category-hero {
        padding-top: 90px;
        /* Extend the solid color area slightly on mobile so the stacked header fits */
        background: linear-gradient(
            to bottom, 
            var(--cat-bg-color) 0%, 
            var(--cat-bg-color) 65%, 
            rgba(255, 255, 255, 0) 100% 
        );
    }
    
    /* Ensures text and image stay side-by-side even on tiny phone screens */
    .cat-hero-inner {
        flex-direction: row; 
        min-height: 160px;
        gap: 16px;
    }
    
    .cat-hero-content {
        margin-top: -20px;
    }

    .cat-hero-title {
        font-size: 2rem;
    }
    
    .cat-png-img {
        max-width: 160px; 
    }
}