:root {
    /* 
     * KONFIGURASI WARNA UTAMA (DYNAMIC)
     * User hanya perlu mengganti nilai ini.
     */
    --az-theme-primary: #e41930;
    /* Warna Utama */
    --az-theme-primary-hover: #d3192f;
    /* Warna Hover */

    --az-theme-secondary: #ffffff;
    /* Secondary Color (Default: White/Contrast to Primary) */
    --az-theme-secondary-hover: #f5f5f5;
    /* Secondary Hover (Optional) */

    --az-theme-text-on-primary: #ffffff;
    /* Warna Teks di atas background primary */

    /* Warna Netral (Opsional untuk diubah) */
    --az-theme-white: #ffffff;
    --az-theme-gray-light: #f5f5f5;
}

/* 
 * ==========================================
 * GLOBAL STYLES
 * ==========================================
 */

a,
a:hover,
a:focus,
a:active,
a:visited {
    text-decoration: none !important;
}

/* 
 * ==========================================
 * UTILITY CLASSES
 * ==========================================
 */

/* Text Colors */
.text-primary,
a.text-primary {
    color: var(--az-theme-primary) !important;
}

/* Handle hover/focus for anchor tags with text-primary */
a.text-primary:hover,
a.text-primary:focus,
a.text-primary:active,
a:hover .text-primary,
a:focus .text-primary,
a:active .text-primary,
a:hover i.text-primary,
a:focus i.text-primary,
a:active i.text-primary {
    color: var(--az-theme-primary-hover) !important;
}

.text-secondary,
a.text-secondary {
    color: var(--az-theme-secondary) !important;
    /* Fallback or specific gray */
}

/* Handle hover/focus for anchor tags with text-secondary */
a.text-secondary:hover,
a.text-secondary:focus,
a.text-secondary:active,
a:hover .text-secondary,
a:focus .text-secondary,
a:active .text-secondary,
a:hover i.text-secondary,
a:focus i.text-secondary,
a:active i.text-secondary {
    color: var(--az-theme-secondary-hover) !important;
}

.text-white {
    color: var(--az-theme-white) !important;
}

/* Background Colors */
.bg-primary {
    background-color: var(--az-theme-primary) !important;
}

.bg-secondary {
    background-color: var(--az-theme-secondary) !important;
    /* Standard secondary bg */
}

.bg-light {
    background-color: var(--az-theme-gray-light) !important;
}

/* Border Colors */
.border-primary {
    border-color: var(--az-theme-primary) !important;
}

/* Hover States */
.hover\:text-primary:hover {
    color: var(--az-theme-primary) !important;
}

.hover\:bg-primary:hover {
    background-color: var(--az-theme-primary-hover) !important;
}

/* Custom height utilities (keeps names clear of Tailwind v2) */
@media (min-width: 768px) {
    .md\:h-100 {
        height: 32rem !important;
    }
}
@media (min-width: 1280px) {
    .xl\:h-98 {
        height: 30rem !important;
    }
}

.h-98 {
    height: 30rem !important;
}

/* 
 * ==========================================
 * class utility timpa tailwind biar aman dari bootstrap 3
 * ==========================================
 */
@media (min-width: 1024px) {
    .lg\:block {
        display: block !important;
    }
}

@media (min-width: 1280px) {
    .xl\:block {
        display: block !important;
    }
}



/* 
 * ==========================================
 * BUTTON CLASSES (BOOTSTRAP 3 STYLE)
 * ==========================================
 */

/* 
 * 1. Button Primary (Block Color)
 * Bg: Primary, Text: Secondary (Contrast)
 */
.btn-primary {
    background-color: var(--az-theme-primary) !important;
    border-color: var(--az-theme-primary) !important;
    color: var(--az-theme-secondary) !important;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: var(--az-theme-primary-hover) !important;
    border-color: var(--az-theme-primary-hover) !important;
    color: var(--az-theme-secondary) !important;
}

/* 
 * 2. Button Secondary (Block Color with Border)
 * Bg: Secondary, Border: Primary, Text: Primary
 * "Reverse" style
 */
.btn-secondary {
    background-color: var(--az-theme-secondary) !important;
    border: 1px solid var(--az-theme-primary) !important;
    color: var(--az-theme-primary) !important;
    transition: all 0.3s ease;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary.active {
    background-color: var(--az-theme-primary) !important;
    border-color: var(--az-theme-primary) !important;
    color: var(--az-theme-secondary) !important;
    /* Text becomes Secondary (e.g., White) on hover */
}

/* Helper untuk menyembunyikan/menampilkan element (Responsive) */
@media (min-width: 1200px) {
    .show-on-xl {
        display: block !important;
    }

    .hide-on-xl {
        display: none !important;
    }
}

@media (max-width: 1199px) {
    .show-on-below-xl {
        display: block !important;
    }

    .hide-on-below-xl {
        display: none !important;
    }
}


/* 
 * ==========================================
 * CUSTOM CLASSES
 * ==========================================
 */
.close {
    background: transparent;
    border: none;
    font-size: 20px;
    /* ukuran X */
    font-weight: bold;
    /* biar tebal */
    color: #333;
    /* warna X */
    cursor: pointer;
    padding: 0 10px;
    line-height: 1;
    opacity: 1 !important;
    /* hilangkan opacity default */
    transition: 0.2s ease;
}

.close:hover {
    color: #000;
    /* warna saat hover */
    transform: scale(1.1);
    /* sedikit membesar saat dihover */
}

/* Kalau di dalam .modal-header ada button .bootbox-close-button,
   maka sembunyikan button .modal-btn-close .close */
.modal-header:has(.bootbox-close-button) .modal-btn-close .close {
    display: none !important;
}

.triangle-up {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 25px solid #1f2936;
}

/* 
 * ==========================================
 * MOBILE BOTTOM NAVIGATION
 * ==========================================
 */
.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 99999;
    height: 60px;
    border-top: 1px solid #eee;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888 !important;
    text-decoration: none !important;
    font-size: 11px;
    flex: 1;
    transition: color 0.3s ease;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.bottom-nav-item.active {
    color: var(--az-theme-primary) !important;
}

.bottom-nav-item:hover {
    color: var(--az-theme-primary-hover) !important;
}

.bottom-nav-item span {
    line-height: 1.2;
    font-weight: 500;
}

/* Adjust body/footer to not be covered on mobile */
@media (max-width: 1199px) {
    body {
        padding-bottom: 70px;
    }
}

/* 
 * ==========================================
 * CATEGORY MODAL (ORIGINAL)
 * ==========================================
 */
.category-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.category-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.category-modal-content {
    position: relative;
    background-color: #fff;
    width: 100%;
    max-width: 400px;
    /* Mobile width constraint */
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.category-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
}

.category-modal-header h3 {
    font-size: 18px;
    margin: 0;
    color: #333;
}

.category-modal-header i {
    font-size: 18px;
    color: #555;
}

.category-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.category-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
    color: #555;
    transition: transform 0.2s;
}

.category-grid-item:hover {
    transform: translateY(-2px);
    color: var(--az-theme-primary) !important;
}

.category-icon-wrapper {
    width: 50px;
    height: 50px;
    /* border-radius: 10px; */
    /* background-color: #f9f9f9; */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
}

.category-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-name {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
    color: inherit;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 
 * ==========================================
 * BOTTOM SHEET OVERRIDES (EXTEND KE ATAS)
 * ==========================================
 */
.category-modal {
    z-index: 99998;
    /* Below bottom nav (99999) */
    pointer-events: auto;
}

.category-modal-overlay {
    cursor: pointer;
}

.category-modal-content {
    position: absolute;
    bottom: 60px;
    /* Matches bottom nav height */
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.15);
    animation: slideUpBottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpBottom {
    from {
        transform: translateY(100%);
        opacity: 0.5;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.category-modal-body {
    padding-bottom: 30px;
    -webkit-overflow-scrolling: touch;
}