/* =====================================================================
   Bahga Shop – Mobile / Tablet Polish Layer  (mobile-pro.css)
   ---------------------------------------------------------------------
   LOAD ORDER (last in <head>):
     style.css -> responsive.css -> home-responsive-pro.css -> mobile-pro.css
   Goal: make phones look like a scaled-down version of the desktop
   design (same hero, same cards, same spacing rhythm) instead of a
   stretched / cramped one. Desktop (>=992px) is NOT touched.
   ===================================================================== */

:root {
    --bs-header-h: 68px;          /* mobile header height  */
    --bs-gutter: 16px;            /* page side padding     */
    --bs-radius: 16px;            /* cards / banners       */
    --bs-brand: #930f0f;
}

/* ---------- 0. Global safety ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* `clip` (not hidden) so position:sticky/fixed children keep working */
body { overflow-x: clip; }

/* Custom cursor is useless on touch devices */
@media (hover: none), (max-width: 991.98px) {
    .tf-mouse { display: none !important; }
}

/* =====================================================================
   1. HEADER  (<= 991px)
   Problem: #page had padding-top:88px while the header was still in
   normal flow => ~120px of dead space above the logo.
   Fix: header is fixed + page reserves exactly its height.
   ===================================================================== */
@media (max-width: 991.98px) {
    #page.pt-40,
    .pt-40 { padding-top: var(--bs-header-h) !important; }

    .header_1,
    .header_1.header-fixed,
    .header_1.is-fixed,
    .header_1.is-fixed.is-small {
        position: fixed !important;
        top: 0 !important;
        left: 0;
        right: 0;
        width: 100%;
        height: var(--bs-header-h) !important;
        min-height: var(--bs-header-h) !important;
        /* NO backdrop-filter / transform here: they turn the header into the
           containing block of the fixed mobile menu and squash it into the bar */
        background: #161616;
        box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
        z-index: 9999;
        transition: none;
    }
    .header_1 .themesflat-container,
    .header_1.is-fixed.is-small .themesflat-container {
        padding: 0 var(--bs-gutter);
        height: 100%;
    }
    .header_1 .row,
    .header_1 .col-12,
    #site-header-inner,
    #site-header-inner .wrap-box { height: 100%; }
    #site-header-inner .wrap-box { align-items: center; }
    #site-logo { height: var(--bs-header-h); display: flex; align-items: center; }
    #site-logo-inner { position: static; transform: none; }

    /* cart pill + burger vertically centred & evenly spaced */
    .flat-wallet { right: calc(var(--bs-gutter) + 44px); }
    .mobile-button { right: var(--bs-gutter); }
    .header-cart-btn {
        height: 42px !important;
        min-width: 46px !important;
        border-radius: 12px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
@media (max-width: 480px) {
    :root { --bs-header-h: 64px; }
}

/* =====================================================================
   2. HERO  – ad slider + 3D product carousel
   ===================================================================== */
@media (max-width: 991.98px) {
    .flat-pages-title {
        padding-top: 14px;
        padding-bottom: 28px;
    }
    .flat-pages-title .themesflat-container { padding-left: var(--bs-gutter); padding-right: var(--bs-gutter); }
    .flat-pages-title .pages-title { padding-left: 0; padding-right: 0; }

    /* ---- ad slider: keep the REAL image ratio (was stretched to 500px) ---- */
    .slider-ad-wrapper { width: 100%; margin: 0 auto; }
    .home-ads-slider,
    .slider-ad-wrapper .swiper {
        border-radius: var(--bs-radius);
        overflow: hidden;
        margin-bottom: 0;
    }
    /* every slide gets the same desktop-like ratio (21:9) so slides of
       different image sizes never leave a blank gap under the shorter ones */
    .home-ads-slider .swiper-slide,
    .slider-ad-wrapper .swiper-slide { aspect-ratio: 21 / 9; overflow: hidden; }
    .home-ads-slider img,
    .slider-ad-wrapper .swiper-slide img {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: cover;
        display: block;
    }
    /* dots (theme hides every .swiper-pagination <=1200px) */
    .slider-ad-wrapper .swiper-pagination {
        display: block !important;
        position: relative;
        bottom: auto;
        margin-top: 12px;
        text-align: center;
    }
    .slider-ad-wrapper .swiper-pagination-bullet {
        width: 7px; height: 7px; margin: 0 4px !important;
    }

    /* decorative stars: bring them back (smaller) like on desktop */
    .slider-ad-wrapper .icon-background { display: block; opacity: .85; }
    .slider-ad-wrapper .icon-background img { max-width: 14px; height: auto; }
}

/* ---- 3D coverflow carousel ----
   Phones now show the SAME 7-card coverflow as desktop, just scaled down.
   The scaling is done by a tiny script in index.php (fitHeroCarousel):
   it renders the swiper at a fixed "design width" and applies
   transform:scale() so every proportion stays identical to desktop. */
@media (max-width: 991.98px) {
    .flat-pages-title .relative.hero-3d-box { position: relative; overflow: hidden; clip-path: inset(0); margin-top: 6px; }
    .flat-pages-title .swiper-3d-7 {
        padding-top: 0;
        padding-bottom: 0;
        margin: 0;
        max-width: none !important;   /* let JS lay it out at the design width */
        transform-origin: 0 0;
    }
    .flat-pages-title .swiper-3d-7 .swiper-slide { width: 268px !important; }
    .flat-pages-title .swiper-3d-7 .tf-card-box { margin-bottom: 0; }
    .flat-pages-title .swiper-3d-7 .button-place-bid { display: none !important; }
    /* arrows + numbers are too small to use once scaled; swipe instead */
    .flat-pages-title .swiper-3d-7 .swiper-pagination { display: none !important; }
    .flat-pages-title .next-3d,
    .flat-pages-title .prev-3d { display: none !important; }
}

/* =====================================================================
   3. PRODUCT CARDS (hero / upcoming / discover)  – touch friendly
   The “Add to cart / View” buttons only existed on :hover, which never
   fires on phones. Make them a permanent, tidy footer of the card.
   ===================================================================== */
@media (max-width: 991.98px), (hover: none) {
    /* fluid images instead of fixed 235x244 */
    .tf-card-box.style-1 .card-media img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
    .tf-card-box { margin-bottom: 0; }
    .tf-card-box:hover .card-media a img { transform: none; }

    /* permanent action buttons (discover grid only – hero keeps the clean look) */
    .discover-item .tf-card-box .card-media { overflow: hidden; }
    .discover-item .tf-card-box .button-place-bid,
    .discover-item .tf-card-box.style-1 .card-media .button-place-bid,
    .discover-item .tf-card-box.style-1:hover .card-media .button-place-bid {
        position: absolute;
        left: 8px; right: 8px; bottom: 8px;
        top: auto;
        transform: none;
        height: auto;
        opacity: 1;
        display: flex !important;
        gap: 6px !important;
    }
    .discover-item .tf-card-box .button-place-bid form { flex: 1 1 auto; margin: 0; }
    .discover-item .tf-card-box .button-place-bid .tf-button {
        width: 100%;
        height: 36px;
        min-height: 36px;
        padding: 0 8px;
        font-size: 12px;
        line-height: 36px;
        border-radius: 10px;
        justify-content: center;
        white-space: nowrap;
    }
    /* image + product name are already links => hide the redundant “View” */
    .discover-item .tf-card-box .button-place-bid > a.tf-button { display: none; }


    .wishlist-button { width: 32px; height: 32px; top: 8px; right: 8px; }
    .featured-countdown { top: 9px !important; left: 8px !important; font-size: 11px; padding: 7px 9px; }
}

/* ---- Upcoming Items carousel ---- */
@media (max-width: 767.98px) {
    .featured-item .tf-card-box.style-1 { padding: 8px 8px 12px; border-radius: 14px; }
    .featured-item .tf-card-box.style-1 .card-media { border-radius: 10px; margin-bottom: 8px; }
    .featured-item .tf-card-box.style-1 .name {
        font-size: 13px; line-height: 1.4; margin: 0 4px 4px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .featured-item .tf-card-box.style-1 .author { margin: 0 4px; }
    .featured-item .tf-card-box.style-1 .author .info { gap: 6px; }
    .featured-item .tf-card-box.style-1 .author .info span { font-size: 10px; opacity: .7; }
    .featured-item .tf-card-box.style-1 .author .info h6 { font-size: 12px; }
}

/* ---- Discover grid: stay 2-per-row on ordinary phones (360px+) ---- */
@media (max-width: 380px) and (min-width: 331px) {
    .discover-item .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .discover-item .tf-card-box.style-1 .name { font-size: 12.5px; }
}
@media (max-width: 330px) {
    .discover-item .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
}
@media (max-width: 767.98px) {
    .discover-item .wow { visibility: visible !important; }   /* avoid invisible cards if WOW fails */
    .discover-item .row > [class*="col-"] { margin-bottom: 0; }
}

/* =====================================================================
   4. SECTION RHYTHM + HEADINGS
   ===================================================================== */
@media (max-width: 991.98px) {
    .tf-section,
    .tf-section-1,
    .tf-section-2,
    .tf-section-3,
    .tf-section-4,
    .tf-section-5 { padding-top: 28px; padding-bottom: 28px; }

    .heading-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px 16px;
        padding-bottom: 16px !important;
    }
    .heading-section .tf-title { margin: 0; padding-bottom: 0 !important; font-size: clamp(20px, 5.4vw, 26px); }
    .heading-section > a { font-size: 13px; white-space: nowrap; }
    .featured-item .pt-10 { padding-top: 0 !important; }
}

/* =====================================================================
   5. FILTER BAR (Category / Sort)
   ===================================================================== */
@media (max-width: 767.98px) {
    .discover-item .pb-30 { padding-bottom: 16px !important; }
    .tf-soft .soft-left {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }
    .tf-soft .soft-left .dropdown { width: 100% !important; min-width: 0; }
    .tf-soft .soft-left .btn.dropdown-toggle {
        width: 100%;
        height: 44px;
        padding: 0 12px;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        overflow: hidden;
    }
    .tf-soft .soft-left .btn.dropdown-toggle span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .tf-soft .soft-left .dropdown-menu {
        width: 100%;
        min-width: 0;
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* =====================================================================
   6. TOP SELLERS
   ===================================================================== */
@media (max-width: 767.98px) {
    .tf-section.seller .heading-section .tf-title { padding-bottom: 0 !important; }
    .tf-author-box { padding: 14px 8px; }
    .tf-author-box .author-avatar { margin-bottom: 10px; }
    .tf-author-box .author-avatar img.avatar { width: 64px !important; height: 64px !important; }
    .tf-author-box .author-infor h5 {
        font-size: 13px; line-height: 1.35; margin-bottom: 2px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .tf-author-box .author-infor .price.gem.style-1 { font-size: 11px; }
    .tf-author-box .author-avatar .number { width: 20px; height: 20px; font-size: 11px; }
}

/* =====================================================================
   7. BANNERS (full-width ad strips)
   ===================================================================== */
@media (max-width: 767.98px) {
    .banner-ad-img {
        height: auto;
        aspect-ratio: 16 / 7;
        border-radius: 12px;
    }
    .banner-wrap-bottom { padding-left: var(--bs-gutter); padding-right: var(--bs-gutter); }
    .banner-wrap-bottom .banner-ad-img { border-radius: 12px; }
    .container .raw-12.mb-5,
    .banner-wrap-bottom .raw-12.mb-5 { margin-bottom: 20px !important; }
}

/* =====================================================================
   8. CTA / ACTION BANNER
   ===================================================================== */
@media (max-width: 991.98px) {
    .tf-section.action { padding-top: 12px; padding-bottom: 28px; }
    .tf-section.action .explore-items { padding: 0 var(--bs-gutter); }
    .tf-section.action .action__body {
        margin: 0;
        padding: 36px 20px 40px;
        border-radius: 22px;
        min-height: 260px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .tf-section.action .action__body h2 { margin-bottom: 20px; }
    .tf-section.action .bg-home7 { opacity: .22; right: -40px; }
    .tf-section.action .flat-button .tf-button { width: auto; min-width: 150px; }
}

/* =====================================================================
   9. FOOTER  – clean 2-column grid, centred brand + socials
   ===================================================================== */
@media (max-width: 767.98px) {
    #footer { padding: 36px 0 20px; }
    #footer .footer-content.flex.flex-grow {
        display: flex;
        flex-wrap: wrap;
        gap: 26px 16px;
    }
    #footer .widget-logo { flex: 1 1 100%; width: 100%; text-align: center; }
    #footer .widget-logo img { max-width: 150px; height: auto; margin: 0 auto; }
    #footer .widget,
    #footer .widget-menu {
        flex: 1 1 calc(50% - 8px);
        width: calc(50% - 8px);
        margin: 0;
    }
    #footer .widget-last {
        flex: 1 1 100%;
        width: 100%;
        margin: 0 !important;           /* kills .mx-5 */
        text-align: center;
        padding-top: 18px;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }
    #footer .widget-last .title-widget { margin-left: 0 !important; margin-right: 0 !important; }
    #footer .widget-social ul { justify-content: center; gap: 12px; }
    #footer .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 18px;
        padding: 16px 0 0;
        text-align: center;
        font-size: 12px;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }
    #footer .footer-bottom ul { gap: 18px; justify-content: center; }
    #footer .footer-bottom ul li { margin-left: 0; }
}

/* =====================================================================
   10. SCROLL-TO-TOP  &  MISC
   ===================================================================== */
@media (max-width: 767.98px) {
    .progress-wrap {
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        width: 42px;
        height: 42px;
    }
    /* generous, accessible tap targets */
    a.tf-button, button.tf-button { min-height: 40px; }
}

/* Tablets (768–991): 3 cards per row in Discover, bigger hero */
@media (min-width: 768px) and (max-width: 991.98px) {
    .discover-item .row > [class*="col-"] { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .flat-pages-title .swiper-3d-7 .swiper-slide { width: 320px !important; }
}

/* =====================================================================
   11. FIXES FROM TESTING
   ===================================================================== */
/* bare .col-md-12 (no .col-12) shrinks to content on phones and sits
   beside its sibling instead of taking the full row */
@media (max-width: 767.98px) {
    .featured-item .row > .col-md-12,
    .tf-section.seller .row > .col-md-12,
    .discover-item .row > .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
    /* filters: one per row so the full label stays readable */
    .tf-soft .soft-left { grid-template-columns: 1fr; }
    .discover-item .row { row-gap: 12px; }
    .flat-pages-title { padding-bottom: 8px; }
}
@media (min-width: 431px) and (max-width: 767.98px) {
    .tf-soft .soft-left { grid-template-columns: 1fr 1fr; }
}

/* mobile menu drawer must sit above everything (header, hero, sliders) */
@media (max-width: 991.98px) {
    .mobile-nav-wrap,
    .mobile-nav-wrap .overlay-mobile-nav,
    .mobile-nav-wrap .inner-mobile-nav { z-index: 100000; }
}

/* =====================================================================
   12. DATA TABLES -> CARDS ON PHONES (My Orders, Recently Delivered...)
   The theme forces `table-layout: fixed`, so 5 columns get equal width
   and order numbers / dates break into broken lines. On phones every
   row becomes a small card: order # as the title, other fields in a
   tidy 2-column grid with their labels. Needs mobile-tables.js, which
   copies each <th> text into the matching <td data-label>.
   Opt out for a specific table with class="no-stack".
   ===================================================================== */
@media (max-width: 640px) {
    table.bs-stack { display: block; width: 100%; border: 0 !important; table-layout: auto; background: transparent; }
    table.bs-stack thead { display: none; }
    table.bs-stack tbody { display: grid; gap: 10px; }
    table.bs-stack tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 14px;
        padding: 12px 14px;
        border: 1px solid rgba(255, 255, 255, .09) !important;
        border-radius: 12px;
        background: rgba(255, 255, 255, .03);
    }
    table.bs-stack td {
        display: block;
        min-width: 0;
        width: auto !important;
        padding: 0 !important;
        border: 0 !important;
        font-size: 12.5px;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }
    table.bs-stack td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        font-size: 10.5px;
        letter-spacing: .04em;
        text-transform: uppercase;
        opacity: .55;
        font-weight: 600;
    }
    /* first cell (Order #) = card title, full width */
    table.bs-stack td:first-child {
        grid-column: 1 / -1;
        padding-bottom: 8px !important;
        border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
        font-size: 13px;
        font-weight: 700;
        word-break: break-all;
    }
    table.bs-stack td:first-child::before { display: inline; margin: 0 6px 0 0; }
    /* rows that span all columns (e.g. "No orders yet") */
    table.bs-stack td[colspan] { grid-column: 1 / -1; text-align: center; border: 0 !important; }
    table.bs-stack td[colspan]::before { display: none; }
}

/* =====================================================================
   13. ORDER DETAILS PAGE (order-details.php)
   Desktop look is preserved (these rules replace the old inline styles);
   the media query below makes it phone-friendly.
   ===================================================================== */
.order-page { padding: 80px 0; }
.order-item { display: flex; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid #2e2e45; }
.order-item__img { width: 120px; flex: none; }
.order-item__img img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; display: block; }
.order-item__body { flex: 1; min-width: 0; }
.shipment-card { border: 1px solid #2e2e45; border-radius: 10px; padding: 15px; margin-bottom: 15px; }

@media (max-width: 767.98px) {
    .order-page {
        padding: 22px var(--bs-gutter) 48px;
        max-width: 100%;
        overflow-x: clip;
    }
    .order-page h3 { font-size: 22px; margin-bottom: 14px !important; }
    .order-page h4 { font-size: 19px; }
    .order-page h5 { font-size: 16px; }

    /* summary / shipping info tables */
    .orders-table { width: 100%; table-layout: auto; border-radius: 12px; overflow: hidden; }
    .orders-table th {
        width: 38% !important;
        padding: 11px 12px;
        font-size: 12.5px;
        vertical-align: top;
        text-align: left;
    }
    .orders-table td {
        padding: 11px 12px;
        font-size: 13px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }
    .Order-Summary-card, .Shipping-Information-card { margin-bottom: 26px !important; }

    /* product rows */
    .order-item { align-items: flex-start; gap: 14px; padding: 16px 0; }
    .order-item__img { width: 84px; }
    .order-item__img img { width: 84px; height: 84px; border-radius: 12px; }
    .order-item__body h5 { font-size: 15px; line-height: 1.35; margin-bottom: 8px !important; }
    .order-item__body p { font-size: 13px; line-height: 1.55; margin: 0 0 4px; overflow-wrap: anywhere; }
    .order-item__body hr { margin: 10px 0 !important; }
    .order-item__body .tf-button { width: 100%; justify-content: center; height: 44px; margin-top: 4px; }

    /* tracking: 2x2 grid instead of an overflowing row */
    .tracking-timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
    .tracking-timeline div { padding: 14px 10px; border-radius: 12px; }
    .tracking-timeline div strong { font-size: 14px; margin-bottom: 6px; }
    .tracking-timeline div small { font-size: 11.5px; }

    /* shipments */
    .shipment-card { padding: 14px; margin-bottom: 12px; }
    .shipment-card p { font-size: 13px; line-height: 1.55; margin: 0 0 4px; overflow-wrap: anywhere; }
    .shipment-card .tf-button { width: 100%; justify-content: center; height: 44px; }
}

/* =====================================================================
   14. NAVBAR (components/header.php)  – phones & tablets (<= 991px)
   Layout is now a real flex row:  [logo] ......... [search][cart] [menu]
   instead of three absolutely-positioned pieces fighting each other.
   Specificity uses #header_main so it wins over header-responsive.css,
   which header.php loads AFTER this file.
   ===================================================================== */
@media (max-width: 991.98px) {
    #header_main { border-bottom: 1px solid rgba(255, 255, 255, .06); }

    #header_main > .container {
        max-width: 100%;
        height: 100%;
        padding-left: var(--bs-gutter);
        padding-right: var(--bs-gutter);
    }
    #header_main .row,
    #header_main .col-md-12,
    #header_main #site-header-inner,
    #header_main #site-header-inner .wrap-box { height: 100%; }
    #header_main .row { margin-left: 0; margin-right: 0; }
    #header_main .col-md-12 { padding-left: 0; padding-right: 0; }

    #header_main #site-header-inner .wrap-box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: var(--bs-header-h);
    }

    /* logo */
    #header_main #site-logo {
        order: 1;
        flex: 0 1 auto;
        max-width: none;
        min-width: 0;
        height: auto;
    }
    #header_main #logo_header { max-height: 34px; max-width: 150px; width: auto; }

    /* cart / search group */
    #header_main .flat-wallet {
        order: 2;
        position: static;
        transform: none;
        margin: 0 0 0 auto;
        padding: 0;
        gap: 8px;
        align-items: center;
        flex: none;
    }
    #header_main .header-search .show-search {
        width: 40px; height: 42px; line-height: 42px; font-size: 18px; text-align: center;
    }
    #header_main .header-cart-btn {
        height: 42px !important;
        min-width: 46px !important;
        padding: 0 14px !important;
        border-radius: 12px !important;
        font-size: 13px;
    }

    /* burger */
    #header_main .mobile-button {
        order: 3;
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        display: block;
        flex: none;
        width: 28px;
        height: 28px;
        margin: 0 0 0 4px;
        z-index: 2;
    }
}
@media (max-width: 400px) {
    #header_main #logo_header { max-width: 118px; max-height: 30px; }
    #header_main .header-search { display: none; }
    #header_main .header-cart-btn { padding: 0 11px !important; }
}

/* ---------- Slide-in menu (drawer) ---------- */
@media (max-width: 991.98px) {
    .mobile-nav-wrap .overlay-mobile-nav { background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

    .mobile-nav-wrap .inner-mobile-nav {
        width: min(320px, 86vw);
        left: calc(-1 * min(320px, 86vw) - 30px);
        height: 100%;
        height: 100dvh;
        padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
        box-shadow: 12px 0 40px rgba(0, 0, 0, .45);
        transition: left .35s ease;
    }
    .mobile-nav-wrap.active .inner-mobile-nav { transition-delay: 0s; }

    /* logo row + close button on the same line */
    .inner-mobile-nav .main-logo { display: flex; align-items: center; height: 40px; }
    .inner-mobile-nav .main-logo img { max-height: 32px; width: auto; }
    .inner-mobile-nav .mobile-nav-close {
        top: 22px;
        right: 20px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: rgba(255, 255, 255, .07);
    }
    .inner-mobile-nav .mobile-nav-close svg { width: 16px; height: 16px; }

    /* links */
    #menu-mobile-menu { margin-top: 18px; padding-top: 8px; }
    #menu-mobile-menu > li { padding: 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
    #menu-mobile-menu > li > a.item-menu-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 4px;
        font-size: 16px;
        font-weight: 600;
        color: #fff;
    }
    #menu-mobile-menu > li.current-menu-item > a.item-menu-mobile { color: #e5484d; }

    /* Login / Sign up (or My Account / Logout) */
    #header_main .mobile-nav-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 22px;
        padding-top: 22px;
    }
    #header_main .mobile-nav-actions .tf-button {
        width: 100%;
        height: 46px;
        padding: 0 10px;
        justify-content: center;
        border-radius: 12px;
        font-size: 14px;
    }

    /* search inside the drawer */
    .inner-mobile-nav .widget-search { margin-top: 20px !important; }
    .inner-mobile-nav .widget-search input { height: 48px; border-radius: 12px; }
}

/* cart drawer: never wider than the screen, safe on tall phones */
@media (max-width: 480px) {
    #cart-sidebar { width: min(340px, 92vw) !important; height: 100dvh !important; }
}