/* Shop Layout with Sidebar */
.shop-layout-container {
    padding-top: 30px;
    padding-bottom: 50px;
}

.shop-layout-container > .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.shop-sidebar-col {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    flex: 0 0 25%;
    max-width: 25%;
}

.shop-products-col {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    flex: 0 0 75%;
    max-width: 75%;
}

@media (min-width: 992px) {
    .shop-sidebar-col {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .shop-products-col {
        flex: 0 0 75%;
        max-width: 75%;
    }
}

/* Sidebar Styles */
.shop-sidebar {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.shop-sidebar .sidebar-widget {
    margin-bottom: 0;
}

.shop-sidebar .widget-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #611715;
    color: #611715;
}

/* Category List */
.product-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-categories-list > li {
    margin-bottom: 10px;
}

.product-categories-list > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
    background: #f8f8f8;
}

.product-categories-list > li > a:hover {
    background: #611715;
    color: #fff;
    transform: translateX(5px);
}

.product-categories-list > li.current-cat > a {
    background: #611715;
    color: #fff;
    font-weight: 700;
}

.product-categories-list .count {
    font-size: 14px;
    opacity: 0.8;
}

/* Subcategories */
.product-categories-list .subcategories {
    list-style: none;
    padding: 10px 0 0 15px;
    margin: 10px 0 0 0;
}

.product-categories-list .subcategories li {
    margin-bottom: 8px;
}

.product-categories-list .subcategories li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    background: transparent;
}

.product-categories-list .subcategories li a:hover {
    background: #ffa62e;
    color: #fff;
    transform: translateX(3px);
}

.product-categories-list .subcategories li.current-cat a {
    background: #ffa62e;
    color: #fff;
    font-weight: 600;
}

/* Products Column */
.shop-products-col {
    padding-left: 30px;
}

/* WooCommerce Products Header - Above Grid */
.woocommerce-products-header {
    padding-top: 80px;
    padding-bottom: 30px;
    background: #fff;
}

.woocommerce-products-header__title {
    font-size: 36px;
    font-weight: 900;
    color: #611715;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    max-width: 100%;
    background: transparent;
}

/* Category Image */
.woocommerce-products-header .category-img {
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Category Description */
.woocommerce-products-header .term-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 20px;
    padding: 0;
    background: transparent;
}

/* Products Grid - Force 3 columns on desktop */
.shop-products-col .products,
.shop-products-col ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    clear: both;
}

.shop-products-col .products li.product,
.shop-products-col ul.products li.product {
    margin: 0 !important;
    width: 100% !important;
    float: none !important;
}

/* Category Section in template-home-shop */
.category-section-wrapper {
    margin-bottom: 50px;
}

.category-section-wrapper .page-subtitle {
    font-size: 28px;
    font-weight: 700;
    color: #611715;
    border-bottom: 2px solid #ffa62e;
    padding-bottom: 10px;
}

.category-section-wrapper .page-subtitle a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-section-wrapper .page-subtitle a:hover {
    color: #ffa62e;
}

/* Responsive Design */
@media (max-width: 1199px) {
    /* Tablet landscape - 3 columns still */
    .shop-sidebar-col {
        flex: 0 0 30%;
        max-width: 30%;
    }
    
    .shop-products-col {
        flex: 0 0 70%;
        max-width: 70%;
        padding-left: 20px;
    }
}

@media (max-width: 991px) {
    /* Tablet - sidebar full width, then products */
    .shop-sidebar-col {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .shop-products-col {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 15px;
    }
    
    .shop-sidebar {
        position: static;
    }
    
    /* 2 columns on tablets */
    .shop-products-col .products,
    .shop-products-col ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    
    .woocommerce-products-header {
        padding-top: 50px;
    }
}

@media (max-width: 767px) {
    .shop-layout-container {
        padding-top: 20px;
        padding-bottom: 30px;
    }
    
    /* 1 column on mobile */
    .shop-products-col .products,
    .shop-products-col ul.products {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .woocommerce-products-header {
        padding-top: 30px;
        padding-bottom: 20px;
    }
    
    .woocommerce-products-header__title {
        font-size: 24px;
    }
    
    .shop-sidebar .widget-title {
        font-size: 20px;
    }
    
    .product-categories-list > li > a {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 575px) {
    /* Extra small mobile */
    .woocommerce-products-header__title {
        font-size: 20px;
    }
    
    .shop-sidebar .widget-title {
        font-size: 18px;
    }
}

/* Override WooCommerce default columns */
/*
.woocommerce ul.products[class*=columns-] li.product,
.woocommerce-page ul.products[class*=columns-] li.product {
    width: 100% !important;
    margin: 0 !important;
}
    */

/* Ensure proper spacing for WooCommerce elements */
.woocommerce-result-count,
.woocommerce-ordering {
    margin-bottom: 20px;
}

/* Archive description */
.term-description {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 5px;
}

/* Pagination */
.woocommerce-pagination {
    margin-top: 50px;
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-pagination ul li {
    margin: 0;
}



.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li span.current {
    background: #611715;
    color: #fff;
}

.woocommerce .products ul::after, .woocommerce .products ul::before, .woocommerce ul.products::after, .woocommerce ul.products::before {
    display: none;
}