/* =====================================================================
   مهرابی خودرو — منوی پایین موبایل / شیت پیام‌رسان / پیشنهاد نصب
   ===================================================================== */
.mkb, .mkb-sheet, .mkb-install { display: none; }

@media (max-width: 767px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important; }
  /* the floating Chaty bubble would sit on the bar; the bar replaces it on mobile */
  .chaty, [id^="chaty-widget"], .chaty-widget { display: none !important; }

  .mkb {
    display: grid; grid-template-columns: 1fr 1fr 1.15fr 1fr 1fr; align-items: end;
    position: fixed; z-index: 99990; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    height: 62px; padding: 0 4px;
    background: rgba(13, 18, 34, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .55);
    font-family: inherit;
  }
  .mkb__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 62px; background: none; border: 0; padding: 0; cursor: pointer;
    color: #9aa0b8 !important; font-size: 11px; font-weight: 700; text-decoration: none !important; font-family: inherit;
    -webkit-tap-highlight-color: transparent; transition: color .15s;
  }
  .mkb__item i { font-size: 18px; }
  .mkb__item.is-active, .mkb__item:active { color: #fff !important; }
  .mkb__item.is-active i { color: #ff7a2f; }
  .mkb__item--call i { color: #4ade80; }
  .mkb__sell { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 62px; justify-content: flex-end; padding-bottom: 7px;
    color: #fff !important; font-size: 11px; font-weight: 900; text-decoration: none !important; -webkit-tap-highlight-color: transparent; }
  .mkb__sell-btn { width: 56px; height: 56px; margin-top: -26px; border-radius: 18px; display: grid; place-items: center;
    background: linear-gradient(135deg, #ff7a2f, #ff4605); color: #fff; font-size: 22px;
    box-shadow: 0 0 0 5px #0d1222, 0 14px 26px -8px rgba(255, 70, 5, .8); transition: transform .15s; }
  .mkb__sell:active .mkb__sell-btn { transform: scale(.94); }

  /* messenger bottom sheet */
  .mkb-sheet { display: block; position: fixed; inset: 0; z-index: 99995; background: rgba(8, 10, 20, 0); transition: background .2s; }
  .mkb-sheet[hidden] { display: none; }
  .mkb-sheet.is-open { background: rgba(8, 10, 20, .55); }
  .mkb-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 24px 24px 0 0;
    padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform .22s ease; text-align: center; }
  .mkb-sheet.is-open .mkb-sheet__panel { transform: none; }
  .mkb-sheet__grab { display: block; width: 44px; height: 5px; border-radius: 5px; background: #dfe2ea; margin: 0 auto 14px; }
  .mkb-sheet__title { font-size: 17px; font-weight: 900; color: #161a2b; margin: 0 0 2px !important; }
  .mkb-sheet__sub { font-size: 13px; color: #8a8fa3; margin: 0 0 16px !important; }
  .mkb-sheet__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .mkb-sheet__grid .mk-msg { height: 54px; border-radius: 14px; justify-content: center; font-size: 15px; gap: 8px; }
  .mkb-sheet__grid .mk-msg svg { width: 20px; height: 20px; flex-basis: 20px; }
  .mkb-sheet__grid .mk-msg i { font-size: 20px; }
  .mk-msg--ig { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); color: #fff !important; }
  .mkb-sheet__close { margin-top: 12px; width: 100%; height: 48px; border: 0; border-radius: 14px; background: #f1f2f6; color: #4b5065; font-weight: 800; font-size: 15px; font-family: inherit; }

  /* install prompt */
  .mkb-install { display: flex; align-items: center; gap: 10px; position: fixed; z-index: 99989; left: 10px; right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px)); padding: 10px 12px; border-radius: 16px; background: #fff;
    box-shadow: 0 16px 40px -14px rgba(13, 18, 34, .45); border: 1px solid #eef0f5; animation: mkb-up .3s ease; }
  .mkb-install[hidden] { display: none; }
  .mkb-install img { border-radius: 12px; flex: 0 0 44px; }
  .mkb-install__text { flex: 1; min-width: 0; line-height: 1.6; }
  .mkb-install__text strong { display: block; font-size: 14px; color: #161a2b; }
  .mkb-install__text span { font-size: 12px; color: #8a8fa3; }
  .mkb-install__btn { border: 0; border-radius: 10px; background: linear-gradient(135deg, #ff7a2f, #ff4605); color: #fff; font-weight: 900; padding: 9px 16px; font-family: inherit; font-size: 13.5px; }
  .mkb-install__x { border: 0; background: none; color: #8a8fa3; font-size: 22px; line-height: 1; padding: 0 2px; }
  @keyframes mkb-up { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* the in-header messenger icons are redundant with the bar on mobile — keep only the call button */
  .mk-header-cta--mobile .mk-msgs { display: none; }
  .mk-header-cta--mobile .mk-btn--call span { display: inline !important; }
  .mk-header-cta--mobile .mk-btn--call { padding: 9px 13px !important; }

  /* the popup for Bale/Rubika must sit above the bar */
  .mk-msg-pop { z-index: 100001; }
}

/* installed app (standalone): a bit more room at the top */
@media (display-mode: standalone) and (max-width: 767px) {
  body { padding-top: env(safe-area-inset-top, 0px); }
}

/* =====================================================================
   v2: هدر موبایل شیشه‌ای و راست‌چین / منوی کشویی شیشه‌ای / تفکیک منوی پایین
   ===================================================================== */
@media (max-width: 1199px) {
  /* ---- header: menu button + logo on the right, call button on the left ---- */
  .vehica-mobile-menu__wrapper { flex-direction: row !important; align-items: center; gap: 10px; padding: 14px 22px !important; min-height: 74px; }
  .vehica-mobile-menu__wrapper::before { /* glass bar (pseudo-element so the fixed drawer inside is not affected) */
    content: ""; position: absolute; z-index: -1; inset: 8px 10px 0; border-radius: 18px;
    background: rgba(13, 18, 34, .62); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  .vehica-mobile-menu__wrapper .vehica-mobile-menu__hamburger { flex: 0 0 auto !important; order: 1; height: 40px; }
  .vehica-mobile-menu__hamburger > vehica-mobile-menu > div, .vehica-mobile-menu__hamburger [slot-scope] { display: flex; }
  .vehica-mobile-menu__wrapper .vehica-menu-icon { width: 40px; height: 40px; padding: 11px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); box-sizing: border-box; transform: scaleX(-1); }
  .vehica-mobile-menu__wrapper .vehica-mobile-menu__logo { flex: 1 1 auto !important; order: 2; align-items: flex-start; height: 40px; }
  .vehica-mobile-menu__wrapper .vehica-mobile-menu__logo .vehica-logo img { max-height: 34px; width: auto; }
  .vehica-mobile-menu__wrapper .mk-header-cta--mobile { order: 3; margin: 0 !important; margin-inline-start: auto !important; }
  .mk-header-cta--mobile .mk-btn--call { height: 40px; padding: 0 14px !important; border-radius: 12px; font-size: 13.5px; box-shadow: 0 8px 18px -8px rgba(255, 70, 5, .8); }

  /* ---- drawer: right-side glass panel, not full screen ---- */
  .rtl .vehica-mobile-menu__wrapper .vehica-mobile-menu__open,
  .vehica-mobile-menu__wrapper .vehica-mobile-menu__open {
    left: auto !important; right: 10px !important; top: 10px !important;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    width: min(84vw, 330px) !important; max-width: none !important;
    border-radius: 24px; overflow-y: auto !important;
    background: rgba(17, 22, 40, .78) !important;
    backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .08);
    transform: translateX(calc(100% + 24px)) !important; transition: transform .28s cubic-bezier(.2, .8, .2, 1) !important;
  }
  .rtl .vehica-mobile-menu__wrapper .vehica-mobile-menu__open.vehica-active,
  .vehica-mobile-menu__wrapper .vehica-mobile-menu__open.vehica-active { transform: none !important; }
  .vehica-mobile-menu__open__content { display: flex; flex-direction: column; min-height: 100%; }
  .vehica-mobile-menu__wrapper .vehica-mobile-menu__open .vehica-mobile-menu__open__top {
    background: transparent !important; height: 64px !important; padding: 0 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08); flex-direction: row; justify-content: space-between;
  }
  .mkd-brand img { height: 28px; width: auto; display: block; }
  .vehica-mobile-menu__open__top__x { top: 0 !important; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
  .vehica-mobile-menu__open__top__x svg { width: 13px; height: 13px; }
  .vehica-mobile-menu__open__top__x svg path { fill: #fff; }

  /* menu items */
  .vehica-mobile-menu__nav { padding: 12px 12px 6px; }
  .vehica-mobile-menu__wrapper .vehica-mobile-menu__open .vehica-menu > .menu-item { border: 0 !important; margin-bottom: 4px; }
  .vehica-mobile-menu__nav .vehica-menu__link {
    display: flex !important; align-items: center; gap: 12px; text-align: right; direction: rtl;
    padding: 12px 14px !important; border-radius: 14px; color: #e6e8f2 !important; font-size: 15.5px; font-weight: 800;
    transition: background .15s, color .15s;
  }
  .vehica-mobile-menu__nav .vehica-menu__link::before { /* icon chip */
    font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f0c9";
    width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .07); color: #ff8a5c; font-size: 14px;
  }
  .vehica-mobile-menu__nav .vehica-menu__link::after { font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f104"; margin-inline-start: auto; color: #5d6480; font-size: 13px; }
  .vehica-mobile-menu__nav .menu-item-home > .vehica-menu__link::before { content: "\f015"; }
  .vehica-mobile-menu__nav .vehica-menu__link[href$="/blog/"]::before { content: "\f15c"; }
  .vehica-mobile-menu__nav .vehica-menu__link[href$="/faq/"]::before { content: "\f059"; }
  .vehica-mobile-menu__nav .vehica-menu__link[href$="/about-us/"]::before { content: "\f05a"; }
  .vehica-mobile-menu__nav .vehica-menu__link[href$="/contact-us/"]::before { content: "\f095"; }
  .vehica-mobile-menu__nav .vehica-menu__link:active, .vehica-mobile-menu__nav .vehica-menu__link:hover { background: rgba(255, 255, 255, .06); }
  .vehica-mobile-menu__nav .current-menu-item > .vehica-menu__link { background: rgba(255, 70, 5, .14); color: #fff !important; }
  .vehica-mobile-menu__nav .current-menu-item > .vehica-menu__link::before { background: linear-gradient(135deg, #ff7a2f, #ff4605); color: #fff; }

  /* contact block at the bottom of the drawer */
  .mkd-contact { margin-top: auto; padding: 14px 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
  .mkd-contact__label { margin: 0 0 8px !important; font-size: 12px; color: #8e94ab; text-align: center; }
  .mkd-call { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 14px; color: #fff !important; font-weight: 900; font-size: 17px; letter-spacing: .5px; text-decoration: none !important; background: linear-gradient(135deg, #ff7a2f, #ff4605); box-shadow: 0 12px 24px -12px rgba(255, 70, 5, .9); }
  .mkd-msgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
  .mkd-msgs .mk-msg { width: 100%; height: 44px; padding: 0; justify-content: center; border-radius: 12px; background: rgba(255, 255, 255, .07) !important; border: 1px solid rgba(255, 255, 255, .1); color: #fff !important; font-size: 18px; }
  .mkd-msgs .mk-msg svg { width: 18px; height: 18px; flex-basis: 18px; }
  .mkd-msgs .mk-msg--wa i { color: #4ade80; } .mkd-msgs .mk-msg--bale svg { color: #2dd4bf; } .mkd-msgs .mk-msg--rubika svg { color: #c4b5fd; } .mkd-msgs .mk-msg--ig i { color: #f472b6; }

  /* dim + blur the page behind the open drawer (theme only did this ≥450px) */
  .vehica-mobile-menu-mask { transition: opacity .25s ease !important; }
  .vehica-mobile-menu__open.vehica-active + .vehica-mobile-menu-mask { width: 100% !important; opacity: 1 !important; background: rgba(6, 8, 16, .45) !important; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
}

@media (max-width: 767px) {
  /* ---- bottom bar: keep the colours, separate it from dark backgrounds ---- */
  .mkb {
    background: linear-gradient(180deg, rgba(40, 47, 74, .92), rgba(22, 27, 46, .94)) !important;
    border: 1px solid rgba(255, 255, 255, .2) !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 18px 40px -10px rgba(0, 0, 0, .7), 0 0 30px -6px rgba(255, 122, 47, .22), inset 0 1px 0 rgba(255, 255, 255, .12) !important;
  }
  .mkb__item { color: #b7bdd3 !important; }
  .mkb__sell-btn { box-shadow: 0 0 0 5px #1d2339, 0 0 0 6px rgba(255, 255, 255, .18), 0 14px 26px -8px rgba(255, 70, 5, .8) !important; }
}

/* v3: منوی کشویی تمام‌ارتفاع (عرض همان قبلی) */
@media (max-width: 1199px) {
  .rtl .vehica-mobile-menu__wrapper .vehica-mobile-menu__open,
  .vehica-mobile-menu__wrapper .vehica-mobile-menu__open {
    top: 0 !important; bottom: 0 !important; right: 0 !important; height: 100% !important; height: 100dvh !important;
    border-radius: 24px 0 0 24px; border-right: 0;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .mkd-contact { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 767px) {
  .mkb__item { font-size: 11.5px; font-weight: 700; }
  .mkb__sell { font-size: 11.5px; }
}
