/* ==========================================================================
   style.css — Core layout, typography, header/footer, nav, global responsive
   Yesido Egypt · Architecture ref: iyesido.com
   ========================================================================== */

/* --- CRITICAL HOTFIX: overflow + icon bounds (must stay first) --- */
*, *::before, *::after {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  position: relative;
  min-width: 320px;
}

/* Force SVGs and Icons to never overflow */
svg, i, .icon, img {
  max-width: 100% !important;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

/* Restrain header / float icon sizes */
.header-actions svg,
.header-actions i,
.nav-toggle svg,
.nav-toggle i,
.float-btn svg,
.float-btn i,
.icon-btn i,
.icon-btn svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

/* Fix grid / layout widths — no 100vw overflow */
.row, .grid, .container, .promo-grid, .product-grid, .cat-grid,
.header-row, .mega-panel, .advan-grid, .why-grid, .footer-grid,
.promo-side, .promo-card, .section, main, header, footer {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Never use full viewport width tricks that cause swipe */
.promo-hero,
.promo-card,
.drawer,
.modal-panel {
  max-width: 100%;
}

:root {
  --red: #e30613;
  --red-soft: #fff1f2;
  --black: #111;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: #ececec;
  --bg: #fff;
  --soft: #f7f7f7;
  --max: 1280px;
  --font: 'Inter', 'Cairo', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  overflow-x: hidden;
}
html[dir='rtl'] body { font-family: 'Cairo', 'Inter', system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img, svg, video { max-width: 100%; height: auto; display: block; }

/* Logo exception: allow logo height without exploding */
.logo-svg, .logo img, .footer-logo {
  height: 64px;
  width: auto !important;
  max-height: 70px !important;
  max-width: 220px !important;
  display: block;
}

.container {
  width: min(100% - 1.5rem, var(--max, 1280px));
  margin-inline: auto;
  max-width: 100%;
  padding-inline: 0;
  overflow-x: clip;
}

/* Top bar — red only */
.topbar {
  background: #e30613 !important;
  color: #fff !important;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.7rem 1rem;
}

/* Header — white menu (no B2B login here) */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff !important;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.header-row {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.55rem 0;
}
.logo { display: flex; align-items: center; gap: 0.7rem; }
.logo img, .logo-svg {
  height: 64px;
  width: auto;
  display: block;
  filter: none;
}
.logo-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 0.6rem;
}
.footer-logo { height: 56px; width: auto; margin-bottom: 0.5rem; }

.nav-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  margin-inline-start: auto;
  font-size: 1.1rem;
}
.nav {
  display: none;
  gap: 0.15rem 1rem;
  margin-inline: auto;
  align-items: center;
  flex-wrap: wrap;
}
.nav > a, .nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.45rem 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: inherit;
}
.nav > a:hover, .nav-link:hover { color: var(--red); }
.nav-item { position: relative; }
.nav-item .fa-caret-down { font-size: 0.7rem; opacity: 0.7; }

.drop-panel {
  display: none;
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
  padding: 0.45rem;
  z-index: 80;
}
.drop-panel a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
}
.drop-panel a:hover { background: var(--soft); color: var(--red); }
.nav-item.has-drop:hover .drop-panel,
.nav-item.has-drop.open .drop-panel { display: block; }

.mega-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: min(960px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
  z-index: 90;
  padding: 1.1rem 1.15rem 0.9rem;
}
html[dir='rtl'] .mega-panel { transform: translateX(50%); }
.nav-item.has-mega:hover .mega-panel,
.nav-item.has-mega.open .mega-panel { display: block; }
.mega-panel[hidden] { display: none !important; }
.nav-item.has-mega:hover .mega-panel[hidden],
.nav-item.has-mega.open .mega-panel[hidden] { display: block !important; }
.mega-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 1.25rem;
}
.mega-col { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.mega-title {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: var(--black) !important;
  padding: 0.25rem 0 0.4rem !important;
  border-bottom: 2px solid var(--red);
  margin-bottom: 0.35rem;
  display: block;
}
.mega-col > a:not(.mega-title) {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.28rem 0;
  display: block;
}
.mega-col > a:not(.mega-title):hover { color: var(--red); }
.mega-foot {
  grid-column: 1 / -1;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.nav.is-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  order: 10;
  padding: 0.5rem 0 0.75rem;
  border-top: 1px solid var(--line);
  gap: 0.15rem;
}

/* Buttons core */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: .15s;
}
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-red:hover { filter: brightness(.95); }
.btn-outline { border-color: var(--line); color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--black); }
.btn-black { background: var(--black); color: #fff; border-color: var(--black); }
.btn-white {
  background: #fff;
  color: #1a1a1a;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; display: grid; place-items: center; position: relative;
}
.badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  min-width: 18px; height: 18px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px;
}
.badge:empty, .badge[data-count="0"] { display: none; }
.user-chip {
  font-size: 0.75rem; font-weight: 700; color: var(--muted);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Advantage strip */
.advan-strip { background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 0; }
.advan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem 1rem; }
.advan-item {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.82rem; font-weight: 600;
}
.advan-item img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }

/* Promo */
.promo-wrap { background: #fafafa; padding: 1.5rem 0 0.25rem; }
.promo-grid { display: grid; gap: 12px; }
.promo-hero {
  position: relative; border-radius: 16px; overflow: hidden; min-height: 280px;
  background-size: cover; background-position: 70% center; background-color: #f0e4d4;
  display: flex; align-items: center; padding: 2rem 1.75rem; color: #2c2218;
}
.promo-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(244,232,214,.97) 0%, rgba(244,232,214,.82) 28%, rgba(244,232,214,.25) 52%, rgba(244,232,214,0) 68%);
}
.promo-hero-copy { position: relative; z-index: 1; max-width: min(42%, 320px); }
.promo-hero-copy h1 {
  font-size: clamp(1.45rem, 2.8vw, 2rem); font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.2; margin-bottom: 0.7rem; color: #2c2218;
}
.promo-hero-copy p { font-size: 0.92rem; color: #5a4e44; margin-bottom: 1.25rem; line-height: 1.55; max-width: 260px; }
.promo-side { display: grid; gap: 12px; grid-template-rows: 1fr 1fr; }
.promo-card {
  position: relative; display: block; border-radius: 16px; overflow: hidden;
  min-height: 180px; height: 100%; background: #e8eaee;
}
.promo-card-img {
  position: absolute; inset: 0; width: 100%; height: 100% !important;
  object-fit: cover; z-index: 0; max-width: none !important;
}
.promo-card-copy {
  position: relative; z-index: 1; min-height: 180px; height: 100%;
  padding: 1.25rem 1.2rem; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: flex-start;
  background: linear-gradient(180deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,.28) 40%, rgba(255,255,255,.94) 100%);
}
.promo-card-copy h2 {
  font-size: clamp(1.15rem, 1.9vw, 1.4rem); font-weight: 800; margin-bottom: 0.35rem; color: #111;
}
.promo-card-copy p { font-size: 0.88rem; color: #333; margin-bottom: 0.85rem; }

/* Sections / why / dealer / footer */
.section { padding: 2.5rem 0; }
.section-soft { background: var(--soft); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.25rem; }
.section-head h2 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); font-weight: 800; letter-spacing: -.02em; }
.section-head p { width: 100%; color: var(--muted); font-size: 0.92rem; }
.section-head-center { justify-content: center; text-align: center; }
.section-head-center > div { width: 100%; }
.section-head-center p { margin-inline: auto; max-width: 520px; }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 0.75rem; text-align: center; cursor: pointer; width: 100%; color: inherit;
}
.cat-card:hover, .cat-card.active { border-color: var(--red); box-shadow: 0 6px 20px rgba(227,6,19,.08); }
.cat-icon {
  width: 56px; height: 56px; margin: 0 auto 0.65rem; border-radius: 50%;
  background: var(--soft); display: grid; place-items: center; font-size: 1.2rem;
}
.cat-card.active .cat-icon { background: var(--red); color: #fff; }
.cat-card h3 { font-size: 0.85rem; font-weight: 600; }
.cat-card p { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; }

.why-grid { display: grid; gap: 0.75rem; }
.why-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; }
.why-card i { color: var(--red); margin-bottom: 0.5rem; }
.why-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; }
.why-card p { font-size: 0.85rem; color: var(--muted); }

.dealer-cta {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1014 50%, #e30613 160%);
  color: #fff; padding: 3rem 0;
}
.dealer-inner h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 800; margin-bottom: 0.65rem; max-width: 640px; }
.dealer-inner > div > p { color: rgba(255,255,255,.75); margin-bottom: 1rem; max-width: 520px; }
.dealer-list { list-style: none; margin-bottom: 1.25rem; display: grid; gap: 0.45rem; }
.dealer-list li { position: relative; padding-inline-start: 1.2rem; font-size: 0.92rem; color: rgba(255,255,255,.88); }
.dealer-list li::before { content: '✓'; position: absolute; inset-inline-start: 0; font-weight: 800; }
.contact-box { max-width: 720px; margin-inline: auto; }
.contact-actions-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.footer { background: var(--soft); border-top: 1px solid var(--line); padding: 2rem 0 1.25rem; margin-top: 1rem; }
.footer-grid { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
.footer p, .footer a { font-size: 0.85rem; color: var(--muted); display: block; margin-bottom: 0.3rem; }
.footer a:hover { color: var(--red); }
.footer h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 0.55rem; color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 1rem; font-size: 0.75rem; color: var(--muted);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
}

.float-actions {
  position: fixed; inset-inline-end: 14px; bottom: 18px; z-index: 70;
  display: flex; flex-direction: column; gap: 0.45rem;
}
.float-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--red);
  box-shadow: 0 4px 16px rgba(0,0,0,.15); display: grid; place-items: center; cursor: pointer; font-size: 1.15rem;
}
#floatWa { background: #25d366; color: #fff; }

/* Responsive core */
@media (min-width: 769px) {
  .nav-toggle { display: none !important; }
  .nav { display: flex !important; flex-direction: row; align-items: center; width: auto; border: 0; padding: 0; order: 0; max-height: none; overflow: visible; }
  .mega-inner { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .advan-grid { grid-template-columns: repeat(5, 1fr); }
  .advan-item { flex-direction: column; text-align: center; font-size: 0.78rem; }
  .promo-grid {
    grid-template-columns: calc(68.5% - 6px) calc(31.5% - 6px);
    align-items: stretch; min-height: 380px; gap: 12px;
  }
  .promo-hero { min-height: 380px; height: 100%; padding: 2.5rem 2.25rem; }
  .promo-side { height: 100%; min-height: 380px; }
  .promo-card { min-height: 0; height: 100%; }
  .promo-card-copy { min-height: 100%; }
  .header-actions { margin-inline-start: 0; }
}
@media (min-width: 1024px) {
  .mega-inner { grid-template-columns: repeat(6, 1fr); }
  .mega-panel { inset-inline-start: 0; transform: none; width: min(1100px, calc(100vw - 3rem)); }
  html[dir='rtl'] .mega-panel { inset-inline-start: auto; inset-inline-end: 0; transform: none; }
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .promo-grid { min-height: 420px; }
  .promo-hero { min-height: 420px; }
  .promo-side { min-height: 420px; }
  .logo-svg { height: 70px !important; }
}
@media (max-width: 768px) {
  .header-row { min-height: 60px; gap: 0.5rem; padding: 0.4rem 0; justify-content: space-between; }
  .logo img, .logo-svg { max-height: 44px !important; height: 44px !important; width: auto !important; }
  .logo-tag { display: none; }
  .nav-toggle { display: grid; order: 1; margin-inline-start: 0; }
  .header-actions { order: 2; margin-inline-start: auto; gap: 0.35rem; }
  .nav {
    display: none; order: 10; width: 100%; flex-direction: column; align-items: stretch;
    padding: 0.5rem 0; border-top: 1px solid var(--line, #eee);
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .nav.is-open { display: flex !important; }
  .nav > a, .nav-link {
    font-size: 14px; line-height: 48px; width: 100%;
    border-bottom: 1px solid rgba(0,0,0,.08); justify-content: space-between;
  }
  .nav .mega-panel, .nav .drop-panel {
    position: static !important; transform: none !important; width: 100% !important;
    box-shadow: none !important; border: 0 !important; display: none !important;
    background: var(--soft, #f9f9f9); padding: 0.35rem 0 0.5rem 0.75rem !important;
  }
  .nav .nav-item.open .mega-panel,
  .nav .nav-item.open .drop-panel,
  .nav .nav-item.open .mega-panel[hidden] { display: block !important; }
  .nav .mega-inner { grid-template-columns: 1fr !important; }
  .promo-grid { grid-template-columns: 1fr; }
  .promo-hero { min-height: 240px; width: 100%; }
  .promo-side { min-height: 0; }
  .promo-card, .promo-card-copy { min-height: 200px; }
  .advan-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 1.75rem 0; }
  .drawer { width: 100% !important; }
}
@media (max-width: 480px) {
  .topbar { font-size: 0.7rem; }
  .why-grid, .footer-grid { grid-template-columns: 1fr; }
  .promo-hero-copy h1 { font-size: 1.15rem; }
  .contact-actions-row { flex-direction: column; }
  .contact-actions-row .btn { width: 100%; }
}


/* ==========================================================================
   MOBILE POLISH + MISSING IMAGE / OVERFLOW FIXES (append)
   ========================================================================== */

/* تحسين العرض في الموبايل */
@media (max-width: 768px) {
  /* تصغير حجم الخط في التوب بار */
  .topbar {
    font-size: 0.7rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* تحسين الـ Hero section */
  .promo-hero {
    min-height: 200px !important;
    padding: 1.25rem !important;
  }

  .promo-hero-copy {
    max-width: 70% !important;
  }

  .promo-hero-copy h1 {
    font-size: 1rem !important;
    line-height: 1.3;
  }

  .promo-hero-copy p {
    font-size: 0.75rem !important;
    margin-bottom: 0.75rem;
  }

  .promo-hero-copy .btn {
    font-size: 0.7rem !important;
    padding: 0.4rem 0.8rem !important;
  }

  /* تحسين الـ promo cards */
  .promo-card {
    min-height: 150px !important;
  }

  .promo-card-copy {
    min-height: 150px !important;
    padding: 0.75rem !important;
  }

  .promo-card-copy h2 {
    font-size: 0.9rem !important;
  }

  .promo-card-copy p {
    font-size: 0.7rem !important;
    margin-bottom: 0.5rem;
  }

  .promo-card-copy .btn {
    font-size: 0.65rem !important;
    padding: 0.3rem 0.6rem !important;
  }

  /* تحسين الـ categories */
  .cat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .cat-card {
    padding: 0.6rem 0.4rem !important;
  }

  .cat-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 0.9rem !important;
  }

  .cat-card h3 {
    font-size: 0.7rem !important;
  }

  .cat-card p {
    font-size: 0.6rem !important;
  }

  /* تحسين الـ product grid */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .product-card {
    border-radius: 10px !important;
  }

  .product-body {
    padding: 0.4rem !important;
  }

  .product-body h3 {
    font-size: 0.7rem !important;
  }

  .product-price {
    font-size: 0.75rem !important;
  }

  /* تحسين الـ toolbar */
  .toolbar {
    gap: 0.4rem !important;
  }

  .search input {
    padding: 0.5rem 1rem 0.5rem 2.2rem !important;
    font-size: 0.8rem !important;
  }

  .toolbar-meta {
    font-size: 0.7rem !important;
    flex-wrap: wrap;
  }

  #sortSelect {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
  }

  /* تحسين الـ chips */
  .chips {
    gap: 0.3rem !important;
    padding-bottom: 0.3rem !important;
  }

  .chip {
    font-size: 0.6rem !important;
    padding: 0.2rem 0.5rem !important;
  }

  /* تحسين الـ footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
  }

  .footer h4 {
    font-size: 0.65rem !important;
  }

  .footer p, .footer a {
    font-size: 0.7rem !important;
  }

  .footer-logo {
    height: 40px !important;
  }

  .footer-bottom {
    font-size: 0.6rem !important;
    flex-direction: column;
    text-align: center;
  }

  /* تحسين الـ why grid */
  .why-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .why-card {
    padding: 0.75rem !important;
  }

  .why-card h3 {
    font-size: 0.8rem !important;
  }

  .why-card p {
    font-size: 0.7rem !important;
  }

  /* تحسين الـ dealer CTA */
  .dealer-cta {
    padding: 2rem 0 !important;
  }

  .dealer-inner h2 {
    font-size: 1.1rem !important;
  }

  .dealer-inner p {
    font-size: 0.8rem !important;
  }

  .dealer-list li {
    font-size: 0.75rem !important;
  }

  /* تحسين الأزرار العائمة */
  .float-actions {
    bottom: 12px !important;
    right: 12px !important;
    gap: 0.3rem !important;
  }

  .float-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 0.9rem !important;
  }

  /* تحسين الـ header */
  .header-row {
    min-height: 50px !important;
    padding: 0.25rem 0 !important;
  }

  .logo img, .logo-svg {
    height: 32px !important;
    max-height: 32px !important;
  }

  .logo-tag {
    font-size: 0.6rem !important;
  }

  .nav-toggle {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.9rem !important;
  }

  .icon-btn {
    width: 34px !important;
    height: 34px !important;
  }

  .btn {
    font-size: 0.7rem !important;
    padding: 0.4rem 0.7rem !important;
  }

  .btn-sm {
    font-size: 0.6rem !important;
    padding: 0.3rem 0.5rem !important;
  }

  /* تحسين الـ stats */
  .hero-stats {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }

  .hero-stats div {
    font-size: 0.7rem !important;
  }

  .hero-stats strong {
    font-size: 0.9rem !important;
  }

  /* تحسين المودال */
  .modal-panel {
    padding: 1rem !important;
    margin: 0.5rem !important;
    max-height: 90vh !important;
  }

  .modal-panel h3 {
    font-size: 1rem !important;
  }

  .field input {
    padding: 0.5rem !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  /* تحسينات إضافية للشاشات الصغيرة جداً */
  .advan-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .advan-item {
    font-size: 0.6rem !important;
    gap: 0.3rem !important;
  }

  .advan-item img {
    width: 24px !important;
    height: 24px !important;
  }

  .product-grid {
    gap: 0.35rem !important;
  }

  .product-body {
    padding: 0.3rem !important;
  }

  .product-body h3 {
    font-size: 0.6rem !important;
    -webkit-line-clamp: 2 !important;
  }

  .product-price {
    font-size: 0.65rem !important;
  }

  .product-actions {
    flex-wrap: wrap !important;
    gap: 0.2rem !important;
  }

  .qty-input {
    width: 36px !important;
    padding: 0.2rem !important;
    font-size: 0.6rem !important;
  }

  .wish-btn {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.6rem !important;
  }

  .product-actions .btn {
    font-size: 0.55rem !important;
    padding: 0.2rem 0.4rem !important;
  }

  .product-cat {
    font-size: 0.5rem !important;
  }

  .product-sku {
    font-size: 0.5rem !important;
    padding: 0.1rem 0.3rem !important;
  }

  .contact-actions-row {
    flex-direction: column !important;
  }

  .contact-actions-row .btn {
    width: 100% !important;
    font-size: 0.7rem !important;
  }

  .auth-tabs button {
    font-size: 0.7rem !important;
    padding: 0.4rem !important;
  }
}

/* إصلاح مشكلة الصور المفقودة */
.promo-hero {
  background-color: #f0e4d4 !important;
  background-image: none !important;
}

.promo-hero::after {
  content: 'Yesido';
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 2rem;
  font-weight: 800;
  color: rgba(0,0,0,0.05);
  pointer-events: none;
}

.promo-card-img {
  object-fit: cover;
  background-color: #e8eaee;
}

.promo-card-img[src=""],
.promo-card-img:not([src]) {
  display: none;
}

.promo-card-img + .promo-card-copy {
  background: linear-gradient(180deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,.28) 40%, rgba(255,255,255,.94) 100%);
}

/* إصلاح التجاوزات — scoped (global * {max-width:100%} breaks fixed UI chrome) */
html, body, main, header, footer, section, article,
.container, .row, .grid, .promo-grid, .product-grid, .cat-grid,
.promo-hero, .promo-card, .promo-side, .header-row, .footer-grid,
.drawer, .modal-panel, .section {
  max-width: 100% !important;
}

img, svg, video, iframe {
  max-width: 100% !important;
  height: auto !important;
}

/* keep icon-sized SVGs at fixed 24px from header hotfix */
.header-actions svg,
.nav-toggle svg,
.float-btn svg,
.icon-btn svg {
  height: 24px !important;
  width: 24px !important;
}

.container {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

/* تحسين الأداء */
@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;
  }
}

/* Mobile touch UX */
* { -webkit-tap-highlight-color: transparent; }
.drawer-body, .nav.is-open { -webkit-overflow-scrolling: touch; }