/* ============================================================
   دوستان قصابی — Components
   ============================================================ */

/* ─── Navbar ────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  height: var(--nav-h);
  z-index: var(--z-nav);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--t-norm);
}

#navbar.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--sp-6);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--t-spring);
}

.nav-logo:hover {
  transform: scale(1.04);
}

.nav-logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  background: var(--red-50);
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.nav-search-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--cream-100);
  color: var(--text-secondary);
  transition: all var(--t-fast);
  cursor: pointer;
  font-size: 1rem;
}
.nav-search-btn:hover { background: var(--red-50); color: var(--primary); }

.nav-cart-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--cream-100);
  color: var(--text-secondary);
  transition: all var(--t-fast);
  cursor: pointer;
  font-size: 1rem;
}
.nav-cart-btn:hover { background: var(--red-50); color: var(--primary); }

.cart-count {
  position: absolute;
  top: -4px; left: -4px;
  width: 18px; height: 18px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: scaleInBounce 0.3s ease;
  border: 2px solid var(--white);
}

.nav-user-btn {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  background: var(--cream-100);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--t-fast);
  cursor: pointer;
}
.nav-user-btn:hover { background: var(--red-50); color: var(--primary); }

.nav-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--red-400));
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  border-radius: var(--r-sm);
  background: var(--cream-100);
  transition: background var(--t-fast);
}
.nav-toggle:hover { background: var(--red-50); }
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-primary);
  border-radius: var(--r-full);
  transition: all var(--t-norm);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.nav-mobile {
  position: fixed;
  top: var(--nav-h); right: 0; left: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-4);
  z-index: calc(var(--z-nav) - 1);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: all var(--t-norm);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Search Bar */
.search-bar {
  position: fixed;
  top: var(--nav-h); right: 0; left: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-6);
  z-index: calc(var(--z-nav) - 1);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: all var(--t-norm);
  box-shadow: var(--shadow-lg);
}
.search-bar.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.search-bar-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}
.search-input-wrap {
  flex: 1;
  position: relative;
}
.search-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-12);
  border: 2px solid var(--border);
  border-radius: var(--r-full);
  font-size: 0.95rem;
  background: var(--cream-50);
  transition: all var(--t-fast);
}
.search-input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.search-icon {
  position: absolute;
  left: var(--sp-4);
  top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0; left: 0;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  z-index: 10;
  max-height: 400px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  transition: background var(--t-fast);
}
.search-result-item:hover { background: var(--cream-50); }
.search-result-img {
  width: 48px; height: 48px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.search-result-name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.search-result-price { font-size: 0.82rem; color: var(--primary); font-weight: 700; }

/* ─── Hero Section ──────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-dark);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/hero_banner.png');
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  animation: heroSlide 25s ease-in-out infinite;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8,15,10,0.92) 0%,
    rgba(166,27,37,0.28) 50%,
    rgba(25,87,64,0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
  padding: var(--sp-16) 0;
  padding-top: calc(var(--nav-h) + var(--sp-16));
}

.hero-text {}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(166,27,37,0.2);
  border: 1px solid rgba(166,27,37,0.4);
  color: var(--red-200);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--sp-5);
  animation: fadeInDown 0.6s ease forwards;
}

.hero-dot {
  width: 8px; height: 8px;
  background: var(--red-400);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

.hero-title {
  color: var(--white);
  margin-bottom: var(--sp-5);
  animation: fadeInUp 0.7s ease forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

.hero-title .brand {
  color: var(--red-400);
  display: block;
  font-size: 1.2em;
}

.hero-desc {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: var(--sp-8);
  animation: fadeInUp 0.7s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  animation: fadeInUp 0.7s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.hero-stats {
  display: flex;
  gap: var(--sp-8);
  margin-top: var(--sp-10);
  animation: fadeInUp 0.7s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.hero-stat { text-align: center; }
.hero-stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.hero-stat-num span { color: var(--red-400); }
.hero-stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.6); font-weight: 500; margin-top: 4px; }

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  animation: fadeInRight 0.8s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.hero-card-main {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  animation: float 6s ease-in-out infinite;
}

.hero-card-main img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-badge-float {
  position: absolute;
  bottom: var(--sp-5);
  right: var(--sp-5);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  box-shadow: var(--shadow-lg);
}

.hero-badge-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--red-400));
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.hero-badge-title { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.hero-badge-sub   { font-size: 0.72rem; color: var(--text-secondary); }

.hero-mini-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.hero-mini-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-3);
  text-align: center;
  transition: all var(--t-spring);
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.15);
}
.hero-mini-card:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.45);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px 0 rgba(0,0,0,0.25);
}
.hero-mini-card .icon { font-size: 1.6rem; margin-bottom: var(--sp-2); display: flex; align-items: center; justify-content: center; }
.hero-mini-card .label { font-size: 0.85rem; color: rgba(255,255,255,0.92); font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }

/* Hero Scroll Indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--sp-6);
  left: 0; right: 0;
  margin: 0 auto;
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  animation: float 2s ease-in-out infinite;
  cursor: pointer;
  z-index: 10;
}
.scroll-mouse {
  width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  position: relative;
}
.scroll-wheel {
  position: absolute;
  top: 6px;
  left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: var(--r-full);
  animation: scrollAnim 1.5s ease-in-out infinite;
}
@keyframes scrollAnim {
  0%  { top: 6px; opacity: 1; }
  100%{ top: 20px; opacity: 0; }
}

/* ─── Trust Bar ─────────────────────────────────────────── */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-5) 0;
}
.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
}
.trust-item .icon {
  width: 36px; height: 36px;
  background: var(--red-50);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
}

/* ─── Categories ────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-4);
}

@media (max-width: 768px) {
  #shop-categories {
    margin-top: var(--sp-6) !important;
    padding-top: var(--sp-2) !important;
  }
}

.category-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-norm);
  border: 2px solid transparent;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--red-50), transparent);
  opacity: 0;
  transition: opacity var(--t-norm);
}

.category-card:hover, .category-card.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-red);
  transform: translateY(-4px);
}

.category-card:hover::before, .category-card.active::before { opacity: 1; }

.category-icon,
.category-img-wrap {
  width: 80px; height: 80px;
  background: #f4ece4;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-3);
  transition: all var(--t-spring);
  overflow: hidden;
  border: 2px solid var(--border-soft);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.category-header-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-spring);
}

.category-card:hover .category-img-wrap, .category-card.active .category-img-wrap {
  transform: scale(1.08);
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(230, 57, 70, 0.35);
}

.category-card:hover .category-header-img, .category-card.active .category-header-img {
  transform: scale(1.12);
}

/* Light / Dark Mode Image Toggle */
.category-header-img.img-dark {
  display: none !important;
}

.category-header-img.img-light {
  display: block !important;
}

[data-theme="dark"] .category-header-img.img-light {
  display: none !important;
}

[data-theme="dark"] .category-header-img.img-dark {
  display: block !important;
}

[data-theme="dark"] .category-icon,
[data-theme="dark"] .category-img-wrap {
  background: #18271f;
  border-color: #283e30;
}

.category-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── Products Grid ─────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

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

.product-card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-norm);
  position: relative;
  border: 1px solid var(--border);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: var(--cream-300);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--cream-50);
}

.product-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.product-card:hover .product-img { transform: scale(1.08); }

.product-badges {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.product-badge {
  padding: 3px 8px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-block;
}

.badge-new      { background: var(--sage-500); color: var(--white); }
.badge-sale     { background: var(--primary); color: var(--white); }
.badge-hot      { background: #ff6b35; color: var(--white); }
.badge-organic  { background: var(--success); color: var(--white); }

.product-actions {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--t-norm);
}
.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.product-action-btn {
  width: 36px; height: 36px;
  background: var(--white);
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid var(--border);
}
.product-action-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: scale(1.1);
}
.product-action-btn.liked { background: var(--red-50); color: var(--primary); border-color: var(--red-100); }

.product-body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.product-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  font-size: 0.75rem;
  color: var(--text-muted);
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

.product-weight {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.product-weight svg {
  color: var(--secondary);
  flex-shrink: 0;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  white-space: nowrap;
}
.product-rating .stars {
  font-size: 0.72rem;
  color: #f59e0b;
  letter-spacing: -1px;
}
.rating-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border-soft);
  background: var(--cream-50);
  gap: var(--sp-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.product-price-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: right;
}

.product-old-price {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: line-through;
  line-height: 1.1;
  margin-bottom: 2px;
  min-height: 1.1em;
  display: block;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.product-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  font-family: var(--font);
}

.product-unit {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.product-action-wrap {
  flex-shrink: 0;
}

.add-to-cart-btn {
  height: 38px;
  padding: 0 12px;
  background: linear-gradient(135deg, var(--primary), var(--red-400));
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-spring);
  box-shadow: var(--shadow-red);
  flex-shrink: 0;
  border: none;
}

.add-to-cart-btn .add-txt {
  display: inline-block;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(166,27,37,0.4);
}

.add-to-cart-btn:active { transform: scale(0.95); }

/* Product Card Quantity Selector */
.product-card-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--cream-100);
  border-radius: var(--r-md);
  padding: 2px 4px;
  height: 36px;
  border: 1px solid var(--border-soft);
  direction: ltr;
}

/* Mobile Reframing for Product Cards */
@media (max-width: 640px) {
  .product-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }

  .product-price-wrap {
    text-align: right;
  }

  .product-price {
    font-size: 1.1rem;
  }

  .product-action-wrap {
    width: 100%;
  }

  .add-to-cart-btn {
    width: 100%;
    height: 36px;
  }

  .product-card-qty {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .qty-btn-card {
    width: 36px;
    height: 30px;
  }
}
.qty-btn-card {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-fast);
}
.qty-btn-card:hover {
  background: var(--primary);
  color: var(--white);
}
.qty-val {
  font-size: 0.95rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  color: var(--text-primary);
  user-select: none;
}


/* Quantity Selector */
.qty-selector {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--cream-100);
  border-radius: var(--r-md);
  padding: 4px;
}
.qty-btn {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--text-primary);
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}
.qty-btn:hover { background: var(--primary); color: var(--white); }
.qty-num { font-size: 0.9rem; font-weight: 700; min-width: 20px; text-align: center; }

/* ─── Cart Sidebar ──────────────────────────────────────── */
#cart-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--white);
  z-index: var(--z-cart);
  transform: translateX(-100%);
  transition: transform var(--t-slow);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-2xl);
  overscroll-behavior: contain;
}

#cart-sidebar.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--red-600), var(--red-500));
  color: var(--white);
  flex-shrink: 0;
}

.cart-header h3 { font-size: 1.1rem; }
.cart-close-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast);
  font-size: 1rem;
  color: var(--white);
}
.cart-close-btn:hover { background: rgba(255,255,255,0.3); }

.cart-items {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  color: var(--text-muted);
  padding: var(--sp-12);
  text-align: center;
}
.cart-empty-icon { font-size: 4rem; opacity: 0.3; }
.cart-empty h4 { font-size: 1.1rem; color: var(--text-secondary); }

.cart-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--cream-50);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
}
.cart-item:hover { border-color: var(--cream-300); }

.cart-item-img {
  width: 72px; height: 72px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.cart-item-weight{ font-size: 0.78rem; color: var(--text-muted); margin-bottom: var(--sp-2); }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; }
.cart-item-price { font-size: 0.95rem; font-weight: 800; color: var(--primary); }
.cart-item-remove {
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  background: var(--red-50);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.cart-item-remove:hover { background: var(--primary); color: var(--white); }

.cart-coupon {
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.coupon-input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.9rem;
}
.coupon-input:focus { border-color: var(--primary); }

.cart-footer {
  flex-shrink: 0;
  padding: var(--sp-4) var(--sp-6) max(var(--sp-5), calc(env(safe-area-inset-bottom, 0px) + 12px));
  border-top: 1px solid var(--border);
  background: var(--cream-50);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-2);
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.cart-total-row.final {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  border-top: 2px solid var(--border);
  padding-top: var(--sp-3);
  margin-top: var(--sp-3);
}
.cart-total-row.final .amount { color: var(--primary); }

/* ─── Auth / Universal Modals ──────────────────────────── */
#auth-modal,
#address-modal,
#avatar-modal,
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-norm) ease, visibility var(--t-norm) ease;
  touch-action: pan-y;
}

#auth-modal.open,
#address-modal.open,
#avatar-modal.open,
.auth-modal-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  touch-action: none;
}

.auth-card {
  position: relative;
  background: var(--white);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--t-spring);
}

#auth-modal.open .auth-card,
#address-modal.open .auth-card,
#avatar-modal.open .auth-card,
.auth-modal-overlay.open .auth-card { transform: scale(1) translateY(0) !important; }

.auth-header {
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  padding: var(--sp-8) var(--sp-8) var(--sp-6);
  text-align: center;
  position: relative;
}

.auth-logo {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--sp-4);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
}

.auth-header h2 { color: var(--white); font-size: 1.5rem; margin-bottom: var(--sp-1); }
.auth-header p  { color: rgba(255,255,255,0.75); font-size: 0.9rem; }

.auth-close-btn {
  position: absolute;
  top: var(--sp-4); left: var(--sp-4);
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--white);
  font-size: 0.9rem;
  transition: background var(--t-fast);
}
.auth-close-btn:hover { background: rgba(255,255,255,0.3); }

.auth-tabs {
  display: flex;
  background: var(--cream-50);
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: var(--sp-4);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--white);
}

.auth-body { padding: var(--sp-6) var(--sp-8) var(--sp-8); }

.auth-form { display: none; }
.auth-form.active { display: block; }

.input-icon-wrap {
  position: relative;
}
.input-icon-wrap .form-control { padding-left: 44px; }
.input-icon {
  position: absolute;
  left: var(--sp-4);
  top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.input-show-pass {
  position: absolute;
  right: var(--sp-4);
  top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: color var(--t-fast);
}
.input-show-pass:hover { color: var(--primary); }

.auth-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  font-size: 0.875rem;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
}
.checkbox-wrap input { accent-color: var(--primary); }

.forgot-link { color: var(--primary); font-weight: 600; cursor: pointer; }
.forgot-link:hover { text-decoration: underline; }

.auth-footer-text {
  text-align: center;
  margin-top: var(--sp-5);
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.auth-footer-text a { color: var(--primary); font-weight: 700; cursor: pointer; }

/* ─── Clients / Showcase ────────────────────────────────── */
.clients-section { background: var(--white); }

.clients-marquee {
  overflow: hidden;
  position: relative;
  direction: ltr;
  padding: 16px 0;
}

.clients-marquee::before,
.clients-marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
}

.clients-marquee::before {
  right: 0;
  background: linear-gradient(to left, var(--white), transparent);
}
.clients-marquee::after {
  left: 0;
  background: linear-gradient(to right, var(--white), transparent);
}

.clients-track {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  animation: marqueeRtl var(--marquee-duration, 25s) linear infinite;
  width: max-content;
  will-change: transform;
}

@keyframes marqueeRtl {
  0%   { transform: translateX(0); }
  100% { transform: translateX(var(--marquee-shift, -50%)); }
}

.clients-track:hover {
  animation-play-state: paused;
}

.client-card {
  background: var(--cream-50);
  border: 2px solid var(--cream-200);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  min-width: 200px;
  transition: all var(--t-norm);
  flex-shrink: 0;
  margin-right: 0;
  direction: rtl;
}
.client-card:hover {
  border-color: var(--primary);
  background: var(--red-50);
  transform: translateY(-4px);
  box-shadow: var(--shadow-red);
}

.client-logo {
  width: 72px; height: 72px;
  border-radius: var(--r-lg);
  object-fit: contain;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  background: var(--white);
  border: 1px solid var(--border);
}

.client-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); text-align: center; }
.client-type { font-size: 0.78rem; color: var(--text-muted); }

/* Big Clients Feature */
.big-clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
}

.big-client-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: all var(--t-norm);
  position: relative;
  overflow: hidden;
}

.big-client-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--red-400));
  transform: scaleX(0);
  transition: transform var(--t-norm);
  transform-origin: right;
}

.big-client-card:hover::before { transform: scaleX(1); transform-origin: left; }
.big-client-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--cream-300);
  transform: translateY(-6px);
}

.big-client-icon {
  width: 88px; height: 88px;
  border-radius: var(--r-xl);
  background: var(--cream-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto var(--sp-5);
  border: 3px solid var(--cream-200);
  transition: all var(--t-spring);
}

.big-client-card:hover .big-client-icon {
  background: linear-gradient(135deg, var(--red-50), var(--cream-100));
  border-color: var(--red-200);
  transform: scale(1.1) rotate(-5deg);
}

.big-client-name { font-size: 1.1rem; font-weight: 800; margin-bottom: var(--sp-2); }
.big-client-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

.big-client-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-50, #f0fdf4);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--r-full);
  margin-top: var(--sp-3);
  border: 1px solid #bbf7d0;
}

/* ─── Trust / E-Namad ───────────────────────────────────── */
.enamad-section {
  background: linear-gradient(135deg, var(--brown-900), var(--brown-800));
  padding: var(--sp-16) 0;
}

.enamad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-10);
}

.enamad-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  transition: all var(--t-norm);
  cursor: pointer;
}

.enamad-card:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-4px);
  border-color: rgba(166,27,37,0.4);
  box-shadow: 0 8px 32px rgba(166,27,37,0.2);
}

.enamad-icon {
  width: 80px; height: 80px;
  border-radius: var(--r-xl);
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto var(--sp-4);
  border: 2px solid rgba(255,255,255,0.15);
}

.enamad-name { color: var(--white); font-size: 1rem; font-weight: 700; margin-bottom: var(--sp-2); }
.enamad-desc { color: rgba(255,255,255,0.55); font-size: 0.82rem; line-height: 1.6; }

/* ─── Features / Why Us ─────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

.feature-card {
  padding: var(--sp-8) var(--sp-6);
  background: var(--white);
  border-radius: var(--r-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-norm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--sage-400));
  transform: scaleX(0);
  transition: transform var(--t-norm);
  transform-origin: right;
}

.feature-card:hover::after { transform: scaleX(1); transform-origin: left; }
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.feature-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--red-50), var(--cream-100));
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--sp-5);
  border: 2px solid var(--cream-200);
  transition: all var(--t-spring);
}

.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, var(--primary), var(--red-400));
  border-color: var(--primary);
  transform: scale(1.1) rotate(10deg);
}

.feature-title { font-size: 1.1rem; font-weight: 800; margin-bottom: var(--sp-3); }
.feature-desc  { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }

/* ─── Toast Notifications (Modern Top Floating Glass Pills) ─── */
#toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 92vw;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.1);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.25);
  animation: toastSlideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
  direction: rtl;
  color: var(--white);
  will-change: transform, opacity;
}

.toast:active {
  cursor: grabbing;
}

.toast.swiping {
  transition: none !important;
}

.toast.out {
  animation: toastSlideUp 0.25s ease-in forwards;
}

@keyframes toastSlideDown {
  from {
    opacity: 0;
    transform: translateY(-24px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSlideUp {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }
}

.toast.success {
  background: rgba(22, 101, 52, 0.94);
  border-color: rgba(34, 197, 94, 0.5);
}

.toast.error {
  background: rgba(153, 27, 27, 0.94);
  border-color: rgba(239, 68, 68, 0.5);
}

.toast.warning {
  background: rgba(161, 98, 7, 0.94);
  border-color: rgba(234, 179, 8, 0.5);
}

.toast.info {
  background: rgba(14, 26, 20, 0.94);
  border-color: rgba(45, 74, 58, 0.7);
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-msg {
  white-space: nowrap;
}

/* Wallet Step Buttons (+ / -) */
.wallet-step-btn {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  touch-action: manipulation;
}
.wallet-step-btn:hover {
  background: var(--red-50) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  transform: scale(1.05);
}
.wallet-step-btn:active {
  transform: scale(0.95);
}

/* ─── Dashboard ─────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-8);
  padding: var(--sp-8) 0;
  min-height: calc(100vh - var(--nav-h));
}

.dashboard-sidebar {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-8));
  border: 1px solid var(--border);
}

.dash-user-info {
  text-align: center;
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
}

.dash-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: var(--sp-4);
}

.dash-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--red-400));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  border: 4px solid var(--white);
  box-shadow: var(--shadow-red);
  margin: 0 auto;
}

.dash-avatar-edit {
  position: absolute;
  bottom: 0; left: 0;
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 0.65rem;
  cursor: pointer;
  border: 2px solid var(--white);
  transition: transform var(--t-fast);
}
.dash-avatar-edit:hover { transform: scale(1.1); }

.dash-user-name { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.dash-user-email { font-size: 0.82rem; color: var(--text-muted); margin-bottom: var(--sp-3); }

.dash-user-stats {
  display: flex;
  justify-content: center;
  gap: var(--sp-6);
}
.dash-stat { text-align: center; }
.dash-stat-num { font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.dash-stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

.dash-nav { display: flex; flex-direction: column; gap: var(--sp-1); }

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}

.dash-nav-item .icon { font-size: 1.1rem; width: 24px; text-align: center; }

.dash-nav-item:hover {
  background: var(--cream-100);
  color: var(--text-primary);
}

.dash-nav-item.active {
  background: var(--red-50);
  color: var(--primary);
}

.dash-nav-item .badge-count {
  margin-right: auto;
  background: var(--primary);
  color: var(--white);
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.dash-logout {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

/* Dashboard Content */
.dashboard-content { min-width: 0; }

.dash-panel {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: none;
}
.dash-panel.active { display: block; }

.dash-panel-header {
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-panel-header h3 { font-size: 1.1rem; display: flex; align-items: center; gap: var(--sp-3); }
.dash-panel-body { padding: var(--sp-5) var(--sp-6); }

/* Orders */
.orders-tabs {
  display: flex;
  gap: var(--sp-2);
  background: var(--cream-100);
  padding: var(--sp-1);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-6);
  overflow-x: auto;
}

.order-tab {
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
}

.order-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.order-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-4);
  overflow: hidden;
  transition: all var(--t-fast);
}
.order-card:hover { border-color: var(--cream-300); box-shadow: var(--shadow-sm); }

.order-card-header {
  padding: var(--sp-4) var(--sp-5);
  background: var(--cream-50);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.order-id { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.order-date{ font-size: 0.82rem; color: var(--text-muted); }

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 700;
}
.order-status.processing { background: #eff6ff; color: #2563eb; }
.order-status.shipping   { background: #fffbeb; color: #b45309; }
.order-status.delivered  { background: #f0fdf4; color: #16a34a; }
.order-status.cancelled  { background: var(--red-50); color: var(--red-700); }

.order-card-body { padding: var(--sp-4) var(--sp-5); }

.order-items-preview {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.order-item-img {
  width: 52px; height: 52px;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 1px solid var(--border);
}

.order-item-more {
  width: 52px; height: 52px;
  border-radius: var(--r-sm);
  background: var(--cream-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  background: var(--cream-50);
}

.order-total { font-size: 0.9rem; }
.order-total strong { color: var(--primary); font-weight: 800; }

/* ── Order Tracking Timeline ───────────────────────────── */
.order-timeline-track {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 15px 10px;
  background: var(--cream-50);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}
.order-timeline-track::before {
  content: '';
  position: absolute;
  top: 30px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: var(--border);
  z-index: 1;
}
.timeline-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--t-norm);
}
.timeline-step.active .step-circle {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
  box-shadow: 0 0 10px rgba(25, 87, 64, 0.4);
}
.step-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
.timeline-step.active .step-title {
  color: var(--secondary);
}

/* ── Weight Selector Options ───────────────────────────── */
.weight-opt-btn {
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  border-radius: var(--r-md) !important;
  transition: all var(--t-fast) !important;
}
.weight-opt-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
.weight-opt-btn.active {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(166, 27, 37, 0.25) !important;
}

/* Address Cards */
.addresses-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.address-card {
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition: all var(--t-norm);
  position: relative;
}

.address-card:hover { border-color: var(--primary); }
.address-card.default { border-color: var(--sage-400); }

.address-default-tag {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  background: var(--sage-500);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.address-name { font-weight: 700; margin-bottom: var(--sp-2); }
.address-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--sp-3); }
.address-actions { display: flex; gap: var(--sp-2); }

.address-add-card {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  cursor: pointer;
  transition: all var(--t-norm);
  color: var(--text-muted);
  min-height: 140px;
}
.address-add-card:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--red-50);
}

.address-add-icon { font-size: 2rem; }
.address-add-text { font-size: 0.9rem; font-weight: 600; }

/* Wishlist */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

/* ─── Checkout Page ─────────────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-8);
  padding: var(--sp-8) 0;
}

.checkout-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--cream-200);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.payment-methods { display: flex; flex-direction: column; gap: var(--sp-3); }

.payment-method {
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  cursor: pointer;
  transition: all var(--t-fast);
}
.payment-method:hover { border-color: var(--cream-300); }
.payment-method.selected { border-color: var(--primary); background: var(--red-50); }

.payment-icon { font-size: 1.5rem; width: 40px; text-align: center; }
.payment-name { font-weight: 700; font-size: 0.95rem; }
.payment-desc { font-size: 0.8rem; color: var(--text-muted); }

.checkout-summary {
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-8));
}

.checkout-summary-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 800;
}

.checkout-summary-body { padding: var(--sp-6); }

.summary-items { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.summary-item { display: flex; gap: var(--sp-3); align-items: center; }
.summary-item-img { width: 52px; height: 52px; border-radius: var(--r-sm); object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.summary-item-name { font-size: 0.88rem; font-weight: 600; flex: 1; }
.summary-item-price { font-size: 0.88rem; font-weight: 700; color: var(--primary); flex-shrink: 0; }

.summary-rows { border-top: 1px solid var(--border); padding-top: var(--sp-4); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: var(--sp-2); font-size: 0.9rem; }
.summary-row.total { border-top: 2px solid var(--border); padding-top: var(--sp-3); margin-top: var(--sp-3); font-size: 1.05rem; font-weight: 800; }
.summary-row.total .price { color: var(--primary); }

/* ─── Footer ────────────────────────────────────────────── */
footer {
  background: linear-gradient(180deg, #0f1a13, #060e09);
  color: rgba(255,255,255,0.75);
  padding-top: var(--sp-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {}
.footer-logo { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.footer-logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--red-600), var(--red-400));
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}
.footer-logo-title { font-size: 1.4rem; font-weight: 900; color: var(--white); }
.footer-logo-sub   { font-size: 0.78rem; color: rgba(255,255,255,0.5); }

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: var(--sp-6);
  color: rgba(255,255,255,0.6);
}

.footer-socials {
  display: flex;
  gap: var(--sp-3);
}

.social-btn {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  transition: all var(--t-fast);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
}
.social-btn:hover {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(25,87,64,0.4);
}

.footer-col-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--sp-5);
  position: relative;
  padding-bottom: var(--sp-3);
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 32px; height: 2px;
  background: var(--primary);
  border-radius: var(--r-full);
}

.footer-links { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-link {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
}
.footer-link:hover { color: var(--white); padding-right: var(--sp-2); }
.footer-link::before { content: '›'; color: var(--primary); font-weight: 700; }

.footer-contact { display: flex; flex-direction: column; gap: var(--sp-4); }
.footer-contact-item {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}
.footer-contact-icon {
  width: 32px; height: 32px;
  background: rgba(166,27,37,0.2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--red-400);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.footer-contact-text { font-size: 0.88rem; color: rgba(255,255,255,0.65); line-height: 1.5; }

.footer-newsletter {
  margin-top: var(--sp-5);
}
.footer-newsletter p { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: var(--sp-3); }
.newsletter-form { display: flex; gap: var(--sp-2); }
.newsletter-input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: 0.88rem;
  font-family: var(--font);
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter-input:focus { border-color: var(--primary); outline: none; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-6) 0;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-copy { font-size: 0.82rem; color: rgba(255,255,255,0.4); }

.footer-payments { display: flex; align-items: center; gap: var(--sp-3); }
.footer-payments span { font-size: 0.78rem; color: rgba(255,255,255,0.4); }
.payment-logo {
  background: rgba(255,255,255,0.1);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ─── Stats Banner ──────────────────────────────────────── */
.stats-banner-section {
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  padding: var(--sp-12) 0;
}

.stats-banner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  text-align: center;
}

.stats-banner-num {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  white-space: nowrap;
}

.stats-banner-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.8rem, 2.2vw, 0.95rem);
  font-weight: 500;
  margin-top: var(--sp-2);
  line-height: 1.4;
  word-break: keep-all;
  white-space: normal;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1200px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid   { grid-template-columns: repeat(3, 1fr); }
  .features-grid   { grid-template-columns: repeat(2, 1fr); }
  .footer-grid     { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .enamad-grid     { grid-template-columns: repeat(2, 1fr); }
  .big-clients-grid{ grid-template-columns: repeat(2, 1fr); }
  .dashboard-layout{ grid-template-columns: 240px 1fr; }
}

@media (max-width: 1024px) {
  .hero-content    { grid-template-columns: 1fr; text-align: center; }
  .hero-visual     { display: none; }
  .hero-actions    { justify-content: center; }
  .hero-stats      { justify-content: center; }
  .checkout-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-inner       { gap: var(--sp-2); padding: 0 var(--sp-3); justify-content: space-between; }
  .nav-actions     { gap: 6px; margin-right: auto; display: flex; align-items: center; }
  .nav-logo-img    { height: 42px; }
  .nav-links       { display: none; }
  .nav-toggle      { display: flex; }
  .nav-search-btn,
  .nav-cart-btn,
  .nav-user-btn,
  .theme-toggle-btn,
  .nav-toggle {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    border-radius: var(--r-md) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--cream-100) !important;
    border: 1px solid var(--border-soft) !important;
    box-sizing: border-box !important;
  }
  .user-btn-name   { display: none !important; }
  .stats-banner-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-6) var(--sp-4); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
  .products-grid   { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
  .features-grid   { grid-template-columns: repeat(2, 1fr); }
  .big-clients-grid{ grid-template-columns: 1fr; }
  /* Dashboard mobile full redesign */
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: var(--sp-4);
  }
  .dashboard-sidebar { display: none !important; }

  /* Mobile tab bar replaces sidebar */
  .dash-mobile-tabs {
    display: flex !important;
  }

  .addresses-grid  { grid-template-columns: 1fr; }
  .wishlist-grid   { grid-template-columns: repeat(2, 1fr); }
  
  /* Mobile Sticky Bottom Fix for Cart Sidebar & Checkout Page */
  #cart-sidebar {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
  }

  .cart-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 20 !important;
    padding: var(--sp-3) var(--sp-4) max(var(--sp-4), calc(env(safe-area-inset-bottom, 0px) + 12px)) !important;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12) !important;
  }

  /* Checkout Page Mobile Floating Bottom Action Bar */
  #page-checkout {
    padding-bottom: 150px !important;
  }

  .checkout-layout {
    grid-template-columns: 1fr !important;
    padding-bottom: 10px !important;
  }

  .checkout-summary {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    border-radius: var(--r-xl) var(--r-xl) 0 0 !important;
    box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.22) !important;
    padding: 12px 16px max(14px, calc(env(safe-area-inset-bottom, 0px) + 12px)) !important;
    background: var(--white) !important;
    border-top: 1.5px solid var(--border) !important;
    margin: 0 !important;
    top: auto !important;
    box-sizing: border-box !important;
  }

  [data-theme="dark"] .checkout-summary {
    background: #14211a !important;
    border-top-color: #24382c !important;
  }

  .checkout-summary-header,
  .checkout-summary .summary-items {
    display: none !important;
  }

  .checkout-summary-body {
    padding: 0 !important;
  }

  .checkout-summary .summary-rows {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-bottom: 4px !important;
  }

  .checkout-summary .summary-row {
    display: none !important;
  }

  .checkout-summary .summary-row.total {
    display: flex !important;
    margin: 0 !important;
    font-size: 0.95rem !important;
    width: 100% !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-top: 0 !important;
    border-top: none !important;
  }

  .checkout-summary #place-order-btn,
  .checkout-summary #cart-checkout-btn {
    margin-top: 6px !important;
    width: 100% !important;
    height: 48px !important;
    font-size: 1.05rem !important;
    border-radius: var(--r-lg) !important;
    font-weight: 800 !important;
  }

  .footer-grid     { grid-template-columns: 1fr; }
  .enamad-grid     { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .user-btn-name   { display: none; }
  .nav-user-btn    { padding: 0 10px; width: 40px; height: 40px; }
  .products-grid   { grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .enamad-grid     { grid-template-columns: 1fr; }
  .hero-stats      { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); width: 100%; }
  .stats-banner-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4) var(--sp-2); }
  .stats-banner-num  { font-size: 1.5rem; }
  .stats-banner-label{ font-size: 0.78rem; }
  .wishlist-grid   { grid-template-columns: 1fr; }
  .trust-bar-inner { gap: var(--sp-5); }
}

/* ─── Notification Items ─────────────────────────────────── */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
  border: 1px solid transparent;
}
.notification-item.unread {
  background: #f0f8f4;
  border-color: rgba(25,87,64,0.15);
  border-right: 4px solid var(--secondary);
}
.notification-item.read {
  background: var(--cream-50);
  border-right: 4px solid var(--border);
  opacity: 0.75;
}
.notification-item:hover {
  background: var(--cream-100);
  opacity: 1;
}
.notif-dot {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
}
.notif-icon { font-size: 1.5rem; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 3px; color: var(--text-primary); }
.notif-text  { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.notif-time  { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Avatar Picker Popup ────────────────────────────────── */
.avatar-picker-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 50%;
  transform: translateX(50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  width: 260px;
  animation: fadeInUp 0.2s ease;
}
.avatar-picker-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
  text-align: center;
}
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: var(--sp-3);
}
.avatar-emoji-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: var(--cream-100);
  transition: all var(--t-fast);
  border: 1px solid transparent;
}
.avatar-emoji-btn:hover { background: var(--cream-200); transform: scale(1.15); border-color: var(--secondary); }
.avatar-picker-divider {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: var(--sp-3) 0;
  position: relative;
}
.avatar-picker-divider::before,
.avatar-picker-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: var(--border);
}
.avatar-picker-divider::before { right: 0; }
.avatar-picker-divider::after  { left: 0; }

/* ─── Footer Social Links (real icons) ──────────────────── */
.social-btn {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  font-family: var(--font);
}
.social-btn:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(25,87,64,0.4);
}

/* ─── More green: secondary-colored accents ──────────────── */
.btn-secondary {
  background: var(--secondary);
  color: var(--white);
  border: none;
}
.btn-secondary:hover {
  background: var(--secondary-dark);
  box-shadow: var(--shadow-sage);
}
.btn-outline-sage {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}
.btn-outline-sage:hover {
  background: var(--secondary);
  color: var(--white);
}

/* Modal Wishlist Button */
#modal-wish-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font) !important;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--t-fast);
  border-radius: var(--r-md);
  padding: 10px 16px;
  cursor: pointer;
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--text-primary);
}

#modal-wish-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--cream-50);
}

#modal-wish-btn.active {
  background: var(--red-50) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.address-card.default { border-color: var(--secondary); }
.address-default-tag  { background: var(--secondary); color: var(--white); }
.dash-nav-item.active {
  background: rgba(25,87,64,0.1);
  color: var(--secondary);
}
.dash-nav-item.active .icon { filter: none; }
.dash-stat-num { color: var(--secondary); }
.order-status.shipping { background: rgba(25,87,64,0.1); color: var(--secondary); }
.badge-sage { background: rgba(25,87,64,0.1); color: var(--secondary); }

/* ─── Stats / Feature cards green accent ────────────────── */
.feature-card:nth-child(even) .feature-icon { background: linear-gradient(135deg, var(--secondary), var(--secondary-light)); }
.stat-icon { color: var(--secondary); }

/* ─── Reframing & Mobile Layout Optimization ─────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  width: 100%;
  box-sizing: border-box;
}

.form-control, select.form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-overflow: ellipsis;
  overflow: hidden;
}

.quickview-modal-card {
  position: relative;
  background: var(--white);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  transform: scale(0.95);
  transition: transform var(--t-spring);
}

.quickview-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.quickview-img-wrap {
  position: relative;
  background: var(--cream-50);
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  overflow: hidden;
  aspect-ratio: 1/1;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .quickview-modal-card {
    width: 94vw;
    max-height: 88vh;
    margin: auto;
  }

  .quickview-modal-grid {
    grid-template-columns: 1fr;
  }

  .quickview-img-wrap {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    aspect-ratio: 16/9;
    max-height: 220px;
  }

  .quickview-info-body {
    padding: var(--sp-4) !important;
  }

  .dash-panel-header {
    padding: var(--sp-4) var(--sp-5);
  }

  .dash-panel-body {
    padding: var(--sp-4);
  }

  .order-card-header, .order-card-footer {
    padding: var(--sp-3) var(--sp-4);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }

  .order-card-footer > div:last-child {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  #toast-container {
    top: 16px !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    max-width: 92vw !important;
  }

  .toast {
    width: auto !important;
    min-width: auto !important;
    max-width: 100% !important;
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
  }

  .nav-mobile {
    padding: var(--sp-4) var(--sp-3);
  }
}

/* ═══════════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE MODALS & PANELS REFRAMING & OPTIMIZATION
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  /* Overlay containers */
  .auth-modal-overlay {
    padding: 10px !important;
    align-items: flex-end !important;
  }

  /* All Modal Cards Base Mobile Reframing */
  .auth-card,
  .zarinpal-card,
  .quickview-modal-card,
  .club-modal-card,
  .wallet-modal-card,
  .confirm-modal-card,
  #payment-result-modal .auth-card {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px 24px 16px 16px !important;
    margin: 0 auto !important;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3) !important;
  }

  /* ZarinPal Gateway Sandbox Specific Reframing */
  .zarinpal-card {
    border-radius: 20px !important;
  }

  .zp-body {
    padding: var(--sp-4) !important;
  }

  #zp-authority {
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.5px !important;
    max-width: 100% !important;
  }

  .zp-grid-2 {
    grid-template-columns: 1fr !important;
    gap: var(--sp-3) !important;
  }

  .zp-otp-wrap {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .zp-otp-wrap button {
    width: 100% !important;
  }

  /* Cart Sidebar mobile 100% width */
  .cart-sidebar {
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
  }

  /* Order Detail Modal */
  #order-detail-modal .auth-card {
    max-height: 92vh !important;
  }

  /* Confirm Modal */
  #confirm-modal .auth-card {
    border-radius: 20px !important;
    padding: 20px 16px !important;
  }

  /* Form Grid Auto-Fit on Mobile */
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Checkout Layout Mobile Stack & Box Reframing */
  .checkout-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 16px 0 !important;
  }

  .checkout-box {
    padding: 16px 14px !important;
    border-radius: 16px !important;
    margin-bottom: 16px !important;
  }

  .payment-method {
    padding: 12px 12px !important;
    gap: 10px !important;
    border-radius: 14px !important;
  }

  .payment-desc {
    font-size: 0.78rem !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.5 !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE DASHBOARD TAB BAR
   ═══════════════════════════════════════════════════════════ */

/* Hidden by default — shown only on mobile */
.dash-mobile-tabs {
  display: none;
  flex-direction: column;
  width: 100%;
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden; /* Fix card corner bleeding */
  box-sizing: border-box;
}

/* User info compact bar */
.dash-mobile-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
  box-sizing: border-box;
}

.dash-mobile-avatar {
  width: 48px; height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--red-400));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-red);
  cursor: pointer;
  overflow: hidden; /* Fix avatar content overflow */
}

.dash-mobile-info {
  flex: 1;
  min-width: 0;
}

.dash-mobile-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-mobile-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-mobile-logout {
  flex-shrink: 0;
}

/* Scrollable tab bar wrapper with horizontal scroll indicator */
.dash-mobile-tab-bar-wrap {
  position: relative;
  width: 100%;
  background: var(--bg-card);
}

.dash-mobile-tab-bar {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding: 8px 8px 4px 8px;
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Hide native firefox scrollbar */
  width: 100%;
  box-sizing: border-box;
}

.dash-mobile-tab-bar::-webkit-scrollbar {
  display: none; /* Hide native webkit/iOS fade-out scrollbar */
}

/* Always-Visible Persistent Custom Scrollbar Track */
.dash-mobile-scroll-track {
  width: calc(100% - 16px);
  height: 5px;
  margin: 2px auto 8px auto;
  background: var(--cream-200, #e2d8ce);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

[data-theme="dark"] .dash-mobile-scroll-track {
  background: #24382c !important;
}

.dash-mobile-scroll-thumb {
  height: 100%;
  width: 35%;
  background: linear-gradient(135deg, var(--primary), var(--red-500));
  border-radius: 999px;
  position: absolute;
  top: 0;
  right: 0;
  transition: transform 0.05s ease-out;
  box-shadow: 0 1px 3px rgba(166,27,37,0.3);
}


.dash-mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  min-width: max-content;
  position: relative;
  box-sizing: border-box;
  border: 1px solid transparent;
}

.dash-mobile-tab .tab-icon {
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.dash-mobile-tab.active {
  background: var(--red-50);
  color: var(--primary);
  border-color: rgba(166,27,37,0.15);
}

.dash-mobile-tab.active .tab-icon {
  color: var(--primary);
}

.dash-mobile-tab:hover:not(.active) {
  background: var(--cream-100);
}

.dash-mobile-tab .tab-badge {
  position: absolute;
  top: 4px;
  left: calc(50% + 8px);
  min-width: 16px; height: 16px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* Dashboard content card on mobile */
@media (max-width: 768px) {
  .dashboard-content {
    padding-top: 0;
  }

  .dash-panel {
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
  }
}


/* ═══════════════════════════════════════════════════════════
   CROSS-BROWSER COLOR SCHEME NORMALIZATION
   ═══════════════════════════════════════════════════════════ */

/* Force light mode on all form inputs - prevent Firefox/Safari dark mode auto-styling */
input, select, textarea, button {
  color-scheme: light;
  background-color: var(--white);
  color: var(--text-primary);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/* Explicit background for all interactive form elements */
.form-control {
  background-color: var(--white) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

.form-control:focus {
  background-color: var(--white) !important;
}

/* Category SVG icon brand colors */
.category-svg-icon {
  color: var(--secondary);
  transition: color var(--t-spring), transform var(--t-spring);
}

.category-card:hover .category-svg-icon,
.category-card.active .category-svg-icon {
  color: var(--white);
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE THEME
   ═══════════════════════════════════════════════════════════ */

[data-theme="dark"] {
  /* ── Backgrounds ── */
  --bg-main:         #0c1410;
  --bg-card:         #14211a;
  --bg-dark:         #080d0a;
  --white:           #ffffff;

  /* ── High-Contrast Legible Texts ── */
  --text-primary:    #f5ede6;
  --text-secondary:  #b8cecf;
  --text-muted:      #7d998b;
  --text-inverse:    #0c1410;

  /* ── Borders & Outlines ── */
  --border:          #22382c;
  --border-soft:     #192b21;

  /* ── Brand Colors (Dark Mode Adjusted) ── */
  --primary:         #e63946;
  --primary-light:   #ff4d5a;
  --primary-dark:    #b91c1c;
  --primary-glow:    rgba(230, 57, 70, 0.28);

  --secondary:       #2da878;
  --secondary-light: #4ade80;
  --secondary-dark:  #1d7a56;

  /* ── Cream Tone Replacements for Dark Surface Layering ── */
  --cream-50:        #111c16;
  --cream-100:       #18271f;
  --cream-200:       #1f3328;
  --cream-300:       #284235;
  --cream-400:       #335443;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-sm: 0 3px 10px rgba(0,0,0,0.45);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 35px rgba(0,0,0,0.6);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.7);
  --shadow-2xl:0 30px 90px rgba(0,0,0,0.8);
  --shadow-red: 0 8px 24px rgba(230,57,70,0.35);
  --shadow-sage:0 8px 24px rgba(45,168,120,0.3);

  color-scheme: dark;
}

/* ── Global Dark Mode Overrides ── */
html[data-theme="dark"],
[data-theme="dark"] body {
  background-color: var(--bg-main) !important;
  color: var(--text-primary) !important;
}

/* Fix Brand Logo Inversion to Pure White in Dark Mode */
[data-theme="dark"] .nav-logo-img,
[data-theme="dark"] .footer-logo-img,
[data-theme="dark"] .auth-header img,
[data-theme="dark"] .logo-img,
[data-theme="dark"] img[src*="brand_logo"] {
  filter: brightness(0) invert(1) drop-shadow(0 0 2px rgba(255,255,255,0.4)) !important;
}

/* Fix inline sections & containers with light backgrounds */
[data-theme="dark"] section,
[data-theme="dark"] .section,
[data-theme="dark"] .clients-section,
[data-theme="dark"] section[style*="var(--white)"],
[data-theme="dark"] section[style*="#white"],
[data-theme="dark"] div[style*="background:var(--white)"],
[data-theme="dark"] div[style*="background: var(--white)"] {
  background-color: var(--bg-main) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] div[style*="background:var(--cream-50)"],
[data-theme="dark"] div[style*="background: var(--cream-50)"],
[data-theme="dark"] section[style*="background:var(--cream-50)"],
[data-theme="dark"] section[style*="background: var(--cream-50)"] {
  background-color: var(--cream-50) !important;
}

/* Fix Clients Marquee Fade Gradients (Inward Fading Fix) */
[data-theme="dark"] .clients-marquee::before,
[data-theme="dark"] .clients-slider::before {
  background: linear-gradient(to left, #0c1410, transparent) !important;
}

[data-theme="dark"] .clients-marquee::after,
[data-theme="dark"] .clients-slider::after {
  background: linear-gradient(to right, #0c1410, transparent) !important;
}

/* High Contrast Badges and Tags in Dark Mode */
[data-theme="dark"] .badge-cream {
  background: #18271f !important;
  color: #4ade80 !important;
  border: 1px solid #283e30 !important;
}

[data-theme="dark"] .badge-red,
[data-theme="dark"] .badge-sale {
  background: rgba(230, 57, 70, 0.22) !important;
  color: #ff5260 !important;
  border: 1px solid rgba(230, 57, 70, 0.4) !important;
}

[data-theme="dark"] .badge-sage {
  background: rgba(45, 168, 120, 0.22) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(45, 168, 120, 0.4) !important;
}

[data-theme="dark"] .badge-success {
  background: rgba(22, 163, 74, 0.22) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
}

[data-theme="dark"] .badge-warning {
  background: rgba(217, 119, 6, 0.22) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

[data-theme="dark"] .badge-danger {
  background: rgba(220, 38, 38, 0.22) !important;
  color: #ff5260 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

[data-theme="dark"] .badge-info {
  background: rgba(37, 99, 235, 0.22) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

/* Fix Hero Text & Buttons in Dark Mode */
[data-theme="dark"] .hero-title {
  color: #ffffff !important;
}

[data-theme="dark"] .hero-title .brand {
  color: #ff4d5a !important;
}

[data-theme="dark"] .hero-desc {
  color: #d1dfd7 !important;
}

[data-theme="dark"] .hero-tag {
  background: rgba(230, 57, 70, 0.2);
  border-color: rgba(230, 57, 70, 0.4);
  color: #ff707a;
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #e63946, #c92a37) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.4) !important;
}

[data-theme="dark"] .btn-primary * {
  color: #ffffff !important;
}

/* Fix All Outline / Ghost Buttons in Dark Mode */
[data-theme="dark"] .btn-outline,
[data-theme="dark"] .btn-ghost,
[data-theme="dark"] .btn-light {
  background: #18271f !important;
  color: #ffffff !important;
  border: 1.5px solid #283e30 !important;
  box-shadow: none !important;
}

[data-theme="dark"] .btn-outline *,
[data-theme="dark"] .btn-ghost *,
[data-theme="dark"] .btn-light * {
  color: #ffffff !important;
}

[data-theme="dark"] .btn-outline:hover,
[data-theme="dark"] .btn-ghost:hover,
[data-theme="dark"] .btn-light:hover {
  background: rgba(230, 57, 70, 0.2) !important;
  color: #ff5260 !important;
  border-color: #ff4d5a !important;
}

/* Fix Product Quickview Wishlist Button in Dark Mode */
[data-theme="dark"] #modal-wish-btn {
  background: #18271f !important;
  color: #ffffff !important;
  border: 1.5px solid #283e30 !important;
}

[data-theme="dark"] #modal-wish-btn * {
  color: #ffffff !important;
}

[data-theme="dark"] #modal-wish-btn:hover {
  background: rgba(230, 57, 70, 0.2) !important;
  color: #ff5260 !important;
  border-color: #ff4d5a !important;
}

[data-theme="dark"] #modal-wish-btn.active {
  background: linear-gradient(135deg, #e63946, #c92a37) !important;
  color: #ffffff !important;
  border-color: #e63946 !important;
}

[data-theme="dark"] #modal-wish-btn.active * {
  color: #ffffff !important;
}

/* Navbar Links & Actions in Dark Mode */
[data-theme="dark"] #navbar {
  background: rgba(12, 20, 16, 0.95) !important;
  border-bottom-color: var(--border) !important;
}

[data-theme="dark"] .nav-link {
  background: transparent !important;
  color: #c5d4cb !important;
  border: none !important;
  box-shadow: none !important;
}

[data-theme="dark"] .nav-link:hover {
  background: rgba(230, 57, 70, 0.15) !important;
  color: #ff5260 !important;
}

[data-theme="dark"] .nav-link.active {
  background: linear-gradient(135deg, #e63946, #c92a37) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(230, 57, 70, 0.35) !important;
}

[data-theme="dark"] .nav-search-btn,
[data-theme="dark"] .nav-cart-btn,
[data-theme="dark"] .nav-user-btn {
  background: #18271f !important;
  color: #c5d4cb !important;
  border: 1px solid #283e30 !important;
}

[data-theme="dark"] .nav-search-btn:hover,
[data-theme="dark"] .nav-cart-btn:hover,
[data-theme="dark"] .nav-user-btn:hover {
  background: rgba(230, 57, 70, 0.2) !important;
  color: #ff5260 !important;
  border-color: #e63946 !important;
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--cream-100);
  color: var(--text-primary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: var(--red-50);
  color: var(--primary);
  border-color: var(--primary);
}

[data-theme="dark"] .theme-toggle-btn {
  background: #18271f !important;
  color: #ffca28 !important; /* Glowing golden sun icon */
  border: 1px solid #283e30 !important;
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(230, 57, 70, 0.2) !important;
  color: #ff5260 !important;
  border-color: #e63946 !important;
}

/* Quantity Selector Buttons in Dark Mode */
[data-theme="dark"] .qty-btn,
[data-theme="dark"] .qty-btn-card {
  background: #1e2f27 !important;
  color: #ffffff !important;
  border: 1px solid #2e4a3b !important;
  box-shadow: none !important;
}

[data-theme="dark"] .qty-btn:hover,
[data-theme="dark"] .qty-btn-card:hover {
  background: #e63946 !important;
  color: #ffffff !important;
  border-color: #e63946 !important;
}

[data-theme="dark"] .qty-selector {
  background: #121c16 !important;
  border: 1px solid #22382c !important;
}

[data-theme="dark"] .qty-val,
[data-theme="dark"] .qty-num {
  color: #ffffff !important;
}

/* Section Headings & Enamad Cards in Dark Mode */
[data-theme="dark"] .section-title {
  color: #f4efe9 !important;
}

[data-theme="dark"] .section-title span {
  color: #ff4d5a !important;
}

[data-theme="dark"] .section-subtitle {
  color: #b8cecf !important;
}

[data-theme="dark"] .section-tag {
  background: var(--cream-100);
  border-color: var(--border);
  color: #4ade80 !important;
}

[data-theme="dark"] .enamad-section {
  background: #09100c !important;
  border-color: var(--border);
}

[data-theme="dark"] .enamad-card {
  background: #14211a;
  border: 1px solid #24382c;
}

[data-theme="dark"] .enamad-name {
  color: #f4efe9 !important;
}

[data-theme="dark"] .enamad-desc {
  color: #b8cecf !important;
}

/* Product Cards & Category Filter Cards */
[data-theme="dark"] .category-card {
  background: #14211a;
  border: 1px solid #22382c;
  color: #f4efe9;
}

[data-theme="dark"] .category-card.active {
  background: rgba(230, 57, 70, 0.15);
  border-color: #e63946;
  color: #ff4d5a;
}

[data-theme="dark"] .category-name {
  color: #f4efe9;
}

[data-theme="dark"] .category-count {
  color: #869e90;
}

[data-theme="dark"] .product-card {
  background: #14211a;
  border: 1px solid #22382c;
}

[data-theme="dark"] .product-body,
[data-theme="dark"] .product-footer {
  background: #14211a;
}

[data-theme="dark"] .product-category {
  color: #2da878 !important;
  font-weight: 700;
}

[data-theme="dark"] .product-title {
  color: #f4efe9 !important;
}

[data-theme="dark"] .product-weight,
[data-theme="dark"] .product-rating {
  color: #b8cecf !important;
}

[data-theme="dark"] .product-price {
  color: #ff4d5a !important;
  font-weight: 900;
}

[data-theme="dark"] .product-old-price {
  color: #6c8779 !important;
}

[data-theme="dark"] .product-unit {
  color: #869e90 !important;
}

/* Feature Cards & Client Cards */
[data-theme="dark"] .feature-card {
  background: #14211a;
  border: 1px solid #22382c;
}

[data-theme="dark"] .feature-title {
  color: #f4efe9;
}

[data-theme="dark"] .feature-desc {
  color: #b8cecf;
}

[data-theme="dark"] .client-card {
  background: #14211a !important;
  border: 1px solid #22382c !important;
  color: #f4efe9 !important;
}

[data-theme="dark"] .client-name {
  color: #f4efe9 !important;
}

[data-theme="dark"] .client-type {
  color: #869e90 !important;
}

[data-theme="dark"] .big-client-card {
  background: #14211a !important;
  border: 1px solid #22382c !important;
  color: #f4efe9 !important;
}

[data-theme="dark"] .big-client-icon {
  background: #18271f !important;
  border-color: #283e30 !important;
}

[data-theme="dark"] .big-client-name {
  color: #f4efe9 !important;
}

[data-theme="dark"] .big-client-desc {
  color: #b8cecf !important;
}

/* CHECKOUT PAGE & OPTION CARDS (High-Contrast Fix) */
[data-theme="dark"] .checkout-box,
[data-theme="dark"] .checkout-summary {
  background: #14211a !important;
  border: 1px solid #24382c !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5) !important;
}

[data-theme="dark"] .checkout-section-title,
[data-theme="dark"] .checkout-summary-header {
  color: #f4efe9 !important;
  border-bottom-color: #24382c !important;
}

[data-theme="dark"] .payment-method,
[data-theme="dark"] .checkout-address-card {
  background: #18271f !important;
  border: 2px solid #283e30 !important;
  color: #f4efe9 !important;
  transition: all 0.25s ease !important;
}

[data-theme="dark"] .payment-method .payment-name,
[data-theme="dark"] .checkout-address-card .payment-name {
  color: #ffffff !important;
  font-weight: 800 !important;
}

[data-theme="dark"] .payment-method .payment-desc,
[data-theme="dark"] .checkout-address-card .payment-desc {
  color: #b8cecf !important;
}

[data-theme="dark"] .payment-method .payment-icon {
  background: #101a14 !important;
  color: #2da878 !important;
  border: 1px solid #283e30 !important;
}

/* Selected Payment / Address Option in Dark Mode — Bright High Contrast Highlight */
[data-theme="dark"] .payment-method.selected,
[data-theme="dark"] .checkout-address-card.selected {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.22), rgba(230, 57, 70, 0.08)) !important;
  border: 2px solid #ff4d5a !important;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.3) !important;
}

[data-theme="dark"] .payment-method.selected .payment-name,
[data-theme="dark"] .checkout-address-card.selected .payment-name {
  color: #ffffff !important;
}

[data-theme="dark"] .payment-method.selected .payment-desc,
[data-theme="dark"] .checkout-address-card.selected .payment-desc {
  color: #e2ece6 !important;
}

[data-theme="dark"] .payment-method.selected .payment-icon {
  background: rgba(230, 57, 70, 0.25) !important;
  color: #ff4d5a !important;
  border-color: #ff4d5a !important;
}

[data-theme="dark"] .summary-row {
  color: #c5d6cc;
  border-bottom-color: #24382c;
}

[data-theme="dark"] .summary-row.total {
  color: #f4efe9;
}

[data-theme="dark"] .summary-row.total .price {
  color: #ff4d5a;
}

/* User Dashboard & Sidebars */
[data-theme="dark"] .dashboard-sidebar,
[data-theme="dark"] .dash-panel,
[data-theme="dark"] .dash-mobile-tabs {
  background: #14211a !important;
  border-color: #24382c !important;
}

[data-theme="dark"] .dash-panel-header {
  border-bottom-color: #24382c;
  color: #f4efe9;
}

[data-theme="dark"] .dash-user-name {
  color: #f4efe9;
}

[data-theme="dark"] .dash-user-email {
  color: #869e90;
}

[data-theme="dark"] .dash-nav-item {
  color: #b8cecf;
}

[data-theme="dark"] .dash-nav-item:hover {
  background: #18271f;
  color: #f4efe9;
}

[data-theme="dark"] .dash-nav-item.active {
  background: rgba(230, 57, 70, 0.15);
  color: #ff4d5a;
  border-right: 3px solid #e63946;
}

/* Fix Order Filter Tabs in Dashboard (High-Contrast Fix) */
[data-theme="dark"] .orders-tabs {
  background: #101a14 !important;
  border: 1px solid #22382c !important;
}

[data-theme="dark"] .order-tab {
  background: transparent !important;
  color: #b8cecf !important;
  border: none !important;
  box-shadow: none !important;
}

[data-theme="dark"] .order-tab:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .order-tab.active {
  background: linear-gradient(135deg, #e63946, #c92a37) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35) !important;
}

[data-theme="dark"] .notification-item {
  background: #18271f !important;
  border: 1px solid #283e30 !important;
  color: #f4efe9 !important;
}

[data-theme="dark"] .notification-item.unread {
  background: linear-gradient(135deg, rgba(45, 168, 120, 0.18), rgba(20, 33, 26, 0.95)) !important;
  border: 1px solid #2da878 !important;
  border-right: 4px solid #2da878 !important;
  box-shadow: 0 4px 14px rgba(45, 168, 120, 0.15) !important;
}

[data-theme="dark"] .notification-item.read {
  background: #101a14 !important;
  border: 1px solid #1c2e24 !important;
  border-right: 4px solid #283e30 !important;
  opacity: 0.75 !important;
}

[data-theme="dark"] .notification-item:hover {
  background: #1c2e24 !important;
  opacity: 1 !important;
}

[data-theme="dark"] .notif-title {
  color: #ffffff !important;
  font-weight: 800 !important;
}

[data-theme="dark"] .notif-text {
  color: #c8dcd0 !important;
}

[data-theme="dark"] .notif-time {
  color: #8da696 !important;
}

[data-theme="dark"] .notif-dot {
  background: #2da878 !important;
  box-shadow: 0 0 8px #2da878 !important;
}

[data-theme="dark"] .order-card {
  background: #18271f;
  border: 1px solid #24382c;
}

[data-theme="dark"] .order-card-header {
  border-bottom-color: #24382c;
  color: #f4efe9;
}

[data-theme="dark"] .order-id {
  color: #f4efe9;
}

[data-theme="dark"] .order-card-footer {
  border-top-color: #24382c;
  color: #f4efe9;
}

[data-theme="dark"] .address-card {
  background: #18271f;
  border: 1px solid #24382c;
  color: #f4efe9;
}

[data-theme="dark"] .address-card.default {
  border-color: #2da878;
  background: rgba(45, 168, 120, 0.08);
}

[data-theme="dark"] .address-name {
  color: #f4efe9;
}

[data-theme="dark"] .address-text {
  color: #b8cecf;
}

/* Modals & Cart Sidebar (No Light Background Flashes) */
[data-theme="dark"] #cart-sidebar,
[data-theme="dark"] .cart-sidebar,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .quickview-modal-card,
[data-theme="dark"] .zarinpal-card,
[data-theme="dark"] .club-modal-card,
[data-theme="dark"] .wallet-modal-card,
[data-theme="dark"] .confirm-modal-card,
[data-theme="dark"] .order-detail-modal-card,
[data-theme="dark"] #payment-result-modal .auth-card {
  background: #0e1a14 !important;
  border: 1px solid #2a4032 !important;
  color: #f5ede6 !important;
}

[data-theme="dark"] .pay-result-body {
  background: #0e1a14 !important;
}

[data-theme="dark"] .pay-result-box {
  background: #14241b !important;
  border-color: #24382c !important;
}

[data-theme="dark"] .pay-result-box-title,
[data-theme="dark"] #pay-result-method {
  color: #ffffff !important;
  border-bottom-color: #24382c !important;
}

[data-theme="dark"] #pay-result-order-id {
  color: #e2ece6 !important;
}

[data-theme="dark"] #pay-result-ref-id {
  color: #ff4d5a !important;
}

[data-theme="dark"] #pay-result-amount {
  color: #ff4d5a !important;
}

[data-theme="dark"] #pay-result-time {
  color: #9cb3a5 !important;
}

[data-theme="dark"] .quickview-img-wrap {
  background: #101a14 !important;
}

[data-theme="dark"] .cart-items,
[data-theme="dark"] .cart-empty {
  background: #0e1a14 !important;
  color: #b8cecf !important;
}

[data-theme="dark"] .cart-header,
[data-theme="dark"] .cart-footer,
[data-theme="dark"] .auth-header {
  border-color: #24382c !important;
  color: #f4efe9 !important;
}

[data-theme="dark"] .cart-item {
  border-bottom-color: #24382c !important;
}

[data-theme="dark"] .cart-item-name {
  color: #f4efe9 !important;
}

[data-theme="dark"] .cart-item-weight {
  color: #869e90 !important;
}

[data-theme="dark"] .cart-item-price {
  color: #ff4d5a !important;
}

/* Form Controls & Inputs */
[data-theme="dark"] .form-control,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: #18271f !important;
  color: #ffffff !important;
  border: 2px solid #283e30 !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: #ff4d5a !important;
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.25) !important;
  background-color: #1c2e24 !important;
}

[data-theme="dark"] .form-label {
  color: #f4efe9 !important;
}

/* Footer Links & Contact Info */
[data-theme="dark"] footer {
  background: #070d0a !important;
  border-top: 1px solid #1c2e24;
  color: #b8cecf;
}

[data-theme="dark"] .footer-brand p,
[data-theme="dark"] .footer-desc {
  color: #9cb3a5;
}

[data-theme="dark"] .footer-col-title {
  color: #f4efe9;
}

[data-theme="dark"] .footer-link {
  color: #a3baa8;
}

[data-theme="dark"] .footer-link:hover {
  color: #ff4d5a;
}

[data-theme="dark"] .footer-bottom {
  border-top-color: #1c2e24;
  color: #869e90;
}



