/* ═══════════════════════════════════════════════════════════
   MOBILE HEADER — Burger menu, drawer, compact layout
   Breakpoint: < 992px
   ═══════════════════════════════════════════════════════════ */

/* ─── Mobile-only elements (hidden on desktop) ──────────── */
.mob-burger-btn,
.mob-logo-inline,
.mob-drawer-overlay,
.mob-drawer,
.mob-location-sheet-overlay,
.mob-location-sheet {
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE: < 992px
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 991px) {

    /* ── Fix horizontal overflow on all mobile browsers ───── */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw;
    }

    /* ── Fix header jump on scroll (~17px shift) ────────────── */
    /* The old .header has transition:all 0.4s and on scroll it
       adds .scrolled which changes padding. On mobile this creates
       a visible layout shift. Disable the transition and force
       header-top to be fully collapsed with no spacing.          */
    .header {
        transition: none !important;
    }
    .header-top {
        display: none !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        opacity: 0 !important;
        overflow: hidden !important;
        line-height: 0 !important;
        font-size: 0 !important;
    }

    /* ── Hide desktop elements ────────────────────────────── */
    .new-nav-left,
    .new-nav-right,
    .new-logo-spacer,
    .new-logo-container {
        display: none !important;
    }

    /* ── Hide search button from header bar on mobile ─────── */
    .new-left-section {
        display: none !important;
    }

    /* ── Compact header bar ───────────────────────────────── */
    .new-header-strip {
        padding: 0 12px;
    }
    .new-main-header {
        padding: 8px 0;
    }
    .new-header-white-bar {
        height: 54px;
        padding: 0 10px;
        border-radius: 27px;
        gap: 6px;
    }

    /* ── Inline mobile logo ──────────────────────────────── */
    .mob-logo-inline {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        order: 1;
        margin-right: auto;
    }
    .mob-logo-inline img {
        height: 44px;
        width: auto;
    }

    /* ── Burger button ───────────────────────────────────── */
    .mob-burger-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        cursor: pointer;
        flex-shrink: 0;
        padding: 8px;
        border-radius: 10px;
        transition: background 0.2s;
        order: 10;
    }
    .mob-burger-btn:hover {
        background: rgba(10, 143, 214, 0.08);
    }
    .mob-burger-btn span {
        display: block;
        width: 20px;
        height: 2.5px;
        background: #0a8fd6;
        border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
    }
    /* Burger → X animation */
    .mob-burger-btn.active span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    .mob-burger-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .mob-burger-btn.active span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    /* ── Reorder items inside white bar ──────────────────── */
    .new-location-wrapper {
        order: 11;
        margin-left: 4px;
    }
    .new-lang-switcher {
        order: 12;
        margin-left: 4px;
        padding: 3px 3px;
        gap: 1px;
    }
    .new-lang-switcher a {
        min-width: 30px;
        height: 28px;
        font-size: 10.5px;
        padding: 0 6px;
    }
    .lang-dropdown {
        order: 12;
        margin-left: 4px;
    }
    .lang-dropdown-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    .lang-dropdown-menu {
        right: 0;
        min-width: 60px;
    }

    /* ── Hide desktop dropdown, use bottom-sheet instead ── */
    .new-location-dropdown {
        display: none !important;
    }

    /* ── Overlay ─────────────────────────────────────────── */
    .mob-drawer-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0);
        z-index: 9998;
        pointer-events: none;
        transition: background 0.35s ease;
    }
    .mob-drawer-overlay.active {
        background: rgba(0, 0, 0, 0.45);
        pointer-events: auto;
    }

    /* ── Slide-out Drawer ────────────────────────────────── */
    .mob-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: #fff;
        z-index: 9999;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .mob-drawer.active {
        transform: translateX(0);
    }

    /* ── Drawer header ───────────────────────────────────── */
    .mob-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #f0f0f0;
        background: linear-gradient(135deg, #f0faff 0%, #fff 100%);
    }
    .mob-drawer-header img {
        height: 36px;
        width: auto;
    }
    .mob-drawer-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: #f5f5f5;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s, transform 0.2s;
        flex-shrink: 0;
    }
    .mob-drawer-close:hover {
        background: #e8e8e8;
        transform: scale(1.05);
    }
    .mob-drawer-close i {
        color: #666;
        font-size: 16px;
    }

    /* ── Drawer search ──────────────────────────────────── */
    .mob-drawer-search {
        padding: 12px 16px 4px;
    }
    .mob-drawer-search-box {
        display: flex;
        align-items: center;
        background: #f4f7fa;
        border: 2px solid #e8eef3;
        border-radius: 14px;
        padding: 0 12px;
        transition: border-color 0.2s, box-shadow 0.2s;
    }
    .mob-drawer-search-box:focus-within {
        border-color: #0a8fd6;
        box-shadow: 0 0 0 3px rgba(10, 143, 214, 0.1);
        background: #fff;
    }
    .mob-drawer-search-box i {
        color: #0a8fd6;
        font-size: 15px;
        flex-shrink: 0;
    }
    .mob-drawer-search-box input {
        flex: 1;
        border: none;
        background: transparent;
        padding: 11px 10px;
        font-size: 14px;
        font-weight: 600;
        color: #333;
        outline: none;
        font-family: 'Nunito', sans-serif;
    }
    .mob-drawer-search-box input::placeholder {
        color: #aab8c6;
        font-weight: 600;
    }

    /* ── Drawer navigation ───────────────────────────────── */
    .mob-drawer-nav {
        padding: 12px 0;
    }
    .mob-drawer-nav-title {
        padding: 8px 20px 6px;
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #999;
        font-family: 'Nunito', sans-serif;
    }
    .mob-drawer-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 20px;
        font-size: 15px;
        font-weight: 700;
        color: #333;
        text-decoration: none;
        transition: background 0.15s, color 0.15s;
        font-family: 'Nunito', sans-serif;
    }
    .mob-drawer-nav a:hover,
    .mob-drawer-nav a:active {
        background: #f0faff;
        color: #0a8fd6;
    }
    .mob-drawer-nav a i {
        width: 20px;
        text-align: center;
        color: #0a8fd6;
        font-size: 16px;
        flex-shrink: 0;
    }

    .mob-drawer-nav a.active {
        background: #e6f4fd;
        color: #0a8fd6;
        border-right: 3px solid #0a8fd6;
        font-weight: 800;
    }
    .mob-drawer-divider {
        height: 1px;
        background: #f0f0f0;
        margin: 8px 20px;
    }

    /* ── Drawer footer (top-bar info) ────────────────────── */
    .mob-drawer-footer {
        margin-top: auto;
        padding: 16px 20px 24px;
        background: #f8fbfe;
        border-top: 1px solid #f0f0f0;
    }
    .mob-drawer-phone {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 16px;
        font-weight: 800;
        color: #0a8fd6;
        text-decoration: none;
        margin-bottom: 14px;
        font-family: 'Nunito', sans-serif;
    }
    .mob-drawer-phone i {
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, #0a8fd6, #19b5e5);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 14px;
    }
    .mob-drawer-address {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        font-size: 13px;
        color: #666;
        margin-bottom: 14px;
        font-family: 'Nunito', sans-serif;
        line-height: 1.4;
    }
    .mob-drawer-address i {
        color: #0a8fd6;
        margin-top: 2px;
        flex-shrink: 0;
    }
    .mob-drawer-socials {
        display: flex;
        gap: 10px;
        margin-bottom: 14px;
    }
    .mob-drawer-socials a {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #0a8fd6;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 15px;
        transition: transform 0.2s, background 0.2s;
    }
    .mob-drawer-socials a:hover {
        transform: scale(1.1);
        background: #0778b5;
    }
    .mob-drawer-lang {
        display: flex;
        gap: 4px;
        background: #eef5fa;
        border-radius: 20px;
        padding: 4px;
    }
    .mob-drawer-lang a {
        flex: 1;
        text-align: center;
        padding: 7px 12px;
        border-radius: 16px;
        font-weight: 700;
        font-size: 13px;
        color: #666;
        text-decoration: none;
        transition: background 0.2s, color 0.2s;
        font-family: 'Nunito', sans-serif;
    }
    .mob-drawer-lang a.active {
        background: #0a8fd6;
        color: #fff;
    }
    .mob-drawer-lang a:hover:not(.active) {
        background: #dbedf8;
        color: #0a8fd6;
    }

    /* ── Prevent body scroll when drawer/sheet open ──────── */
    body.mob-drawer-open,
    body.mob-sheet-open {
        overflow: hidden;
    }

    /* ═════════════════════════════════════════════════════════
       BOTTOM SHEET — Location selector (mobile app style)
       ═════════════════════════════════════════════════════════ */

    /* ── Overlay ─────────────────────────────────────────── */
    .mob-location-sheet-overlay {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0);
        z-index: 10000;
        pointer-events: none;
        transition: background 0.3s ease;
    }
    .mob-location-sheet-overlay.active {
        background: rgba(0, 0, 0, 0.45);
        pointer-events: auto;
    }

    /* ── Sheet container ─────────────────────────────────── */
    .mob-location-sheet {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        max-height: 70vh;
        background: #fff;
        z-index: 10001;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .mob-location-sheet.active {
        transform: translateY(0);
    }

    /* ── Drag handle ─────────────────────────────────────── */
    .mob-sheet-handle {
        display: flex;
        justify-content: center;
        padding: 12px 0 4px;
        cursor: grab;
    }
    .mob-sheet-handle span {
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: #d0d5dd;
    }

    /* ── Sheet header ────────────────────────────────────── */
    .mob-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 20px 12px;
        border-bottom: 1px solid #f0f0f0;
    }
    .mob-sheet-title {
        font-size: 17px;
        font-weight: 800;
        color: #222;
        font-family: 'Nunito', sans-serif;
    }
    .mob-sheet-close {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: none;
        background: #f3f3f3;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }
    .mob-sheet-close:hover {
        background: #e4e4e4;
    }
    .mob-sheet-close i {
        color: #666;
        font-size: 14px;
    }

    /* ── Sheet list (scrollable) ─────────────────────────── */
    .mob-sheet-list {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px 0;
        flex: 1;
    }
    .mob-sheet-item {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 14px 20px;
        border: none;
        background: none;
        cursor: pointer;
        font-family: 'Nunito', sans-serif;
        font-size: 15px;
        font-weight: 600;
        color: #333;
        text-align: left;
        transition: background 0.15s;
    }
    .mob-sheet-item:hover,
    .mob-sheet-item:active {
        background: #f0f9ff;
    }
    .mob-sheet-item.active {
        color: #0a8fd6;
        font-weight: 800;
        background: #f0f9ff;
    }
    .mob-sheet-item i {
        width: 20px;
        text-align: center;
        color: #0a8fd6;
        font-size: 14px;
        flex-shrink: 0;
    }
    .mob-sheet-item .mob-sheet-check {
        margin-left: auto;
        color: #0a8fd6;
        font-size: 14px;
        opacity: 0;
    }
    .mob-sheet-item.active .mob-sheet-check {
        opacity: 1;
    }
}

/* ── Extra small (< 480px) ───────────────────────────────── */
@media (max-width: 479px) {
    .mob-logo-inline img {
        height: 36px;
    }
    .new-header-white-bar {
        height: 50px;
        padding: 0 8px;
    }
    .mob-burger-btn {
        width: 36px;
        height: 36px;
        padding: 7px;
    }
    .mob-burger-btn span {
        width: 18px;
        height: 2px;
    }
    .new-lang-switcher {
        padding: 2px 2px;
        gap: 1px;
    }
    .new-lang-switcher a {
        min-width: 26px;
        height: 24px;
        font-size: 9.5px;
        padding: 0 4px;
    }
    .lang-dropdown-btn {
        padding: 3px 6px;
        font-size: 10px;
    }
    .new-location-wrapper .new-location-text {
        display: none;
    }
    .new-location-btn {
        width: 40px;
        height: 40px;
        padding: 6px;
        border-radius: 50%;
    }
    .new-location-btn .new-chevron {
        display: none;
    }
}
