/* هوية الصابونجي: مأخوذة من ألوان اللوجو. التفاصيل والقواعد في DESIGN.md */
:root {
  --brand-900: #08474b;  /* أغمق بترولي: الشريط العلوي والفوتر */
  --brand-800: #0b5c61;  /* البترولي الأساسي: الأزرار والروابط والبانر */
  --brand-700: #0e7c82;  /* أفتح شوية: الهوفر وحلقة التركيز */
  --brand-100: #dff1f0;  /* خلفية فاتحة للتحديد والهوفر */
  --sun: #ffd21f;        /* أصفر اللوجو: تمييز، والكلام عليه غامق دايمًا */
  --sun-100: #fff5c8;
  --amber: #fcbf12;
  --bubble: #33bfc2;     /* تيل الفقاعات: زينة بس، مش للكلام */
  --bg: #fffdf5;         /* خلفية الصفحة كريمي */
  --card: #f5f1e4;
  --line: #e4e0d3;
  --ink: #0b3b3e;
  --muted: #4e6a68;
  --red: #d32f2f;
  --radius: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; accent-color: var(--brand-800); scrollbar-color: var(--brand-700) var(--card); }
::selection { background: var(--sun); color: var(--ink); }
input, textarea { caret-color: var(--brand-800); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Montserrat, Cairo, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 15px;
}
[dir="rtl"] body { font-family: Cairo, Montserrat, "Segoe UI", Tahoma, Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand-700); outline-offset: 2px; }
.wrap { max-width: 1192px; margin-inline: auto; padding-inline: clamp(12px, 4vw, 16px); }

/* top bar */
.topbar { background: var(--brand-900); color: #fff; font-size: 14px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; height: 40px; gap: 12px; }
.deliver { display: flex; align-items: center; gap: 6px; white-space: nowrap; min-width: 0; }
.deliver b { text-decoration: underline; font-weight: 700; }
.topbar-end { display: flex; gap: 22px; align-items: center; white-space: nowrap; }
.topbar-end a:hover { text-decoration: underline; }

/* header */
.header { background: var(--bg); position: relative; z-index: 20; }
.header-in { display: flex; align-items: center; gap: 32px; padding-block: 14px 10px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { width: auto; height: 46px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; color: var(--brand-800); }
.logo-text strong { font-size: 18px; font-weight: 800; white-space: nowrap; }
.logo-text small { font-size: 13px; color: var(--brand-700); font-weight: 600; }
.search {
  flex: 0 1 500px; display: flex; align-items: center; gap: 10px; margin: 0;
  height: 44px; padding-inline: 12px; border: 1px solid var(--line); border-radius: 22px; color: var(--muted);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search { background: #fff; }
.search:focus-within { border-color: var(--brand-700); }
.header-icons { display: flex; gap: 20px; margin-inline-start: auto; color: var(--brand-900); }
.icon-btn { position: relative; display: flex; }
.badge {
  position: absolute; top: -6px; inset-inline-end: -8px; min-width: 18px; height: 18px; padding-inline: 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sun); color: var(--ink); border-radius: 9px; font-size: 11px; font-weight: 800;
}
.badge.inline { position: static; display: inline-flex; }

/* page head */
.main { padding-block: 16px 48px; min-height: 60vh; }
.crumbs { display: flex; flex-wrap: wrap; gap: 5px; color: var(--muted); }
.crumbs a { color: var(--brand-800); font-weight: 500; }
h1 { font-size: 30px; font-weight: 800; margin: 16px 0 12px; line-height: 1.3; }
.tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; padding-block: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; font-size: 17px; color: var(--ink); padding-bottom: 3px; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--brand-700); }
.tabs a.on { color: var(--brand-800); font-weight: 700; border-color: var(--brand-800); }
.chips { display: flex; gap: 8px; padding-block: 24px 28px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { white-space: nowrap; height: 48px; padding-inline: 13px; border-radius: 24px; background: var(--card); font-size: 17px; color: var(--ink); display: flex; align-items: center; }
.chips a:hover { background: var(--brand-100); }
.chips a.on { background: var(--brand-800); color: #fff; font-weight: 600; }

.toolbar { display: flex; align-items: center; gap: 16px; margin-block: 8px 24px; }
.filter-btn { display: flex; align-items: center; gap: 8px; color: var(--brand-800); font-weight: 600; }
.result-count { color: var(--muted); font-size: 14px; }
.sort { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; font-size: 14px; }
.sort select { border: 0; background: none; color: var(--brand-800); font-weight: 700; font-size: 16px; cursor: pointer; }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.card {
  /* كارت أبيض بحد رفيع على خلفية الصفحة الكريمي، من غير ظل */
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 12px; min-height: 303px; min-width: 0;
}
.card-media { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.card-media a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.card-media img { max-width: 72%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card.out .card-media img { opacity: .4; }
.fav { position: absolute; top: 2px; inset-inline-end: 0; z-index: 1; color: #555; display: flex; }
.fav.on svg { fill: var(--red); stroke: var(--red); }
.add {
  position: absolute; bottom: 0; inset-inline-end: 0; width: 42px; height: 42px;
  border: 0; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center; background: var(--brand-800); transition: background .15s, transform .15s;
  box-shadow: 0 3px 8px rgba(11,59,62,.22);
}
.add svg { width: 20px; height: 20px; stroke-width: 2.2; }
.add:hover { background: var(--brand-700); transform: scale(1.06); }
.add:active { transform: scale(.94); }
.stepper {
  position: absolute; bottom: 0; inset-inline-end: 0; height: 42px; display: flex; align-items: center;
  background: var(--brand-800); color: #fff; border-radius: 21px; font-weight: 700;
}
.stepper button { width: 40px; height: 42px; color: #fff; font-size: 20px; line-height: 1; }
.stepper span { min-width: 22px; text-align: center; font-size: 15px; }
.sale { position: absolute; top: 2px; inset-inline-start: 0; z-index: 1; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.out-tag { position: absolute; bottom: 8px; inset-inline-end: 0; background: #555; color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 10px; }
.card-name {
  font-size: 15px; line-height: 22px; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-name:hover { color: var(--brand-700); }
.price { color: var(--brand-800); font-weight: 800; margin-top: 6px; font-size: 17px; }
.price del { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-inline-start: 6px; display: inline-block; }
.compare-check { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.compare-check input { accent-color: var(--brand-800); margin: 0; }
.empty { grid-column: 1 / -1; text-align: center; padding: 56px 16px; color: var(--muted); }
.more { display: flex; justify-content: center; margin-top: 32px; }
.loading { height: 240px; display: flex; align-items: center; justify-content: center; }
.loading::after { content: ""; width: 38px; height: 38px; border: 3px solid var(--brand-100); border-top-color: var(--brand-800); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::after { animation-duration: 3s; } }
.error-box { text-align: center; padding: 60px 16px; }

/* home */
/* البانر: شبكة ثابتة الترتيب في كل المقاسات عشان الجراكن تفضل جنب اللوجو.
   العنوان والشعار والزرار في عمود، والجراكن في العمود اللي جنبه، والتكوين كله في النص. */
.hero {
  /* بترولي ثابت من غير تدرج، عشان اللوجو والجراكن يفضلوا محور الاهتمام */
  --logo-w: 340px; --jc-main: 300px; --jc-small: 170px;
  position: relative; background: var(--brand-800); color: #fff; border-radius: 24px; margin-top: 6px; overflow: hidden;
  padding: clamp(20px, 4vw, 44px);
  display: grid; grid-template-columns: minmax(0, auto) minmax(0, auto); justify-content: center; align-items: center;
  grid-template-areas: "title imgs" "logo imgs" "cta imgs"; column-gap: clamp(16px, 4vw, 56px); row-gap: 14px;
}
.hero-text { display: contents; }
.hero h1 { grid-area: title; font-size: clamp(22px, 2.6vw + 8px, 36px); margin: 0; align-self: end; }
.hero-logo-btn { grid-area: logo; }
.hero-imgs { grid-area: imgs; display: flex; justify-content: flex-start; align-items: flex-end; min-width: 0; }
.hero-logo-btn { display: block; width: var(--logo-w); max-width: 100%; border-radius: 28px; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hero-logo-btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 6px; }
/* الشعار طبقتين بنفس المقاس: الشعار من غير الفرشة، والفرشة لوحدها فوقه عشان تلف */
.hero-logo-art { display: block; position: relative; filter: drop-shadow(0 10px 18px rgba(0,0,0,.22)); }
.hero-logo { display: block; width: 100%; height: auto; }
.hero-logo-brush { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 73.9% 21.8%; pointer-events: none; }
/* رغاوي الشعار: طبقة فوق الصفحة عشان الفقاعات تطلع برا البانر */
.foam-layer { position: fixed; inset: 0; z-index: 75; pointer-events: none; overflow: hidden; }
.foam-bubble { position: absolute; left: 0; top: 0; border-radius: 50%; border: 2px solid #36b9c2; background: radial-gradient(circle at 32% 28%, #fff 0 16%, rgba(255,255,255,.94) 17% 58%, #e3f3f4 78%, #c4e8eb 100%); box-shadow: inset -3px -4px 0 rgba(54,185,194,.22), 0 3px 8px rgba(0,0,0,.12); will-change: transform, opacity; }
/* جركن رئيسي كبير، والتاني أصغر بوضوح وراه. من غير حركة */
.hero-imgs img { flex: 0 1 auto; min-width: 0; width: auto; height: var(--jc-main); max-width: 100%; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0,0,0,.32)); }
.hero-imgs img:first-child { height: var(--jc-small); }
.hero-imgs img + img { margin-inline-start: -8%; }
.btn-sun { grid-area: cta; justify-self: start; align-self: start; display: inline-flex; align-items: center; justify-content: center; height: 50px; padding-inline: 36px; border-radius: 25px; background: var(--sun); color: var(--ink); font-weight: 800; font-size: 16px; box-shadow: 0 6px 16px rgba(4,30,32,.28); transition: background .15s, transform .15s; }
.btn-sun:hover { background: var(--amber); transform: translateY(-1px); }
.btn-sun:active { transform: translateY(1px); }
.btn-sun:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 1100px) { .hero { --logo-w: 290px; --jc-main: 260px; --jc-small: 150px; } }
@media (max-width: 900px) { .hero { --logo-w: 240px; --jc-main: 220px; --jc-small: 125px; } }
/* الموبايل: العنوان فوق، اللوجو والجراكن في صف واحد، والزرار تحتهم بعرض كامل */
@media (max-width: 600px) {
  .hero { --logo-w: 100%; --jc-main: 150px; --jc-small: 88px; grid-template-columns: 1fr 1fr; grid-template-areas: "title title" "logo imgs" "cta cta"; column-gap: 10px; border-radius: 20px; }
  .hero-imgs { justify-content: center; }
  .btn-sun { justify-self: stretch; height: 48px; }
}
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-block: 18px 4px; }
.perk { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 14px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.perk svg { flex-shrink: 0; color: var(--brand-800); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-block: 34px 16px; gap: 12px; }
.sec-head h2 { font-size: 23px; font-weight: 800; margin: 0; }
.sec-head a { color: var(--brand-800); font-weight: 600; white-space: nowrap; font-size: 14px; }
.sec-head a:hover { text-decoration: underline; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-tile { background: var(--card); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 124px; transition: .15s; }
.cat-tile:hover { background: var(--brand-100); }
.cat-tile b { font-size: 16px; display: block; }
.cat-tile small { color: var(--muted); }
.cat-tile img { width: 88px; height: 92px; object-fit: contain; mix-blend-mode: multiply; flex-shrink: 0; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 96px) / 5); gap: 24px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding-bottom: 8px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.brand-tile { background: var(--card); border-radius: 14px; padding: 16px 12px; text-align: center; font-weight: 700; color: var(--brand-800); }
.brand-tile:hover { background: var(--brand-100); }
.brand-tile small { display: block; color: var(--muted); font-weight: 500; }

/* buttons */
.btn-primary { background: var(--brand-800); color: #fff; font-weight: 700; height: 46px; padding-inline: 32px; border-radius: 23px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary:hover { background: var(--brand-900); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-primary.small { height: 38px; padding-inline: 20px; font-size: 14px; }
.btn-primary.block { width: 100%; }
.btn-outline { border: 1.5px solid var(--brand-800); color: var(--brand-800); font-weight: 700; height: 46px; padding-inline: 32px; border-radius: 23px; display: inline-flex; align-items: center; justify-content: center; }
.btn-outline:hover { background: var(--brand-100); }
.btn-whatsapp { background: #128c4b; color: #fff; font-weight: 700; height: 46px; padding-inline: 28px; border-radius: 23px; display: inline-flex; align-items: center; justify-content: center; }
.link-btn { color: var(--brand-800); text-decoration: underline; font-weight: 600; font-size: 14px; }

/* product page */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 18px; }
.pdp-media { background: var(--card); border-radius: 24px; display: flex; align-items: center; justify-content: center; height: 440px; padding: 30px; position: relative; }
.pdp-media img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pdp-info h1 { font-size: 26px; margin-top: 4px; }
.pdp-brand { color: var(--brand-700); font-weight: 600; }
.pdp-price { font-size: 26px; font-weight: 800; color: var(--brand-800); margin-block: 8px 20px; }
.pdp-price del { font-size: 16px; color: var(--muted); font-weight: 500; margin-inline-start: 10px; }
.pdp-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.pdp-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 23px; height: 46px; }
.pdp-qty button { width: 42px; height: 44px; color: var(--brand-800); font-size: 20px; font-weight: 700; }
.pdp-qty span { min-width: 30px; text-align: center; font-weight: 700; }
.pdp-meta { color: var(--muted); font-size: 14px; line-height: 1.9; }
.pdp-desc { line-height: 1.8; white-space: pre-line; margin-block: 14px; }

/* cart & checkout pages */
.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(14px, 3vw, 28px); align-items: start; margin-top: 16px; }
.panel { min-width: 0; background: var(--card); border-radius: var(--radius); padding: clamp(14px, 3vw, 20px); }
.panel h2 { font-size: 18px; margin: 0 0 14px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding-block: 5px; font-size: 14px; }
.sum-line.total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.sum-item { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.sum-item b { white-space: nowrap; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.field input, .field select, .field textarea { height: 44px; border: 1px solid var(--line); border-radius: 10px; padding-inline: 12px; font-weight: 400; background: #fff; width: 100%; }
.field textarea { height: 76px; padding-block: 8px; resize: vertical; }
.field .err { color: var(--red); font-weight: 500; font-size: 12.5px; }
.field .err:empty { display: none; }
.pay-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; margin-bottom: 8px; font-weight: 600; }
.pay-opt:has(input:checked) { border-color: var(--brand-800); background: var(--brand-100); }
.pay-opt input { accent-color: var(--brand-800); margin-top: 4px; }
.pay-opt small { display: block; font-weight: 400; color: var(--muted); white-space: pre-line; }
.form-error { background: #fdecec; color: #a11; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.done { text-align: center; max-width: 640px; margin: 24px auto; }
.done .check-mark { width: 68px; height: 68px; border-radius: 50%; background: var(--brand-100); color: var(--brand-800); display: inline-flex; align-items: center; justify-content: center; }
.order-code { font-size: 26px; font-weight: 800; letter-spacing: 2px; color: var(--brand-800); direction: ltr; display: block; margin-block: 8px 2px; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.track-form { max-width: 460px; margin: 16px auto; }
.timeline { list-style: none; padding: 0; margin: 12px 0 0; }
.timeline li { padding: 8px 0; padding-inline-start: 26px; position: relative; color: var(--muted); font-size: 14px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 13px; width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.timeline li.on { color: var(--ink); font-weight: 600; }
.timeline li.on::before { background: var(--brand-800); }
.timeline li.bad::before { background: var(--red); }
.info { max-width: 780px; line-height: 1.9; white-space: pre-line; }

/* footer */
.footer { background: var(--brand-900); color: #d7ecea; font-size: 14px; }
.footer-in { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 32px; padding-block: 44px 28px; }
.footer h3 { color: #fff; font-size: 16px; margin: 0 0 12px; }
.footer-in > div > a { display: block; padding-block: 4px; }
.footer-in > div > a:hover { text-decoration: underline; }
.foot-logo .logo-text, .foot-logo .logo-text small { color: #fff; }
.socials { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.socials a:hover { text-decoration: underline; }
.copyright { border-top: 1px solid rgba(255,255,255,.15); text-align: center; padding: 14px 16px; font-size: 13px; }

/* bottom nav (mobile) */
.bottom-nav { display: none; }

/* compare bar */
.compare-bar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 20px; background: #fff; padding: 10px 20px;
  border-radius: 28px; box-shadow: 0 6px 26px rgba(0,0,0,.2); white-space: nowrap;
}
.compare-bar > div { display: flex; align-items: center; gap: 12px; }

/* overlays */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100%); z-index: 50;
  background: #fff; display: flex; flex-direction: column; box-shadow: 0 0 30px rgba(0,0,0,.2);
}
.drawer.start { inset-inline-end: auto; inset-inline-start: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 19px; margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px; display: grid; gap: 10px; }
.close { font-size: 26px; line-height: 1; color: var(--muted); width: 32px; height: 32px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 64px; object-fit: contain; }
.line-name { font-size: 13.5px; line-height: 1.4; }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; border: 1px solid var(--line); border-radius: 15px; }
.qty button { width: 28px; height: 28px; color: var(--brand-800); font-weight: 700; font-size: 16px; }
.qty span { min-width: 20px; text-align: center; font-size: 13px; }
.line-price { color: var(--brand-800); font-weight: 700; font-size: 14px; white-space: nowrap; }
.total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 17px; }
.note { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.filter-group { margin-bottom: 22px; }
.filter-group h3 { font-size: 15px; margin: 0 0 10px; }
.brand-search { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding-inline: 10px; margin-bottom: 8px; }
.brand-scroll { max-height: 300px; overflow-y: auto; }
.check { display: flex; align-items: center; gap: 8px; padding-block: 5px; cursor: pointer; }
.check input { accent-color: var(--brand-800); width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.check small { color: var(--muted); margin-inline-start: auto; }
.price-range { display: flex; gap: 10px; }
.price-range input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding-inline: 10px; }
.cats-list h4 { margin: 14px 0 6px; color: var(--brand-800); }
.cats-list a { display: block; padding-block: 6px; }

.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.45); }
.modal-card { background: #fff; border-radius: 24px; padding: 24px; width: min(600px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; position: relative; }
.modal-card.wide { width: min(1000px, 100%); }
.modal-card h2 { text-align: center; font-size: 20px; margin: 0 0 18px; }
.modal-card .close { position: absolute; top: 12px; inset-inline-end: 12px; }
.area-list { display: grid; gap: 8px; margin-bottom: 18px; }
.area-list label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.area-list label:has(input:checked) { border-color: var(--brand-800); background: var(--brand-100); }
.area-list input { accent-color: var(--brand-800); margin: 0; }
.area-list small { color: var(--muted); margin-inline-start: auto; }
.center { display: flex; justify-content: center; }
.cmp-wrap { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; min-width: 150px; }
.cmp th:first-child { min-width: 90px; color: var(--muted); font-weight: 600; }
.cmp img { width: 100px; height: 100px; object-fit: contain; display: block; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 70;
  isolation: isolate; background: var(--brand-900); color: #fff; padding: 11px 22px; border-radius: 24px; font-size: 14px; max-width: calc(100% - 32px); text-align: center;
}
.notice-bubbles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.notice-bubbles i { position: absolute; bottom: calc(100% - 4px); left: var(--bubble-left, 12%); width: var(--bubble-size, 10px); aspect-ratio: 1; border: 1px solid var(--brand-700); border-radius: 50%; background: var(--brand-100); }
.notice-bubbles i:nth-child(2) { --bubble-left: 27%; --bubble-size: 6px; --bubble-delay: 100ms; }
.notice-bubbles i:nth-child(3) { --bubble-left: 60%; --bubble-size: 8px; --bubble-delay: 60ms; }
.notice-bubbles i:nth-child(4) { --bubble-left: 78%; --bubble-size: 13px; --bubble-delay: 150ms; }
.notice-bubbles i:nth-child(5) { --bubble-left: 91%; --bubble-size: 6px; --bubble-delay: 25ms; }
:is(#view, #modal) :is([role="alert"], .map-hint, .map-suggest, .field .err, .map-block .err):not(:empty)::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 6px;
  border: 1px solid currentColor; border-radius: 50%; box-shadow: 3px -3px 0 -1px currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .notice-bubbles i { animation: notice-float 850ms ease-out var(--bubble-delay, 0ms) both; }
  @keyframes notice-float {
    from { transform: translateY(7px) scale(.65); opacity: 0; }
    25% { opacity: 1; }
    to { transform: translateY(-23px) scale(1.08); opacity: 0; }
  }
}

/* responsive */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .row { grid-auto-columns: calc((100% - 72px) / 4); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .row { grid-auto-columns: calc((100% - 32px) / 3); gap: 16px; }
  .header-in { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; flex: 1 0 100%; }
  .footer-in { grid-template-columns: repeat(3, 1fr); gap: 24px 16px; }
  .foot-brand { grid-column: 1 / -1; }
  .pdp, .checkout { grid-template-columns: minmax(0, 1fr); }
  .pdp-media { height: 340px; }
}
@media (max-width: 640px) {
  body { padding-bottom: 62px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .row { grid-auto-columns: 46%; gap: 12px; }
  .card { min-height: 270px; padding: 10px; }
  .card-name { font-size: 14.5px; line-height: 21px; }
  .price { font-size: 16px; }
  .card-media { height: 124px; }
  h1 { font-size: 24px; }
  .perks { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { flex-direction: column-reverse; text-align: center; padding: 12px; }
  .tabs a, .chips a { font-size: 15px; }
  .chips { padding-block: 14px 18px; }
  .chips a { height: 40px; }
  .topbar { font-size: 12.5px; }
  .topbar-end { gap: 10px; }
  .topbar-end a[href="/page/contact"] { display: none; }
  .result-count { display: none; }
  .sort > span { display: none; }
  .logo img { height: 38px; }
  .logo-text strong { font-size: 15px; }
  .logo-text small { font-size: 12px; }
  .pdp-media { height: 280px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 35;
    background: #fff; border-top: 1px solid var(--line); height: 62px;
  }
  .bottom-nav > * { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--brand-800); }
  .bottom-nav .badge { top: 5px; inset-inline-end: calc(50% - 22px); }
  .compare-bar { bottom: 72px; width: calc(100% - 24px); justify-content: space-between; gap: 8px; padding: 8px 14px; font-size: 13px; }
  .toast { bottom: 76px; }
}
@media print {
  .topbar, .header, .footer, .bottom-nav, .compare-bar { display: none !important; }
}

/* ========== v2: motion, search, sizes, accounts, offers ========== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.word { display: inline-block; }
.fly-img { position: fixed; z-index: 80; object-fit: contain; pointer-events: none; }

/* instant search */
.search { position: relative; }
.suggest { position: absolute; top: calc(100% + 6px); inset-inline: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 34px rgba(0,0,0,.16); z-index: 30; max-height: 70vh; overflow-y: auto; padding: 6px; color: var(--ink); }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
.suggest a:hover, .suggest a.active { background: var(--brand-100); }
.sug-item img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.sug-item span { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sug-item b { color: var(--brand-800); white-space: nowrap; }
.sug-cat { font-weight: 700; color: var(--brand-800); }
.sug-all { justify-content: center; font-weight: 700; color: var(--brand-800); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.sug-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 14px; }
.search-note { margin: 0 0 6px; }
.chips-gap { height: 20px; }

/* home */
.cat-tile { position: relative; overflow: hidden; }
.cat-tile::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .25s; pointer-events: none; background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(11,92,97,.14), transparent 70%); }
.cat-tile:hover::before { opacity: 1; }
.cat-tile > * { position: relative; }
.marquee { display: flex; flex-wrap: wrap; gap: 10px; }
.marquee-track, .marquee-set { display: contents; }
.marquee-set[aria-hidden] { display: none; }
.marquee.is-running { overflow: hidden; flex-wrap: nowrap; direction: ltr; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee.is-running .marquee-track { display: flex; width: max-content; }
.marquee.is-running .marquee-set, .marquee.is-running .marquee-set[aria-hidden] { display: flex; gap: 10px; padding-inline-end: 10px; }
.brand-chip { background: var(--card); color: var(--brand-800); font-weight: 700; padding: 12px 22px; border-radius: 26px; white-space: nowrap; }
.brand-chip:hover { background: var(--brand-100); }
.reorder-strip { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--brand-100); border-radius: var(--radius); padding: 14px 18px; margin-top: 16px; flex-wrap: wrap; }
.reorder-imgs { display: flex; gap: 8px; margin-block: 8px; flex-wrap: wrap; }
.reorder-imgs img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }

/* bundles */
.bundle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.bundle { display: grid; grid-template-columns: 170px 1fr; gap: 14px; background: var(--card); border-radius: var(--radius); padding: 14px; }
.bundle-imgs { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.bundle-imgs img { width: 72px; height: 72px; object-fit: contain; mix-blend-mode: multiply; }
.bundle h3 { margin: 6px 0; font-size: 16px; }
.bundle ul { margin: 0 0 6px; padding-inline-start: 18px; font-size: 13px; line-height: 1.6; }
.bundle .btn-primary { margin-top: 8px; }
.sale.static { position: static; display: inline-block; }

/* cards */
.card-rating { font-size: 12px; margin-top: 3px; }
.card-rating small { color: var(--muted); }
.card-sizes { font-size: 12px; color: var(--brand-700); font-weight: 600; margin-top: 3px; }
.card-sizes:hover { text-decoration: underline; }
.stars i { font-style: normal; color: #cfd4d3; }
.stars i.on { color: #e8a700; }

/* product page */
.pdp-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pdp-thumbs button { width: 66px; height: 66px; background: var(--card); border-radius: 12px; border: 2px solid transparent; padding: 4px; }
.pdp-thumbs button.on { border-color: var(--brand-800); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pdp-rating { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 4px; }
.pdp-rating small { color: var(--muted); text-decoration: underline; }
.pdp-sizes { margin-bottom: 18px; }
.pdp-sizes > span { display: block; font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.pdp-sizes > div { display: flex; flex-wrap: wrap; gap: 8px; }
.size-chip { border: 1.5px solid var(--line); border-radius: 12px; padding: 7px 14px; text-align: center; font-weight: 700; font-size: 14px; }
.size-chip small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.size-chip:hover { border-color: var(--brand-700); }
.size-chip.on { border-color: var(--brand-800); background: var(--brand-100); }
.size-chip.off { opacity: .55; }
.pdp-desc { white-space: normal; }
.pdp-desc h2 { font-size: 16px; margin: 0 0 6px; }
.pdp-desc p { margin: 0 0 6px; }
.pdp-extra { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 12px; }
.pdp-compare { margin: 0; padding: 0; }
.notify-form { width: 100%; max-width: 360px; display: grid; gap: 4px; }
.review { border-bottom: 1px solid var(--line); padding-block: 10px; }
.review p { margin: 6px 0 0; line-height: 1.7; }
.review-form { margin-top: 14px; max-width: 520px; }
.review-form h3 { margin: 0 0 8px; font-size: 16px; }
.star-pick { display: inline-flex; gap: 2px; margin-bottom: 8px; }
.star-pick label { position: relative; cursor: pointer; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick span { font-size: 30px; color: #cfd4d3; }
.star-pick label:has(input:checked) span, .star-pick label:has(~ label input:checked) span { color: #e8a700; }
.star-pick input:focus-visible + span { outline: 2px solid var(--brand-700); }

/* cart */
.free-bar { padding: 10px 20px; background: var(--brand-100); }
.panel .free-bar { border-radius: 10px; margin-top: 10px; padding: 10px 12px; }
.free-text { font-size: 13px; font-weight: 600; color: var(--brand-900); margin-bottom: 6px; }
.free-track { height: 7px; background: #fff; border-radius: 4px; overflow: hidden; }
.free-track i { display: block; height: 100%; background: var(--brand-800); border-radius: 4px; transition: width .35s; }
.line-remove { display: block; font-size: 12px; color: var(--muted); text-decoration: underline; margin-top: 5px; }
.line-remove:hover { color: var(--red); }
.cart-extras { margin-top: 18px; }
.cart-extras h3 { font-size: 14.5px; margin: 0 0 6px; }
.extra { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 8px; align-items: center; padding-block: 6px; font-size: 12.5px; }
.extra img { width: 44px; height: 44px; object-fit: contain; }
.extra b { color: var(--brand-800); white-space: nowrap; }
.add.static { position: static; width: 34px; height: 34px; box-shadow: none; }
.add.static svg { width: 16px; height: 16px; }

/* checkout + account */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sum-line.off { color: var(--red); font-weight: 600; }
.coupon-box { margin-top: 12px; padding: 14px 16px; }
.coupon-box .field { margin-bottom: 6px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding-inline: 12px; background: #fff; }
.btn-outline.small { height: 40px; padding-inline: 18px; font-size: 14px; }
.coupon-box .err { color: var(--red); font-size: 12.5px; margin-top: 6px; }
.coupon-applied { margin-top: 8px; font-weight: 700; color: var(--brand-800); font-size: 14px; }
.checkout-title { margin-block: 0 14px; }
.login-hint { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.login-hint a { flex: 0 0 auto; min-height: 44px; padding-inline: 14px; text-decoration: none; white-space: nowrap; }
.login-hint span { flex: 1 1 120px; color: var(--ink); font-size: 14px; line-height: 1.55; }
.checkout-address { margin-block: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.checkout-address > summary { display: grid; gap: 8px; padding: 12px 14px; cursor: pointer; list-style: none; }
.checkout-address > summary::-webkit-details-marker { display: none; }
.checkout-address-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.checkout-address-heading::after { content: ""; width: 8px; height: 8px; border: solid var(--brand-800); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-inline-end: 3px; }
.checkout-address[open] .checkout-address-heading::after { transform: rotate(225deg); }
.checkout-address-edit { margin-inline-start: auto; color: var(--brand-800); font-size: 14px; font-weight: 700; }
.checkout-address-preview { display: grid; gap: 3px; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.checkout-address[open] :is(.checkout-address-edit, .checkout-address-preview) { display: none; }
.checkout-address-fields { padding: 0 14px 14px; }
.checkout-address-fields #cSummary { display: none; }
.auth-panel, .access-panel, .account-head { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: clamp(16px, 4vw, 28px); }
.track-form.auth-panel { max-width: 460px; }
.auth-panel h1, .access-panel h1 { margin: 0; }
.auth-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-block: 16px 20px; border-radius: 12px; background: var(--card); }
.auth-tabs a { display: grid; place-items: center; min-height: 44px; padding: 6px; border-radius: 9px; text-align: center; font-weight: 700; }
.auth-tabs a[aria-current="page"] { background: #fff; color: var(--brand-800); box-shadow: 0 1px 4px rgba(8,71,75,.12); }
.access-panel { display: grid; justify-items: center; gap: 12px; text-align: center; }
.access-panel p { max-width: 38ch; margin: 0; color: var(--muted); line-height: 1.7; }
.access-panel .btn-primary { margin-top: 4px; min-height: 44px; }
.access-icon { width: 44px; height: 44px; padding: 9px; border-radius: 12px; background: var(--brand-100); color: var(--brand-800); }
.account-head { margin-bottom: clamp(16px, 3vw, 24px); }
.account-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.account-title h1 { margin: 0; }
.account-title button { min-height: 44px; }
.account-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px 20px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.account-details dt { color: var(--muted); font-size: 13px; }
.account-details dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.account { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(14px, 3vw, 24px); align-items: start; }
.account h2 { font-size: 18px; margin: 0 0 12px; }
.order-card { margin-bottom: 12px; }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.order-status { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 12px; background: #fff3dc; color: #b26a00; white-space: nowrap; }
.order-status.delivered { background: var(--brand-100); color: var(--brand-800); }
.order-status.cancelled { background: #eee; color: #555; }
.order-card .note { margin-block: 6px; }
.addr { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.addr small { color: var(--muted); }
.address-form { margin-top: 14px; }
.account-add-address { margin-top: 10px; }
.loading.small { height: 70px; }

/* floating whatsapp */
.wa-float { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 32; width: 56px; height: 56px; border-radius: 50%; background: #128c4b; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: transform .15s; }
.wa-float:hover { transform: scale(1.08); }

@media (max-width: 900px) {
  .account { grid-template-columns: 1fr; }
  .bundle-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* أول منتج يبان بدري: رأس الصفحة أصغر، والمقارنة في صفحة المنتج */
  .compare-check:not(.pdp-compare) { display: none; }
  .card { min-height: 0; }
  .main { padding-block: 8px 32px; }
  .crumbs { display: none; }
  .main > .tabs { display: none; }
  h1 { font-size: 21px; margin: 6px 0 2px; }
  .chips { padding-block: 8px 10px; }
  .chips a { height: 36px; font-size: 14px; }
  .chips-gap { height: 6px; }
  .toolbar { margin-block: 2px 12px; }
  .header-in { padding-block: 8px 6px; gap: 8px; }
  .header-icons { gap: 14px; }
  .search { height: 40px; }
  .topbar-in { height: 34px; }
  .bundle { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .wa-float { bottom: 74px; inset-inline-start: 14px; width: 50px; height: 50px; }
}

/* ========== v3: feature band, map, order tracking ========== */
html, body { overflow-x: clip; }
.feature-band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: var(--sun-100); color: var(--ink);
  margin-block: 18px 4px; margin-inline: calc(-1 * max(16px, (100vw - 1192px) / 2 + 16px));
  padding: 18px max(16px, (100vw - 1192px) / 2 + 16px);
}
/* شريط مضغوط: الأيقونة جنب الكلام بدل ما تكون فوقه */
.feature { display: flex; align-items: center; justify-content: center; gap: 10px; }
.feature svg { color: var(--brand-800); width: 34px; height: 34px; flex-shrink: 0; }
.feature p { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; }

.map-block { margin-bottom: 12px; }
.map-title { display: block; font-size: 13.5px; font-weight: 600; margin-block: 2px 6px; }
.map-search { display: flex; gap: 8px; margin-bottom: 8px; }
.map-search input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding-inline: 12px; background: #fff; }
.map-results { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; max-height: 190px; overflow-y: auto; padding: 4px; font-size: 13px; }
.map-results button { display: block; width: 100%; text-align: start; padding: 8px 10px; border-radius: 8px; line-height: 1.5; }
.map-results button:hover { background: var(--brand-100); }
.map-results .note { padding: 8px 10px; }
.map-wrap { position: relative; }
.map { height: 280px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); direction: ltr; position: relative; z-index: 0; background: var(--card); }
.map-small { height: 200px; margin-bottom: 12px; }
.map-locate { position: absolute; z-index: 500; bottom: 12px; inset-inline-end: 12px; height: 38px; padding-inline: 14px; border-radius: 10px; background: #fff; color: var(--brand-900); font-weight: 700; font-size: 13.5px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.map-hint { margin-top: 6px; }
.map-pin { background: none; border: 0; }
.map-pin span { display: block; position: relative; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; background: var(--brand-800); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.map-pin span::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }

.track-form { max-width: 620px; }
#trackOrders .order-card { background: var(--card); }
#trackResult { margin-top: 22px; scroll-margin-top: 110px; }
.merge-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.customer-order-actions { margin-top: 14px; display: grid; gap: 12px; }
.customer-order-actions summary { cursor: pointer; color: var(--brand-900); font-weight: 700; padding-block: 8px; }
.customer-order-actions > button { justify-self: start; }
.customer-order-actions form { margin-top: 10px; }
.track-eta { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--brand-100); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.track-eta b { color: var(--brand-900); }
.track-steps { list-style: none; margin: 0 0 8px; padding: 0; }
.track-steps li { display: flex; gap: 12px; padding-bottom: 18px; position: relative; color: var(--muted); }
.track-steps li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.track-steps li.done:not(:last-child)::before { background: var(--brand-800); }
.step-dot { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.track-steps li.done .step-dot { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.track-steps li.current .step-dot { border-color: var(--brand-800); color: var(--brand-800); box-shadow: 0 0 0 4px var(--brand-100); }
.track-steps li.bad .step-dot { background: var(--red); border-color: var(--red); color: #fff; }
.track-steps li.done, .track-steps li.current, .track-steps li.bad { color: var(--ink); }
.track-steps b { display: block; line-height: 1.5; }
.track-steps small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.track-live { margin-bottom: 12px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.order-actions :is(.btn-primary, .btn-outline) { min-height: 44px; }

@media (max-width: 900px) {
  .feature-band { grid-template-columns: repeat(2, 1fr); padding-block: 14px; gap: 12px; }
  .feature { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .feature-band { gap: 10px 8px; padding-block: 12px; }
  .feature { gap: 7px; }
  .feature p { font-size: 12.5px; line-height: 1.4; }
  .feature svg { width: 26px; height: 26px; }
  .map { height: 240px; }
  .map-small { height: 180px; }
}

/* ========== v4: category cards, delivery modal, home link, demo notice ========== */
.demo-banner { background: #fff3cd; color: #5c4400; text-align: center; font-size: 13.5px; font-weight: 600; padding: 7px 16px; line-height: 1.5; }
.home-back { padding-top: 12px; }
.home-back a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-800); font-weight: 700; font-size: 14px; }
.home-back a:hover { text-decoration: underline; }

.cat-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-tile { flex-direction: column; justify-content: flex-start; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 18px; min-height: 0; text-align: center; gap: 14px; transition: box-shadow .2s, transform .2s, color .2s; }
.cat-tile:hover { background: #fff; color: var(--brand-700); box-shadow: 0 10px 26px rgba(0,0,0,.1); transform: translateY(-3px); }
.cat-tile b { font-size: 16px; font-weight: 700; line-height: 1.5; }
.tile-media { display: block; position: relative; height: 170px; background: var(--card); border-radius: 10px; overflow: hidden; }
.tile-media img { position: absolute; width: auto; height: auto; max-width: 46%; max-height: 74%; object-fit: contain; mix-blend-mode: multiply; }
.tile-media img:nth-child(1) { left: 50%; bottom: 10%; transform: translateX(-50%); max-height: 84%; max-width: 52%; z-index: 2; }
.tile-media.n3 img:nth-child(2), .tile-media.n2 img:nth-child(2) { left: 5%; bottom: 8%; z-index: 1; max-height: 66%; max-width: 40%; }
.tile-media.n3 img:nth-child(3) { right: 5%; bottom: 8%; z-index: 1; max-height: 66%; max-width: 40%; }

.loc-form { display: grid; gap: 4px; }
.loc-form .field select { height: 50px; border-radius: 16px; }
.loc-confirm { min-width: 260px; height: 52px; border-radius: 26px; margin-block: 10px 6px; }
.loc-form .link-btn { font-size: 15px; margin-bottom: 10px; }
#locMapBox { margin-top: 6px; }

@media (max-width: 640px) {
  .home-back { padding-top: 8px; }
  .home-back a { font-size: 13px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { flex-direction: column; padding: 10px 10px 14px; gap: 10px; }
  .cat-tile b { font-size: 14px; }
  .tile-media { height: 118px; }
  .loc-confirm { min-width: 100%; }
}

@media (max-width: 640px) { .home-back { display: none; } }
@media (max-width: 380px) { .footer-in { grid-template-columns: 1fr 1fr; } }

/* ========== v5: العبور بس، رهن الجركن، منتجات الصابونجي ========== */
.fixed-city { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-height: 44px; padding: 10px 12px; border-radius: 10px; background: var(--brand-100); font-weight: 400; }
.fixed-city b { color: var(--brand-900); font-weight: 800; }
.fixed-city small { color: var(--muted); font-size: 12.5px; }
.saved-addrs { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.saved-addrs legend { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.saved-addr { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.saved-addr:has(input:checked) { border-color: var(--brand-800); background: var(--brand-100); }
.saved-addr input { margin-top: 4px; }
.saved-addr span { display: grid; gap: 2px; }
.saved-addr small { color: var(--muted); }
.card-jc { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--brand-900); background: var(--sun-100); border-radius: 8px; padding: 3px 8px; align-self: flex-start; }
.pdp-jc { margin: -8px 0 16px; font-size: 14px; font-weight: 600; color: var(--brand-900); background: var(--sun-100); border-radius: 10px; padding: 8px 12px; display: inline-block; }
.jc-panel { margin-bottom: 16px; }
.jc-hint { margin-bottom: 10px; font-size: 13.5px; color: var(--ink); }
.jc-panel .field select { max-width: 160px; }
.cat-tile.own { border-color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun); }
.tile-media.n1 img { left: 50%; bottom: 6%; transform: translateX(-50%); max-height: 88%; max-width: 70%; mix-blend-mode: normal; }

/* شريط "كل الأقسام / الرئيسية" والقايمة المنسدلة بتاعته (كمبيوتر وتابلت) */
.nav { display: flex; gap: 22px; padding-block: 2px 12px; overflow-x: auto; scrollbar-width: none; color: var(--brand-800); font-weight: 600; font-size: 14.5px; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .nav button { white-space: nowrap; display: flex; align-items: center; gap: 8px; min-height: 36px; }
.nav a:hover, .nav button:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 4px; }
.mega { position: absolute; inset-inline: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 16px 30px rgba(11,59,62,.14); padding-block: 22px; max-height: 70vh; overflow-y: auto; }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.mega-grid h4 { margin: 0 0 8px; font-size: 15px; color: var(--brand-800); }
.mega-grid a { display: block; padding-block: 3px; font-size: 14px; }
.mega-grid a:hover { color: var(--brand-700); text-decoration: underline; }
@media (max-width: 900px) { .mega-grid { grid-template-columns: repeat(2, 1fr); } }
/* على الموبايل الشريط اللي تحت فيه "الرئيسية" و"الأقسام"، فالشريط ده بيستخبى عشان ميتكررش */
@media (max-width: 640px) { .nav, .mega { display: none !important; } }

/* ========== نموذج العنوان المنظم (نافذة العنوان، صفحة الطلب، العناوين المحفوظة) ========== */
.addr-form { display: grid; gap: 8px; min-width: 0; }
.addr-form .field { margin-bottom: 10px; }
.addr-form .lbl { font-weight: 700; }
.addr-key:empty { display: none; }
.addr-key .field { margin-bottom: 0; }
.addr-form .map-block { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.addr-form .map-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.addr-form .map-search input, .addr-form .map-search button { min-height: 44px; }
.addr-form .map { height: clamp(244px, 37dvh, 360px); border-radius: 12px; }
.addr-form .map-expanded .map { height: clamp(350px, 66dvh, 640px); }
.picker-controls { position: absolute; top: 10px; right: 10px; z-index: 1; display: grid; gap: 6px; }
.picker-controls button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--brand-900); box-shadow: 0 2px 8px rgba(11,59,62,.14); }
.picker-controls button:hover { background: var(--brand-100); }
.picker-controls button:focus-visible { outline: 2px solid var(--brand-700); outline-offset: 2px; }
.picker-controls [aria-expanded="false"] .collapse-icon,
.picker-controls [aria-expanded="true"] .expand-icon { display: none; }
.addr-form .map .leaflet-bar { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 8px rgba(11,59,62,.14); }
.addr-form .map .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; color: var(--brand-900); }
.addr-form .map .leaflet-bar a.leaflet-disabled { color: var(--muted); }
.addr-form .map-hint { margin: 10px 0 0; color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .pin-drag-guide span { animation: pin-drag-guide 950ms ease-in-out 2; }
  @keyframes pin-drag-guide {
    0%, 100% { translate: 0 0; }
    35% { translate: 12px -8px; }
    65% { translate: -9px -4px; }
  }
}
.place-type { border: 0; padding: 0; margin: 4px 0 10px; min-inline-size: 0; }
.place-options { display: flex; flex-wrap: wrap; gap: 8px; }
.place-type legend { width: 100%; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; padding: 0; }
.type-opt { position: relative; cursor: pointer; flex: 1 1 96px; }
.type-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-opt span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 8px; text-align: center; border-radius: 22px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; }
.type-opt input:checked + span { border-color: var(--brand-800); background: var(--brand-100); color: var(--brand-900); }
.type-opt input:focus-visible + span { outline: 2px solid var(--brand-700); outline-offset: 2px; }
.addr-no-number { justify-self: start; margin: -4px 0 10px; font-size: 13.5px; }
.addr-more { border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin-bottom: 10px; background: #fff; }
.addr-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; font-size: 13.5px; color: var(--brand-800); }
.addr-more[open] { padding-bottom: 4px; }
.addr-codes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }
.addr-legacy { background: var(--sun-100); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; line-height: 1.7; }
.addr-legacy small { color: var(--muted); }
.addr-summary { background: var(--brand-100); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.7; color: var(--ink); }
.map-suggest { margin-top: 4px; color: var(--brand-900); font-weight: 600; }
.map-block .err { display: block; color: var(--red); font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.addr-actions { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.addr-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.addr-btns button { min-height: 38px; }
.legacy-tag { color: var(--muted); }
.modal-card.wide .loc-form { max-width: 640px; margin-inline: auto; }
@media (max-width: 640px) {
  .modal-card:has(.loc-form) { padding: 18px 14px; max-height: calc(100dvh - 20px); scrollbar-width: thin; }
  .addr-form .map-block { padding: 10px; }
  .addr-codes { grid-template-columns: 1fr 1fr; }
  .type-opt span { font-size: 13.5px; }
}
/* وصف المدخل: مقاس ثابت (مش بيكبر ولا يصغر بالسحب)، وزرار يقفله */
.addr-form textarea[data-addr] { resize: none; height: 72px; min-height: 72px; max-height: 72px; overflow-y: auto; }
.addr-form .close-entrance { justify-self: start; font-size: 12.5px; margin-top: -2px; }
@media (max-width: 360px) {
  .header-in, .header-icons { gap: 12px; }
  .logo { gap: 6px; }
  .account-details { grid-template-columns: minmax(0, 1fr); }
}
.near-building { display: grid; gap: 8px; margin-top: 8px; color: var(--ink); font-weight: 500; }
.near-building .btn-primary { justify-self: start; min-height: 44px; font-size: 14px; }
.delivery-schedule { margin-block: 10px; padding: 10px 14px; border-radius: 10px; background: var(--brand-100); color: var(--brand-900); font-weight: 700; }
/* عروض الأقسام: السعر الأصلي واضح والخصم يُحسب مرة واحدة في السلة. */
.category-offer-note { color: #0b5c61; background: #dff1f0; padding: 5px 8px; border-radius: 6px; font-size: 12px; line-height: 1.5; margin: 6px 0; }
