.main-image-container {
    height: 400px; /* Fixed height */
    border: 2px solid #ddd; /* Border stays the same */
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff; /* Keeps background inside border */
}
.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain
}
/* .thumbnail-img {
aspect-ratio: 1 / 1;
object-fit: cover;
border: 1px solid #ddd;
padding: 5px;
cursor: pointer;
transition: transform 0.3s;
}
.thumbnail-img:hover {
transform: scale(1.1);
}
.thumbnail-wrapper {
border: 2px solid #ddd;
border-radius: 8px;
padding: 5px;
transition: border-color 0.3s ease;
margin-bottom: 10px; 
}
.thumbnail-wrapper:hover {
border-color: black; 
} */
 .thumbnail-scroll-container {
    overflow-x: auto; /* horizontal scroll */
    overflow-y: hidden; /* no vertical scroll */
    white-space: nowrap;
    padding-bottom: 20px; /* optional spacing */
}

.thumbnail-scroll-container::-webkit-scrollbar {
    height: 7px; /* scrollbar height */
}

.thumbnail-scroll-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 3px;
}

.thumbnail-scroll-container::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

.thumbnail-wrapper {
    flex: 0 0 25%; /* 4 thumbnails per row */
    box-sizing: border-box;
    padding: 5px;
}

.thumbnail-img {
    width: 100%;
    aspect-ratio: 1 / 1; 
    object-fit: cover; 
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.3s;
}

.thumbnail-img:hover {
    transform: scale(1.1);
}

.selected-thumbnail {
    border: 1px solid black !important;
}

.btn-check:not(:checked) + label {
border: 1px solid rgb(202, 200, 200) !important;
background-color: white !important;
color: black !important;
}

.btn-check:checked + label {
border: 2px solid black !important;
background-color: white !important;
color: black !important;
}

/* Ensure the label content is stacked vertically */
.btn-check + label {
display: flex;
flex-direction: column;
align-items: center;
padding: 10px;
width: 100px; /* Adjust width for better appearance */
}

/* Styling for the color circle */
.btn-check + label span {
display: inline-block;
width: 20px;
height: 20px;
border-radius: 50%;
margin-bottom: 5px; /* Space between circle and text */
}

/* Filter Section Styling */
.filter-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.filter-section .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0;
    padding: 1.5rem;
    border-bottom: none;
}

.filter-section .card-header h5 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.filter-section .form-label {
    color: #495057;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.filter-section .form-control,
.filter-section .form-select {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.filter-section .form-control:focus,
.filter-section .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    background-color: #ffffff;
}

.filter-section .form-control:hover,
.filter-section .form-select:hover {
    border-color: #adb5bd;
}

/* Sort filter specific styling */
#sortFilter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

#sortFilter option {
    background-color: white;
    color: #495057;
}

#sortFilter:focus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Filter Group Styling */
.filter-group {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.filter-group:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.filter-group .form-label {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 0.85rem;
}

/* Filter Buttons */
.filter-section .btn {
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.filter-section .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.filter-section .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.filter-section .btn-outline-secondary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.filter-section .btn-outline-secondary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.2);
}

.filter-section .btn-outline-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0277bd;
    border: 2px solid #29b6f6;
}

.filter-section .btn-outline-info:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    box-shadow: 0 4px 15px rgba(41, 182, 246, 0.3);
}

/* Filtered Results Styling */
#filteredResults .card {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

#filteredResults .card-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 0;
    padding: 1.5rem;
    border-bottom: none;
}

#filteredResults .card-header h5 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

#variantsContainer .card {
    border: 2px solid #e9ecef;
    border-radius: 16px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    overflow: hidden;
}

#variantsContainer .card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

#variantsContainer .card-body {
    padding: 1.5rem;
}

#variantsContainer .card-title {
    font-weight: 700;
    color: #495057;
    font-size: 1.1rem;
}

#variantsContainer .badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

#variantsContainer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    padding: 0.75rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#variantsContainer .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-section .row > div {
        margin-bottom: 1rem;
    }
    
    .filter-section .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-section .btn {
        width: 100%;
    }
    
    .filter-group {
        padding: 1rem;
    }
    
    .filter-section .card-body {
        padding: 1.5rem;
    }
    
    .filter-section .card-header {
        padding: 1rem;
    }
    
    .filter-section .card-header h5 {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .filter-group {
        padding: 0.75rem;
    }
    
    .filter-section .form-control,
    .filter-section .form-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .filter-section .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Animation for filter results */
#filteredResults {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Out of Stock Styling */
.out-of-stock-border {
    border: 2px solid #dc3545 !important;
    border-radius: 8px;
    padding: 10px;
    background-color: rgba(220, 53, 69, 0.05);
    position: relative;
}

.out-of-stock-border::before {
    content: "⚠️ Out of Stock";
    position: absolute;
    top: -10px;
    left: 10px;
    background-color: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1;
}

.out-of-stock-border .btn-check:checked + label {
    border: 2px solid #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.out-of-stock-border .btn-check + label {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Option Unavailable Styling - Enhanced */
.option-unavailable {
    position: relative;
    opacity: 0.6;
    cursor: pointer;
}

.option-unavailable .btn-check + label {
    opacity: 0.5;
    cursor: pointer;
    color: #999 !important;
    text-decoration: line-through;
    position: relative;
}

.option-unavailable .btn-check + label::before {
    content: "✗";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.option-unavailable .btn-check + label span {
    opacity: 0.3;
}

/* For storage options specifically */
.option-unavailable .btn-check + label {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}

.option-unavailable .btn-check:checked + label {
    background-color: #f8f9fa !important;
    border-color: #6c757d !important;
    color: #6c757d !important;
}

/* Keep radio buttons clickable but show visual indication of unavailability */
.option-unavailable .btn-check {
    pointer-events: auto;
}

/* Add a subtle overlay for unavailable options */
.option-unavailable .btn-check + label::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(220, 53, 69, 0.1) 2px,
        rgba(220, 53, 69, 0.1) 4px
    );
    pointer-events: none;
    z-index: 1;
}