/**
 * Category Hero Section Styles
 * 
 * Full-width hero section for category/brand pages
 * Displays Custom H1 and intro content
 * Auto-adjusts height based on content
 * 
 * @package Commerce_Elite
 */

/* ============================================
   CATEGORY HERO SECTION - FULL WIDTH
   ============================================ */

.category-hero-section {
    position: relative;
    width: 100%;
    min-height: 300px;
    padding: 80px 0;
    background: #4a0e0e;
    overflow: hidden;
    z-index: 1;
}

/* Background overlay with image support */
.category-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -1;
}

/* Optional: Add pattern overlay */
.category-hero-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

/* Container keeps content centered */
.category-hero-section .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* ============================================
   HERO TITLE (H1)
   ============================================ */

.category-hero-title {
    margin: 0 0 1.5rem 0;
    padding: 0;
    font-size: clamp(2rem, 5vw, 3.5rem); /* Responsive: 32px - 56px */
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: #ffffff !important;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    word-wrap: break-word;
}

/* ============================================
   HERO INTRO TEXT
   ============================================ */

.category-hero-intro {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    font-size: clamp(1rem, 2vw, 1.125rem); /* Responsive: 16px - 18px */
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95) !important;
    text-align: center;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.category-hero-intro p {
    margin: 0 0 1rem 0;
    color: rgba(255, 255, 255, 0.95) !important;
}

.category-hero-intro p:last-child {
    margin-bottom: 0;
}

/* ============================================
   BREADCRUMBS (Inside Content Area)
   ============================================ */

.category-breadcrumbs-wrapper {
    margin: 0 0 2rem 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.category-breadcrumbs-wrapper .woocommerce-breadcrumb {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.category-breadcrumbs-wrapper .woocommerce-breadcrumb a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.category-breadcrumbs-wrapper .woocommerce-breadcrumb a:hover {
    color: var(--color-primary);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1024px) {
    .category-hero-section {
        padding: 60px 0;
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .category-hero-section {
        padding: 40px 0;
        min-height: 200px;
    }
    
    .category-hero-title {
        margin-bottom: 1rem;
    }
    
    .category-hero-intro {
        font-size: 0.9375rem; /* 15px */
    }
}

@media (max-width: 480px) {
    .category-hero-section {
        padding: 30px 0;
    }
    
    .category-hero-title {
        font-size: 1.75rem; /* 28px */
    }
}

/* ============================================
   AUTO HEIGHT ADJUSTMENT
   ============================================ */

/* Hero adjusts height automatically based on content */
.category-hero-section {
    height: auto; /* Not fixed height */
}

/* Short content: minimum height maintained */
.category-hero-section:has(.category-hero-intro) {
    min-height: 350px;
}

/* Only H1, no intro: smaller minimum */
.category-hero-section:not(:has(.category-hero-intro)) {
    min-height: 250px;
    padding: 50px 0;
}

/* Long content: expands automatically */
/* No max-height restriction */

/* ============================================
   DARK MODE BY DEFAULT
   ============================================ */

/* Hero section is dark by default to match dark themed sites */
/* If you need a light version, add a body class and override colors */

/* ============================================
   ANIMATION (Optional)
   ============================================ */

.category-hero-title {
    animation: fadeInUp 0.6s ease-out;
}

.category-hero-intro {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   BRAND PAGES (Same Styling)
   ============================================ */

/* Applies to both product_category and product_brand taxonomies */
.tax-product_brand .category-hero-section {
    /* Same styles apply */
}