/*!
Theme Name: Avanam
Theme URI: https://avanam.org
Author: AvanamOrg
Author URI: https://avanam.org/
Description: This is starter WordPress theme called Avanam. Created for theme developers to start building beautiful WordPress themes using Avanam.
Version: 1.5.9
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: avanam
Requires at least: 6.2
Tested up to: 6.7
Tags: translation-ready, two-columns, right-sidebar, left-sidebar, footer-widgets, blog, custom-logo, custom-background, custom-menu, rtl-language-support, editor-style, threaded-comments, custom-colors, featured-images, wide-blocks, full-width-template, theme-options, e-commerce
Requires PHP: 7.4

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share
what you've learned with others.
*/

/*--------------------------------------------------------------
# Category Cards Layout Fix
--------------------------------------------------------------*/

/* Fix for category cards layout - horizontal arrangement */
.woocommerce ul.products {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

.woocommerce ul.products li.product_cat {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-width: 200px;
    margin-bottom: 0;
}

.woocommerce ul.products li.product_cat .category-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce ul.products li.product_cat .category-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Category thumbnail - ensure it's on top */
.woocommerce ul.products li.product_cat .woocommerce-loop-category__link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce ul.products li.product_cat .woocommerce-loop-category__link img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border-radius: 0.25rem 0.25rem 0 0;
}

/* Category title and count - ensure they're below image */
.woocommerce ul.products li.product_cat .woocommerce-loop-category__title {
    padding: 1rem;
    margin: 0;
    font-size: 1em;
    font-weight: normal;
    line-height: 1.4;
    text-align: center;
    border-radius: 0 0 0.25rem 0.25rem;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.woocommerce ul.products li.product_cat .woocommerce-loop-category__title a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.woocommerce ul.products li.product_cat .woocommerce-loop-category__title mark {
    background: none;
    color: #666666;
    font-size: 0.85em;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
}

/* Hide scrollbar but keep functionality */
.woocommerce ul.products {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.woocommerce ul.products::-webkit-scrollbar {
    display: none; /* WebKit */
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .woocommerce ul.products {
        gap: 0.75rem;
    }
    
    .woocommerce ul.products li.product_cat {
        min-width: 180px;
    }
    
    .woocommerce ul.products li.product_cat .woocommerce-loop-category__title {
        padding: 0.75rem;
        font-size: 0.9em;
    }
}

@media screen and (min-width: 769px) {
    .woocommerce ul.products li.product_cat {
        min-width: 220px;
    }
}

@media screen and (min-width: 1200px) {
    .woocommerce ul.products {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .woocommerce ul.products li.product_cat {
        flex: 0 0 calc(20% - 1rem);
        max-width: calc(20% - 1rem);
    }
}