/* ============================================
   Z-INDEX & VISIBILITY FIXES
   Resolves overlap issues in Desktop View
   ============================================ */

/* 1. Ensure Header Stays Top but below Modals */
.header-main-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    z-index: 1010 !important;
    width: 100% !important;
}

.main-navigation {
    position: relative !important;
    z-index: 1005 !important;
}

/* Header should be relative inside sticky placeholder */
.professional-header {
    z-index: 99999 !important;
    position: relative !important;
    width: 100% !important;
    top: auto !important;
    margin: 0 !important;
}

/* 2. Login & Search Dropdowns must be above Header and Nav */
.login-dropdown-menu,
.search-autocomplete,
.pincode-popup-modal {
    z-index: 2000 !important;
}

/* 3. Promo Bar should not hide dropdowns */
.promo-bar {
    z-index: 1001 !important;
    overflow: visible !important;
    /* Allow dropdowns to spill out if needed */
}

/* Force show dropdowns on hover/active */
.login-dropdown-wrapper:hover .login-dropdown-menu,
.search-container.active .search-autocomplete {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Ensure Dropdowns are not clipped */
.login-dropdown-wrapper,
.search-container {
    overflow: visible !important;
}

/* 4. Cart Drawer & Overlays - Highest Priority */
.cart-overlay,
.cart-drawer,
.mobile-menu-drawer,
.mobile-menu-overlay,
#loginOverlay {
    z-index: 2000 !important;
}

/* 5. Datepicker/Select dropdowns */
.datepicker,
.select2-dropdown {
    z-index: 2005 !important;
}

/* 6. Sticky Header Architecture Fix */
#header-placeholder {
    position: sticky !important;
    top: 0 !important;
    z-index: 100000 !important;
    width: 100% !important;
    height: auto !important;
    background: white;
    /* Ensure absolutely NO clipping for 62px logo or shadow */
    overflow: visible !important;
    box-sizing: border-box !important;
}

.hero-slider-section,
.hero-section {
    position: relative !important;
    z-index: 1 !important;
    /* Lower than 10000 */
    transform: none !important;
    /* Prevent new stacking context */
    overflow: hidden !important;
}

/* FIX: REMOVE DOUBLE SCROLL - RESET TO DEFAULTS */
html {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    /* Allow growth */
}

body {
    overflow-y: visible !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

/* 7. Ensure desktop elements are not hidden by mobile rules */
@media (min-width: 1025px) {

    .header-actions-right,
    .pincode-display,
    .search-container {
        display: flex !important;
    }
}