: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: 1280px) {
    .show-on-xl {
        display: block !important;
    }

    .hide-on-xl {
        display: none !important;
    }
}

@media (max-width: 1279px) {
    .show-on-below-xl {
        display: block !important;
    }

    .hide-on-below-xl {
        display: none !important;
    }
}

.top-26 {
    top: 7.5rem !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: 1279px) {
    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;
}

/*
 * ==========================================
 * CHAT MODAL STYLES
 * ==========================================
 */

.chat-phone-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-phone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
}

.chat-phone-info {
    flex: 1;
}

.chat-phone-number {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.chat-phone-name {
    font-size: 13px;
    color: #888;
}

.chat-phone-actions {
    display: flex;
    gap: 8px;
}

.chat-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.chat-icon-btn-wa {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.chat-icon-btn-wa:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.4);
}

.chat-icon-btn-copy {
    background: #e0e0e0;
    color: #666;
}

.chat-icon-btn-copy:hover {
    background: #d0d0d0;
    transform: scale(1.1);
}

.chat-icon-btn.copied {
    background: #25D366;
    color: white;
}

.chat-icon-btn i {
    font-size: 18px;
}

/*
 * ==========================================
 * CHAT CITY GROUPING STYLES
 * ==========================================
 */

.chat-city-group {
    margin-bottom: 20px;
}

.chat-city-group:last-child {
    margin-bottom: 0;
}

.chat-city-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
}

.chat-city-header i {
    font-size: 14px;
}

.chat-city-phones {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Desktop city grouping */
.wa-float-city-group {
    margin-bottom: 15px;
}

.wa-float-city-group:last-child {
    margin-bottom: 0;
}

.wa-float-city-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
}

.wa-float-city-header i {
    font-size: 13px;
}

.wa-float-city-phones {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/*
 * ==========================================
 * FLOATING WHATSAPP BUTTON (DESKTOP XL+)
 * ==========================================
 */

.wa-float-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.wa-float-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.wa-float-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.wa-float-button i {
    font-size: 24px;
}

.wa-float-text {
    white-space: nowrap;
}

.wa-float-popup {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wa-float-popup-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 15px;
}

.wa-float-popup-body {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.wa-float-phone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.wa-float-phone-row:last-child {
    margin-bottom: 0;
}

.wa-float-phone-info {
    flex: 1;
}

.wa-float-phone-number {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.wa-float-phone-name {
    font-size: 12px;
    color: #888;
}

.wa-float-phone-actions {
    display: flex;
    gap: 6px;
}

/* Hide on mobile (below xl) */
@media (max-width: 1279px) {
    .wa-float-container {
        display: none !important;
    }
}

/*
 * ==========================================
 * PRODUCT IMAGE 1:1 ASPECT RATIO
 * ==========================================
 */

/* 1:1 Aspect Ratio Container */
.az-img-square {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    /* 1:1 aspect ratio */
    overflow: hidden;
    /*background-color: #f3f4f6;*/
    /* gray-100 */
}

.az-img-square-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Responsive sizes for 1:1 images */
.az-img-square-sm {
    padding-bottom: 100%;
}

.az-img-square-md {
    padding-bottom: 100%;
}

.az-img-square-lg {
    padding-bottom: 100%;
}

/* Alternative: Fixed height approach (if padding-bottom causes issues) */
.az-img-square-fixed {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
    background-color: #f3f4f6;
}

.az-img-square-fixed-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}