/*
 * آندیا — لایهٔ ظاهریِ موبایل (۱۴۰۵/۰۷/۱۲)
 * فقط زیر ۹۹۲px بارگذاری می‌شود (media روی خودِ link)؛ دسکتاپ دست‌نخورده است.
 * تم و رنگِ برند (فیروزه‌ای #016b75) و فونت isSans عوض نشده‌اند؛ فقط شکلِ هدر،
 * نوارِ پایین، کارت‌ها و حرکت‌ها تازه شده‌اند.
 */
:root {
  --ad-teal: #016b75;
  --ad-teal-2: #0a8a96;
  --ad-soft: #eaf4f5;
  --ad-ink: #1b2a2d;
  --ad-mute: #6b7d81;
  --ad-line: rgba(1, 107, 117, .14);
  --ad-dock-h: 66px;
}

html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  background: #f3f8f8;
  color: var(--ad-ink);
  padding-bottom: calc(var(--ad-dock-h) + 34px + env(safe-area-inset-bottom)) !important;
  -webkit-font-smoothing: antialiased;
}
a, button { touch-action: manipulation; }

/* ───────── هدر ───────── */
.dk-header {
  background: rgba(255, 255, 255, .9) !important;
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 0 !important;
  box-shadow: 0 1px 0 var(--ad-line), 0 10px 28px -14px rgba(1, 107, 117, .35) !important;
  transition: transform .28s ease, box-shadow .28s ease;
}
.dk-header > .topbar { padding: 8px 10px !important; background: transparent !important; border: 0 !important; }
.dk-header .logo { height: 38px !important; width: auto; }
.dk-header .search-box {
  height: 44px !important;
  border-radius: 16px !important;
  background: var(--ad-soft) !important;
  border: 1.5px solid transparent;
  margin: 0 8px !important;
  padding: 0 14px !important;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.dk-header .search-box:focus-within {
  background: #fff !important;
  border-color: var(--ad-teal);
  box-shadow: 0 0 0 4px rgba(1, 107, 117, .12);
}
.dk-header .search-box i { color: var(--ad-teal) !important; opacity: .75; }
.dk-header .search-box input { font-size: 14px !important; color: var(--ad-ink); }
.dk-header .search-box input::placeholder { color: var(--ad-mute); }
.dk-header .hamburger {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 16px;
  background: var(--ad-soft); color: var(--ad-teal);
  font-size: 18px;
  transition: transform .15s ease, background .2s;
}
.dk-header .hamburger:active { transform: scale(.92); background: #d8ebed; }

/* ───────── نوار پایین: داکِ شناور ───────── */
.mobile-nav {
  display: block !important;
  left: 12px !important; right: 12px !important;
  bottom: calc(10px + env(safe-area-inset-bottom)) !important;
  padding: 6px 6px !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, .94) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--ad-line);
  box-shadow: 0 14px 34px -10px rgba(1, 107, 117, .42), 0 2px 8px rgba(0, 0, 0, .07) !important;
  z-index: 1000;
}
.mobile-nav-container { max-width: none !important; padding: 0 !important; justify-content: space-between !important; align-items: flex-end !important; }
.mobile-nav .nav-item {
  flex: 1 1 0;
  min-height: 54px;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  color: var(--ad-mute);
  border-radius: 20px;
  transition: color .2s, transform .15s;
}
.mobile-nav .nav-item:hover { animation: none; color: var(--ad-mute); }
.mobile-nav .nav-item:active { transform: scale(.94); }
.mobile-nav .nav-item i { font-size: 20px; margin: 0; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.mobile-nav .nav-item > span:not(.cart-badge) { font-size: 11px; font-weight: 600; letter-spacing: -.1px; }
.mobile-nav .nav-item.active { color: var(--ad-teal); }
.mobile-nav .nav-item.active i { transform: translateY(-2px) scale(1.12); }
.mobile-nav .nav-item.active::after {
  content: ''; position: absolute; bottom: 1px;
  width: 18px; height: 3px; border-radius: 3px;
  background: var(--ad-teal);
}
.mobile-nav .nav-item .cart-badge {
  top: 0 !important; right: calc(50% - 24px) !important;
  background: #e5484d !important; color: #fff;
  border: 2px solid #fff; box-shadow: none !important;
  min-width: 20px; height: 20px; line-height: 16px; font-size: 11px; font-weight: 700;
}
/* سبد خرید: دکمهٔ برجستهٔ میانی */
.mobile-nav .nav-item--cart { flex: 0 0 82px; margin-top: -30px; color: var(--ad-teal); }
.mobile-nav .nav-item--cart i {
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 50%; font-size: 22px; color: #fff;
  background: linear-gradient(145deg, var(--ad-teal-2), var(--ad-teal));
  border: 4px solid #fff;
  box-shadow: 0 10px 20px -6px rgba(1, 107, 117, .65);
}
.mobile-nav .nav-item--cart.active i { transform: scale(1.06); }
.mobile-nav .nav-item--cart.active::after { display: none; }
.mobile-nav .nav-item--cart .cart-badge { top: -4px !important; right: 8px !important; }

/* ───────── کارت‌های محصول ───────── */
body .product-card {
  border: 0 !important;
  border-radius: 18px !important;
  background: #fff;
  box-shadow: 0 2px 14px rgba(1, 107, 117, .10) !important;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .2s ease;
}
body .product-card:active { transform: scale(.985); }
body .product-image-wrapper { height: auto !important; aspect-ratio: 4 / 5; }
body .product-card .card-body { padding: 10px 12px 12px !important; }
body .product-card .card-title { font-size: 13px !important; line-height: 1.75 !important; min-height: 46px !important; color: var(--ad-ink) !important; }
body .product-action-btn {
  width: 34px !important; height: 34px !important;
  background: rgba(255, 255, 255, .92) !important;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .12) !important;
}
body .afrooz-card { border-radius: 16px !important; overflow: hidden; box-shadow: 0 2px 14px rgba(1, 107, 117, .10) !important; border: 0 !important; }

/* ───────── منوی همبرگری ───────── */
.mobile-menu { border-radius: 24px 0 0 24px; box-shadow: -18px 0 40px -12px rgba(1, 107, 117, .35); }
.mobile-menu-list a { border-radius: 14px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ───────── لایه‌ها: منوی دسته‌بندی بالای داک، منوی کشویی با کم‌رنگ‌شدنِ داک ───────── */
.mobile-mega-menu {
  bottom: calc(var(--ad-dock-h) + 52px + env(safe-area-inset-bottom)) !important;
  height: auto !important; max-height: calc(100vh - var(--ad-dock-h) - 130px) !important;
  border-radius: 26px 26px 0 0 !important;
  box-shadow: 0 -10px 40px -10px rgba(1, 107, 117, .35) !important;
}
body:has(.mobile-menu.open) .mobile-nav { opacity: 0; pointer-events: none; transform: translateY(24px); transition: opacity .2s, transform .25s; }
.mobile-menu { border-radius: 26px 0 0 26px !important; }

/* ───────── فوتر موبایل: یک ردیفِ جمع‌وجور (تلفن، شبکه‌ها، اینماد) + یک خط شعار ───────── */
body .footer { padding: 14px 0 12px !important; margin-top: 28px !important; border-radius: 22px 22px 0 0; }
body .footer h5 { display: none !important; }
body .footer .container { padding: 0 16px !important; max-width: 100% !important; }
body .footer .row {
    flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important;
    justify-content: space-between !important; gap: 10px 14px !important; margin: 0 !important; padding: 0 !important;
}
body .footer .row > [class*="col-"] {
    width: auto !important; max-width: none !important; flex: 0 0 auto !important;
    padding: 0 !important; margin: 0 !important; text-align: start !important;
}
body .footer .row > .col-md-4:nth-child(1) {
    order: 4; flex: 1 1 100% !important; text-align: center !important;
    border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 10px !important;
}
body .footer .row > .col-md-4:nth-child(1) p { font-size: 12px !important; line-height: 1.7; opacity: .8; margin: 0 !important; text-align: center; }
body .footer .row > .col-md-4:nth-child(2) { order: 1; }
body .footer .row > .col-md-4:nth-child(2) p { margin: 0 !important; font-size: 14px !important; font-weight: 600; white-space: nowrap; text-align: start; }
body .footer .row > .col-md-3 { order: 2; }
body .footer .social-links { margin: 0 !important; justify-content: flex-start !important; gap: 6px !important; }
body .footer .social-links a {
    width: 38px !important; height: 38px !important; display: grid !important; place-items: center;
    margin: 0 !important; border-radius: 12px !important; background: rgba(255, 255, 255, .14) !important; font-size: 18px !important;
}
body .footer .row > .col-md-1 { order: 3; }
body .footer .row > .col-md-1 img { height: 40px; width: auto; border-radius: 8px; }
