/* ==========================================================================
   1. LAYOUT CONTAINER
   ========================================================================== */

/* Hide the automatic WooCommerce 'View Cart' link on shop pages */
.added_to_cart.wc-forward {
    display: none !important;
}

/* Optional: Add a loading spinner to the button while adding */
.shop-ajax-add-to-cart.loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: rotate 0.6s linear infinite;
    margin-left: 10px;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}
:is(
    .star-rating,
    .wc-block-components-product-rating-stars__stars,
    .wp-block-woocommerce-product-filter-rating .wc-block-components-product-rating__stars,
    .wc-block-grid__product-rating .wc-block-grid__product-rating__stars,
    .has-rating .wc-block-components-review-list-item__rating > .wc-block-components-review-list-item__rating__stars
):before {
    content: none !important;
}

:is(.star-rating,.wc-block-components-product-rating-stars__stars,.wp-block-woocommerce-product-filter-rating .wc-block-components-product-rating__stars,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars,.has-rating .wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars){font-size:1.2em;color:hsl(37 91% 50%) !important;letter-spacing:.2em;width:5.5em;line-height:0.8em !important;}

.shop-container {
    display: flex;
    gap: 50px;
    padding: 60px 5%;
    background-color: #F5F3EF;
    align-items: flex-start;
	border-bottom:1px solid hsl(220 13% 91%);
}

/* ==========================================================================
   2. SIDEBAR & MODERN CHECKBOXES
   ========================================================================== */
.sidebar {
    width: 260px;
    flex-shrink: 0;
}

.sidebar h1 {
    font-family: "Playfair Display", serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 40px;
    color: rgb(26, 26, 26);
    margin-bottom: 20px;
}

.filter-title {
    font-family: "Playfair Display", serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: rgb(26, 26, 26);
    margin-bottom: 25px;
    text-transform: uppercase;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-item {
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: rgb(26, 26, 26);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
}
.filter-item:hover {
    color: #000;
}

/* Modern Checkbox Styling */
.filter-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid hsl(220 13% 91%);
    border-radius: 4px;
    margin: 0;
    cursor: pointer;
    outline: none;
    position: relative;
    background: #fff;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.filter-item input[type="checkbox"]:checked {
    background-color: #000;
}

.filter-item input[type="checkbox"]:checked::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   3. PRODUCT GRID
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    flex-grow: 1;
}

/* ==========================================================================
   4. PRODUCT CARD (DITTO STYLE)
   ========================================================================== */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.05);
	border:1px solid rgb(0 0 0 / 15%);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/*.product-image-wrapper {*/
/*    background-color: #F5F3EF;*/
/*    padding: 20px;*/
/*    display: flex;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*    min-height: 230px;*/
/*}*/

.purchase-selection {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px;
    margin-bottom: 7px;
}

.custom-ajax-add-to-cart{margin-top:10px !important;}

label{font-size:13px !important; }

.product-image-wrapper img {
    max-width: 100%;
    height: auto;
    mix-blend-mode: multiply;
}

.product-info {
    padding: 15px;
    text-align: left;
    gap: 4px !important;
}

.review-row {
    display: flex;
    align-items: center;
    margin: 5px 0px;
}

.star-rating {
    color: #D48B44;
    font-size: 14px;
    line-height: 1;
}

.rev-text {
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #666;
}

.dynamic-product-title {
    font-family: "Playfair Display", serif;
    font-size: 16px;
    font-weight: 700;
    margin: 5px 0 15px 0;
    color: #000;
    line-height: 1.4;
}

/* ==========================================================================
   5. BUTTONS & SELECTION
   ========================================================================== */
.main-add-to-cart {
    width: 100%;
    padding: 10px;
    background: #000 !important;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.main-add-to-cart:hover {
    opacity: 0.85;
    background: #2e5738 !important;
    color: #fff !important;
}

/* ==========================================================================
   6. RESPONSIVE FIXES (2x2 GRID & STACKING)
   ========================================================================== */
@media (max-width: 1100px) {
    .product-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 767px) {
    
    .sidebar h1{font-size:26px;}
    
    .shop-container { 
        flex-direction: column; 
        padding: 20px 15px;
    }

    /* Keep filters visible at the top */
    .sidebar {
        width: 100% !important;
        margin-bottom: 30px !important;
        display: block !important;
    }

    /* Force 2x2 Grid for products */
    .product-grid { 
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important;
        width: 100% !important;
    }

    /* Centered styling for mobile cards */
    .product-card {
        align-items: center;
        text-align: center;
    }

    .product-info {
        padding: 15px;
        align-items: center;
        display: flex;
        flex-direction: column;
    }

/*     .product-image-wrapper {
        padding: 20px;
        min-height: 180px;
    } */

    .review-row {
        justify-content: center;
    }

    .main-add-to-cart {
        padding: 12px;
        font-size: 12px;
    }
    
    .filter-group {
        display: flex !important;
        flex-direction: row !important; /* This fixes the DevTools issue */
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: space-between !important;
    }

    /* Target the immediate children (the filter items) */
    .filter-group > * {
        flex: 0 0 calc(50% - 5px) !important;
        box-sizing: border-box !important;
    }
}