/* =========================================================
   ElectroStore — style.css
   1) المتغيرات  2) الأساسيات  3) الهيدر  4) Hero
   5) الأقسام    6) المنتجات   7) السلة   8) الفوتر
   9) الحركات    10) التجاوب
   ========================================================= */

/* ---------- 1) المتغيرات (غيّر الألوان من هنا فقط) ---------- */
:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;

  --navy: #0b1220;
  --navy-2: #121c33;

  --primary: #2563eb;
  --primary-2: #06b6d4;
  --accent: #f59e0b;
  --danger: #ef4444;

  --radius: 18px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, .10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .20);

  --ease: cubic-bezier(.22, .8, .3, 1);
  --font: 'Cairo', 'Segoe UI', Tahoma, system-ui, sans-serif;
}

/* ---------- 2) الأساسيات ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; font-size: 1rem; }
button { cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

[hidden] { display: none !important; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; right: 16px; z-index: 200;
  background: var(--primary); color: #fff; padding: 8px 16px; border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--primary-2); outline-offset: 2px; }

/* أزرار */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 700; transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 20px rgba(37, 99, 235, .35);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(37, 99, 235, .45); }

.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }

.btn-block { width: 100%; }

.btn-link {
  background: none; border: 0; color: var(--muted); text-decoration: underline;
  padding: 6px; align-self: center;
}
.btn-link:hover { color: var(--danger); }

.icon-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font-size: 1.15rem; transition: background .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: #eef3ff; transform: translateY(-1px); }

/* ---------- 3) الهيدر ---------- */
.announce {
  background: var(--navy); color: #cbd5e1; text-align: center;
  font-size: .85rem; padding: 8px 12px;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner { display: flex; align-items: center; gap: 16px; min-height: 72px; }

.menu-toggle { display: none; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; }
.logo-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
}
.logo-text b { color: var(--primary); }
.logo-light .logo-text { color: #fff; }
.logo-light .logo-text b { color: var(--primary-2); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .95rem; color: #334155;
  transition: background .2s, color .2s;
}
.main-nav a:hover { background: #eef3ff; color: var(--primary); }
.main-nav a.active { background: #e0eaff; color: var(--primary); }

.search {
  flex: 1; max-width: 360px; margin-inline-start: auto;
  display: flex; align-items: center;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 16px; color: var(--ink);
}
.search input:focus { outline: none; }
.search button { border: 0; background: transparent; padding: 0 14px; font-size: 1.05rem; }

.cart-count {
  position: absolute; top: -6px; left: -6px; min-width: 22px; height: 22px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: .75rem; font-weight: 800;
  border: 2px solid #fff;
}
.cart-count.bump { animation: bump .45s var(--ease); }

/* ---------- 4) القسم الرئيسي ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 400px at 85% 10%, rgba(37, 99, 235, .45), transparent 60%),
    radial-gradient(700px 400px at 10% 90%, rgba(6, 182, 212, .30), transparent 60%),
    linear-gradient(160deg, var(--navy), var(--navy-2));
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero-inner {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr;
  align-items: center; gap: 32px; padding-block: 72px;
}
.eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: 999px; font-size: .85rem; font-weight: 700;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #bae6fd;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.25; font-weight: 800; margin: 18px 0 14px; }
.grad {
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: #cbd5e1; font-size: 1.1rem; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; color: #94a3b8; font-size: .92rem; }

.hero-visual { position: relative; height: 420px; }
.float-card {
  position: absolute; width: 190px; padding: 14px; border-radius: 22px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg); animation: float 6s ease-in-out infinite;
}
.float-card.fc1 { width: 230px; top: 10%; right: 22%; z-index: 2; }
.float-card.fc2 { top: 0; left: 4%; animation-delay: -2s; }
.float-card.fc3 { bottom: 2%; left: 14%; animation-delay: -4s; }

/* ---------- 5) الأقسام ---------- */
.section { padding-block: 64px 8px; scroll-margin-top: 90px; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 4px; min-height: 1.7em; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.category-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 28px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #bfd3ff; }
.category-icon {
  width: 68px; height: 68px; display: grid; place-items: center; font-size: 2rem;
  border-radius: 20px; background: linear-gradient(135deg, #e0eaff, #d6f6fd);
  transition: transform .3s var(--ease);
}
.category-card:hover .category-icon { transform: scale(1.1) rotate(-4deg); }
.category-card h3 { font-size: 1.1rem; font-weight: 800; margin-top: 8px; }
.category-card span { color: var(--muted); font-size: .88rem; }

/* ---------- 6) المنتجات ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: .92rem; color: #334155; transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }

.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.sort select {
  padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
}

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }

.card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  animation: cardIn .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.card-media {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: linear-gradient(160deg, #f1f5ff, #eafafd);
}
.card-media svg, .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media svg, .card:hover .card-media img { transform: scale(1.07); }

.badge {
  position: absolute; top: 12px; right: 12px; z-index: 1; padding: 4px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; }
.card-cat { font-size: .8rem; font-weight: 700; color: var(--primary); }
.card-title { font-size: 1.05rem; font-weight: 800; line-height: 1.4; }
.card-desc { font-size: .88rem; color: var(--muted); line-height: 1.55; }

.rating { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.stars { position: relative; display: inline-block; color: #d5dbe6; letter-spacing: 2px; white-space: nowrap; line-height: 1; }
.stars::before {
  content: "★★★★★"; position: absolute; top: 0; inset-inline-start: 0;
  width: var(--rate, 0%); overflow: hidden; white-space: nowrap; color: #f5a524;
}

.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: auto; padding-top: 8px; }
.price { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.old-price { font-size: .9rem; color: #94a3b8; text-decoration: line-through; }

.add-btn { margin-top: 10px; width: 100%; padding: 11px 16px; }

.empty-state { text-align: center; padding: 56px 16px; }
.empty-icon { font-size: 3rem; margin-bottom: 8px; }
.empty-state h3 { font-size: 1.4rem; font-weight: 800; }
.empty-state p { color: var(--muted); margin: 6px 0 20px; }

/* ---------- 7) سلة المشتريات ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 150; background: rgba(8, 13, 25, .55);
  backdrop-filter: blur(2px); opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility 0s .3s;
}
.overlay.show { opacity: 1; visibility: visible; transition-delay: 0s; }

/* الواجهة RTL ثابتة، فالسلة تنزلق من اليسار (جهة أيقونة السلة) */
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 160;
  width: min(420px, 100%); display: flex; flex-direction: column;
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(-100%); visibility: hidden;
  transition: transform .4s var(--ease), visibility 0s .4s;
}
.drawer.open { transform: translateX(0); visibility: visible; transition-delay: 0s; }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.25rem; font-weight: 800; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }

.cart-list { display: flex; flex-direction: column; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); animation: cardIn .4s var(--ease) both; }
.cart-thumb { width: 72px; height: 72px; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #f1f5ff, #eafafd); }
.cart-thumb svg, .cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info h3 { font-size: .95rem; font-weight: 800; line-height: 1.4; }
.cart-price { display: block; font-size: .85rem; color: var(--muted); margin: 2px 0 8px; }
.cart-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.cart-side strong { font-size: .95rem; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 32px; height: 32px; border: 0; background: var(--bg); font-size: 1.1rem; font-weight: 700; transition: background .2s; }
.qty button:hover { background: #e0eaff; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }

.remove { border: 0; background: transparent; font-size: 1.05rem; padding: 4px; border-radius: 8px; opacity: .6; transition: opacity .2s, background .2s; }
.remove:hover { opacity: 1; background: #fee2e2; }

.cart-empty { text-align: center; padding: 64px 0; }
.cart-empty p { color: var(--muted); margin-bottom: 18px; }

.drawer-foot { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 22px; border-top: 1px solid var(--line); background: #fafcff; }
.total-row { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1.05rem; }
.total-row strong { font-size: 1.35rem; }
.note { text-align: center; font-size: .8rem; color: var(--muted); }

/* رسائل التنبيه */
.toast-zone { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); border-inline-start: 4px solid var(--primary-2);
  animation: toastIn .4s var(--ease) both;
}
.toast.out { animation: toastOut .3s ease forwards; }

/* ---------- 8) الفوتر ---------- */
.site-footer { margin-top: 80px; background: var(--navy); color: #cbd5e1; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 32px; padding-block: 48px 32px; }
.footer-brand p, .footer-note p { margin-top: 12px; font-size: .92rem; color: #94a3b8; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h4, .footer-note h4 { color: #fff; font-size: 1rem; margin-bottom: 4px; }
.footer-links a { color: #94a3b8; font-size: .92rem; transition: color .2s, transform .2s; width: fit-content; }
.footer-links a:hover { color: var(--primary-2); transform: translateX(-4px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); text-align: center; padding: 16px; font-size: .85rem; color: #64748b; }

/* ---------- 9) الحركات ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 10) التجاوب ---------- */
@media (max-width: 1000px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; row-gap: 10px; padding-block: 10px; }
  .menu-toggle { display: grid; }
  .logo { margin-inline-end: auto; }
  .header-actions { order: 3; }
  .search { order: 5; flex-basis: 100%; max-width: none; margin: 0; }

  .main-nav {
    display: none; order: 6; flex-basis: 100%; flex-direction: column; align-items: stretch;
    padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  }
  .main-nav.open { display: flex; animation: cardIn .3s var(--ease); }
  .main-nav a { padding: 12px 14px; }

  .hero-inner { grid-template-columns: 1fr; padding-block: 48px; text-align: center; }
  .hero p { margin-inline: auto; }
  .hero-actions, .hero-points { justify-content: center; }
  .hero-visual { height: 320px; max-width: 460px; margin-inline: auto; width: 100%; }
  .float-card { width: 140px; padding: 10px; border-radius: 18px; }
  .float-card.fc1 { width: 170px; right: 24%; }
}

@media (max-width: 640px) {
  .section { padding-block: 48px 4px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-products-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
  .card-body { padding: 12px; }
  .card-title { font-size: .95rem; }
  .card-desc { display: none; }
  .price { font-size: 1.05rem; }
  .add-btn { padding: 10px 8px; font-size: .9rem; }
  .category-grid { gap: 12px; }
  .category-card { padding: 20px 10px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .chip { white-space: nowrap; }
  .sort { justify-content: space-between; }
  .footer-inner { grid-template-columns: 1fr; }
  .toast-zone { left: 16px; right: 16px; bottom: 16px; }
}

/* تقسيم المنتجات حسب الأقسام */




/* ==========================================
   ElectroStore — Mobile Responsive Upgrade
   ========================================== */

/* منع خروج العناصر خارج الشاشة */
html {
  width: 100%;
  overflow-x: clip;
}

body {
  min-width: 0;
  overflow-x: clip;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
}

.product-grid.category-view {
  display: block;
  width: 100%;
}

.product-category-section {
  display: block;
  width: 100%;
  min-width: 0;
  margin-bottom: 40px;
}

.category-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
  min-width: 0;
}

/* شاشات اللابتوب الصغيرة والتابلت */
@media (max-width: 1000px) {
  .category-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-inner {
    gap: 20px;
  }

  .hero-visual {
    min-width: 0;
  }
}

/* التابلت والموبايل */
@media (max-width: 900px) {
  .header-inner {
    gap: 10px;
  }

  .logo {
    font-size: 1.15rem;
    gap: 8px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 42px;
    gap: 24px;
  }

  .hero-visual {
    height: 280px;
    max-width: 400px;
  }

  .section {
    scroll-margin-top: 130px;
  }
}

/* الموبايل */
@media (max-width: 640px) {
  .container {
    width: calc(100% - 24px);
  }

  /* الشريط العلوي */
  .announce {
    padding: 7px 10px;
    font-size: 0.75rem;
    line-height: 1.6;
  }

  /* الهيدر */
  .header-inner {
    min-height: auto;
    padding-block: 10px;
    column-gap: 8px;
    row-gap: 10px;
  }

  .logo {
    font-size: 1.08rem;
    gap: 7px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .search {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    border-radius: 12px;
  }

  .search input {
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  .main-nav {
    gap: 4px;
  }

  .main-nav a {
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  /* القسم الرئيسي */
  .hero-inner {
    padding-block: 36px 24px;
    gap: 18px;
  }

  .eyebrow {
    padding: 5px 12px;
    font-size: 0.76rem;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.35rem);
    line-height: 1.35;
    margin: 14px 0 10px;
  }

  .hero p {
    font-size: 0.92rem;
    line-height: 1.8;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 46px;
  }

  .hero-points {
    gap: 8px 14px;
    margin-top: 18px;
    font-size: 0.8rem;
  }

  .hero-visual {
    height: 230px;
    max-width: 340px;
  }

  .float-card {
    width: 120px;
    padding: 9px;
    border-radius: 14px;
  }

  .float-card.fc1 {
    width: 145px;
    right: 22%;
    top: 8%;
  }

  .float-card.fc2 {
    left: 2%;
    top: 2%;
  }

  .float-card.fc3 {
    left: 8%;
    bottom: 0;
  }

  /* عناوين الأقسام */
  .section {
    padding-block: 36px 4px;
    scroll-margin-top: 120px;
  }

  .section-head {
    margin-bottom: 22px;
  }

  .section-head h2 {
    font-size: 1.45rem;
    line-height: 1.5;
  }

  .section-head p {
    font-size: 0.86rem;
  }

  /* الأقسام */
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .category-card {
    padding: 17px 8px;
    border-radius: 15px;
    gap: 5px;
  }

  .category-icon {
    width: 54px;
    height: 54px;
    border-radius: 15px;
    font-size: 1.65rem;
  }

  .category-card h3 {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .category-card span {
    font-size: 0.76rem;
  }

  /* أدوات تصفية المنتجات */
  .toolbar {
    gap: 12px;
    margin-bottom: 18px;
  }

  .chips {
    gap: 7px;
    max-width: 100%;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }

  .chip {
    flex-shrink: 0;
    padding: 8px 13px;
    font-size: 0.82rem;
  }

  .sort {
    gap: 10px;
    font-size: 0.84rem;
  }

  .sort select {
    min-width: 0;
    max-width: 65%;
    padding: 9px 10px;
    font-size: 0.86rem;
  }

  /* المنتجات: عمودان متساويان */
  .product-grid,
  .category-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-category-section {
    margin-bottom: 30px;
  }

  .product-category-heading {
    gap: 8px;
    margin-bottom: 13px;
  }

  .product-category-heading h2 {
    font-size: 1.08rem;
    line-height: 1.5;
  }

  /* كارت المنتج */
  .card {
    min-width: 0;
    border-radius: 14px;
    animation-duration: 0.3s;
  }

  .card-media {
    aspect-ratio: 1 / 1;
  }

  .card-body {
    padding: 10px;
    gap: 5px;
  }

  .card-cat {
    font-size: 0.72rem;
  }

  .card-title {
    font-size: 0.88rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }

  .card-desc {
    display: none;
  }

  .badge {
    top: 7px;
    right: 7px;
    padding: 3px 7px;
    font-size: 0.67rem;
  }

  .rating {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.73rem;
  }

  .stars {
    letter-spacing: 1px;
  }

  .price-row {
    gap: 3px 7px;
    padding-top: 6px;
  }

  .price {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .old-price {
    font-size: 0.76rem;
  }

  .add-btn {
    min-height: 40px;
    margin-top: 8px;
    padding: 8px 5px;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.5;
  }

  /* السلة */
  .drawer {
    width: min(100%, 420px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .drawer-head {
    padding: 14px 16px;
  }

  .drawer-body {
    padding-inline: 14px;
  }

  .cart-item {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 13px 0;
  }

  .cart-thumb {
    width: 58px;
    height: 58px;
    border-radius: 11px;
  }

  .cart-info h3 {
    font-size: 0.84rem;
    overflow-wrap: anywhere;
  }

  .cart-price {
    font-size: 0.77rem;
  }

  .cart-side strong {
    font-size: 0.82rem;
  }

  .qty button {
    width: 28px;
    height: 30px;
  }

  .qty span {
    min-width: 25px;
    font-size: 0.85rem;
  }

  .drawer-foot {
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .total-row {
    font-size: 0.95rem;
  }

  .total-row strong {
    font-size: 1.15rem;
  }

  /* التنبيهات */
  .toast-zone {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .toast {
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
  }

  /* الفوتر */
  .site-footer {
    margin-top: 48px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-block: 32px 24px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    padding: 14px 10px;
    font-size: 0.77rem;
  }

  /* تقليل الحركات على الموبايل */
  .card:hover,
  .category-card:hover,
  .btn:hover {
    transform: none;
  }
}

/* الموبايلات الصغيرة جدًا */
@media (max-width: 360px) {
  .container {
    width: calc(100% - 18px);
  }

  .product-grid,
  .category-products-grid {
    gap: 8px;
  }

  .card-body {
    padding: 8px;
  }

  .card-title {
    font-size: 0.82rem;
  }

  .price {
    font-size: 0.92rem;
  }

  .add-btn {
    font-size: 0.73rem;
  }

  .logo {
    font-size: 0.98rem;
  }
}

/* احترام إعداد تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .card,
  .reveal,
  .float-card {
    animation: none !important;
    transition: none !important;
  }
}
