/* Shima Storefront UI 3.3.8 — final mobile navigation layer */
@media (max-width: 800px) {
  :root { --shima-mobile-drawer-w: min(86vw, 366px); }

  .shima-mobile-drawer,
  .shima-mobile-drawer * { box-sizing: border-box; }

  .shima-mobile-drawer {
    position: fixed !important;
    z-index: 2147483000 !important;
    inset: 0 0 0 auto !important;
    width: var(--shima-mobile-drawer-w) !important;
    height: 100vh !important;
    height: var(--shima-mobile-vh, 100dvh) !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)) !important;
    display: flex !important;
    flex-direction: column;
    gap: 10px !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    direction: rtl;
    background: linear-gradient(180deg,#fff 0%,#fcfefc 72%,#f8fcf9 100%) !important;
    border-left: 1px solid rgba(11,122,69,.09);
    border-radius: 0 !important;
    box-shadow: -24px 0 70px rgba(8,28,18,.18) !important;
    transform: translate3d(104%,0,0) !important;
    transition: transform .21s cubic-bezier(.2,.8,.2,1) !important;
    contain: layout paint style;
    isolation: isolate;
  }
  .shima-mobile-drawer > * { flex-shrink: 0; }
  .shima-mobile-drawer { touch-action: pan-y; }
  .shima-mobile-drawer-head { position:sticky; top:0; z-index:2; background:#fff; }
  .shima-mobile-drawer[hidden] { display: none !important; }
  .shima-mobile-drawer.is-open { transform: translate3d(0,0,0) !important; }

  .shima-drawer-backdrop {
    position: fixed !important;
    z-index: 2147482990 !important;
    inset: 0 !important;
    display: block;
    border: 0 !important;
    padding: 0 !important;
    background: rgba(8,22,15,.48) !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 0;
    transition: opacity .2s ease;
    touch-action: none;
  }
  .shima-drawer-backdrop[hidden] { display: none !important; }
  .shima-drawer-backdrop.is-open { opacity: 1; }

  body.shima-menu-open { overflow: hidden !important; overscroll-behavior: none !important; }

  .shima-mobile-drawer-head {
    min-height: 58px;
    display: flex !important;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px 9px !important;
    border-bottom: 1px solid #e5eee9 !important;
  }
  .shima-mobile-drawer-brand { min-width: 0; display: inline-flex; align-items: center; }
  .shima-mobile-drawer-brand img,
  .shima-mobile-drawer-head img { display: block; width: 152px !important; height: auto; max-height: 52px; object-fit: contain; }
  .shima-mobile-menu-close {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px;
    display: grid !important;
    place-items: center;
    border: 1px solid #dbe9e1 !important;
    border-radius: 16px !important;
    background: #f4f9f6 !important;
    color: #0a7343 !important;
    box-shadow: 0 5px 16px rgba(7,92,53,.05);
    -webkit-tap-highlight-color: transparent;
  }
  .shima-mobile-menu-close svg { width: 21px !important; height: 21px !important; }

  .shima-mobile-user-card {
    position: relative;
    min-height: 112px;
    display: grid !important;
    grid-template-columns: 58px minmax(0,1fr) 18px;
    align-items: center;
    gap: 11px;
    padding: 13px !important;
    overflow: hidden;
    border: 1px solid #d8eae0 !important;
    border-radius: 20px !important;
    background:
      radial-gradient(circle at 12% 30%,rgba(17,149,88,.07) 0 34px,transparent 35px),
      linear-gradient(135deg,#f2faf6,#fff) !important;
    box-shadow: 0 8px 24px rgba(7,92,53,.045);
    text-decoration: none !important;
  }
  .shima-mobile-user-card.is-active { border-color: #76c69c !important; box-shadow: 0 0 0 2px rgba(13,148,82,.07); }
  .shima-mobile-user-avatar {
    width: 58px; height: 58px;
    display: grid; place-items: center;
    border-radius: 18px;
    background: linear-gradient(145deg,#09a15b,#087743);
    color: #fff;
    box-shadow: 0 10px 22px rgba(8,123,67,.18);
  }
  .shima-mobile-user-avatar svg { width: 27px !important; height: 27px !important; }
  .shima-mobile-user-copy { min-width: 0; display: grid; gap: 2px; }
  .shima-mobile-user-copy > small { color: #718178; font-size: 11px; line-height: 1.5; }
  .shima-mobile-user-copy > strong { color: #112d1f; font-size: 16px; font-weight: 950; line-height: 1.55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shima-mobile-user-copy > em { color: #7d8983; font-size: 10.5px; font-style: normal; line-height: 1.65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shima-mobile-user-arrow { display: grid; place-items: center; color: #7e9188; }
  .shima-mobile-user-arrow svg { width: 16px; height: 16px; transform: rotate(180deg); }
  .shima-mobile-user-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 5px; }
  .shima-mobile-user-meta b {
    max-width: 100%;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 9px;
    line-height: 1.45;
    font-weight: 850;
    white-space: nowrap;
  }
  .shima-policy-chip { color: #07663c; background: #e9f7ef; border: 1px solid #d1ebdc; }
  .shima-discount-chip { color: #8a5b04; background: #fff8e7; border: 1px solid #f2e0ad; }
  .shima-cart-chip { color: #285b76; background: #edf7fb; border: 1px solid #d5eaf4; }

  .shima-mobile-drawer-section-title {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 27px;
    margin: 2px 2px 0 !important;
    color: #68786f;
  }
  .shima-mobile-drawer-section-title span { flex: 0 0 auto; font-size: 12.5px; font-weight: 900; }
  .shima-mobile-drawer-section-title i { display: block; height: 1px; flex: 1; background: linear-gradient(90deg,#dce7e1,transparent); }

  .shima-mobile-drawer-nav { display: grid !important; gap: 7px !important; }
  .shima-mobile-drawer-nav > a {
    min-height: 61px !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0,1fr) 16px !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 10px !important;
    border: 1px solid #e0e9e4 !important;
    border-radius: 17px !important;
    background: #fff !important;
    box-shadow: 0 4px 13px rgba(15,23,42,.025);
    text-decoration: none !important;
    transition: border-color .16s ease, background .16s ease, transform .12s ease, box-shadow .16s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .shima-mobile-drawer-nav > a:active { transform: scale(.987); }
  .shima-mobile-drawer-nav > a.is-active,
  .shima-mobile-drawer-nav > a[aria-current="page"] {
    border-color: #82cfa7 !important;
    background: linear-gradient(135deg,#eefaf4,#fbfffc) !important;
    box-shadow: 0 6px 18px rgba(8,123,67,.07);
  }
  .shima-mobile-drawer-link-icon {
    position: relative;
    width: 42px !important; height: 42px !important;
    display: grid !important; place-items: center;
    border-radius: 13px !important;
    background: #edf8f2 !important;
    color: #0b7a47 !important;
  }
  .shima-mobile-drawer-link-icon svg { width: 21px !important; height: 21px !important; }
  .shima-mobile-drawer-nav > a.is-active .shima-mobile-drawer-link-icon,
  .shima-mobile-drawer-nav > a[aria-current="page"] .shima-mobile-drawer-link-icon {
    background: #0a8e50 !important;
    color: #fff !important;
  }
  .shima-mobile-drawer-link-text { min-width: 0; display: grid !important; gap: 1px; }
  .shima-mobile-drawer-link-text strong { color: #122f20; font-size: 14px !important; line-height: 1.55; font-weight: 930 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shima-mobile-drawer-link-text small { color: #7c8b83; font-size: 10.4px !important; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shima-mobile-drawer-link-arrow { display: grid; place-items: center; color: #87988f; }
  .shima-mobile-drawer-link-arrow svg { width: 14px; height: 14px; transform: rotate(180deg); }
  .shima-mobile-item-badge {
    position: absolute;
    top: -5px; left: -5px;
    min-width: 19px; height: 19px;
    display: grid; place-items: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e84d4d;
    color: #fff;
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(232,77,77,.25);
  }

  .shima-mobile-services-title { margin-top: 1px !important; }
  .shima-mobile-services { display: grid !important; grid-template-columns: minmax(0,1fr); gap: 8px !important; }
  .shima-mobile-services > a {
    min-width: 0;
    min-height: 56px;
    display: grid !important;
    grid-template-columns: 34px minmax(0,1fr) 13px;
    align-items: center;
    gap: 7px;
    padding: 8px !important;
    border: 1px solid #e0e9e4 !important;
    border-radius: 16px !important;
    background: #fff !important;
    text-decoration: none !important;
  }
  .shima-mobile-services > a.is-active { border-color: #82cfa7 !important; background: #f0faf5 !important; }
  .shima-mobile-service-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #0b7a47; background: #edf8f2; }
  .shima-mobile-service-icon svg { width: 18px; height: 18px; }
  .shima-mobile-services strong { min-width: 0; color: #183326; font-size: 13px; font-weight: 900; white-space: normal; overflow-wrap:anywhere; }
  .shima-mobile-service-arrow { display: grid; place-items: center; color: #8b9b93; }
  .shima-mobile-service-arrow svg { width: 12px; height: 12px; transform: rotate(180deg); }

  .shima-mobile-drawer-slogan {
    margin-top: auto !important;
    padding: 8px 4px 1px !important;
    display: grid !important;
    grid-template-columns: minmax(24px,1fr) auto minmax(24px,1fr);
    align-items: center;
    gap: 8px;
    text-align: center;
    color: #687870;
  }
  .shima-mobile-drawer-slogan > span { height: 1px; background: linear-gradient(90deg,transparent,#b1cabd); }
  .shima-mobile-drawer-slogan > span:nth-of-type(2) { background: linear-gradient(90deg,#b1cabd,transparent); }
  .shima-mobile-drawer-slogan strong { font-size: 10.5px; font-weight: 850; white-space: nowrap; }
  .shima-mobile-drawer-slogan small { grid-column: 1 / -1; margin-top: -3px; color: #99a49e; font-size: 9px; line-height: 1.45; }

  .shima-mobile-bottom-nav a { position: relative; -webkit-tap-highlight-color: transparent; }
  .shima-mobile-bottom-nav a.is-active,
  .shima-mobile-bottom-nav a[aria-current="page"] { color: #087b43 !important; }
  .shima-mobile-bottom-badge {
    position: absolute;
    top: 5px;
    right: calc(50% - 19px);
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e84d4d;
    color: #fff;
    font-size: 8px;
    line-height: 1;
    font-weight: 900;
  }
}

@media (max-width: 430px) {
  :root { --shima-mobile-drawer-w: min(88vw, 354px); }
  .shima-mobile-drawer { padding-right: max(11px,env(safe-area-inset-right)) !important; padding-left: max(11px,env(safe-area-inset-left)) !important; gap: 8px !important; }
  .shima-mobile-drawer-brand img, .shima-mobile-drawer-head img { width: 143px !important; }
  .shima-mobile-user-card { min-height: 106px; grid-template-columns: 54px minmax(0,1fr) 16px; padding: 11px !important; }
  .shima-mobile-user-avatar { width: 54px; height: 54px; border-radius: 17px; }
  .shima-mobile-user-copy > strong { font-size: 15px; }
  .shima-mobile-drawer-nav { gap: 6px !important; }
  .shima-mobile-drawer-nav > a { min-height: 57px !important; grid-template-columns: 39px minmax(0,1fr) 14px !important; padding: 7px 9px !important; }
  .shima-mobile-drawer-link-icon { width: 39px !important; height: 39px !important; }
  .shima-mobile-drawer-link-text strong { font-size: 13.5px !important; }
  .shima-mobile-drawer-link-text small { font-size: 9.9px !important; }
}

@media (max-height: 720px) and (max-width: 800px) {
  .shima-mobile-drawer { gap: 6px !important; padding-top: max(9px, env(safe-area-inset-top)) !important; padding-bottom: max(9px, env(safe-area-inset-bottom)) !important; }
  .shima-mobile-drawer-head { min-height: 50px; padding-bottom: 6px !important; }
  .shima-mobile-drawer-brand img, .shima-mobile-drawer-head img { width: 132px !important; }
  .shima-mobile-menu-close { width: 44px !important; height: 44px !important; border-radius: 14px !important; }
  .shima-mobile-user-card { min-height: 82px; grid-template-columns: 46px minmax(0,1fr) 14px; padding: 8px 10px !important; border-radius: 16px !important; }
  .shima-mobile-user-avatar { width: 46px; height: 46px; border-radius: 14px; }
  .shima-mobile-user-avatar svg { width: 23px !important; height: 23px !important; }
  .shima-mobile-user-copy > strong { font-size: 14px; }
  .shima-mobile-user-copy > em { display: none; }
  .shima-mobile-user-meta { margin-top: 3px; }
  .shima-mobile-user-meta b { padding: 2px 6px; font-size: 8.5px; }
  .shima-mobile-drawer-section-title { min-height: 21px; margin-top: 0 !important; }
  .shima-mobile-drawer-nav { gap: 5px !important; }
  .shima-mobile-drawer-nav > a { min-height: 49px !important; padding-top: 5px !important; padding-bottom: 5px !important; }
  .shima-mobile-drawer-link-icon { width: 35px !important; height: 35px !important; border-radius: 11px !important; }
  .shima-mobile-drawer-link-icon svg { width: 18px !important; height: 18px !important; }
  .shima-mobile-drawer-link-text small { display: none; }
  .shima-mobile-services > a { min-height: 47px; }
  .shima-mobile-drawer-slogan small { display: none; }
  .shima-mobile-drawer-slogan { padding-top: 4px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .shima-mobile-drawer,
  .shima-drawer-backdrop,
  .shima-mobile-drawer-nav > a { transition: none !important; scroll-behavior: auto !important; }
}

@media(max-width:800px){
 .shima-mobile-drawer #shima-pwa-install { flex-shrink:0; margin:4px 0; max-width:100%; font:700 13px/1.8 Vazirmatn,Tahoma,sans-serif; }
 .shima-mobile-drawer #shima-pwa-install[hidden] { display:none!important; }
 .shima-mobile-drawer :focus-visible { outline:3px solid #d99010; outline-offset:2px; }
 .shima-mobile-drawer-link-text strong,.shima-mobile-user-copy > strong { white-space:normal; overflow-wrap:anywhere; }
}

/* 3.4.4 — final mobile drawer polish: softer geometry, tighter rhythm and
   a clear visual hierarchy on narrow iOS/Android viewports. */
@media (max-width: 800px) {
  .shima-mobile-menu-toggle {
    width: 42px !important;
    height: 42px !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid #d7e9de !important;
    border-radius: 15px !important;
    background: linear-gradient(145deg, #f7fbf8, #edf7f1) !important;
    color: #0a7343 !important;
    box-shadow: 0 7px 17px rgba(7, 92, 53, .08) !important;
    -webkit-tap-highlight-color: transparent;
  }

  .shima-mobile-menu-toggle svg {
    width: 24px !important;
    height: 24px !important;
  }

  .shima-mobile-menu-toggle:active {
    transform: scale(.96);
  }

  .shima-mobile-drawer {
    width: min(90vw, 392px) !important;
    padding-top: max(12px, env(safe-area-inset-top)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    gap: 8px !important;
    border-radius: 28px 0 0 28px !important;
    border: 1px solid rgba(12, 111, 65, .08) !important;
    border-right: 0 !important;
    box-shadow: -18px 0 54px rgba(8, 28, 18, .20) !important;
  }

  .shima-drawer-backdrop {
    background: rgba(7, 24, 16, .52) !important;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }

  .shima-mobile-drawer-head {
    min-height: 60px !important;
    padding: 0 3px 9px !important;
    border-bottom: 1px solid #e3eee8 !important;
  }

  .shima-mobile-drawer-brand img,
  .shima-mobile-drawer-head img {
    width: min(151px, 47vw) !important;
    max-height: 48px !important;
  }

  .shima-mobile-menu-close {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px !important;
    border-radius: 18px !important;
    border: 1px solid #d7e9de !important;
    background: linear-gradient(145deg, #f7fbf8, #edf7f1) !important;
    box-shadow: 0 7px 17px rgba(7, 92, 53, .08) !important;
  }

  .shima-mobile-user-card {
    min-height: 101px !important;
    grid-template-columns: 54px minmax(0, 1fr) 16px !important;
    gap: 10px !important;
    padding: 11px !important;
    border-radius: 23px !important;
    border-color: #cfe6d9 !important;
    box-shadow: 0 7px 20px rgba(7, 92, 53, .06) !important;
  }

  .shima-mobile-user-avatar {
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
  }

  .shima-mobile-drawer-section-title {
    min-height: 25px !important;
    margin: 1px 4px 0 !important;
  }

  .shima-mobile-drawer-nav {
    gap: 7px !important;
  }

  .shima-mobile-drawer-nav > a {
    min-height: 59px !important;
    grid-template-columns: 43px minmax(0, 1fr) 15px !important;
    gap: 10px !important;
    padding: 8px 11px !important;
    border-radius: 21px !important;
    border-color: #d9e8e0 !important;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .035) !important;
  }

  .shima-mobile-drawer-link-icon {
    width: 43px !important;
    height: 43px !important;
    border-radius: 16px !important;
  }

  .shima-mobile-drawer-link-text strong {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  .shima-mobile-drawer-link-text small {
    font-size: 10px !important;
    line-height: 1.55 !important;
  }

  .shima-mobile-services {
    gap: 7px !important;
  }

  .shima-mobile-services > a {
    min-height: 55px !important;
    padding: 8px 10px !important;
    border-radius: 20px !important;
    border-color: #d9e8e0 !important;
  }

  .shima-mobile-service-icon {
    border-radius: 14px !important;
  }

  .shima-mobile-drawer-slogan {
    padding-top: 7px !important;
  }
}

@media (max-width: 430px) {
  .shima-mobile-drawer {
    width: min(92vw, 382px) !important;
    border-radius: 24px 0 0 24px !important;
  }

  .shima-mobile-user-card {
    min-height: 95px !important;
    grid-template-columns: 50px minmax(0, 1fr) 14px !important;
  }

  .shima-mobile-user-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 16px !important;
  }

  .shima-mobile-drawer-nav > a {
    min-height: 56px !important;
    grid-template-columns: 40px minmax(0, 1fr) 14px !important;
    border-radius: 19px !important;
  }

  .shima-mobile-drawer-link-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;
  }
}
