/* ========================================
   CATEGORY HERO WITH SEO-FRIENDLY IMG
   ======================================== */

/* Hero container - UPDATED for IMG approach */
.category-hero {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
}

/* SEO-friendly background image */
.category-hero .category-hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

/* Dark overlay */
.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    z-index: 2;
}

/* Content container */
.category-hero .term-description {
    position: relative;
    z-index: 3;
    padding: 140px 20px;
}

/* ========================================
   TYPOGRAPHY STYLES
   ======================================== */

/* Main heading */
.term-description h1 {
    font-size: 1.2em; 
    line-height: 1.3;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Hero heading override */
.category-hero .term-description h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-size: 1.4em;
    margin-bottom: 20px;
}

/* Text spacing adjustments */
.term-description blockquote, 
.term-description dl, 
.term-description figure, 
.term-description form, 
.term-description ol, 
.term-description p, 
.term-description pre, 
.term-description ul {
    margin-bottom: -0.2em;
}

/* ========================================
   TEXT OVERLAY STYLES
   ======================================== */

.text-overlay {
    background: rgba(255, 255, 255, 0.25);
    padding: 10px 14px;
    border-radius: 4px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
    line-height: 1.5;
}

/* ========================================
   ACCORDION STYLES
   ======================================== */

.term-description .accordion summary {
    background: rgba(255,255,255,0.15);
    padding: 2px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    list-style: none;
    outline: none;
}

.term-description .accordion summary::-webkit-details-marker {
    display: none;
}

.term-description .accordion summary::after {
    content: ' ▼';
    float: right;
    transition: transform 0.3s ease;
}

.term-description .accordion[open] summary::after {
    transform: rotate(180deg);
}

.term-description .accordion summary:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

.term-description .accordion[open] summary {
    background: rgba(0,0,0,0.05);
    margin-bottom: 5px;
}

.term-description .accordion-content {
    padding: 7px;
    background: rgba(255,255,255,0.95);
    color: #333;
    border-radius: 8px;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.term-description .compact-text {
    font-size: 0.95em;
    width: 100%;
    max-width: none;
}

.term-description .compact-text strong {
    color: #2c3e50;
}

.term-description .compact-text p {
    margin: 0 0 1px 0;
}

.term-description .compact-text p:last-child {
    margin-bottom: 0;
}

/* Hero accordion overrides */
.category-hero .accordion summary {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    background: rgba(255,255,255,0.1);
}

.category-hero .accordion summary:hover {
    background: rgba(255,255,255,0.2);
}

/* ========================================
   TAGS STYLES
   ======================================== */

.term-description .custom-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

/* Webkit scrollbar styling */
.term-description .custom-tags::-webkit-scrollbar {
    height: 6px;
}

.term-description .custom-tags::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
}

.term-description .custom-tags::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.term-description .custom-tags::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

.term-description .custom-tags .woocommerce-product-tags {
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    padding-left: 25px;
    white-space: nowrap;
    flex-shrink: 0;
    backdrop-filter: blur(5px);
}

.term-description .custom-tags .woocommerce-product-tags::before {
    content: '#';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: #666;
}

.term-description .custom-tags .woocommerce-product-tags:hover {
    background: white;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Hide BR tags in tags */
.term-description .custom-tags br {
    display: none;
}

/* Hero tags size adjustment */
.category-hero .custom-tags .woocommerce-product-tags {
    font-size: 0.6em;
    padding: 6px 11px;
    padding-left: 18px;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    /* Hero adjustments */
    .category-hero .term-description {
        padding: 30px 15px;
    }
    
    .category-hero .term-description h1 {
        font-size: 1.2em;
    }
    
    /* Accordion mobile */
    .term-description .accordion summary {
        padding: 10px 15px;
        font-size: 1em;
    }
    
    .term-description .accordion-content {
        padding: 15px;
    }
    
    /* WooCommerce filters positioning */
    .category-filtering,
    .woocommerce-ordering {
        position: absolute;
        top: 2.9rem;
    }

    .category-filtering {
        left: 45%;
        top: 56%;
        transform: translateX(-100%);
    }

    .woocommerce-ordering {
        left: 45%;
        top: 65%;
        transform: translateX(10%);
    }

    .filter-button {
        display: inline-block;
        margin-top: 0.1em; 
    }

    .woocommerce-ordering select {
        padding: 0.2em 1.4em;
        line-height: 0.8;
        font-size: 1rem;
        height: auto;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    /* Hero mobile */
    .category-hero .term-description {
        padding: 25px 10px;
    }
    
    .category-hero .term-description h1 {
        font-size: 1.1em;
    }
    
    /* Tags mobile - general */
    .term-description .custom-tags .woocommerce-product-tags {
        font-size: 0.8em;
        padding: 6px 12px;
        padding-left: 22px;
    }
    
    .term-description .custom-tags {
        gap: 4px;
    }
    
    /* Tags mobile - hero specific */
    .category-hero .custom-tags .woocommerce-product-tags {
        font-size: 0.56em;
        padding: 4px 8px;
        padding-left: 15px;
    }
    
    /* Text overlay mobile */
    .text-overlay {
        padding: 8px 12px;
        margin-bottom: 12px;
    }
}