/* Product List With Image Component Styles - Image + Products Layout */
.product_list_with_image-section {
    background-color: #fff;
    padding: 20px 30px;
}

.product_list_with_image-heading {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: capitalize;
}

.product_list_with_image-subheading {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    color: #888;
    margin-bottom: 0;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.product_list_with_image-wrapper {
    position: relative;
    margin-top: 30px;
}

/* Category Image Styles */
.category-image-wrapper {
    position: relative;
    width: 100%;
    height: 700px;
    min-height: 400px;
    overflow: hidden;
    border-radius: 8px;
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* .category-image-wrapper:hover .category-image {
    transform: scale(1.05);
} */

/* Product Grid Styles - 2 stacked products in second column */
.product-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    min-height: 400px;
    padding: 0px 0 !important;
    justify-content: space-between;
}

.product-grid .product-box {
    flex: 1;
    min-height: 0;
    max-height: calc(50% - 10px); /* Half height minus gap */
}







.no-products {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .product_list_with_image-section {
        padding: 20px 30px;
    }
    
    .category-image-wrapper {
        min-height: 300px;
    }
    
    .product-grid {
        gap: 15px;
        min-height: 300px;
        padding: 0;
    }
    
    .product-grid .product-box {
        max-height: calc(50% - 7.5px); /* Half height minus gap */
    }
}

@media (max-width: 767px) {
    .product_list_with_image-section {
        padding: 20px 15px;
    }
    
    .product_list_with_image-wrapper .row.g-0 {
        flex-direction: column;
        gap: 20px;
    }
    
    .category-image-wrapper {
        min-height: 250px;
    }
    
    .product-grid {
        flex-direction: row;
        gap: 15px;
        min-height: 250px;
        padding: 0;
    }
    
    .product-grid .product-box {
        max-height: 100%;
        flex: 1;
    }
    
    .product-item {
        flex: 1;
        min-height: 0;
    }
    
    .product-name {
        font-size: 12px;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .product-info {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .product_list_with_image-section {
    padding: 10px 0;
}
    .product_list_with_image-heading {
        font-size: 28px;
    }
    
    .product_list_with_image-subheading {
        font-size: 13px;
    }
    
    .product-grid {
        gap: 10px;
    }
    
    .product-item {
        flex: 1;
        min-height: 0;
    }
    
    .product-name {
        font-size: 11px;
        min-height: 2.4em;
        display: -webkit-box;
        display: -moz-box;
        display: box;
        -webkit-line-clamp: 2;
        -moz-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        -moz-box-orient: vertical;
        box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-price {
        font-size: 13px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .star {
        font-size: 11px;
    }
}

.category-item-large .category-link {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.category-item-large .category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-item-large:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.category-item-large .category-content {
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.category-item-large .category-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
}

.category-item-large .category-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    animation: arrowPulse 2s infinite;
}

.category-item-large:hover .category-arrow {
    animation: none;
}

@keyframes arrowPulse {
    0% {
        transform: translateX(-50%);
    }
    50% {
        transform: translateX(-50%) scale(1.1);
    }
}

.category-item-large:hover .category-arrow {
    animation: none;
}

/* Small Category Items (Right Column) */
.category-item-small {
    height: 240px;
    background-color: #f8f9fa;
}

.category-item-small .category-link {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.category-item-small .category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-item-small:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.category-item-small .category-content {
    position: relative;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #fff;
    text-align: center;
    background: rgba(0,0,0,0.6);
    padding: 15px 20px;
    border-radius: 5px;
    backdrop-filter: blur(5px);
    min-width: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.category-item-small .category-arrow {
    display: inline-block;
    margin-top: 5px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.category-item-small:hover .category-arrow {
    transform: translateX(3px);
}

.category-item-small .category-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    opacity: 0.9;
}

.category-item-small .category-arrow {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.category-item-small:hover .category-arrow {
    transform: translateX(3px);
}

/* Empty State Styles */
.category-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f8f9fa;
    color: #6c757d;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    text-align: center;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product_list_with_image-heading {
        font-size: 28px;
    }

    .category-item-large {
        height: 350px;
        margin-bottom: 15px;
    }

    .category-item-small {
        height: 200px;
        margin-bottom: 15px;
    }

    .category-item-large .category-content {
        padding: 20px;
    }

    .category-item-large .category-name {
        font-size: 20px;
    }

    .category-item-small .category-content {
        padding: 12px 15px;
    }

    .category-item-small .category-name {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .product_list_with_image-section {
        padding: 40px 0;
    }

    .product_list_with_image-heading {
        font-size: 24px;
    }

    .category-item-large {
        height: 280px;
    }

    .category-item-small {
        height: 160px;
    }

    .category-item-large .category-content {
        padding: 15px;
    }

    .category-item-large .category-name {
        font-size: 18px;
    }

    .category-item-small .category-name {
        font-size: 14px;
    }

    .category-item-small .category-price {
        font-size: 14px;
    }
}

/* Select2 Dropdown Styles */
.product_list_with_image-container .select2-container {
    z-index: 9999 !important;
}

.product_list_with_image-container .select2-selection {
    z-index: 9998 !important;
}

.product_list_with_image-container .select2-dropdown {
    z-index: 9999 !important;
}

.product_list_with_image-container .select2-results {
    z-index: 9998 !important;
}

/* Ensure dropdowns are above other content */
.product_list_with_image-container .select2-container--above {
    z-index: 10000 !important;
}

.product_list_with_image-container .form-control {
    position: relative !important;
    z-index: 1 !important;
}

/* Ensure Select2 dropdowns are clickable */
.select2-container--default .select2-selection--multiple {
    background-color: white !important;
    border: 1px solid #ced4da !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.select2-container--default .select2-selection--multiple:hover {
    border-color: #80bdff !important;
}

/* Fix modal overlay issues */
.modal .select2-container {
    z-index: 1050 !important;
}

.modal .select2-dropdown {
    z-index: 1051 !important;
}

/* Ensure dropdown appears above modal backdrop */
.select2-container {
    position: relative !important;
    z-index: 10000 !important;
}

.select2-dropdown {
    position: absolute !important;
    z-index: 10001 !important;
    background: white !important;
    border: 1px solid #aaa !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Fix pointer events */
.select2-selection {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.select2-selection__rendered {
    pointer-events: auto !important;
}

.select2-search__field {
    pointer-events: auto !important;
}

/* Ensure dropdown items are clickable */
.select2-results__option {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.select2-results__option:hover {
    background-color: #f8f9fa !important;
}

/* Loading State */
.category-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f8f9fa;
    color: #6c757d;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

.category-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #dee2e6;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
