/* [1] GLOBAL & UTILITY STYLES */
        .hrw-only-desktop {
            display: none !important;
        }

        .hrw-only-mobile {
            display: flex !important;
        }

        .logo-box {
            display: flex;
            align-items: center;
            gap: 15px;
            cursor: pointer;
        }

        .logo-img {
            width: 150px;
            height: auto;
            object-fit: contain;
            transition: 0.3s;
        }

        #hajiRabriLogoText {
            color: var(--primary-gold);
            font-weight: 900;
            font-size: 28px;
            letter-spacing: 1.5px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }

        .main-header {
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 10px 15px;
        }

        /* [2] DESKTOP VIEW (Match SS Perfectly) */
        @media (min-width: 993px) {
            .hrw-only-desktop {
                display: flex !important;
            }

            .hrw-only-mobile {
                display: none !important;
            }

            .main-header {
                gap: 10px !important;
            }

            .header-row-top {
                display: grid !important;
                grid-template-columns: 1fr 1.8fr 1fr !important;
                /* Forces search to dead-center */
                align-items: center !important;
                width: 100% !important;
                gap: 20px !important;
            }

            .header-left {
                display: flex;
                align-items: center;
                gap: 20px;
                justify-content: flex-start;
            }

            .header-center-search {
                display: flex;
                justify-content: center;
                width: 100%;
            }

            .header-right-actions {
                display: flex;
                justify-content: flex-end;
                align-items: center;
            }

            #hajiRabriLogoText {
                margin-left: 10px !important;
                /* Set margin to prevent overlap */
                transform: translateY(14px) !important;
                /* Visual center with seal */
                font-size: 28px !important;
                /* Adjusted for single-line perfection */
                white-space: nowrap !important;
                /* Force single line */
            }

            .logo-img {
                width: 165px !important;
            }

            /* Floating Navigation Pill */
            header .main-header .header-row-bottom { display: none !important; }

            .desktop-nav-link {
                color: var(--primary-gold) !important;
                font-weight: 800 !important;
                font-size: 20px !important;
                margin: 0 35px !important;
                text-decoration: none !important;
                display: flex;
                align-items: center;
                gap: 10px;
                transition: 0.3s;
            }

            .desktop-nav-link:hover {
                transform: scale(1.05);
            }

            .search-bar-actions .action-btn {
                background: none;
                border: none;
                color: #333;
                font-weight: 700;
                cursor: pointer;
                display: flex;
                align-items: center;
                gap: 8px;
                font-size: 15px;
            }

            .search-bar-actions .action-sep {
                height: 25px;
                width: 1px;
                background: #ddd;
                margin: 0 10px;
            }
        }

        /* [3] MOBILE VIEW (Stacked & Scroll Safe) */
        @media (max-width: 992px) {
            .header-row-top {
                display: flex !important;
                flex-direction: column !important;
                gap: 15px !important;
                width: 100% !important;
            }

            .header-left, .header-right-actions { display: flex !important; align-items: center !important; }
            
            /* Hide search bar on mobile view */
            .header-center-search {
                display: none !important;
            }

            .logo-img {
                width: 100px !important;
            }

            #hajiRabriLogoText {
                font-size: 26px !important; /* Increased for mobile readability */
                margin-left: 0 !important;
                transform: none !important;
            }

            .location-drop {
                margin: 0 !important;
                justify-content: center !important;
            }
            
            /* Increased location texts for mobile */
            #deliverToText {
                font-size: 16px !important;
            }
            #selectedCityText {
                font-size: 14px !important;
            }

            .search-bar {
                width: 95% !important;
                margin: 0 auto !important;
            }
            
            /* Prevent iOS zooming and improve readability */
            #searchInput {
                font-size: 16px !important;
            }

            header .main-header .header-row-bottom { display: none !important; }

            .desktop-nav-link {
                margin: 5px 10px !important;
            }
            
            /* Make the highlighted Navbar links much larger on mobile */
            .desktop-nav-link .action-text,
            .desktop-nav-link i {
                font-size: 19px !important;
                font-weight: 800 !important;
            }
            
            /* Force Branches to its own line and center it (Mobile Only) */
            .desktop-nav-link[href="branches.html"] {
                display: flex !important;
                flex-basis: 100% !important;
                justify-content: center !important;
                margin-top: 15px !important;
                margin-bottom: 5px !important;
            }

            /* Force Login/Cart container to its own line below Branches (Mobile Only) */
            .hrw-only-mobile.conditional-hide-container {
                flex-basis: 100% !important;
                justify-content: center !important;
                margin-top: 10px !important;
                padding-top: 10px !important;
                border-top: 1px dashed #eee !important;
            }
            
            /* Override global action-text for other mobile elements (Login/Cart) */
            .action-text {
                font-size: 15px !important; /* Increased from 12px */
            }

            /* Bottom Header Mobile Layout Fix using Grid */
            .bottom-header {
                display: grid !important;
                grid-template-columns: auto auto !important;
                justify-content: space-between !important;
                align-items: center !important;
                padding: 10px 15px !important;
                gap: 10px 0 !important; /* vertical gap between rows */
            }
            .bottom-header .cat-dropdown-container {
                grid-column: 1 !important;
                grid-row: 1 !important;
            }
            .bottom-header .contact-info {
                grid-column: 2 !important;
                grid-row: 1 !important;
                margin-left: 0 !important;
            }
            .bottom-header #welcomeText {
                grid-column: 1 / span 2 !important;
                grid-row: 2 !important;
                margin-top: 5px !important;
                font-size: 16px !important;
            }
            #catDropdownBtn {
                width: 140px !important; /* Reduce width */
                padding: 0 12px !important;
                font-size: 14px !important;
            }

            /* Global Scroll Fix */
            html,
            body {
                overflow-x: hidden !important;
                width: 100% !important;
                position: relative !important;
                height: auto !important;
            }
        }
.loader-logo {
            width: 200px;
            max-width: 90%;
            height: auto;
            display: block;
            margin: 0 auto;
            border-radius: 50%;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

        }

        .action-text {
            display: inline-block !important;
            font-size: 12px !important;
            letter-spacing: 0.2px !important;
            text-transform: uppercase;
        }

        /* Forceful hide backup if JS completely fails */
        @keyframes forceHide {
            0% {
                opacity: 1;
                pointer-events: all;
            }

            95% {
                opacity: 1;
                pointer-events: all;
            }

            100% {
                opacity: 0;
                pointer-events: none;
                visibility: hidden;
                display: none;
            }
        }

        #loader {
            animation: forceHide 2.5s forwards;
            z-index: 999999;
        }

        /* Welcome Popup Modal */
        .welcome-popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            z-index: 99999;
            display: none;
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .order-type-popup {
            width: 100%;
            max-width: 450px;
            padding: 35px 30px 25px 30px;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
            font-family: 'Inter', sans-serif;
            color: var(--text-dark);
            position: relative;
            transform: scale(0.8);
            transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            max-height: 90vh;
            overflow-y: auto;
            margin: 0 15px;
        }

        .welcome-popup-overlay.show {
            display: flex;
            opacity: 1;
        }

        .welcome-popup-overlay.show .order-type-popup {
            transform: scale(1);
        }

        .popup-close-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            font-size: 28px;
            color: #999;
            cursor: pointer;
            line-height: 1;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s;
        }

        .popup-close-btn:hover {
            color: #e54d58;
            background: #f5f5f5;
        }

        .popup-logo-container {
            text-align: center;
            margin-bottom: 15px;
        }

        .popup-logo {
            height: 90px;
            object-fit: contain;
        }

        .popup-title {
            font-size: 18px;
            font-weight: 800;
            margin-bottom: 15px;
            color: #2b303a;
            text-align: center;
        }

        .popup-toggle-group {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 25px;
        }

        .popup-toggle-btn {
            padding: 10px 30px;
            border-radius: 25px;
            border: 1px solid #e2e8f0;
            background: #fff;
            color: #4a5568;
            font-weight: 700;
            cursor: pointer;
            transition: 0.3s;
            font-size: 14px;
        }

        .popup-toggle-btn.active {
            background: #104494; /* Dark blue matching Al-Naseeb style */
            color: #fff;
            border-color: #104494;
        }

        .popup-separator {
            height: 1px;
            background: #f0f0f0;
            margin: 25px 0;
            width: 100%;
        }

        .popup-subtitle {
            font-size: 15px;
            font-weight: 800;
            margin-bottom: 15px;
            color: #4a5568;
            text-align: center;
        }

        .use-location-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 10px 20px;
            border-radius: 20px;
            background: #f4f5f7;
            border: 1px solid #e2e8f0;
            color: #2b303a;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            transition: 0.3s;
            margin-bottom: 25px;
        }

        .use-location-btn:hover {
            background: #e2e8f0;
        }

        .popup-form-group {
            text-align: left;
            margin-bottom: 18px;
        }

        .popup-form-group label {
            display: block;
            font-size: 14px;
            font-weight: 800;
            margin-bottom: 8px;
            color: #4a5568;
        }

        .popup-select {
            width: 100%;
            padding: 14px 15px;
            border-radius: 8px;
            border: 1px solid #cbd5e0;
            background: #fff;
            font-size: 15px;
            outline: none;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23718096%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
            background-repeat: no-repeat;
            background-position: right 15px top 50%;
            background-size: 10px auto;
            color: #718096;
        }

        .popup-select:focus {
            border-color: #a0aec0;
            color: #2b303a;
        }
        
        .popup-select option {
            color: #2b303a;
        }

        .popup-note {
            font-size: 12px;
            color: #a0aec0;
            text-align: left;
            margin-top: 15px;
            margin-bottom: 25px;
            line-height: 1.5;
        }

        .popup-submit-btn {
            width: 100%;
            background: #e2e8f0;
            color: #a0aec0;
            padding: 15px;
            border-radius: 8px;
            border: none;
            font-size: 16px;
            font-weight: 800;
            cursor: pointer;
            transition: 0.3s;
        }

        .popup-submit-btn:not([disabled]) {
            background: #104494; /* Active button uses the dark blue */
            color: white;
        }
        
        .popup-submit-btn:not([disabled]):hover {
            background: #0c3370;
        }

        .welcome-popup-close {
            display: none;
        }
/* Appended extracted inline styles */
.premium-banner {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../../images/three_rabri_banner.webp');
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    margin: 60px 0;
    padding: 100px 40px;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
}
.premium-banner h2 {
    font-size: 42px; margin: 0; text-transform: uppercase; font-weight: 900; letter-spacing: 2px; text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}
.premium-banner p {
    font-size: 20px; max-width: 800px; margin: 0; line-height: 1.6; font-weight: 500; text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}
.premium-banner button {
    background: var(--primary-gold); color: white; border: none; padding: 15px 40px; font-size: 16px; font-weight: 800; border-radius: 8px; cursor: pointer; text-transform: uppercase; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.premium-banner button:hover {
    background: white; color: var(--dark-brown);
}

.why-card {
    background: white; padding: 40px 30px; border-radius: 12px; box-shadow: 0 8px 25px rgba(0,0,0,0.06); transition: all 0.4s ease; border: 1px solid #f9f9f9;
}
.why-card:hover {
    transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.why-icon {
    width: 80px; height: 80px; border-radius: 50%; background: var(--bg-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto;
}
.why-icon i {
    font-size: 35px; color: var(--primary-gold);
}
.why-card h3 {
    color: var(--dark-brown); margin-bottom: 12px; font-size: 20px; font-weight: 800;
}
.why-card p {
    color: var(--text-gray); font-size: 15px; line-height: 1.6;
}

/* --- AL NASEEB MOBILE VIEW REPLICATION --- */

/* 1. Sticky Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666666;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    gap: 4px;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--primary-gold);
}

/* Add padding to body so content isn't hidden behind the bottom nav */
@media (max-width: 992px) {
    body {
        padding-bottom: 70px !important;
    }
    
    /* Hide floating WhatsApp since we have it in bottom nav */
    .floating-whatsapp {
        display: none !important;
    }

    /* 2. Compact Mobile Header (Al Naseeb style) */
    .header-row-top {
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 5px 0 !important;
        gap: 0 !important;
    }

    .header-left {
        width: auto !important;
        gap: 5px !important;
    }

    #hajiRabriLogoText {
        display: none !important; /* Hide text, only show logo for compact view */
    }

    .logo-img {
        width: 60px !important; /* Smaller logo */
    }

    .location-drop {
        padding: 2px 5px !important;
    }

    #deliverToText {
        font-size: 12px !important;
    }

    #selectedCityText {
        font-size: 10px !important;
    }

    /* Move Search bar back into header or make it full width below */
    .header-center-search {
        display: none !important; /* Hidden by default on mobile */
        width: 100% !important;
        padding: 0 10px !important;
        margin-top: 5px !important;
        margin-bottom: 5px !important;
    }
    
    .header-center-search.show-search {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px);
        z-index: 999 !important; /* Bottom nav is 1000 */
        padding: 20px !important;
        align-items: flex-start !important;
        margin: 0 !important;
        animation: fadeIn 0.2s ease-out;
    }

    .header-center-search.show-search .search-bar {
        width: 100% !important;
        max-width: 100% !important;
        background: #fff !important;
        border: 2px solid var(--primary-gold) !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
        padding: 15px 20px !important;
        border-radius: 8px !important;
    }
    
    .header-center-search.show-search .close-search-btn {
        display: block !important;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .search-bar {
        padding: 8px 15px !important;
    }

    /* Hide the duplicated mobile actions since they are now in the bottom nav */
    .hrw-only-mobile.conditional-hide-container {
        display: none !important;
    }

    /* Hide Desktop Bottom Header Navigation Links on Mobile */
    .header-row-bottom {
        display: none !important; /* Hide the pill nav */
    }
    
    /* Hide the Categories button row since we have it in bottom nav */
    .bottom-header {
        display: none !important;
    }
    
    #catDropdownMenu.mobile-active {
        display: block !important;
        position: fixed !important;
        bottom: 70px !important;
        top: auto !important;
        left: 0 !important;
        width: 100% !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
        border-top: 1px solid #eee !important;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.1) !important;
        z-index: 1001 !important;
        background: white !important;
    }

    /* 3. Horizontal Category Scroll */
    .shop-by-category {
        margin-bottom: 30px !important;
    }
    
    .category-images-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 15px !important;
        padding-bottom: 15px !important;
        grid-template-columns: none !important; /* Override grid */
    }

    .category-images-grid::-webkit-scrollbar {
        display: none; /* Hide scrollbar for clean look */
    }

    .category-images-grid > div {
        flex: 0 0 calc(35% - 10px); /* Show roughly 3 items */
        scroll-snap-align: start;
        margin: 0 !important;
    }
    
    /* 4. Hero Slider Optimization */
    .slider-wrapper {
        border-radius: 12px !important;
        margin: 10px !important;
        width: calc(100% - 20px) !important;
        overflow: hidden !important;
    }
}

/* --- LOGIN MODAL (Al-Naseeb Style) --- */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 100000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.login-modal-content {
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    margin: 20px;
}

.login-modal-overlay.show .login-modal-content {
    transform: translateY(0);
}

.login-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f0f0f0;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    transition: 0.3s;
}

.login-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.login-modal-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
}

.login-modal-icon i {
    font-size: 30px;
    color: var(--primary-gold);
}

.login-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark-brown);
    margin-bottom: 10px;
}

.login-modal-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.login-input-group {
    display: flex;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    transition: 0.3s;
}

.login-input-group:focus-within {
    border-color: var(--primary-gold);
}

.login-country-code {
    background: #f8f8f8;
    padding: 15px;
    border-right: 2px solid #eaeaea;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-input {
    flex-grow: 1;
    border: none;
    padding: 15px;
    font-size: 16px;
    outline: none;
    color: #333;
}

.btn-login-primary {
    width: 100%;
    background: var(--primary-gold);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login-primary:hover {
    background: var(--dark-brown);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.otp-input {
    width: 50px;
    height: 60px;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    font-size: 24px;
    text-align: center;
    font-weight: 800;
    color: var(--dark-brown);
    transition: 0.3s;
    outline: none;
}

.otp-input:focus {
    border-color: var(--primary-gold);
}

.login-timer {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.login-timer span {
    font-weight: 700;
    color: var(--primary-gold);
}

/* Disabled state for buttons */
.popup-submit-btn:disabled,
.btn-login-primary:disabled {
    opacity: 0.5;
    pointer-events: none;
    background: #ccc;
    color: #666;
}

