/* Professional Category Layout Styles */

/* Hide theme interfering elements - Only on category pages */
.woocommerce-page.archive .post_item,
.woocommerce-page.archive .post_featured,
.woocommerce-page.archive .post_featured .post_thumb,
.woocommerce-page.archive .post_content_wrap,
.woocommerce-page.archive .post_content {
    display: none !important;
}

/* Main container for category layout - Professional Design */
.woocommerce-page .category-layout-container,
body.woocommerce .category-layout-container,
.woocommerce .category-layout-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 24px !important;
    margin: 0 0 32px 0 !important;
    padding: 24px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e5e7eb !important;
    flex-wrap: nowrap !important;
    position: relative !important;
    transition: all 0.2s ease !important;
}

.woocommerce-page .category-layout-container:hover,
body.woocommerce .category-layout-container:hover,
.woocommerce .category-layout-container:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px) !important;
}

/* Image section - Professional styling */
.category-image-section {
    flex: 0 0 30% !important;
    max-width: 30% !important;
    min-width: 200px !important;
    width: 30% !important;
    position: relative !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.category-image-section img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    border-radius: 6px !important;
    transition: transform 0.2s ease !important;
    display: block !important;
}

.category-image-section:hover img {
    transform: scale(1.02) !important;
}

/* Description section - Professional styling */
.category-description-section {
    flex: 1 !important;
    max-width: 45% !important;
    min-width: 300px !important;
    width: 45% !important;
    padding: 0 !important;
}

/* Category titles - Professional styling */
.category-content h2,
.category-content .woocommerce-loop-category__title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin: 0 0 12px 0 !important;
    color: #1f2937 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.025em !important;
}

.category-content h2 a,
.category-content .woocommerce-loop-category__title a,
.category-content h2 mark,
.category-content .woocommerce-loop-category__title mark {
    text-decoration: none !important;
    color: #cb0000 !important;
    display: inline !important;
    transition: color 0.2s ease !important;
}

.category-content h2 a:hover,
.category-content .woocommerce-loop-category__title a:hover {
    color: #0081b9 !important;
}

/* Category description text - Professional styling */
.category-description {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #6b7280 !important;
    margin: 0 0 16px 0 !important;
    font-weight: 400 !important;
}

/* Button section - Professional styling */
.category-button-section {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    min-width: 140px !important;
    width: 25% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

/* View button - Professional styling */
.category-view-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    background: #0081b9 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.category-view-button:hover {
    background: #fd9833 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.category-view-button svg {
    width: 14px !important;
    height: 14px !important;
    fill: currentColor !important;
    transition: transform 0.2s ease !important;
}

.category-view-button:hover svg {
    transform: translateX(2px) !important;
}

/* Force override grid/flex layouts that might interfere */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: block !important;
    grid-template-columns: none !important;
    flex-direction: column !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 0 0rem 0 !important;
}

.tax-product_cat.woocommerce ul.products.columns-3 {
    width: 33.3333333333%!important;
}

.tax-product_cat.woocommerce-page.archive .post_item, 
.tax-product_cat.woocommerce-page.archive .post_featured, 
.tax-product_cat.woocommerce-page.archive .post_featured .post_thumb, 
.tax-product_cat.woocommerce-page.archive .post_content_wrap, 
.tax-product_cat.woocommerce-page.archive .post_content {    
    display: block!important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woocommerce-page .category-layout-container,
    body.woocommerce .category-layout-container,
    .woocommerce .category-layout-container {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px !important;
        gap: 20px !important;
    }
    
    .category-image-section,
    .category-description-section,
    .category-button-section {
        flex: none !important;
        max-width: 100% !important;
        min-width: auto !important;
        width: 100% !important;
    }
    
    .category-content h2,
    .category-content .woocommerce-loop-category__title {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 480px) {
    .woocommerce-page .category-layout-container,
    body.woocommerce .category-layout-container,
    .woocommerce .category-layout-container {
        padding: 16px !important;
        gap: 16px !important;
    }
    
    .category-content h2,
    .category-content .woocommerce-loop-category__title {
        font-size: 1.2rem !important;
    }
    
    .category-view-button {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
    }
}