/* ==========================================================================
   LEADERX GEBEYA — MARKETPLACE STYLESHEET (consolidated)
   Single source of truth. No duplicated blocks.
   Breakpoints:
     ≥1600px  large desktop
     1280–1599 default desktop
     1025–1279 laptop
     ≤1024px  tablet + mobile (sidebar becomes drawer)
     ≤768px   mobile
     ≤480px   small mobile
     ≤360px   tiny mobile
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand */
  --leaderx-blue-primary: #0A4D8C;
  --leaderx-blue-secondary: #1E88E5;
  --leaderx-blue-dark: #07315E;
  --leaderx-blue-light: #E3F2FD;
  --leaderx-blue-gradient: linear-gradient(135deg, #0A4D8C, #1E88E5);

  /* Neutrals */
  --white: #FFFFFF;
  --off-white: #F8FAFC;
  --light-gray: #F5F7FA;
  --border-color: #E5E7EB;
  --border-soft: #F0F1F3;
  --shadow-color: rgba(10, 77, 140, 0.1);

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #64748B;
  --text-muted: #9CA3AF;

  /* Status */
  --success-color: #10B981;
  --warning-color: #F59E0B;
  --error-color: #F44336;
  --info-color: #2196F3;

  /* Verification tiers */
  --verified-green: #10B981;
  --verified-business-blue: #3B82F6;
  --verified-enterprise-purple: #8B5CF6;
  --verified-premium-gold: #F59E0B;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);

  /* Radii */
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;

  /* Layout metrics */
  --sidebar-width: 280px;
  --top-bar-height: 50px;
  --nav-bar-height: 70px;
  --header-reserved: 70px;
  --nav-reserved: 50px;
  --ad-reserved: 90px;
  --category-card-height: 240px;
  --product-card-height: 380px;

  /* Motion */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Safe-area */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Runtime */
  --sticky-offset: 90px;
  --mk-sticky-top: 16px;
}

/* ==========================================================================
   2. BASE RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--white);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.drawer-open,
body.mk-drawer-open { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

p { margin-bottom: 1rem; }

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button {
  font-family: 'Open Sans', sans-serif;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  transition: all var(--transition-fast);
}

input, textarea, select {
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* Containment hints (kept conservative — no `contain: paint` because
   it breaks position:fixed modals opened from inside cards) */
#gebeyaNavContainer,
.gebeya-nav-container,
#adWidgetContainer,
.gebeya-ad-container { contain: layout style; }

/* ==========================================================================
   3. NAV BAR
   ========================================================================== */
.nav-bar {
  background: transparent;
  color: var(--text-primary);
  padding: calc(0.625rem + var(--safe-top)) 1.25rem 0.625rem;
  display: flex;
  align-items: center;
  gap: 0.9375rem;
  position: sticky;
  top: 0;
  z-index: 900;
  min-height: var(--nav-bar-height);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  min-width: 0;
}

.nav-controls { display: flex; align-items: center; gap: 0.3125rem; }
.nav-separator { color: var(--border-color); margin: 0 0.5rem; }

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--leaderx-blue-light);
  color: var(--leaderx-blue-primary);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}
.nav-back-btn:hover {
  background: var(--leaderx-blue-primary);
  color: #fff;
  transform: translateY(-2px);
}

.desktop-actions-container {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.desktop-icon {
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.1rem;
  text-decoration: none;
  border: 1px solid var(--border-color);
}
.desktop-icon:hover {
  background: var(--leaderx-blue-light);
  color: var(--leaderx-blue-primary);
  transform: translateY(-2px);
  border-color: var(--leaderx-blue-primary);
}

.desktop-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  padding: 0 4px;
}
.desktop-badge.show { display: flex; }
#desktopUnreadBadge { background: #28a745; }

.desktop-action-btn.btn-sell-desktop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.desktop-action-btn.btn-sell-desktop:hover {
  background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
  transform: translateY(-2px);
}

/* ==========================================================================
   4. LAYOUT SHELL
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 0;
  background: var(--off-white);
  overflow-y: auto;
  min-height: calc(100vh - var(--top-bar-height) - var(--nav-bar-height));
  width: 100%;
  min-width: 0;
  transition: width 0.3s ease, margin 0.3s ease;
}

.mk-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 0.75rem 1.5rem 3rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.mk-main {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  min-width: 0;
}

/* ==========================================================================
   5. SIDEBAR
   ========================================================================== */
.mk-sidebar {
  position: sticky;
  top: var(--mk-sticky-top, 16px);
  max-height: none;
  overflow: visible;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  padding: 0;
}

.mk-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  border-radius: 14px 14px 0 0;
}
.mk-sidebar-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--leaderx-blue-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mk-sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.mk-sidebar-close:hover { background: #f2f2f2; }

.mk-sidebar-body { padding: 8px 0 16px; }

.mk-filter-block { border-bottom: 1px solid var(--border-soft); }
.mk-filter-block:last-child { border-bottom: none; }

.mk-filter-title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: #1F2937;
  font-family: inherit;
}
.mk-filter-title span { display: inline-flex; align-items: center; gap: 8px; }
.mk-filter-title i:first-child { color: var(--leaderx-blue-primary); }

.mk-chev { color: var(--text-muted); transition: transform 0.18s ease, color 0.18s ease; }
.mk-filter-block.is-collapsed .mk-chev { transform: rotate(-90deg); }

.mk-filter-body { padding: 0 12px 12px; display: block; }
.mk-filter-block.is-collapsed .mk-filter-body { display: none; }

/* Rating */
.mk-rating-list { display: flex; flex-direction: column; gap: 6px; }
.mk-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #374151;
}
.mk-radio:hover { background: var(--light-gray); }
.mk-radio input { accent-color: var(--leaderx-blue-primary); }

/* Price */
.mk-price-inputs { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.mk-price-inputs input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.85rem;
}
.mk-price-inputs input:focus { outline: none; border-color: var(--leaderx-blue-primary); }

.mk-apply-price {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--leaderx-blue-primary);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
}
.mk-apply-price:hover { background: var(--leaderx-blue-secondary); }

/* ==========================================================================
   6. SEARCH + CHIPS + SORT BAR (main column)
   ========================================================================== */
.mk-search-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  padding: 10px 0 8px;
  margin-bottom: 4px;
}
.mk-main .gebeya-search-bar {
  position: relative;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0 12px 0 16px;
  box-shadow: none;
  transition: border-color 0.2s ease;
}
.mk-main .gebeya-search-bar:focus-within {
  border-color: #7EB6F0;
  box-shadow: none;
}
.mk-search-icon {
  color: #7EB6F0;
  font-size: 1rem;
  margin-right: 10px;
  flex-shrink: 0;
}

.mk-main .gebeya-search-input {
  flex: 1;
  border: none !important;
  box-shadow: none !important;
  padding: 14px 0 !important;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: transparent !important;
  border-radius: 0 !important;
  min-width: 0;
}
.mk-main .gebeya-search-input::placeholder {
  color: #9AA6B2;
  opacity: 1;
}
.mk-main .gebeya-search-input:focus,
.mk-main .gebeya-search-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }

.mk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 12px;
  background: #E8F0FE;
  color: var(--leaderx-blue-primary);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #D2E3FC;
}
.mk-chip button {
  background: rgba(10, 77, 140, 0.1);
  border: none;
  color: var(--leaderx-blue-primary);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.mk-chip button:hover { background: var(--leaderx-blue-primary); color: #fff; }
.mk-chip-clear {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #FECACA;
  padding: 5px 12px;
}

.mk-sortbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px;
  margin-bottom: 6px;
  gap: 10px;
  flex-wrap: wrap;
}
.mk-results-count { font-size: 0.85rem; color: #6B7280; }
.mk-results-count strong { color: #111827; font-weight: 700; font-size: 1rem; }
.mk-sort-right { display: flex; align-items: center; gap: 8px; }
.mk-sort-label { font-size: 0.83rem; color: #6B7280; }
.mk-sort-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.85rem;
  background: #fff;
  cursor: pointer;
}
.mk-sort-select:focus { outline: none; border-color: var(--leaderx-blue-primary); }

/* Mobile filter button (hidden on desktop) */
.mk-mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #111827;
  cursor: pointer;
}
.mk-mobile-filter-btn:hover {
  border-color: var(--leaderx-blue-primary);
  color: var(--leaderx-blue-primary);
}

.mk-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 998;
  backdrop-filter: blur(2px);
}
.mk-sidebar-backdrop.is-open { display: block; }

/* ==========================================================================
   7. SECTIONS
   ========================================================================== */
.section {
  margin-bottom: 3.75rem;
  padding: 2.5rem;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  contain: layout style;
}
.section.light {
  background: var(--off-white);
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 {
  font-size: 2rem;
  color: var(--leaderx-blue-primary);
  margin-bottom: 0.9375rem;
  position: relative;
  display: inline-block;
}
.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -0.625rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3.75rem;
  height: 0.1875rem;
  background: var(--leaderx-blue-gradient);
  border-radius: 0.1875rem;
}
.section-title p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 43.75rem;
  margin: 0 auto;
  line-height: 1.7;
}

.mk-cat-section {
  padding: 18px 16px !important;
  margin-bottom: 1.25rem !important;
  border-radius: 14px !important;
  overflow: hidden;
}

.mk-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}
.mk-section-head h2 { margin: 0; font-size: 1.15rem; color: #111827; }

.mk-products-section {
  padding: 16px !important;
  margin-bottom: 1rem !important;
  border-radius: 14px !important;
  min-height: 400px;
}

.mk-loadmore-wrap { text-align: center; padding: 20px 0 40px; }
.mk-loadmore-btn {
  padding: 12px 32px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--leaderx-blue-primary);
  color: var(--leaderx-blue-primary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mk-loadmore-btn:hover { background: var(--leaderx-blue-primary); color: #fff; }

.quick-link {
  color: var(--leaderx-blue-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.quick-link:hover { color: var(--leaderx-blue-secondary); text-decoration: underline; }

/* ==========================================================================
   8. CATEGORY STRIP
   ========================================================================== */
.mk-cat-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  padding: 4px 4px 12px 4px !important;
  margin: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  min-height: 0 !important;
  -webkit-overflow-scrolling: touch;
}
.mk-cat-grid::-webkit-scrollbar { height: 6px; }
.mk-cat-grid::-webkit-scrollbar-track { background: #F1F5F9; border-radius: 10px; }
.mk-cat-grid::-webkit-scrollbar-thumb { background: var(--leaderx-blue-secondary); border-radius: 10px; }
.mk-cat-grid::-webkit-scrollbar-thumb:hover { background: var(--leaderx-blue-primary); }

.gebeya-category-card {
  background: var(--white);
  padding: 16px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: var(--category-card-height);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.gebeya-category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 0.3125rem;
  background: var(--leaderx-blue-gradient);
}
.gebeya-category-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-xl);
  border-color: var(--leaderx-blue-light);
}

.gebeya-category-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 22px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gebeya-category-card:hover .gebeya-category-icon { transform: scale(1.1); }
.gebeya-category-icon img,
.gebeya-category-image { width: 100%; height: 100%; object-fit: cover; }
.gebeya-category-icon i { font-size: 22px; color: white; }

.gebeya-category-card h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #111827;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gebeya-category-card p {
  font-size: 0.75rem;
  margin-bottom: 6px;
  color: #6B7280;
  max-height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.2;
}
.category-product-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 6px;
}
.browse-category {
  font-size: 0.78rem;
  margin-top: 4px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  color: var(--leaderx-blue-secondary);
  font-weight: 600;
}

/* ==========================================================================
   9. PRODUCT GRID + CARDS
   ========================================================================== */
.gebeya-products-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 14px !important;
  margin-top: 0 !important;
  min-height: 0 !important;
}

.gebeya-product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #EEF0F3;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.gebeya-product-card:hover {
  transform: translateY(-3px);
  border-color: #D2E3FC;
  box-shadow: 0 10px 24px rgba(10, 77, 140, 0.10);
}

/* Wishlist toggle */
.wishlist-btn {
  position: absolute;
  top: 0.9375rem;
  right: 0.9375rem;
  background: var(--white);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 10;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.wishlist-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
  background: var(--off-white);
}
.wishlist-btn.active { color: #FF4757; background: rgba(255, 71, 87, 0.1); }
.wishlist-btn i { font-size: 1.125rem; transition: transform var(--transition-fast); }
.wishlist-btn:hover i { transform: scale(1.1); }

/* Image */
.gebeya-product-image {
  height: 190px;
  min-height: 190px;
  background: #F9FAFB;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--leaderx-blue-primary);
  font-size: 3.75rem;
  position: relative;
  overflow: hidden;
}
.gebeya-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform var(--transition-base);
}
.gebeya-product-card:hover .gebeya-product-image img { transform: scale(1.05); }

/* Product badge (top-left) */
.product-badge {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--white);
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-badge.verified-badge { background: var(--verified-green); }
.product-badge.verified-business { background: var(--verified-business-blue); }
.product-badge.verified-enterprise { background: var(--verified-enterprise-purple); }
.product-badge.verified-premium { background: var(--verified-premium-gold); }

/* Details */
.gebeya-product-details {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.gebeya-product-details h3 {
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.product-description {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-bottom: 6px;
  max-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Seller */
.product-seller {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.seller-avatar-small {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 6px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.verified-icon {
  color: var(--verified-green);
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

/* Location */
.seller-location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0.375rem;
  border: 1px solid rgba(59, 130, 246, 0.1);
}
.seller-location i {
  color: var(--leaderx-blue-primary);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.seller-location .location-text {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gebeya-product-location--missing {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.1);
}
.gebeya-product-location--missing i { color: var(--error-color); }

/* Verification badges under seller */
.seller-verification-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3125rem;
  margin: 0.5rem 0;
}
.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}
.verification-badge.verified-badge { background: #e6f4ea; color: #137333; border: 1px solid #b7e0c6; }
.verification-badge.verified-business { background: #e8f0fe; color: #1a73e8; border: 1px solid #c6dafc; }
.verification-badge.verified-enterprise { background: #f3e8ff; color: #8a2be2; border: 1px solid #d9bdfc; }
.verification-badge.verified-premium { background: #fff8e1; color: #ff8f00; border: 1px solid #ffecb3; }

/* Rating */
.gebeya-product-rating {
  color: #FFD700;
  margin-bottom: 0.625rem;
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  font-size: 0.75rem;
  min-height: 24px;
  flex-wrap: wrap;
}
.gebeya-product-rating--clickable { cursor: pointer; }
.rating-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-left: 0.3125rem;
  font-weight: 500;
}
.gebeya-product-rating:hover .rating-count {
  color: var(--leaderx-blue-primary);
  text-decoration: underline;
}

/* Price */
.gebeya-product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--leaderx-blue-primary);
  margin: 6px 0;
  line-height: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.original-price { text-decoration: line-through; color: #999; font-size: 0.78rem; margin-right: 8px; }
.current-price { font-weight: 700; color: var(--leaderx-blue-primary); font-size: 1.05rem; }
.discount-badge {
  background: #dc3545;
  color: white;
  padding: 1px 6px;
  border-radius: 12px;
  font-size: 0.65rem;
  margin-left: 8px;
}

.min-order {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0.5rem 0;
  padding: 0.25rem 0.5rem;
  background: var(--light-gray);
  border-radius: var(--border-radius-sm);
  display: inline-block;
  font-weight: 500;
}

/* Stock */
.stock-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  margin: 5px 0;
  align-self: flex-start;
}
.stock-status.in-stock { color: #28a745; background: #e8f5e9; }
.stock-status.low-stock { color: #ff9800; background: #fff3e0; }
.stock-status.out-of-stock { color: #dc3545; background: #fce4ec; }

/* Actions */
.product-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.product-actions button {
  flex: 1;
  padding: 8px 6px;
  border-radius: var(--border-radius-sm);
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  transition: all var(--transition-fast);
}
.gebeya-add-to-cart { background: var(--leaderx-blue-primary); color: var(--white); }
.gebeya-add-to-cart:hover {
  background: var(--leaderx-blue-secondary);
  transform: translateY(-0.125rem);
}
.gebeya-add-to-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.product-actions .btn-outline {
  background: transparent;
  color: var(--leaderx-blue-primary);
  border: 2px solid var(--leaderx-blue-primary);
}
.product-actions .btn-outline:hover {
  background: var(--leaderx-blue-light);
  transform: translateY(-0.125rem);
}

/* ==========================================================================
   10. SIDEBAR CATEGORY / LOCATION TREES
   ========================================================================== */
.category-tree-container,
.location-tree-container {
  position: relative;
  min-width: 0;
  display: block;
}

.category-tree-trigger,
.location-tree-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  background: #F9FAFB;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.83rem;
  transition: all 0.2s ease;
  min-width: 0;
}
.category-tree-trigger:hover,
.location-tree-trigger:hover {
  border-color: var(--leaderx-blue-primary);
  background: #F8FBFF;
}
.category-tree-trigger span,
.location-tree-trigger span {
  flex: 1;
  text-align: left;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-tree-trigger i:last-child,
.location-tree-trigger i:last-child {
  color: #999;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.category-tree-trigger.active i:last-child,
.location-tree-trigger.active i:last-child { transform: rotate(180deg); }

.category-tree-dropdown,
.location-tree-dropdown {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  margin-top: 6px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: none;
  z-index: 1000;
  min-width: 0;
  max-height: none;
  overflow: visible;
  display: none;
  flex-direction: column;
}
.category-tree-dropdown.is-open,
.location-tree-dropdown.is-open { display: flex; }

.category-tree-search,
.location-tree-search {
  padding: 10px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}
.category-tree-search input,
.location-tree-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
}
.category-tree-search input:focus,
.location-tree-search input:focus { outline: none; border-color: var(--leaderx-blue-primary); }

.category-tree,
.location-tree {
  flex: none;
  overflow: visible;
  max-height: none;
  padding: 8px 0;
  min-height: 0;
}

.clear-category-btn,
.clear-location-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 5px;
  font-size: 16px;
  flex-shrink: 0;
  display: none;
}
.clear-category-btn.is-flex,
.clear-location-btn.is-flex { display: flex; }
.clear-category-btn:hover,
.clear-location-btn:hover { color: #dc3545; }

/* Tree nodes */
.cat-tree-node,
.tree-node { user-select: none; }

.cat-tree-node-header,
.tree-node-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cat-tree-node-header:hover,
.tree-node-header:hover { background: #f0f7ff; }
.cat-tree-node-header.selected,
.tree-node-header.selected {
  background: #e3f0ff;
  color: var(--leaderx-blue-primary);
  font-weight: 500;
}

.cat-tree-node-toggle,
.tree-node-toggle {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  color: #666;
  font-size: 12px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.cat-tree-node-toggle.empty,
.tree-node-toggle.empty { visibility: hidden; }

.cat-tree-node-icon {
  width: 28px;
  min-width: 28px;
  margin-right: 8px;
  font-size: 14px;
  color: var(--leaderx-blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-tree-node-icon img,
.cat-tree-node-img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--white);
}
.cat-tree-node-icon i { font-size: 18px; color: var(--leaderx-blue-primary); }

.tree-node-icon { width: 20px; margin-right: 8px; font-size: 14px; flex-shrink: 0; }
.tree-node-icon.country { color: var(--leaderx-blue-primary); }
.tree-node-icon.state { color: #28a745; }
.tree-node-icon.city { color: #ff9800; }

.cat-tree-node-label,
.tree-node-label {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-tree-node-count,
.tree-node-count {
  font-size: 11px;
  color: #999;
  margin-left: 8px;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

.cat-tree-node-children,
.tree-node-children { margin-left: 14px; display: block; }

.cat-tree-node-label mark,
.tree-node-label mark {
  background: #ffeb3b;
  padding: 0 2px;
  border-radius: 3px;
  color: #333;
  font-weight: 500;
}

.no-search-results { padding: 20px; text-align: center; color: #999; }
.tree-node-empty { padding: 12px; text-align: center; color: #999; font-style: italic; }

/* ==========================================================================
   11. FILTERS PANEL (More)
   ========================================================================== */
#filtersPanel,
.filters-panel {
  background: #f8f9fa;
  padding: 0;
  border-radius: 8px;
  margin-top: 15px;
  border: 1px solid #e9ecef;
  display: none;
}
.filters-panel.is-open,
#filtersPanel.is-open { display: block; }

.filters-panel-inner {
  margin-top: 20px;
  padding: 20px;
  border-top: 2px solid #dee2e6;
}
.filters-panel h4,
.filters-panel-title { margin-bottom: 15px; color: var(--leaderx-blue-primary); }
.filters-panel select { max-width: 100%; }

.filter-row { margin: 10px 0; }
.filter-row-label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--text-primary);
  font-size: 0.875rem;
}
.filter-select {
  width: 200px;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.875rem;
  background: var(--white);
}
.filter-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn-apply-filters,
.btn-clear-filters {
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}
.btn-apply-filters { background: #28a745; }
.btn-apply-filters:hover { background: #218838; transform: translateY(-1px); }
.btn-clear-filters { background: #6c757d; }
.btn-clear-filters:hover { background: #5a6268; transform: translateY(-1px); }

/* ==========================================================================
   12. SERVICE CARDS (sidebar)
   ========================================================================== */
.mk-sidebar .service-cards-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow: visible;
  min-height: 0;
}

.mk-sidebar .service-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  min-width: 0;
  max-width: none;
  flex: none;
  min-height: 0;
  text-align: left;
  border: 1px solid var(--border-color);
  box-shadow: none;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mk-sidebar .service-card:hover {
  transform: none;
  border-color: var(--leaderx-blue-primary);
  background: #F8FBFF;
}
.mk-sidebar .service-card-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  margin: 0;
  font-size: 0.9rem;
  border-radius: 8px;
  background: var(--leaderx-blue-light);
  color: var(--leaderx-blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mk-sidebar .service-card-content h3 {
  font-size: 0.83rem;
  margin: 0 0 2px;
  color: #111827;
}
.mk-sidebar .service-card-content p {
  font-size: 0.72rem;
  margin: 0;
  color: #6B7280;
  line-height: 1.3;
}

/* ==========================================================================
   13. BUTTONS
   ========================================================================== */
.btn-primary {
  background: var(--leaderx-blue-primary);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.875rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--transition-base);
}
.btn-primary:hover {
  background: var(--leaderx-blue-secondary);
  transform: translateY(-0.125rem);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--leaderx-blue-secondary);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.875rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all var(--transition-base);
}
.btn-secondary:hover {
  background: var(--leaderx-blue-primary);
  transform: translateY(-0.125rem);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--leaderx-blue-primary);
  border: 2px solid var(--leaderx-blue-primary);
  padding: 0.625rem 1.5625rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-base);
}
.btn-outline:hover {
  background: var(--leaderx-blue-primary);
  color: var(--white);
  transform: translateY(-0.125rem);
}

.btn-text {
  background: none;
  border: none;
  color: var(--leaderx-blue-primary);
  cursor: pointer;
  font-weight: 500;
  padding: 0;
  text-decoration: underline;
  transition: color var(--transition-fast);
}
.btn-text:hover { color: var(--leaderx-blue-secondary); }

.dynamic-clear-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.dynamic-clear-btn:hover { background: #c82333; transform: translateY(-2px); }

.filter-type-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.filter-type-btn.active { background: var(--leaderx-blue-primary); }
.filter-type-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   14. FORM GROUPS
   ========================================================================== */
.form-group { margin-bottom: 1.25rem; padding: 0 24px; }
.form-group label,
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}
.form-group input,
.form-group textarea,
.form-group select,
.form-control {
  width: 100%;
  padding: 0.75rem 0.9375rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 1rem;
  transition: all var(--transition-fast);
  font-family: 'Open Sans', sans-serif;
  background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-control:focus {
  outline: none;
  border-color: var(--leaderx-blue-primary);
  box-shadow: 0 0 0 3px rgba(10, 77, 140, 0.1);
}
.form-group textarea,
textarea.form-control { resize: vertical; min-height: 100px; }

/* ==========================================================================
   15. MODALS
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn var(--transition-base);
  overflow-y: auto;
  padding: 1.25rem;
  -webkit-overflow-scrolling: touch;
}
.modal-content {
  background-color: var(--white);
  margin: 2.5% auto;
  padding: 1.875rem;
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 31.25rem;
  position: relative;
  animation: slideIn var(--transition-base);
  box-shadow: var(--shadow-xl);
}
.modal-content h3 {
  color: var(--leaderx-blue-primary);
  margin-bottom: 1.5625rem;
  text-align: center;
  padding-right: 2.5rem;
  font-size: 1.5rem;
}
.modal-content-narrow { max-width: 500px; }

.close-modal {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  font-size: 1.75rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-secondary);
  z-index: 10;
  background: none;
  border: none;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}
.close-modal:hover { color: var(--text-primary); background: var(--light-gray); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: linear-gradient(135deg, #0A4D8C, #1E88E5);
  color: white;
  border-radius: 12px 12px 0 0;
}
.modal-title { margin: 0; font-size: 1.2rem; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}
.modal-close:hover { background-color: rgba(255, 255, 255, 0.2); }
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 20px 24px 24px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}
.modal-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  flex: 1;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.modal-btn-primary { background: linear-gradient(135deg, #0A4D8C, #1E88E5); color: white; }
.modal-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10, 77, 140, 0.3); }
.modal-btn-secondary { background: #f5f5f5; color: #333; border: 1px solid #ddd; }
.modal-btn-secondary:hover { background: #e0e0e0; }

#cartModal .modal-content { max-width: 37.5rem; position: relative; z-index: 10001; }

/* Seller-selection modal */
.seller-selection-modal h3 { text-align: center; margin-bottom: 20px; }
.seller-selection-hint { text-align: center; color: #666; margin-bottom: 20px; font-size: 0.875rem; }
.sellers-list { max-height: 400px; overflow-y: auto; padding: 5px; }
.seller-selection-actions { margin-top: 20px; text-align: center; }

.seller-checkout-option {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  cursor: pointer;
  background: white;
  transition: all 0.3s ease;
}
.seller-checkout-option:hover {
  border-color: var(--leaderx-blue-primary);
  box-shadow: 0 4px 12px rgba(10, 77, 140, 0.15);
  transform: translateY(-2px);
}
.seller-checkout-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.seller-checkout-option-header h4 {
  margin: 0 0 5px 0;
  color: var(--leaderx-blue-primary);
  font-size: 1rem;
}
.seller-checkout-option-header p { margin: 0; color: #666; font-size: 13px; }
.seller-checkout-option-total { text-align: right; }
.seller-checkout-option-price {
  font-size: 18px;
  font-weight: bold;
  color: var(--leaderx-blue-primary);
  margin-bottom: 5px;
}
.seller-checkout-option-products {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}
.seller-checkout-option-products small { color: #999; }
.btn-checkout-small { padding: 8px 16px; font-size: 13px; }

/* ==========================================================================
   16. CART
   ========================================================================== */
.empty-cart { text-align: center; padding: 2.5rem 1.25rem; }
.empty-cart i,
.empty-cart-icon {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  opacity: 0.5;
}
.empty-cart h3 { color: var(--text-primary); margin-bottom: 0.625rem; font-size: 1.25rem; }
.empty-cart p { color: var(--text-secondary); margin-bottom: 1.25rem; font-size: 0.9375rem; }

.cart-item {
  display: flex;
  gap: 0.9375rem;
  padding: 0.9375rem 0;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}
.cart-item:last-child { border-bottom: none; }

.cart-item img {
  width: 3.75rem;
  height: 3.75rem;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .name {
  font-weight: 600;
  margin-bottom: 0.3125rem;
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.cart-item .price { color: var(--leaderx-blue-primary); font-weight: 600; font-size: 0.9375rem; }
.cart-item .qty { display: flex; align-items: center; gap: 0.625rem; flex-shrink: 0; }
.cart-item .qty button {
  width: 1.875rem;
  height: 1.875rem;
  border: 1px solid var(--border-color);
  background: var(--white);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.cart-item .qty button:hover {
  background: var(--leaderx-blue-light);
  border-color: var(--leaderx-blue-secondary);
}
.cart-item .remove {
  background: none;
  border: none;
  color: var(--error-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.3125rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.cart-item .remove:hover { background: rgba(244, 67, 54, 0.1); }

.cart-total {
  text-align: right;
  padding: 1.25rem 0;
  border-top: 2px solid var(--border-color);
  font-size: 1.25rem;
  color: var(--leaderx-blue-primary);
  font-weight: 700;
}
.cart-seller-group {
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}
.cart-seller-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}
.cart-seller-header i { color: var(--leaderx-blue-primary); font-size: 18px; flex-shrink: 0; }
.cart-seller-header strong {
  font-size: 14px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-seller-items { padding: 10px; }
.cart-seller-items .cart-item { padding: 10px; border-bottom: 1px solid #f0f0f0; }
.cart-seller-items .cart-item:last-child { border-bottom: none; }
.cart-seller-footer { padding: 10px; text-align: right; border-top: 1px solid #f0f0f0; }
.cart-seller-total { font-weight: bold; margin-bottom: 10px; color: var(--leaderx-blue-primary); }
.btn-full-width { width: 100%; margin-top: 20px; }

/* ==========================================================================
   17. WISHLIST
   ========================================================================== */
.wishlist-items {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.625rem;
  -webkit-overflow-scrolling: touch;
}
.wishlist-item {
  display: flex;
  gap: 0.9375rem;
  padding: 0.9375rem 0;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}
.wishlist-item:last-child { border-bottom: none; }

.wishlist-item-image {
  width: 4.6875rem;
  height: 4.6875rem;
  border-radius: var(--border-radius-sm);
  background: var(--light-gray);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}
.wishlist-item-image i { font-size: 1.5rem; color: var(--text-secondary); }
.wishlist-item-details { flex: 1; min-width: 0; }
.wishlist-item-details h4 {
  margin: 0 0 0.3125rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.wishlist-item-details p {
  margin: 0 0 0.3125rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wishlist-item-price {
  color: var(--leaderx-blue-primary);
  font-weight: 700;
  font-size: 1.125rem;
}
.wishlist-item-actions {
  display: flex;
  gap: 0.625rem;
  flex-shrink: 0;
  flex-direction: column;
}
.wishlist-item-actions button {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
}
.wishlist-stock-status {
  margin-top: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  font-weight: 600;
  font-size: 11px;
}
.wishlist-add-cart {
  background: var(--leaderx-blue-primary);
  border-color: var(--leaderx-blue-primary);
}
.wishlist-add-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #999;
  border-color: #999;
}

/* ==========================================================================
   18. SEARCH SUGGESTIONS
   ========================================================================== */
.search-suggestions,
.gebeya-search-suggestions {
  background: var(--white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  max-height: 18.75rem;
  overflow-y: auto;
  z-index: 1000;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.3125rem;
  animation: fadeIn var(--transition-fast);
  -webkit-overflow-scrolling: touch;
}
.suggestions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--off-white);
}
.clear-searches {
  background: none;
  border: none;
  color: var(--leaderx-blue-primary);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
}
.clear-searches:hover { background: var(--leaderx-blue-light); transform: translateY(-0.0625rem); }
.suggestions-list { padding: 0.5rem 0; }
.suggestion-item {
  display: flex;
  align-items: center;
  padding: 0.625rem 1rem;
  cursor: pointer;
  gap: 0.625rem;
  transition: background var(--transition-fast);
}
.suggestion-item:hover { background: var(--leaderx-blue-light); }
.suggestion-item i.fa-history {
  color: var(--text-secondary);
  font-size: 0.75rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}
.suggestion-item span {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.remove-suggestion {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.7;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.remove-suggestion:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--error-color);
  opacity: 1;
}

/* ==========================================================================
   19. TOASTS + LOADING + SKELETONS
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius-md);
  color: var(--white);
  z-index: 2002;
  max-width: 21.875rem;
  box-shadow: var(--shadow-xl);
  animation: slideInRight var(--transition-base);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.toast-success { background: var(--success-color); }
.toast-error { background: var(--error-color); }
.toast-warning { background: var(--warning-color); }
.toast-info { background: var(--info-color); }

.loading {
  color: var(--text-secondary);
  font-size: 1.125rem;
  text-align: center;
  padding: 2.5rem;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-height: 200px;
}
.loading i {
  font-size: 2.5rem;
  color: var(--leaderx-blue-primary);
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  animation: fadeIn var(--transition-fast);
}
.loading-content {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow-xl);
  min-width: 12.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.loading-content i {
  font-size: 2.5rem;
  color: var(--leaderx-blue-primary);
  animation: spin 1s linear infinite;
}
.loading-content p {
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
}

.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--border-radius-sm);
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card,
.gebeya-skeleton-card { pointer-events: none; user-select: none; }
.gebeya-skeleton-image { height: 200px; width: 100%; border-radius: 0; }
.gebeya-skeleton-line { height: 20px; width: 80%; margin-bottom: 10px; }
.gebeya-skeleton-line--full { width: 100%; height: 14px; margin-bottom: 8px; }
.gebeya-skeleton-line--short { width: 60%; height: 14px; margin-bottom: 15px; }
.gebeya-skeleton-button { height: 36px; width: 100%; }
.gebeya-skeleton-category-icon { height: 100px; width: 100px; border-radius: 12px; margin: 0 auto 1.5rem; }
.gebeya-skeleton-category-line { height: 20px; width: 70%; margin: 0 auto 10px; }
.gebeya-skeleton-category-line--full { width: 90%; height: 14px; margin: 0 auto 8px; }
.gebeya-skeleton-category-line--short { width: 60%; height: 14px; margin: 0 auto; }

/* ==========================================================================
   20. MISC WIDGETS
   ========================================================================== */
#scrollToTop,
.scroll-to-top {
  position: fixed;
  bottom: calc(1.875rem + var(--safe-bottom));
  right: calc(1.875rem + var(--safe-right));
  width: 3.125rem;
  height: 3.125rem;
  background: var(--leaderx-blue-primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: all var(--transition-base);
}
#scrollToTop:hover,
.scroll-to-top:hover {
  background: var(--leaderx-blue-secondary);
  transform: translateY(-0.1875rem);
  box-shadow: var(--shadow-xl);
}
#scrollToTop.show,
.scroll-to-top.show { display: flex; }

.sidebar-status {
  padding: 0.625rem 1.25rem;
  background: var(--leaderx-blue-light);
  border-top: 1px solid var(--border-color);
  font-size: 0.6875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--border-radius-md);
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 8px;
}
.sidebar-status strong { color: var(--leaderx-blue-primary); font-weight: 600; }

/* Utility classes */
.no-products {
  text-align: center;
  padding: 3.75rem 1.25rem;
  grid-column: 1 / -1;
  background: var(--white);
  border-radius: var(--border-radius-md);
  border: 2px dashed var(--border-color);
}
.no-products i {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  opacity: 0.5;
}
.no-products h3 { color: var(--text-primary); margin-bottom: 0.625rem; font-size: 1.25rem; }
.no-products p { color: var(--text-secondary); margin-bottom: 1.25rem; font-size: 0.9375rem; }

.cat-empty {
  text-align: center;
  padding: 1.875rem 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.875rem;
}

.mt-2 { margin-top: 0.5rem; }
.text-danger { color: #dc3545; }
.is-hidden { display: none !important; }
.is-flex { display: flex !important; }

/* Error / empty states */
.gebeya-error-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
}
.gebeya-error-state__icon {
  font-size: 48px;
  color: var(--warning-color);
  margin-bottom: 20px;
}
.gebeya-error-state--network .gebeya-error-state__icon { color: var(--error-color); }
.gebeya-error-state--server .gebeya-error-state__icon { color: var(--warning-color); }
.gebeya-error-state__title { color: var(--text-primary); margin-bottom: 0.625rem; }
.gebeya-error-state__message { color: var(--text-secondary); margin-bottom: 1rem; }
.gebeya-error-state__retry { margin-top: 15px; }

/* Connection status pill */
.gebeya-connection-status {
  position: fixed;
  bottom: calc(20px + var(--safe-bottom));
  left: calc(20px + var(--safe-left));
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  z-index: 99999;
  display: none;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease;
}
.gebeya-connection-status.is-online { background: var(--success-color); }
.gebeya-connection-status.is-offline { background: var(--error-color); }

/* ==========================================================================
   21. SIDEBAR CATEGORY DROPDOWN (legacy — kept for JS that targets these)
   ========================================================================== */
.sidebar-category-dropdown { position: relative; }
.sidebar-dropdown-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}
.sidebar-dropdown-trigger:hover { border-color: var(--leaderx-blue-primary); }
.sidebar-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 5px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  max-height: 400px;
  overflow: hidden;
  flex-direction: column;
}
.sidebar-dropdown-menu.active { display: flex; }
.sidebar-category-search { padding: 10px; border-bottom: 1px solid #eee; }
.sidebar-category-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.sidebar-category-search input:focus { outline: none; border-color: var(--leaderx-blue-primary); }
.sidebar-category-list {
  overflow-y: auto;
  max-height: 320px;
  padding: 5px 0;
}
.category-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s ease;
}
.category-item:hover { background: #f0f7ff; }
.category-item.has-children { font-weight: 500; }
.category-arrow { margin-left: auto; font-size: 12px; transition: transform 0.2s ease; }
.category-arrow.expanded { transform: rotate(90deg); }
.category-icon { font-size: 14px; color: var(--leaderx-blue-primary); }
.category-name { flex: 1; }
.sb-cat-selected {
  background: #e3f0ff;
  color: var(--leaderx-blue-primary);
  font-weight: 600;
}
.subcategory-list { display: none; }

/* ==========================================================================
   22. ANIMATIONS
   ========================================================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideIn {
  from { transform: translateY(-3.125rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(3.125rem); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideUpMobile {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.mk-main .gebeya-search-bar.empty-search {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
  animation: shake 0.5s ease-in-out;
}
.mk-main .gebeya-search-bar.empty-search .gebeya-search-input {
  background-color: #fff8f8;
}
/* ==========================================================================
   23. SCROLLBAR + FOCUS + SELECTION
   ========================================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: var(--leaderx-blue-secondary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--leaderx-blue-primary); }
:focus-visible { outline: 2px solid var(--leaderx-blue-secondary); outline-offset: 2px; }
.mk-main .gebeya-search-bar,
.mk-main .gebeya-search-bar *:focus,
.mk-main .gebeya-search-bar *:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
::selection { background: var(--leaderx-blue-primary); color: white; }

/* ==========================================================================
   24. RESPONSIVE — LARGE DESKTOP (≥1600px)
   ========================================================================== */
@media (min-width: 1600px) {
  .mk-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    padding: 1rem 2rem 3rem;
  }
  .gebeya-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  }
  .gebeya-category-card { min-width: 220px; max-width: 220px; width: 220px; }
}

/* ==========================================================================
   25. RESPONSIVE — LAPTOP (1025–1279px)
   ========================================================================== */
@media (max-width: 1279px) and (min-width: 1025px) {
  .mk-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem 1rem 3rem;
  }
  .gebeya-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }
  .main-content { padding: 0 1rem 1rem; }
  .gebeya-category-card { min-width: 180px; max-width: 180px; width: 180px; }
}

/* ==========================================================================
   26. RESPONSIVE — TABLET & MOBILE (≤1024px)
   Sidebar becomes a drawer.
   ========================================================================== */
@media (max-width: 1024px) {
  .mk-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 0.75rem 0.75rem 3rem !important;
    gap: 0 !important;
  }

  .mk-mobile-filter-btn { display: inline-flex !important; }

  .mk-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 88vw;
    max-width: 360px;
    height: 100vh !important;
    max-height: 100vh !important;
    z-index: 999;
    border-radius: 0 14px 14px 0 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important;
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    will-change: transform;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-top: var(--safe-top);
    padding-bottom: calc(1rem + var(--safe-bottom));
  }
  .mk-sidebar.is-open { transform: translateX(0) !important; }
  .mk-sidebar-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .main-content { width: 100%; padding: 1rem; }
  .nav-bar { padding: 0.625rem 1.25rem; flex-wrap: wrap; gap: 0.5rem; }
  .section { padding: 1.5rem; margin-bottom: 3rem; }
  .section-title h2 { font-size: 1.75rem; }

  .filter-controls { flex-direction: column; align-items: stretch; }
  .filter-buttons-group { margin-left: 0; }

  .gebeya-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 10px !important;
  }

  .gebeya-category-card {
    min-width: 170px;
    max-width: 170px;
    width: 170px;
    min-height: 220px;
  }
  .gebeya-category-icon { width: 56px; height: 56px; font-size: 20px; }
}

/* ==========================================================================
   27. RESPONSIVE — MOBILE (≤768px)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --product-card-height: auto;
    --category-card-height: auto;
    --sidebar-width: 88vw;
  }

  .main-content { padding: 0.5rem; }

  .nav-bar {
    flex-direction: row;
    gap: 0.5rem;
    padding: calc(0.5rem + var(--safe-top)) 0.5rem 0.5rem;
    flex-wrap: wrap;
    min-height: 50px;
  }
  .nav-controls { flex: 1; }
  .desktop-icon { width: 34px; height: 34px; font-size: 0.9rem; }
  .desktop-badge {
    min-width: 14px;
    height: 14px;
    font-size: 8px;
    top: -3px;
    right: -3px;
    padding: 0 3px;
  }
  .desktop-action-btn.btn-sell-desktop { padding: 5px 10px; font-size: 0.7rem; }

  .section {
    padding: 1rem 0.75rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
  }
  .section-title { margin-bottom: 1.5rem; padding: 0 0.5rem; }
  .section-title h2 { font-size: 1.25rem; }

   /* Search */
  .mk-search-wrap { padding: 8px 0 6px; }
  .mk-main .gebeya-search-bar { padding: 0 4px 0 12px; }
  .mk-main .gebeya-search-input { padding: 12px 6px !important; font-size: 0.9rem; }
  .mk-main .gebeya-search-bar.is-searching::after { left: 12px; }

  .mk-chips { gap: 4px; }
  .mk-chip { font-size: 0.72rem; padding: 4px 5px 4px 10px; }

  .mk-sortbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .mk-sort-right { justify-content: space-between; }
  .mk-sort-select { flex: 1; }

  /* Products */
  .gebeya-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .mk-products-section { padding: 10px !important; }
  .gebeya-product-image { height: 140px; min-height: 140px; }
  .gebeya-product-details { padding: 10px; }
  .gebeya-product-details h3 { font-size: 0.82rem; }
  .gebeya-product-price { font-size: 1rem; }
  .mk-products-section .gebeya-product-price { font-size: 1rem !important; }
  .product-actions { flex-direction: column; }
  .product-actions button { width: 100%; font-size: 0.72rem !important; }

  /* Category strip */
  .gebeya-category-card {
    min-width: 150px;
    max-width: 150px;
    width: 150px;
    min-height: 200px;
    padding: 12px 8px;
  }
  .gebeya-category-icon { width: 50px; height: 50px; font-size: 18px; margin-bottom: 8px; }
  .gebeya-category-card h3 { font-size: 0.8rem; }
  .gebeya-category-card p { font-size: 0.68rem; }
  .browse-category { font-size: 0.7rem; }
  .category-product-count { font-size: 0.65rem; }

  /* Sidebar */
  .mk-sidebar { width: 88vw !important; max-width: 340px !important; }
  .mk-sidebar-header { padding: 12px 14px; }
  .mk-filter-title { padding: 11px 14px; font-size: 0.85rem; }
  .mk-filter-body { padding: 0 10px 10px; }
  .category-tree-trigger,
  .location-tree-trigger { font-size: 0.8rem; padding: 9px 10px; }
  .mk-price-inputs input { font-size: 0.8rem; padding: 7px 8px; }

  /* Cart / Wishlist mobile layout */
  .cart-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.5rem;
    text-align: left;
  }
  .cart-item img {
    width: 52px;
    height: 52px;
    min-width: 52px;
    object-fit: cover;
    border-radius: 8px;
  }
  .cart-item .info { flex: 1; min-width: 0; text-align: left; }
  .cart-item .name {
    font-size: 0.813rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
  }
  .cart-item .price { font-size: 0.813rem; margin-bottom: 0.375rem; }
  .cart-item .qty { gap: 0.375rem; }
  .cart-item .qty button { width: 26px; height: 26px; font-size: 0.75rem; border-radius: 6px; }
  .cart-item .qty span { min-width: 20px; text-align: center; font-size: 0.813rem; font-weight: 600; }
  .cart-item .remove { width: 28px; height: 28px; font-size: 1.125rem; align-self: flex-start; }

  .cart-seller-group { margin-bottom: 0.75rem; border-radius: 10px; }
  .cart-seller-header { padding: 0.625rem 0.75rem; font-size: 0.813rem; }
  .cart-seller-header i { font-size: 0.875rem; }
  .cart-seller-items { padding: 0.375rem; }
  .cart-seller-items .cart-item { padding: 0.625rem 0.5rem; }
  .cart-total { padding: 0.75rem 0; font-size: 1rem; }
  .cart-seller-footer { padding: 0.75rem 0.5rem; }

  .wishlist-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.5rem;
    text-align: left;
  }
  .wishlist-item-image { width: 56px; height: 56px; min-width: 56px; border-radius: 8px; }
  .wishlist-item-details { flex: 1; min-width: 0; text-align: left; }
  .wishlist-item-details h4 { font-size: 0.813rem; margin-bottom: 0.25rem; line-height: 1.3; }
  .wishlist-item-details p { font-size: 0.75rem; margin-bottom: 0.25rem; }
  .wishlist-item-price { font-size: 0.938rem; margin-bottom: 0.25rem; }
  .wishlist-item-actions {
    flex-direction: column;
    gap: 0.375rem;
    flex-shrink: 0;
    width: auto;
    min-width: 82px;
  }
  .wishlist-item-actions button {
    width: 100%;
    padding: 0.375rem 0.5rem;
    font-size: 0.688rem;
    border-radius: 6px;
    white-space: nowrap;
  }

  /* Modal becomes bottom sheet */
  .modal { padding: 0; align-items: flex-end; }
  .modal-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    padding-bottom: calc(1rem + var(--safe-bottom));
    animation: slideUpMobile 0.3s ease;
  }
  #cartModal .modal-content,
  #wishlistModal .modal-content { max-height: 92vh; display: flex; flex-direction: column; }
  #cartModal .modal-content h3,
  #wishlistModal .modal-content h3 {
    font-size: 1.125rem;
    padding: 0.5rem 2.25rem 0.75rem 0.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    flex-shrink: 0;
  }
  #cartItems,
  .wishlist-items {
    flex: 1;
    overflow-y: auto;
    max-height: none;
    padding: 0.5rem 0.25rem;
    -webkit-overflow-scrolling: touch;
  }
  .empty-cart { padding: 2rem 1rem; }
  .empty-cart i,
  .empty-cart-icon { font-size: 2.5rem; }
  .empty-cart h3 { font-size: 1.125rem; }
  .empty-cart p { font-size: 0.875rem; }
  #cartModal .btn-primary[onclick*="checkout"] {
    width: 100% !important;
    margin: 0.75rem 0 !important;
    padding: 0.75rem !important;
    font-size: 0.938rem !important;
    border-radius: 10px !important;
    flex-shrink: 0;
  }

  /* Suggestions as bottom sheet */
  .search-suggestions,
  .gebeya-search-suggestions {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
    margin: 0;
    animation: slideUpMobile 0.3s ease;
  }

  /* Floating widgets */
  #scrollToTop,
  .scroll-to-top {
    bottom: calc(20px + var(--safe-bottom));
    right: calc(16px + var(--safe-right));
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: calc(1rem + var(--safe-bottom));
    max-width: none;
    font-size: 0.813rem;
    padding: 0.625rem 1rem;
  }
  .gebeya-connection-status {
    left: 1rem;
    right: 1rem;
    bottom: calc(1rem + var(--safe-bottom));
    text-align: center;
  }

  .mk-layout { padding: 0.5rem 0.5rem 3rem !important; }
}

/* ==========================================================================
   28. RESPONSIVE — SMALL MOBILE (≤640px)
   ========================================================================== */
@media (max-width: 640px) {
  .mk-layout { padding: 0.5rem 0.5rem 3rem !important; }
}

/* ==========================================================================
   29. RESPONSIVE — SMALL MOBILE (≤480px)
   ========================================================================== */
@media (max-width: 480px) {
   .mk-main .gebeya-search-bar { padding: 0 4px 0 10px; }
  .mk-main .gebeya-search-input { padding: 10px 6px !important; font-size: 0.813rem; }
  .mk-main .gebeya-search-bar.is-searching::after { left: 10px; }

  .section-title h2 { font-size: 1.125rem; }

  .gebeya-category-card {
    min-width: 160px;
    max-width: 160px;
    width: 160px;
    padding: 1rem 0.5rem;
    min-height: 220px;
  }
  .gebeya-category-icon { width: 60px; height: 60px; font-size: 20px; margin-bottom: 0.75rem; }
  .gebeya-category-card h3 { font-size: 0.875rem; }
  .gebeya-category-card p { font-size: 0.688rem; }

  .gebeya-products-grid { grid-template-columns: 1fr !important; gap: 0.75rem; }
  .gebeya-product-image { height: 11rem; min-height: 11rem; }
  .gebeya-product-price { font-size: 1.125rem; }
  .product-actions { flex-direction: column; }
  .product-actions button { width: 100%; }

  .modal-content { padding: 0.875rem; border-radius: 14px 14px 0 0; }
  .close-modal {
    right: 0.75rem;
    top: 0.75rem;
    font-size: 1.5rem;
    width: 1.75rem;
    height: 1.75rem;
  }
  .modal-content h3 { font-size: 1rem; padding: 0.375rem 2rem 0.5rem 0.125rem; }

  #scrollToTop,
  .scroll-to-top {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
    bottom: calc(16px + var(--safe-bottom));
    right: calc(12px + var(--safe-right));
  }

  .cart-item img { width: 44px; height: 44px; min-width: 44px; }
  .cart-item .name,
  .wishlist-item-details h4 { font-size: 0.75rem; }
  .cart-item .price,
  .wishlist-item-price { font-size: 0.75rem; }
  .cart-item .qty button { width: 22px; height: 22px; font-size: 0.688rem; }
  .cart-item .qty span { font-size: 0.75rem; }
  .cart-item .remove { width: 24px; height: 24px; font-size: 1rem; }

  .wishlist-item-image { width: 48px; height: 48px; min-width: 48px; }
  .wishlist-item-actions { min-width: 72px; }
  .wishlist-item-actions button { font-size: 0.625rem; padding: 0.313rem 0.375rem; }

  .mk-sidebar { width: 92vw !important; max-width: none !important; }
}

/* ==========================================================================
   30. RESPONSIVE — TINY MOBILE (≤360px)
   ========================================================================== */
@media (max-width: 360px) {
  .desktop-icon { width: 30px; height: 30px; font-size: 0.8rem; }
  .desktop-action-btn.btn-sell-desktop { padding: 4px 8px; font-size: 0.65rem; }
  .desktop-action-btn.btn-sell-desktop span { display: none; }

  .gebeya-category-card { min-width: 140px; max-width: 140px; width: 140px; }

  .wishlist-item-actions { min-width: 64px; }
  .wishlist-item-actions button { font-size: 0.563rem; padding: 0.25rem 0.313rem; }

  .gebeya-products-grid { grid-template-columns: 1fr !important; }

  .mk-cat-grid .gebeya-category-card,
  .gebeya-category-card {
    min-width: 130px;
    max-width: 130px;
    width: 130px;
    min-height: 180px;
  }
  .gebeya-category-icon { width: 44px; height: 44px; font-size: 16px; }
}

/* ==========================================================================
   31. RESPONSIVE — LANDSCAPE PHONE
   ========================================================================== */
@media (max-width: 896px) and (orientation: landscape) {
  .modal { align-items: center; padding: 0.5rem; }
  .modal-content {
    max-height: 95vh;
    border-radius: 12px;
    margin: 1rem auto;
    max-width: 90%;
  }
  #cartModal .modal-content,
  #wishlistModal .modal-content { max-width: 700px; border-radius: 12px; }

  .gebeya-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  }
}

/* ==========================================================================
   32. DESKTOP — HIDE MOBILE-ONLY CONTROLS
   ========================================================================== */
@media (min-width: 1025px) {
  .mk-mobile-filter-btn { display: none !important; }
  .mk-sidebar-close { display: none !important; }
  .mk-sidebar-backdrop { display: none !important; }
}

/* ==========================================================================
   33. HOVER-TO-OPEN BEHAVIOUR (pointer devices only)
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  /* Filter blocks */
  .mk-sidebar .mk-filter-block:hover > .mk-filter-body { display: block; }
  .mk-sidebar .mk-filter-block:hover > .mk-filter-title .mk-chev { transform: rotate(0deg); }
  .mk-sidebar .mk-filter-block:hover > .mk-filter-title {
    color: var(--leaderx-blue-primary);
    background: #F8FBFF;
  }
  .mk-sidebar #filtersPanel:hover,
  .mk-sidebar .mk-filter-block:hover > #filtersPanel,
  .mk-sidebar .mk-filter-block:hover > .filters-panel {
    display: block !important;
  }

  /* Category / location dropdowns */
  .mk-sidebar .category-tree-container:hover .category-tree-dropdown,
  .mk-sidebar .location-tree-container:hover .location-tree-dropdown,
  .mk-sidebar .category-tree-dropdown:hover,
  .mk-sidebar .location-tree-dropdown:hover {
    display: flex;
  }
  .mk-sidebar .category-tree-container:hover .category-tree-trigger i:last-child,
  .mk-sidebar .location-tree-container:hover .location-tree-trigger i:last-child {
    transform: rotate(180deg);
  }
  .mk-sidebar .category-tree-container:hover .category-tree-trigger,
  .mk-sidebar .location-tree-container:hover .location-tree-trigger {
    border-color: var(--leaderx-blue-primary);
    background: #F8FBFF;
  }
  .mk-sidebar .category-tree-container::after,
  .mk-sidebar .location-tree-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 8px;
    pointer-events: auto;
  }

  /* Category tree child expand */
  .mk-sidebar .cat-tree-node:hover > .cat-tree-node-children { display: block; }
  .mk-sidebar .cat-tree-node:hover > .cat-tree-node-header { background: #F0F7FF; }
  .mk-sidebar .cat-tree-node:hover > .cat-tree-node-children .cat-tree-node-header {
    background: #F8FBFF;
  }

  /* Location tree child expand */
  .mk-sidebar .tree-node:hover > .tree-node-children { display: block; }
  .mk-sidebar .tree-node:hover > .tree-node-header { background: #F0F7FF; }
  .mk-sidebar .tree-node:hover > .tree-node-children .tree-node-header {
    background: #F8FBFF;
  }
}

/* Touch devices: don't apply hover transforms */
@media (hover: none) and (pointer: coarse) {
  .btn-primary,
  .btn-outline,
  .btn-secondary,
  .dynamic-clear-btn,
  .filter-type-btn,
  .desktop-icon,
  .wishlist-btn {
    -webkit-tap-highlight-color: rgba(10, 77, 140, 0.15);
  }
  .gebeya-product-card:hover,
  .gebeya-category-card:hover,
  .service-card:hover { transform: none; }
}

/* ==========================================================================
   34. iOS SPECIFIC FIX
   ========================================================================== */
@supports (-webkit-touch-callout: none) {
  .main-content { min-height: -webkit-fill-available; }
}

/* ==========================================================================
   35. ACCESSIBILITY — REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   36. PRINT STYLES
   ========================================================================== */
@media print {
  .nav-bar,
  .search-filter-section,
  #scrollToTop,
  .scroll-to-top,
  .product-actions,
  .quick-link,
  footer,
  .modal,
  .toast,
  .loading-overlay,
  .desktop-actions-container,
  .gebeya-connection-status,
  .mk-sidebar,
  .mk-mobile-filter-btn,
  .mk-sidebar-backdrop,
  .mk-chips,
  .mk-sortbar {
    display: none !important;
  }

  .main-content,
  .mk-main { padding: 0; margin: 0; width: 100%; }

  .section,
  .mk-cat-section,
  .mk-products-section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
    margin-bottom: 1rem;
    padding: 1rem;
  }

  .gebeya-products-grid,
  .mk-cat-grid,
  .service-cards-container { display: block; }

  .gebeya-product-card,
  .gebeya-category-card,
  .service-card {
    break-inside: avoid;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  body { font-size: 12pt; line-height: 1.4; opacity: 1 !important; }
  h1, h2, h3, h4, h5, h6 { color: black !important; }
  a { color: black !important; text-decoration: underline; }
  .btn-primary, .btn-secondary, .btn-outline { display: none !important; }
}

/* ==========================================================================
   37. TREE CHEVRONS — LOCKED DOWN (expanded state)
   The trees are always expanded; the arrow must always point down.
   ========================================================================== */
.mk-sidebar .cat-tree-node-toggle:not(.empty) i,
.mk-sidebar .tree-node-toggle:not(.empty) i {
  transform: rotate(0deg) !important;
  transition: transform 0.18s ease;
}

/* Kill any leftover hover rotation on the chevrons */
@media (hover: hover) and (pointer: fine) {
  .mk-sidebar .cat-tree-node:hover > .cat-tree-node-header .cat-tree-node-toggle:not(.empty) i,
  .mk-sidebar .tree-node:hover > .tree-node-header .tree-node-toggle:not(.empty) i {
    transform: rotate(0deg) !important;
  }
}.nav-bar {
  z-index: 1;
}