/* ==========================================================================
   گالری طلا و جواهر مونامو (Moonamo) - Responsive & Mobile Excellence
   بهینه‌سازی ۱۰۰٪ ریسپانسیو و تجربه شبیه به اپلیکیشن موبایل (Mobile App Experience)
   ========================================================================== */

/* نوار دسترسی سریع پایین صفحه در موبایل (Bottom Navigation Bar) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(13, 16, 22, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  z-index: 1000;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.6);
}

.mobile-bottom-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 100%;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
  transition: var(--transition);
}

.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--gold-400);
}

.bottom-nav-item.active svg {
  transform: translateY(-2px);
  color: var(--gold-400);
}

.bottom-nav-item .cart-badge-dot {
  position: absolute;
  top: 6px;
  right: 24px;
  background: var(--gold-500);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* منوی کشویی موبایل (Mobile Offcanvas Drawer) */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 85%;
  background: #11151D;
  border-left: 1px solid var(--border-gold);
  z-index: 1101;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px;
}

.mobile-drawer-overlay.open .mobile-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #FFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drawer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.drawer-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.02);
}

.drawer-nav-list a:hover {
  background: var(--gold-gradient-subtle);
  color: var(--gold-300);
}

/* دراور سبد خرید کشویی (Cart Slide Drawer) */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 380px;
  max-width: 90%;
  background: #11151D;
  border-right: 1px solid var(--border-gold);
  z-index: 1101;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.cart-drawer-overlay.open .cart-drawer {
  transform: translateX(0);
}

.cart-items-list {
  flex-grow: 1;
  overflow-y: auto;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 10px;
  border-radius: var(--radius-md);
}

.cart-item-card img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.cart-item-info {
  flex-grow: 1;
}

.cart-item-info h5 {
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #FFF;
}

.cart-item-info span {
  font-size: 0.8rem;
  color: var(--gold-400);
  font-weight: 700;
}

/* ==========================================================================
   Media Queries: تبلت و لپ‌تاپ‌های کوچک (Max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .main-nav {
    display: none; /* سوئیچ به منوی موبایل/تبلت */
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .btn-header-account span {
    display: none; /* فقط آیکون */
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-grid {
    grid-template-columns: 1fr;
  }

  .article-layout-grid {
    grid-template-columns: 1fr;
  }

  .toc-sidebar-sticky {
    position: static;
    margin-bottom: 30px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Media Queries: موبایل (Max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-bottom: 70px; /* فضا برای Bottom Bar */
  }

  .mobile-bottom-bar {
    display: block;
  }

  .top-gold-bar {
    font-size: 0.75rem;
  }

  .top-gold-bar .container {
    justify-content: center;
  }

  .market-status-indicator {
    display: none;
  }

  .top-promo-banner .container {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .custom-gold-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .custom-steps-list {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .article-main-title {
    font-size: 1.65rem;
  }
}
