/* ══════════════════════════════════════════════════════════════════
   🎨 CATALOG STYLESHEET (CSS)
   الهوية البصرية وتنسيقات المتجر: أرجواني فاخر وأبيض متناسق
   تطبيق جوال متكامل ومتجاوب بنسبة 100%
   ══════════════════════════════════════════════════════════════════ */

/* ── Reset & App Foundations ── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html, body {
  /* clip بدل hidden: القيمة الأخيرة لأن overflow-x: hidden يحوّل body إلى
     حاوية تمرير ويُبطِل position: sticky (الشريط العلوي والقائمة الجانبية). */
  overflow-x: hidden;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
  scroll-behavior: smooth;
}
body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8f6fa;
  color: #1e1e28;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Top Navbar (Desktop & Mobile Shared Foundations) ── */
.navbar {
  background: #ffffff;
  border-bottom: 1.5px solid #ede7f3;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(113, 32, 152, 0.04);
}
.nav-inner {
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo-area {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-img-custom {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(113, 32, 152, 0.16));
  transition: transform 0.2s ease;
}
.logo-img-custom:hover { transform: scale(1.05); }

/* ── Search Bar: Desktop Centered ── */
.nav-search-area {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}
.search-box {
  position: relative;
  width: 100%;
}
.search-box input {
  width: 100%;
  height: 44px;
  padding: 10px 42px 10px 38px;
  background: #f6f0fa;
  border: 1.5px solid transparent;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e1e28;
  outline: none;
  transition: all 0.2s ease;
}
.search-box input:focus {
  background: #ffffff;
  border-color: #712098;
  box-shadow: 0 0 0 3px rgba(113, 32, 152, 0.14);
}
.search-box input::placeholder {
  color: #9c8eab;
  font-weight: 400;
}
.search-box .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #9c8eab;
  font-size: 14px;
  pointer-events: none;
}
.search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9c8eab;
  font-size: 14px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.search-clear-btn:hover { color: #dc2626; }
.search-clear-btn.visible { display: flex; }

/* ── Social Icons (Desktop & Mobile): بألوان اللوجو (بنفسجي متدرّج) ── */
.nav-socials-area {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  justify-content: flex-end;
}
.social-icon-link {
  font-size: 24px;
  color: #712098;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
/* التدرّج يُطبَّق على الأيقونة نفسها لأن الرابطة لا تحمل خلفية */
.social-icon-link i {
  color: #712098;
  background: linear-gradient(135deg, #712098, #9b3bcc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.social-icon-link:hover {
  transform: scale(1.18);
  filter: brightness(1.15);
}
.social-icon-link:active { transform: scale(0.94); }

/* ── LAYOUT CONTAINER (Desktop 2 Columns) ── */
.layout-container {
  max-width: 1700px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── SIDEBAR CATEGORIES (Desktop Only) ── */
.sidebar-categories {
  background: #ffffff;
  border: 1.5px solid #ede7f3;
  border-radius: 16px;
  padding: 16px 12px;
  box-shadow: 0 2px 10px rgba(113, 32, 152, 0.03);
  position: sticky;
  top: calc(var(--nav-h, 68px) + 16px);
  max-height: calc(100vh - var(--nav-h, 68px) - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d9b8ea #ffffff;
}
.sidebar-categories::-webkit-scrollbar { width: 4px; }
.sidebar-categories::-webkit-scrollbar-thumb { background: #d9b8ea; border-radius: 4px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 12px;
  margin-bottom: 8px;
  border-bottom: 1.5px solid #f6f0fa;
}
.sidebar-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #1e1e28;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-title i { color: #712098; font-size: 15px; }
.sidebar-total-badge {
  font-size: 11px;
  font-weight: 700;
  color: #712098;
  background: #f5eafb;
  padding: 2px 8px;
  border-radius: 12px;
}
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Category Item in Sidebar */
.side-cat-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #3b3447;
  font-family: 'Cairo', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: right;
  user-select: none;
}
.side-cat-item:hover {
  background: #f8f2fb;
  color: #712098;
  transform: translateX(-2px);
}
.side-cat-item:active { transform: scale(0.97); }
.side-cat-item.active {
  background: linear-gradient(135deg, #712098, #9b3bcc);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(113, 32, 152, 0.32);
  font-weight: 800;
  transform: translateX(-2px);
}
.side-cat-icon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #712098;
  flex-shrink: 0;
}
.side-cat-item.active .side-cat-icon { color: #ffffff; }
.side-cat-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.side-cat-count {
  font-size: 10.5px;
  background: #f6f0fa;
  color: #712098;
  padding: 1px 7px;
  border-radius: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.side-cat-item.active .side-cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ── Mobile Category Dropdown (Hidden on Desktop) ── */
.mobile-cat-dropdown-wrap { display: none; }

/* ── PRODUCTS MAIN AREA ── */
.products-main-area { min-width: 0; }
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.current-title {
  font-size: 18px;
  font-weight: 900;
  color: #1e1e28;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.title-indicator {
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, #712098, #9b3bcc);
  border-radius: 4px;
  flex-shrink: 0;
}
/* العنوان الرئيسي للصفحة (h1) يرث تنسيق الحاوية بدل حجم المتصفح الافتراضي */
.current-title h1 {
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  color: inherit;
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── SEO: فهرس التصنيفات النصي حُذف من الصفحة الرئيسية بطلب المالك ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.reset-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 20px;
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.reset-filter-btn:hover { background: #fecaca; }
.reset-filter-btn.visible { display: inline-flex; }

.items-counter {
  font-size: 12px;
  font-weight: 700;
  color: #712098;
  background: #f5eafb;
  border: 1.5px solid #e8d4f2;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── PRODUCTS GRID (Desktop: 5 Columns) ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1550px) {
  .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 1200px) {
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}

/* ── High-End E-Commerce Product Card ── */
.product-card {
  background: #ffffff;
  border: 1.5px solid #ede7f3;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(113, 32, 152, 0.03);
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: #cfa8e6;
  box-shadow: 0 12px 30px rgba(113, 32, 152, 0.16);
}
.product-card:active { transform: scale(0.98); }

.product-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #fbf7fd;
  flex-shrink: 0;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.product-card:hover .product-img { transform: scale(1.06); }
.product-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccaedc;
  font-size: 38px;
  background: #fbf7fd;
}
.photos-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(30, 10, 42, 0.68);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Body & Alignment Perfection */
.product-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-cat-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #9b3bcc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.product-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e1e28;
  line-height: 1.35;
  height: 35px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}
.product-footer-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed #f2eaf7;
}
.product-price {
  font-size: 15px;
  font-weight: 900;
  color: #712098;
  white-space: nowrap;
}
.card-order-btn {
  padding: 7px 12px;
  background: linear-gradient(135deg, #712098, #9b3bcc);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-family: 'Cairo', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.card-order-btn:hover {
  background: linear-gradient(135deg, #581477, #8023a8);
  box-shadow: 0 4px 12px rgba(113, 32, 152, 0.35);
}
.card-order-btn:active { transform: scale(0.96); }

/* ── Empty State ── */
.empty-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #9c8eab;
}
.empty-box i { font-size: 56px; color: #ccaedc; margin-bottom: 16px; }
.empty-box h3 { font-size: 18px; color: #3b3447; margin-bottom: 6px; }

/* ── Product Modal (Desktop Dialog) ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 8, 30, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(113, 32, 152, 0.25);
  transform: scale(0.94);
  transition: transform 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: #d9b8ea #ffffff;
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-box::-webkit-scrollbar { width: 4px; }
.modal-box::-webkit-scrollbar-thumb { background: #d9b8ea; border-radius: 4px; }

.modal-header {
  padding: 18px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1.5px solid #f6f0fa;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}
.modal-title {
  font-size: 18px;
  font-weight: 900;
  color: #1e1e28;
  line-height: 1.35;
}
.modal-cat-tag {
  font-size: 12px;
  color: #712098;
  font-weight: 700;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.modal-cat-tag i { color: #712098; }
.modal-close-btn {
  background: #f6f0fa;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #712098;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.modal-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.modal-content-grid {
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Gallery inside Modal */
.gallery-main-view {
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #fbf8fd;
  border: 1px solid #ede7f3;
  margin-bottom: 10px;
  cursor: zoom-in;
}
.gallery-main-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-main-view:hover img { transform: scale(1.04); }
.gallery-thumbs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gallery-thumbs-row::-webkit-scrollbar { display: none; }
.gthumb-box {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
  background: #f6f0fa;
}
.gthumb-box img { width: 100%; height: 100%; object-fit: cover; }
.gthumb-box.selected { border-color: #712098; }

/* Details & Ordering in Modal */
.modal-price-tag {
  font-size: 25px;
  font-weight: 900;
  color: #712098;
  margin-bottom: 10px;
}
.modal-description {
  font-size: 13px;
  color: #4b4258;
  line-height: 1.75;
  margin-bottom: 16px;
}
.features-header {
  font-size: 12px;
  font-weight: 800;
  color: #712098;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.features-ul {
  list-style: none;
  margin-bottom: 18px;
}
.features-ul li {
  padding: 6px 0;
  border-bottom: 1px solid #f6f0fa;
  font-size: 12.5px;
  color: #2e2638;
  display: flex;
  align-items: center;
  gap: 8px;
}
.features-ul li:last-child { border-bottom: none; }
.features-ul li::before {
  content: '✓';
  width: 18px;
  height: 18px;
  background: #f5eafb;
  color: #712098;
  font-weight: 900;
  font-size: 11px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* زر مشاركة المنتج */
.share-product-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 11px;
  background: #fbf7fd;
  border: 1.5px dashed #cfa8e6;
  color: #712098;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}
.share-product-btn:hover {
  background: #f5eafb;
  border-color: #712098;
  transform: translateY(-1px);
}
.share-product-btn:active { transform: scale(0.97); }
.share-product-btn i { font-size: 15px; }

/* 4 Big Order Buttons */
.order-section-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e1e28;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.order-section-title i { color: #712098; }
.order-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-channel-btn {
  padding: 11px 16px;
  border-radius: 11px;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.order-channel-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.order-channel-btn:active { transform: scale(0.97); }
/* أزرار الطلب بألوان الموقع (واتساب + تيليجرام فقط) */
.order-channel-btn.btn-whatsapp { background: linear-gradient(135deg, #712098, #9b3bcc); }
.order-channel-btn.btn-telegram { background: linear-gradient(135deg, #581477, #8023a8); }
.order-channel-btn.btn-whatsapp:hover,
.order-channel-btn.btn-telegram:hover { box-shadow: 0 6px 18px rgba(113, 32, 152, 0.34); }
.order-channel-btn.btn-facebook { background: linear-gradient(135deg, #1877f2, #0d5cb6); }
.order-channel-btn.btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* ── Lightbox Modal ── */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 5, 20, 0.95);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.lightbox-modal.open { opacity: 1; visibility: visible; }
.lightbox-modal img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
}
.lightbox-close-btn {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close-btn:hover { background: rgba(239, 68, 68, 0.6); }
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav-btn:hover { background: rgba(113, 32, 152, 0.6); }
.lightbox-nav-btn.prev { right: 18px; }
.lightbox-nav-btn.next { left: 18px; }

/* ── Toast Notification ── */
.toast-notice {
  position: fixed;
  bottom: 80px;
  right: 50%;
  transform: translateX(50%) translateY(100px);
  background: #240a33;
  border: 1px solid #712098;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 10px 25px rgba(113, 32, 152, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  z-index: 4000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  white-space: nowrap;
}
.toast-notice.show {
  transform: translateX(50%) translateY(0);
  opacity: 1;
}
.toast-notice i { color: #10b981; font-size: 16px; }

/* ── Scroll Top Button ── */
.scroll-top-btn {
  position: fixed;
  bottom: 85px;
  left: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #712098, #9b3bcc);
  color: #ffffff;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(113, 32, 152, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s ease;
  z-index: 800;
}
.scroll-top-btn.visible { opacity: 1; visibility: visible; }
.scroll-top-btn:hover { transform: translateY(-3px); }

/* ══════════════════════════════════════════════════════════════════
   📱 NATIVE MOBILE APPLICATION EXPERIENCE (@media max-width: 768px)
   ══════════════════════════════════════════════════════════════════ */
.mobile-app-bottom-bar { display: none; }

@media (max-width: 768px) {
  body {
    padding-bottom: 76px !important;
  }

  /* 1. Header: 2-Tier Mobile Grid */
  .navbar {
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(113, 32, 152, 0.05);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
  }
  .nav-inner {
    height: auto !important;
    padding: 10px 14px 10px !important;
    display: grid !important;
    grid-template-areas:
      "logo socials" !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    gap: 10px 12px !important;
  }
  /* عند فتح البحث من زر «بحث» في المنيو السفلية تُضاف الصف الثاني */
  .navbar.search-open .nav-inner {
    grid-template-areas:
      "logo socials"
      "search search" !important;
  }
  .nav-logo-area {
    grid-area: logo;
    display: flex !important;
    align-items: center !important;
  }
  .logo-img-custom {
    max-height: 38px !important;
  }
  .nav-socials-area {
    grid-area: socials;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;
  }
  .social-icon-link {
    font-size: 22px !important;
  }
  .nav-search-area {
    grid-area: search;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: none !important; /* مخفي افتراضياً على الجوال */
  }
  .navbar.search-open .nav-search-area {
    display: block !important;
    animation: searchRowIn 0.2s ease;
  }
  @keyframes searchRowIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .search-box input {
    height: 42px !important;
    font-size: 15px !important; /* Prevents iOS auto-zoom bug */
    padding: 8px 38px 8px 36px !important;
    border-radius: 50px !important;
    background: #f6f0fa !important;
  }
  .search-box .search-icon {
    left: 14px !important;
    font-size: 14px !important;
  }

  /* 2. Hide Desktop Sidebar on Mobile */
  .sidebar-categories {
    display: none !important;
  }

  /* 3. 📱 النمط الجديد المطلوب: قائمة منسدلة فخمة للتصنيفات في الجوال */
  .mobile-cat-dropdown-wrap {
    display: block !important;
    position: sticky !important;
    top: var(--nav-h, 110px) !important;
    z-index: 950 !important;
    padding: 8px 12px 6px !important;
    background: #f8f6fa !important;
  }
  .mobile-cat-dropdown-btn {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #ede7f3;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(113, 32, 152, 0.04);
    transition: all 0.2s ease;
    font-family: 'Cairo', sans-serif;
    outline: none;
  }
  .mobile-cat-dropdown-btn:active {
    transform: scale(0.98);
    background: #faf6fd;
  }
  .mobile-cat-dropdown-wrap.open .mobile-cat-dropdown-btn {
    border-color: #712098;
    box-shadow: 0 4px 16px rgba(113, 32, 152, 0.12);
    border-radius: 14px 14px 0 0;
  }
  .mcd-info {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
  }
  .mcd-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f5eafb;
    color: #712098;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }
  .mobile-cat-dropdown-wrap.open .mcd-icon-box {
    background: linear-gradient(135deg, #712098, #9b3bcc);
    color: #ffffff;
  }
  .mcd-text-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .mcd-sub-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #9c8eab;
    line-height: 1.2;
  }
  .mcd-selected-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #1e1e28;
    line-height: 1.3;
  }
  .mcd-badge-side {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .mcd-counter {
    font-size: 11px;
    font-weight: 700;
    color: #712098;
    background: #f5eafb;
    padding: 2px 8px;
    border-radius: 12px;
  }
  .mcd-chevron {
    font-size: 13px;
    color: #712098;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .mobile-cat-dropdown-wrap.open .mcd-chevron {
    transform: rotate(180deg);
  }

  /* The Dropdown Menu List */
  .mobile-cat-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    background: #ffffff;
    border: 1.5px solid #712098;
    border-top: 1px solid #f2eaf7;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 14px 32px rgba(113, 32, 152, 0.18);
    max-height: min(380px, 46vh);
    overflow-y: auto;
    z-index: 1000;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: #d9b8ea #ffffff;
    animation: mcdSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes mcdSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .mobile-cat-dropdown-wrap.open .mobile-cat-dropdown-menu {
    display: block;
  }

  /* Individual Item inside Dropdown */
  .mcd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #3b3447;
    font-size: 13px;
    font-weight: 700;
    user-select: none;
  }
  .mcd-item:active {
    background: #f5eafb;
  }
  .mcd-item.active {
    background: linear-gradient(135deg, #712098, #9b3bcc);
    color: #ffffff;
    font-weight: 800;
  }
  .mcd-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .mcd-item-icon {
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #712098;
  }
  .mcd-item.active .mcd-item-icon {
    color: #ffffff;
  }
  .mcd-item-right {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .mcd-item-count {
    font-size: 11px;
    background: #f6f0fa;
    color: #712098;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
  }
  .mcd-item.active .mcd-item-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
  }
  .mcd-item-check {
    display: none;
    font-size: 12px;
    color: #ffffff;
  }
  .mcd-item.active .mcd-item-check {
    display: inline-block;
  }

  /* 4. Layout Container on Mobile */
  .layout-container {
    padding: 8px 12px 24px !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .content-header {
    margin-bottom: 12px !important;
    padding: 0 2px;
  }
  .current-title {
    font-size: 16px !important;
  }
  .title-indicator {
    height: 18px !important;
    width: 3.5px !important;
  }
  .items-counter {
    font-size: 11px !important;
    padding: 2px 10px !important;
  }

  /* 5. 2 Equal-Height Flawless Mobile Grid Columns */
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .product-card {
    border-radius: 14px !important;
    box-shadow: 0 1px 6px rgba(113, 32, 152, 0.04) !important;
  }
  .product-body {
    padding: 10px !important;
  }
  .product-cat-tag {
    font-size: 9.5px !important;
    margin-bottom: 2px !important;
  }
  .product-title {
    font-size: 12px !important;
    height: 33px !important;
    line-height: 1.35 !important;
    margin-bottom: 6px !important;
  }
  .product-footer-row {
    padding-top: 6px !important;
  }
  .product-price {
    font-size: 14px !important;
  }
  .card-order-btn {
    padding: 6px 10px !important;
    font-size: 11px !important;
    border-radius: 7px !important;
    gap: 4px !important;
  }
  .photos-badge {
    font-size: 9px !important;
    padding: 1px 6px !important;
    bottom: 6px !important; left: 6px !important;
  }

  /* 6. Native Mobile App Bottom Sheet (Modal) — صندوق مضغوط */
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal-box {
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 74vh !important;
    animation: appSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  @keyframes appSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .modal-header {
    padding: 11px 14px !important;
    gap: 10px !important;
  }
  .modal-title {
    font-size: 14.5px !important;
  }
  .modal-cat-tag {
    font-size: 11px !important;
  }
  .modal-close-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
  }
  .modal-content-grid {
    grid-template-columns: 1fr !important;
    padding: 12px 14px 20px !important;
    gap: 12px !important;
  }

  /* المعرض بحجم أصغر حتى لا يبتلع الشاشة */
  .gallery-main-view {
    aspect-ratio: auto !important;
    height: 34vh !important;
    max-height: 260px !important;
    margin-bottom: 8px !important;
  }
  .gallery-thumbs-row { gap: 6px !important; }
  .gthumb-box {
    width: 44px !important;
    height: 44px !important;
    border-radius: 8px !important;
  }

  .modal-price-tag {
    font-size: 20px !important;
    margin-bottom: 6px !important;
  }
  .modal-description {
    font-size: 12px !important;
    line-height: 1.6 !important;
    margin-bottom: 10px !important;
  }
  .features-header {
    margin-bottom: 6px !important;
  }
  .features-ul {
    margin-bottom: 12px !important;
  }
  .features-ul li {
    font-size: 12px !important;
    padding: 5px 0 !important;
  }
  .share-product-btn {
    padding: 9px 12px !important;
    font-size: 12.5px !important;
    margin-bottom: 12px !important;
  }
  .order-section-title {
    font-size: 12.5px !important;
    margin-bottom: 8px !important;
  }
  .order-buttons-list { gap: 7px !important; }
  .order-channel-btn {
    padding: 9px 12px !important;
    font-size: 12px !important;
    border-radius: 9px !important;
    gap: 8px !important;
  }

  /* 7. Bottom Navigation App Bar (Always Fixed at Bottom) */
  .mobile-app-bottom-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60px !important;
    background: #ffffff !important;
    border-top: 1.5px solid #ede7f3 !important;
    z-index: 1500 !important;
    justify-content: space-around !important;
    align-items: center !important;
    box-shadow: 0 -4px 20px rgba(113, 32, 152, 0.08) !important;
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
  }
  .app-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: #7e6e8e;
    font-family: 'Cairo', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    height: 100%;
    text-decoration: none;
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
  }
  .app-tab-btn i {
    font-size: 18px;
    transition: transform 0.15s ease;
  }
  .app-tab-btn:active { transform: scale(0.92); }
  .app-tab-btn.active { color: #712098; }
  .app-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #712098;
  }
  /* واتساب وتيليجرام مخفيّان من المنيو السفلية (يبقيان في الشريط العلوي) */
  .app-tab-btn.whatsapp-tab,
  .app-tab-btn.telegram-tab {
    display: none !important;
  }

  /* سهم العودة للأعلى مخفي على الجوال */
  .scroll-top-btn {
    display: none !important;
  }
}
