
/* Style untuk filter input fields */
.filter-section {
    position: sticky;
    top: 0px;
}

.filter-item {
    margin-bottom: 1rem;
}

.filter-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

#min-price, #max-price {
    cursor: text;
}

#min-price:focus, #max-price:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(129, 162, 138, 0.25);
    border-color: #81a28a;
}

#reset-filters {
    background-color: #f0ad4e !important;
    color: #fff !important;
    border: none !important;
}

#reset-filters:hover {
    background-color: #ec971f !important;
    color: #fff !important;
    border: none !important;
}

#toggle-filter {
    background-color: #81a28a !important;
    border: none !important;
    padding: 8px !important;
}

/* Make only toggle button sticky on mobile/tablet */
@media (max-width: 991.98px) {
    .toggle-filter-container {
        position: sticky;
        top: 0;
        z-index: 101;
        background: white;
        padding: 10px 0;
        margin-bottom: 10px;
    }
}

#toggle-filter:hover {
    background-color: #6e8f79 !important;
    border: none !important;
    padding: 8px !important;
}

/* Style untuk Select2 */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    border: 1px solid #ced4da;
    border-radius: 50rem !important;
    padding: 0.375rem 0.1rem;
    display: flex !important;
    align-items: center !important;
}

/* Style untuk Select2 Multiple */
.select2-container--default .select2-selection--multiple {
    min-height: calc(1.5em + 0.75rem + 2px);
    border: 1px solid #ced4da;
    border-radius: 25px !important;
    padding: 0.375rem 0.75rem;
    position: relative;
}

/* Styling untuk color badge yang sudah terpilih */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    border-radius: 20px !important;
    color: #fff !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    padding: 4px 8px 4px 12px !important;
    margin: 3px 6px 3px 0 !important;
    border: 1px solid transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    position: relative !important;
    height: 26px !important;
    line-height: 1 !important;
    max-width: calc(100% - 12px) !important;
    overflow: hidden !important;
    background-color: #81a28a !important; /* Default fallback color */
}

/* Remove button styling yang lebih rapi dan tidak tumpang tindih */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: bold !important;
    font-size: 14px !important;
    margin-left: 6px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.25) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
    position: relative !important;
    flex-shrink: 0 !important;
    order: 2 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff !important;
    background: rgba(0, 0, 0, 0.4) !important;
    transform: scale(1.1) !important;
}

/* Text container untuk label warna */
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    order: 1 !important;
    flex-grow: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    margin-right: 4px !important;
}

/* Force override untuk memastikan warna applied */
.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-red {
    background-color: #e74c3c !important;
    border-color: #c0392b !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-orange {
    background-color: #e67e22 !important;
    border-color: #d35400 !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-yellow {
    background-color: #f1c40f !important;
    border-color: #e6b800 !important;
    color: #2c3e50 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-green {
    background-color: #27ae60 !important;
    border-color: #229954 !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-blue {
    background-color: #3498db !important;
    border-color: #2980b9 !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-purple {
    background-color: #9b59b6 !important;
    border-color: #8e44ad !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-pink {
    background-color: #e91e63 !important;
    border-color: #c2185b !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-brown {
    background-color: #8d6e63 !important;
    border-color: #6d4c41 !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-white {
    background-color: #ecf0f1 !important;
    border-color: #bdc3c7 !important;
    color: #2c3e50 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-black {
    background-color: #2c3e50 !important;
    border-color: #1b2631 !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-gray {
    background-color: #95a5a6 !important;
    border-color: #7f8c8d !important;
    color: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-gold {
    background-color: #f0d27f !important;
    border-color: #d0b878ff !important;
    color: #2c3e50 !important;
}

/* Specific styling untuk remove button pada light colors */
.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-yellow .select2-selection__choice__remove,
.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-white .select2-selection__choice__remove,
.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-gold .select2-selection__choice__remove {
    color: rgba(44, 62, 80, 0.9) !important;
    background: rgba(255, 255, 255, 0.4) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-yellow .select2-selection__choice__remove:hover,
.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-white .select2-selection__choice__remove:hover,
.select2-container--default .select2-selection--multiple .select2-selection__choice.color-choice-gold .select2-selection__choice__remove:hover {
    color: #2c3e50 !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem + 2px);
    right: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + 0.75rem) !important;
    padding-left: 12px !important;
    position: relative;
    top: -1px;
}

/* dropdown styling */
/* Saat dropdown terbuka ke bawah - Single Select */
.select2-container--open.select2-container--below .select2-selection--single {
    border: 1px solid #81a28a !important;
    border-bottom: none !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Saat dropdown terbuka ke bawah - Multiple Select */
.select2-container--open.select2-container--below .select2-selection--multiple {
    border: 1px solid #81a28a !important;
    border-bottom: none !important;
    border-top-left-radius: 25px !important;
    border-top-right-radius: 25px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.select2-container--open .select2-dropdown--below {
    border: 1px solid #81a28a !important;
    border-top: none !important;
    margin-top: -1px !important;
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
    padding: 6px;
}

/* Saat dropdown terbuka ke atas - Single Select */
.select2-container--open.select2-container--above .select2-selection--single {
    border: 1px solid #81a28a !important;
    border-top: none !important;
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Saat dropdown terbuka ke atas - Multiple Select */
.select2-container--open.select2-container--above .select2-selection--multiple {
    border: 1px solid #81a28a !important;
    border-top: none !important;
    border-bottom-left-radius: 25px !important;
    border-bottom-right-radius: 25px !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.select2-container--open .select2-dropdown--above {
    border: 1px solid #81a28a !important;
    border-bottom: none !important;
    margin-bottom: -1px !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    padding: 6px;
}

/* Warna item yang sedang terpilih saat membuka dropdown */
.select2-results__option--selected {
    background-color: #81a28a !important;
    color: #fff !important;
    border-radius: 16px;
    margin-bottom: 4px;
    margin-top: 4px;
}

/* Warna item yang sedang terhighlight */
.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #e9f0eb;
    color: #00473e;
    border-radius: 16px;
    padding: 6px 12px;
}

/* Color dropdown options styling dengan background warna */
#color-filter + .select2-container .select2-results__option {
    padding: 8px 12px !important;
    border-radius: 8px !important;
    margin: 2px 4px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    font-weight: 500 !important;
}

#color-filter + .select2-container .select2-results__option::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Specific colors for dropdown options */
#color-filter + .select2-container .select2-results__option[id*="red"]::before {
    background-color: #e74c3c;
}

#color-filter + .select2-container .select2-results__option[id*="orange"]::before {
    background-color: #e67e22;
}

#color-filter + .select2-container .select2-results__option[id*="yellow"]::before {
    background-color: #f1c40f;
}

#color-filter + .select2-container .select2-results__option[id*="green"]::before {
    background-color: #27ae60;
}

#color-filter + .select2-container .select2-results__option[id*="blue"]::before {
    background-color: #3498db;
}

#color-filter + .select2-container .select2-results__option[id*="purple"]::before {
    background-color: #9b59b6;
}

#color-filter + .select2-container .select2-results__option[id*="pink"]::before {
    background-color: #e91e63;
}

#color-filter + .select2-container .select2-results__option[id*="brown"]::before {
    background-color: #8d6e63;
}

#color-filter + .select2-container .select2-results__option[id*="white"]::before {
    background-color: #ecf0f1;
    border-color: #bdc3c7;
}

#color-filter + .select2-container .select2-results__option[id*="black"]::before {
    background-color: #2c3e50;
}

#color-filter + .select2-container .select2-results__option[id*="gray"]::before {
    background-color: #95a5a6;
}

#color-filter + .select2-container .select2-results__option[id*="gold"]::before {
    background-color: #f0d27f;
}

/* Selected state styling untuk color options */
#color-filter + .select2-container .select2-results__option--selected {
    background-color: rgba(129, 162, 138, 0.1) !important;
    color: #00473e !important;
    border: 1px solid #81a28a;
}

/* Highlighted state untuk color options */
#color-filter + .select2-container .select2-results__option--highlighted[aria-selected] {
    background-color: rgba(129, 162, 138, 0.05) !important;
    color: #00473e !important;
    transform: translateX(2px);
    transition: all 0.2s ease;
}

/* search item option styling */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #81a28a;
    border-radius: 20px;
    padding: 6px 12px;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    outline: none;
}

/* scrollbar styling */
.select2-results__options::-webkit-scrollbar {
    width: 5px !important;
}

.select2-results__options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px !important;
}

.select2-results__options::-webkit-scrollbar-thumb {
    background: #81a28a;
    border-radius: 5px !important;
}

.select2-results__options::-webkit-scrollbar-thumb:hover {
    background: #6e8f79;
}

/* Styling khusus untuk Select2 tanpa search (items per page) */
.select2-no-search + .select2-container .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
    border: 1px solid #81a28a !important;
    border-radius: 12px !important;
    padding: 0.375rem 0.1rem !important;
    color: #81a28a !important;
    min-width: 180px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(129, 162, 138, 0.15);
    transition: all 0.3s ease;
}

.select2-no-search + .select2-container .select2-selection--single:hover {
    border-color: #6e8f79 !important;
    box-shadow: 0 4px 12px rgba(129, 162, 138, 0.25);
    transform: translateY(-1px);
}

.select2-no-search + .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + 0.75rem) !important;
    padding-left: 16px !important;
    color: #81a28a !important;
    font-weight: 500;
    font-size: 14px;
}

.select2-no-search + .select2-container .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem + 2px) !important;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.select2-no-search + .select2-container .select2-selection--single .select2-selection__arrow b {
    border-color: #81a28a transparent transparent transparent;
    border-style: solid;
    border-width: 6px 5px 0 5px;
    height: 0;
    left: 50%;
    margin-left: -5px;
    margin-top: -3px;
    position: absolute;
    top: 50%;
    width: 0;
}

.select2-no-search + .select2-container--open.select2-container--below .select2-selection--single {
    border: 1px solid #81a28a !important;
    border-bottom: none !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    box-shadow: 0 -2px 8px rgba(129, 162, 138, 0.15);
}

.select2-no-search + .select2-container--open .select2-dropdown--below {
    border: 1px solid #81a28a !important;
    border-top: none !important;
    margin-top: -1px !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    padding: 8px;
    box-shadow: 0 8px 16px rgba(129, 162, 138, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Styling untuk dropdown yang terbuka ke atas */
.select2-no-search + .select2-container--open.select2-container--above .select2-selection--single {
    border: 1px solid #81a28a !important;
    border-top: none !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    box-shadow: 0 2px 8px rgba(129, 162, 138, 0.15);
}

.select2-no-search + .select2-container--open .select2-dropdown--above {
    border: 1px solid #81a28a !important;
    border-bottom: none !important;
    margin-bottom: -1px !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    padding: 8px;
    box-shadow: 0 -8px 16px rgba(129, 162, 138, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Options styling untuk items per page */
.select2-no-search + .select2-container .select2-results__option {
    padding: 10px 16px;
    border-radius: 8px;
    margin: 2px 0;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #81a28a;
}

.select2-no-search + .select2-container .select2-results__option[aria-selected=true] {
    background: linear-gradient(135deg, #81a28a, #6e8f79) !important;
    color: #fff !important;
    border-radius: 8px;
}

.select2-no-search + .select2-container .select2-results__option--highlighted[aria-selected] {
    background: linear-gradient(135deg, #e9f0eb, #f0f7f2) !important;
    color: #81a28a !important;
    border-radius: 8px;
}

/* card product styling */
.products-container {
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden; 
}

.products-container::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.products-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.products-container::-webkit-scrollbar-thumb {
    background: #81a28a;
    border-radius: 3px;
}

.products-container::-webkit-scrollbar-thumb:hover {
    background: #6e8f79;
}

/* Products container padding untuk memberikan ruang border card */
#case-products {
    padding: 8px 16px !important;
}

.case-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

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

/* Skeleton card tidak bisa diklik */
.skeleton-card {
    cursor: default;
    pointer-events: none;
    user-select: none;
}

.case-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio (Square) */
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0; /* Border radius sesuai card */
}

.case-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover untuk fill container square */
    object-position: center;
    border-radius: 12px 12px 0 0; /* Border radius sesuai container */
}

.case-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
}

.case-type {
    color: #00473e;
    line-height: 1.2;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
}

.case-price {
    font-weight: bold;
    color: #00473e;
}

/* Flexbox layout untuk card content */
.case-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.case-content {
    flex-grow: 1;
}

.case-button-container {
    margin-top: auto;
    padding-top: 0.5rem;
}

.btn-order {
    background-color: #81a28a !important;
    border: none !important;
}

.btn-order:hover {
    background-color: #6e8f79 !important;
    border: none !important;
}

.alert-info {
    color: #00473e;
    background-color: #fff8f8;
    text-align: center;
    padding: 0.5rem 1.25rem;
    border: none;
}

/* Pagination styling */
.pagination .page-link {
    color: #81a28a;
    border: 1px solid #dee2e6;
    border-radius: 8px !important;
    margin: 0 2px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    color: #fff;
    background-color: #81a28a;
    border-color: #81a28a;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: #81a28a;
    border-color: #81a28a;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

#load-more-cases {
    background-color: transparent;
    border: 2px solid #81a28a;
    color: #81a28a;
    transition: all 0.3s ease;
    min-width: 200px;
}

#load-more-cases:hover {
    background-color: #81a28a;
    border-color: #81a28a;
    color: #fff;
    transform: translateY(-2px);
}

#load-more-cases:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.pagination-info {
    font-size: 0.875rem;
}

/* modal detail styling */
#product-detail-modal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

#product-detail-modal .modal-header {
    background: linear-gradient(135deg, #81a28a, #6e8f79);
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom: none;
}

#product-detail-modal .close {
    color: white;
    opacity: 0.8;
    font-size: 1.5rem;
}

#product-detail-modal .close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Square image container for carousel */
#product-detail-modal .carousel-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 12px;
}

#product-detail-modal .carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
}

#product-detail-modal .carousel-control-prev,
#product-detail-modal .carousel-control-next {
    width: 45px;
    height: 45px;
    background: rgba(129, 162, 138, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

#product-detail-modal .carousel-control-prev:hover,
#product-detail-modal .carousel-control-next:hover {
    background: rgba(129, 162, 138, 0.95);
    transform: translateY(-50%) scale(1.1);
}

#product-detail-modal .carousel-control-prev {
    left: 15px;
}

#product-detail-modal .carousel-control-next {
    right: 15px;
}

/* Product info styling */
#product-detail-modal .product-info {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    position: relative;
}

#product-detail-modal .product-info::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #81a28a, #6e8f79);
    border-radius: 12px 0 0 12px;
}

/* Branch badges styling */
#detail-product-branches .badge {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: white;
}

/* Branch badges with price styling */
#detail-product-price-section .branch-price-badge {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Simple price styling */
#detail-product-price-section .simple-price {
    color: #00473e;
    font-size: 1.4rem;
    font-weight: bold;
}

/* Product title styling */
#detail-product-name {
    font-weight: 600 !important;
    color: #333 !important;
}

/* Type case styling */
#detail-product-type {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Description styling dengan dropdown yang lebih jelas */
#product-detail-modal .product-description .description-toggle {
    transition: all 0.3s ease;
}

#product-detail-modal .product-description .description-toggle:hover {
    border-color: #81a28a !important;
    box-shadow: 0 2px 4px rgba(129, 162, 138, 0.1);
}

#product-detail-modal .product-description .description-toggle:hover span {
    color: #81a28a;
}

#product-detail-modal .product-description .description-toggle:hover .description-action {
    color: #81a28a !important;
}

#product-detail-modal .description-arrow.rotated {
    transform: rotate(180deg);
}

#product-detail-modal .description-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 8px;
    border: 1px solid #e9ecef;
}

#product-detail-modal .description-content p {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: #6c757d;
}

#product-detail-modal .description-content p:last-child {
    margin-bottom: 0;
}

/* Styling untuk semua element HTML dari CKEditor */
#detail-product-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6c757d;
}

#detail-product-description p {
    margin-bottom: 1rem;
}

#detail-product-description p:last-child {
    margin-bottom: 0;
}

#detail-product-description h1,
#detail-product-description h2,
#detail-product-description h3,
#detail-product-description h4,
#detail-product-description h5,
#detail-product-description h6 {
    color: #495057;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

#detail-product-description h1:first-child,
#detail-product-description h2:first-child,
#detail-product-description h3:first-child,
#detail-product-description h4:first-child,
#detail-product-description h5:first-child,
#detail-product-description h6:first-child {
    margin-top: 0;
}

#detail-product-description ul,
#detail-product-description ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

#detail-product-description li {
    margin-bottom: 0.25rem;
}

#detail-product-description strong,
#detail-product-description b {
    font-weight: 600;
    color: #495057;
}

#detail-product-description em,
#detail-product-description i {
    font-style: italic;
}

/* Order button styling - same as card button */
#product-detail-modal .btn-order {
    background-color: #81a28a !important;
    border: none !important;
    color: #fff !important;
    transition: all 0.3s ease;
}

#product-detail-modal .btn-order:hover {
    background-color: #6e8f79 !important;
    border: none !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Responsive modal - hanya untuk mobile kecil */
@media (max-width: 576px) {
    #product-detail-modal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    #product-detail-modal .modal-body .row {
        flex-direction: column;
    }
    
    #product-detail-modal .col-md-6 {
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    #product-detail-modal .col-md-6:first-child {
        margin-bottom: 20px;
    }
    
    #product-detail-modal .carousel-control-prev,
    #product-detail-modal .carousel-control-next {
        width: 35px;
        height: 35px;
    }
    
    #product-detail-modal .carousel-control-prev {
        left: 10px;
    }
    
    #product-detail-modal .carousel-control-next {
        right: 10px;
    }
    
    #product-detail-modal .description-content p {
        font-size: 0.8rem;
    }
    
    #detail-product-branches .badge {
        font-size: 0.7rem;
        padding: 0.3em 0.6em;
    }
    
    #detail-product-price-section .branch-price-badge {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    #detail-product-price-section .simple-price {
        font-size: 1.2rem;
    }
}

/* Responsive modal untuk tablet - tetap 2 kolom seperti desktop */
@media (min-width: 577px) and (max-width: 768px) {
    #product-detail-modal .modal-dialog {
        margin: 15px auto;
        max-width: 95%;
    }
    
    /* Tetap menggunakan layout 2 kolom */
    #product-detail-modal .modal-body .row {
        flex-direction: row;
    }
    
    #product-detail-modal .col-md-6 {
        max-width: 50%;
        flex: 0 0 50%;
    }
    
    #product-detail-modal .col-md-6:first-child {
        margin-bottom: 0;
        padding-right: 10px;
    }
    
    #product-detail-modal .col-md-6:last-child {
        padding-left: 10px;
    }
    
    /* Ukuran elemen yang disesuaikan untuk tablet */
    #product-detail-modal .carousel-control-prev,
    #product-detail-modal .carousel-control-next {
        width: 38px;
        height: 38px;
    }
    
    #product-detail-modal .carousel-control-prev {
        left: 12px;
    }
    
    #product-detail-modal .carousel-control-next {
        right: 12px;
    }
    
    #detail-product-branches .badge {
        font-size: 0.72rem;
        padding: 0.32em 0.65em;
    }
    
    #detail-product-price-section .branch-price-badge {
        font-size: 0.78rem;
        padding: 6.5px 10.5px;
    }
    
    #detail-product-price-section .simple-price {
        font-size: 1.25rem;
    }
    
    #product-detail-modal h4 {
        font-size: 1.35rem;
    }
    
    #product-detail-modal .description-content p {
        font-size: 0.82rem;
    }
}

@media (max-width: 576px) {
    #product-detail-modal .modal-dialog {
        margin: 5px;
        max-width: calc(100% - 10px);
    }
    
    #product-detail-modal h4 {
        font-size: 1.3rem;
    }
    
    #product-detail-modal .description-content {
        padding: 10px;
    }
    
    #product-detail-modal .description-content p {
        font-size: 0.75rem;
        line-height: 1.4;
    }
}

/* Image Popup Overlay - Base Styles */
#image-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

/* Popup Container */
#image-popup-overlay .popup-container {
    position: relative;
    width: 80vmin;
    height: 80vmin;
    max-width: 600px;
    max-height: 600px;
    min-width: 300px;
    min-height: 300px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Image Wrapper */
#image-popup-overlay .popup-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

/* Image Styling */
#image-popup-overlay .popup-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

#image-popup-overlay .popup-image-wrapper img:hover {
    transform: scale(1.02);
}

/* Close Button */
#image-popup-overlay .popup-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#image-popup-overlay .popup-close-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    transform: scale(1.1);
}

/* Navigation Buttons */
#image-popup-overlay .popup-prev-btn,
#image-popup-overlay .popup-next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#image-popup-overlay .popup-prev-btn {
    left: -25px;
}

#image-popup-overlay .popup-next-btn {
    right: -25px;
}

#image-popup-overlay .popup-prev-btn:hover,
#image-popup-overlay .popup-next-btn:hover {
    background: rgba(129, 162, 138, 0.9);
    transform: translateY(-50%) scale(1.1);
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    #image-popup-overlay .popup-container {
        width: 75vmin;
        height: 75vmin;
        max-width: 500px;
        max-height: 500px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #image-popup-overlay {
        padding: 15px;
    }
    
    #image-popup-overlay .popup-container {
        width: 85vmin;
        height: 85vmin;
        max-width: none;
        max-height: none;
        min-width: 280px;
        min-height: 280px;
    }
    
    #image-popup-overlay .popup-close-btn {
        top: -10px;
        right: -10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
    
    #image-popup-overlay .popup-prev-btn,
    #image-popup-overlay .popup-next-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    #image-popup-overlay .popup-prev-btn {
        left: -15px;
    }
    
    #image-popup-overlay .popup-next-btn {
        right: -15px;
    }
}

/* Very Small Mobile */
@media (max-width: 480px) {
    #image-popup-overlay {
        padding: 10px;
    }
    
    #image-popup-overlay .popup-container {
        width: 90vmin;
        height: 90vmin;
        min-width: 250px;
        min-height: 250px;
    }
}

/* Agar filter tidak mempengaruhi layout saat disembunyikan */
@media (max-width: 991.98px) {
    .filter-section {
        position: relative;
        width: 100%;
        padding: 0;
        margin-bottom: 20px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .filter-container {
        margin: 0;
        max-width: 100%;
    }
    
    .filter-section .card {
        border: 1px solid #dee2e6;
        border-radius: 8px;
    }
}

/* Desktop sticky filter */
@media (min-width: 992px) {
    .filter-section {
        position: sticky;
        top: 20px;
        z-index: 100;
        height: fit-content;
    }
}

@media (min-width: 320px) {
    .filter-container .card-body {
        padding: 14px !important;
        font-size: 12px !important;
    }
    
    .card-filter-title {
        margin: 8px 0px !important;
        font-size: 16px;
    }
    
    /* Responsive untuk multi-select color pada mobile */
    .select2-container--default .select2-selection--multiple {
        min-height: 38px !important;
        font-size: 12px !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        font-size: 0.7rem !important;
        padding: 2px 6px 2px 8px !important;
        margin: 2px 3px 2px 0 !important;
        height: 22px !important;
        max-width: calc(100% - 8px) !important;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
        margin-left: 4px !important;
        width: 14px !important;
        height: 14px !important;
        font-size: 10px !important;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
        margin-right: 2px !important;
    }
    
    /* Color options di mobile */
    #color-filter + .select2-container .select2-results__option::before {
        width: 16px !important;
        height: 16px !important;
        margin-right: 8px !important;
    }
    
    /* Responsive spacing untuk mobile - 2 cards per row dengan gap kecil */
    #case-products {
        padding: 4px 12px !important; /* Memberikan ruang lebih untuk border card */
    }
    
    #case-products .col-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 4px !important; /* Gap kecil antar card */
    }
    
    #case-products .col-6 .case-card {
        margin-bottom: 8px !important; /* Gap vertikal lebih kecil */
    }
}

@media (min-width: 576px) {
    /* Small tablets - 2 cards per row */
    #case-products .col-6,
    #case-products .col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (min-width: 768px) {
    .filter-container .card-body {
        padding: 16px !important;
        font-size: 14px !important;
    }
    
    .card-filter-title {
        margin: 8px 0px !important;
        font-size: 18px;
    }
    
    /* Responsive untuk multi-select color pada tablet */
    .select2-container--default .select2-selection--multiple {
        min-height: 40px !important;
        font-size: 14px !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        font-size: 0.75rem !important;
        padding: 3px 7px 3px 10px !important;
        margin: 2px 4px 2px 0 !important;
        height: 24px !important;
        max-width: calc(100% - 10px) !important;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
        margin-left: 5px !important;
        width: 16px !important;
        height: 16px !important;
        font-size: 12px !important;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
        margin-right: 3px !important;
    }
    
    /* Color options di tablet */
    #color-filter + .select2-container .select2-results__option::before {
        width: 18px !important;
        height: 18px !important;
        margin-right: 10px !important;
    }
}

@media (min-width: 992px) {
    /* Medium tablet ke desktop transition */
    #case-products .col-lg-4,
    #case-products .col-md-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

@media (min-width: 1200px) {
    .filter-container .card-body {
        padding: 18px !important;
        font-size: 16px !important;
    }
    
    /* Responsive untuk multi-select color pada desktop large */
    .select2-container--default .select2-selection--multiple {
        min-height: 42px !important;
        font-size: 16px !important;
        padding: 0.375rem 0.75rem !important;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        font-size: 0.8rem !important;
        padding: 4px 8px 4px 12px !important;
        margin: 3px 6px 3px 0 !important;
        height: 26px !important;
        max-width: calc(100% - 12px) !important;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
        margin-left: 6px !important;
        width: 18px !important;
        height: 18px !important;
        font-size: 14px !important;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
        margin-right: 4px !important;
    }
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-content {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid #81a28a;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #e3f2e6;
    border-top: 4px solid #81a28a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin: 0;
    color: #81a28a;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
}

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

/* Loading overlay untuk area produk saja */
.products-loading {
    position: relative;
}

.products-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    border-radius: 8px;
}

.card-filter-title {
    margin: 10px 0px 12px 0px !important;
    font-size: 22px;
}

/* Skeleton Loading Styles */
.skeleton-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.skeleton-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio (Square) */
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.skeleton-text {
    height: 1rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.2rem;
    width: 80%;
}

.skeleton-price {
    height: 1rem;
    width: 60%;
}

.skeleton-badge {
    display: inline-block;
    height: 1.5rem;
    width: 4rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.skeleton-badge-sm {
    width: 3rem;
}

.skeleton-button {
    height: 2rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 20px;
    width: 100%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive styling untuk branch price items */
/* Mobile XS */
@media (max-width: 320px) {
    .branch-prices-container {
        line-height: 3.5 !important;
    }
    
    .normal-badge {
        font-size: 0.36rem !important;
        min-width: 36px !important;
    }
    
    .branch-price-item {
        font-size: 0.37rem !important;
    }
    
    .branch-badge {
        font-size: 0.36rem !important;
        min-width: 36px !important;
    }
    
    .case-type {
        font-size: 0.4rem !important;
    }
    
    .products-container .btn-order {
        font-size: 0.4rem !important;
        padding: 6px 0 !important;
    }
}

/* Mobile S */
@media (min-width: 321px) and (max-width: 360px) {
    .branch-prices-container {
        line-height: 3.7 !important;
    }
    
    .normal-badge {
        font-size: 0.4rem !important;
        min-width: 40px !important;
    }
    
    .branch-price-item {
        font-size: 0.4rem !important;
    }
    
    .branch-badge {
        font-size: 0.4rem !important;
        min-width: 40px !important;
    }
    
    .case-type {
        font-size: 0.45rem !important;
    }
    
    .products-container .btn-order {
        font-size: 0.4rem !important;
        padding: 6px 0 !important;
    }
}

/* Mobile SM */
@media (min-width: 361px) and (max-width: 375px) {
    .branch-prices-container {
        line-height: 2.7 !important;
    }
    
    .normal-badge {
        font-size: 0.5rem !important;
        min-width: 47px !important;
    }
    
    .branch-price-item {
        font-size: 0.5rem !important;
    }
    
    .branch-badge {
        font-size: 0.5rem !important;
        min-width: 47px !important;
    }
    
    .case-type {
        font-size: 0.5rem !important;
    }
    
    .products-container .btn-order {
        font-size: 0.6rem !important;
        padding: 6px 0 !important;
    }
}

/* Mobile M */
@media (min-width: 376px) and (max-width: 419px) {
    .branch-prices-container {
        line-height: 2.8 !important;
    }
    
    .normal-badge {
        font-size: 0.5rem !important;
        min-width: 50px !important;
    }
    
    .branch-price-item {
        font-size: 0.5rem !important;
    }
    
    .branch-badge {
        font-size: 0.5rem !important;
        min-width: 50px !important;
    }
    
    .case-type {
        font-size: 0.55rem !important;
    }
    
    .products-container .btn-order {
        font-size: 0.6rem !important;
        padding: 6px 0 !important;
    }
}

/* Mobile L */
@media (min-width: 420px) and (max-width: 576px) {
    .branch-prices-container {
        line-height: 2 !important;
    }
    
    .normal-badge {
        font-size: 0.6rem !important;
        min-width: 56px !important;
    }
    
    .branch-price-item {
        font-size: 0.7rem !important;
    }
    
    .branch-badge {
        font-size: 0.6rem !important;
        min-width: 56px !important;
    }
    
    .case-type {
        font-size: 0.6rem !important;
    }
    
    .products-container .btn-order {
        font-size: 0.6rem !important;
        padding: 6px 0 !important;
    }
}

/* Tablet */
@media (min-width: 577px) and (max-width: 991px) {
    .branch-prices-container {
        line-height: 1.7;
    }
    
    .branch-price-item {
        font-size: 0.8rem !important;
    }
    
    .branch-badge {
        font-size: 0.65rem !important;
        min-width: 60px !important;
    }
    
    .case-type {
        font-size: 0.65rem !important;
    }
}

/* Desktop */
@media (min-width: 992px) and (max-width: 1199px) {
    .branch-prices-container {
        line-height: 1.6;
    }
    
    .branch-price-item {
        font-size: 0.85rem !important;
    }
    
    .branch-badge {
        font-size: 0.7rem !important;
        min-width: 70px !important;
    }
    
    .case-type {
        font-size: 0.7rem !important;
    }
}

/* Desktop L*/
@media (min-width: 1200px) {
    .branch-prices-container {
        line-height: 1.6;
    }
    
    .branch-price-item {
        font-size: 0.9rem !important;
    }
    
    .branch-badge {
        font-size: 0.7rem !important;
        min-width: 80px !important;
    }
    
    .case-type {
        font-size: 0.75rem !important;
    }
}
