/* Product Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0px 0;
}
/* Product Card Styles */
.product-card {
    /* border: 1px solid #eee; */
    /* border-radius: 8px; */
    
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.039);
    /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transform: translateY(-5px);
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); */
}

.product-card-content{
    padding: 0px 15px 15px;
}


/* Image Container - Critical Fix */
.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 125%; /* 4:5 aspect ratio */
    overflow: hidden;
    /* border-radius: 5px; */
    margin-bottom: 15px;
}
 .product-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius:unset !important;
}
 .product-card h3 {
     font-size: 16px;
     margin-bottom: 10px;
     color: #333;
 }

 .product-price {
     font-weight: bold;
     color: var(--primary-color);
     margin-bottom: 10px;
 }

 .product-meta {
     display: flex;
     justify-content: space-between;
     font-size: 14px;
     color: #666;
 }

 .product-actions {
     margin-top: 15px;
     display: flex;
     gap: 10px;
 }

 .btn-view,
 .btn-add-to-cart {
     padding: 8px 1px;
     border: none;
     border-radius: 4px;
     cursor: pointer;
     font-size: 14px;
 }

 .btn-view {
     background: #f5f5f5;
     color: #333;
 }

 .btn-add-to-cart {
     background: var(--primary-color);
     color: white;
 }

 .blouses-main-flex {
     /* display: flex;
     flex-wrap: wrap; */
     display: grid;
     grid-template-columns: 2fr 10fr;
     gap: 20px;
     /* padding: 20px; */
 }

 .filter-sidebar {
     flex: 1;
     min-width: 250px;
     max-width: 300px;
     border: 1px solid #ddd;
     padding: 20px;
     border-radius: 10px;
     background: #fff;
     box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
 }

 .filter-sidebar h3 {
     margin-bottom: 20px;
     font-size: 20px;
     color: #333;
     border-bottom: 1px solid #eee;
     padding-bottom: 10px;
 }

 .filter-group {
     margin-bottom: 20px;
     display: flex;
     flex-direction: column;
 }

 .filter-group label {
     font-weight: bold;
     margin-bottom: 4px;
     color: #444;
     font-size: 15px;
 }

 .filter-group select {
     padding: 8px 10px;
     border-radius: 5px;
     border: 1px solid #ccc;
     font-size: 14px;
 }

 button[type="submit"] {
     background-color: var(--primary-color);
     color: white;
     padding: 12px 15px;
     font-size: 15px;
     border: none;
     border-radius: 5px;
     cursor: pointer;
     width: 100%;
     transition: background 0.3s ease;
 }

 button[type="submit"]:hover {
     background-color: #333;
 }

 .color-options {
     display: grid;
     grid-template-columns: 2fr 2fr 2fr 2fr 2fr;
     gap: 8px;
     flex-wrap: wrap;
     margin-top: 10px;
 }

 .color-box {
     width: 28px;
     height: 28px;
     border-radius: 4px;
     cursor: pointer;
     position: relative;
     border: 2px solid transparent;
     transition: all 0.2s ease;
     background-color: var(--color);
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .color-box input[type="checkbox"] {
     opacity: 0;
     position: absolute;
     width: 100%;
     height: 100%;
     cursor: pointer;
     margin: 0;
 }

 .color-box::after {
     content: '';
     position: absolute;
     top: 6px;
     left: 6px;
     width: 20px;
     height: 20px;
     display: none;
     background-image: url('data:image/svg+xml;utf8,<svg fill="white" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6.00039 11.1998L2.80039 7.9998L1.86606 8.93314L6.00039 13.0665L15.0004 4.06647L14.0671 3.13314L6.00039 11.1998Z"/></svg>');
     background-size: cover;
     z-index: 2;
 }

 .color-box input[type="checkbox"]:checked+.color-box::after {
     display: block;
 }

 .color-box input[type="checkbox"]:checked+.color-checkmark {
     display: block;
 }

 .color-checkmark {
     display: none;
     position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     color: white;
     font-size: 14px;
 }

 /* Style for selected color box */
 .color-box.selected {
     border: 2px solid #8e44ad;
     box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.3);
 }

 /* White checkmark for dark colors */
 .color-box.dark-color .color-checkmark {
     color: white;
 }

 /* Black checkmark for light colors */
 .color-box.light-color .color-checkmark {
     color: black;
 }


 .color-box input[type="checkbox"]:checked {
     border: 3px solid #333;
     box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
 }

 .color-box input[type="checkbox"]:checked+.color-box {
     border: 2px solid #000;
     transform: scale(1.1);
 }
 .color-circles {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.color-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}


 @media screen and (max-width: 768px) {
     .blouses-main-flex {
        display: flex;
         flex-direction: column;
     }

     .filter-sidebar {
         width: 100%;
         margin-bottom: 20px;
     }
 }

 /* Responsive Adjustments */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .product-image-container {
        padding-top: 133%; /* 3:4 aspect ratio */
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        padding: 12px;
    }
    
    .product-image-container {
        padding-top: 150%; /* 2:3 aspect ratio for mobile */
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-image-container {
        padding-top: 133%; /* 3:4 aspect ratio for single column */
    }
}

 .colors-error{
    color: var(--danger);
    width: 20px;
 }

/* Cloth Type Grid Styles */
.cloth-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 6px;
}

.cloth-option {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cloth-option:hover {
    background-color: #e9ecef;
}

.cloth-option.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.cloth-option input[type="checkbox"] {
    margin-right: 2px;
    cursor: pointer;
    min-width: 16px;
}

.loading-cloth {
    grid-column: 1 / -1;
    color: #666;
    padding: 10px;
    text-align: center;
}

.show-more-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 13px;
    width: 100%;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    background-color: #f0f0f0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cloth-grid-container {
        grid-template-columns: 1fr;
    }
}
.cloth-search{
    padding: 4px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
}

.color-option-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 8px;
    cursor: pointer;
}

.color-name-label {
    font-size: 10px;
    margin-top: 5px;
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #555;
}

.color-selected .color-name-label {
    font-weight: bold;
    color: #8e44ad; /* Or your theme color */
}

.variant-tabs {
    display: flex;
    margin: 20px 0;
    border-bottom: 1px solid #ddd;
}

.variant-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.variant-tab.active {
    color: #8e44ad; /* Your theme color */
    border-bottom-color: #8e44ad;
}

.variant-tab:hover {
    color: #8e44ad;
}
.discount-badge{
    position: absolute;
    top: 20px;
    left: 20px;
}

/* Pagination Style */

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
}

.page-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.page-btn:hover {
    background: #f1f1f1;
}
