/* --- AJAX Search Field Styling --- */
.ajax-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px; /* Space before the product grid */
    width: 100%;
}

#shop-search-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #eeeeee;
    font-size: 14px;
    background-color: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

#shop-search-input:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.ajax-search-form button {
    padding: 12px 25px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.ajax-search-form button:hover {
    opacity: 0.8;
}

/* Ensure search bar works well on mobile */
@media (max-width: 600px) {
    .ajax-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    .ajax-search-form button {
        width: 100%;
    }
}
/* Main Layout Container */
.shop-main-layout-wrapper {
    display: flex;
    gap: 40px; /* Space between sidebar and products */
    align-items: flex-start;
    width: 100%;
}

/* Sidebar Column (Left) */
.shop-sidebar-column {
    flex: 0 0 25%; /* Sidebar takes 25% width */
    max-width: 25%;
    position: sticky;
    top: 20px; /* Keeps sidebar visible while scrolling products */
}

/* Products Column (Right) */
.shop-products-column {
    flex: 0 0 calc(75% - 40px); /* Remaining space minus gap */
    max-width: calc(75% - 40px);
}

/* Typography for Sidebar */
.filter-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

/* Responsive: Stack them on Mobile */
@media (max-width: 1024px) {
    .shop-main-layout-wrapper {
        flex-direction: column;
    }
    .shop-sidebar-column, 
    .shop-products-column {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* --- Sidebar & Checkbox Styling --- */
.shop-filter-sidebar {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #eeeeee;
	width:250px;
}

.filter-category-list, .child-category-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.filter-item {
    border-bottom: 1px solid #f5f5f5;
}

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.filter-row label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 500;
}

.toggle-children {
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    color: #999;
    width: 25px;
    text-align: center;
}

.child-category-list {
    padding-left: 25px !important;
    padding-bottom: 10px !important;
}

/* --- 3-Column Grid Layout --- */
ul.products.columns-3 {
    gap: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}
/* --- 3-Column Grid Layout Fix --- */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    width: 100% !important;
}

/* Force each list item to stay in the grid flow */
ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important; /* Prevents WooCommerce default floats from breaking grid */
}

/* Ensure the image doesn't collapse the card */
.product-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}
/* --- Fix for Empty First Column --- */
ul.products::before, 
ul.products::after {
    display: none !important; /* Removes invisible spacers */
    content: none !important;
}

ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* Force products to fill the grid from the left */
ul.products li.product {
    grid-column: span 1; 
    margin: 0 !important;
    width: 100% !important;
}
/* --- Custom Product Card --- */
.custom-product-card {
    background: #fff;
    border: 1px solid #ebebeb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.custom-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.product-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.product-card-details {
    padding: 15px;
}

.product-sku {
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.product-card-title {
    font-size: 16px;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.product-card-title a {
    color: #333;
    text-decoration: none;
}

.product-card-price {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 15px;
}

.product-card-actions .button {
    width: 100%;
    background: #000;
    color: #fff !important;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
}

/* Loading Overlay */
.products.loading {
    opacity: 0.4;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 991px) {
    ul.products.columns-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
    ul.products.columns-3 { grid-template-columns: 1fr !important; }
}