@font-face {
  font-family: 'Cairo';
  src: url('fonts/cairo-arabic-wght-normal.woff2') format('woff2');
  font-weight: 200 1000;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
  font-display: swap;
}
@font-face {
  font-family: 'Cairo';
  src: url('fonts/cairo-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 1000;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

:root {
  /* ألوان اللوغو ديال Business Pro */
  --navy: #130F3F;
  --ocean: #003859;
  --teal: #0E8778;
  --teal-bright: #0A968A;
  --teal-light: #7FD9CD;
  --teal-soft: #E6F4F2;
  --teal-ink: #0A6A5F;
  --navy-soft: #ECEBF6;
  --red: #C0392B;
  --bg: #FFFFFF;
  --soft: #F5F5F3;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --muted: #666;
  --border: #ECECEC;
  --shadow: 0 1px 3px rgba(0,0,0,.04);
  --radius: 16px;
  --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
  overscroll-behavior-y: contain;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ───── Top bar ───── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--ocean) 55%, var(--teal) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 22px;
  background: #FFFFFF; border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.18); overflow: hidden;
}
.brand h1 { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.3; }
.brand p { margin: 0; font-size: 11px; color: var(--teal-light); font-weight: 600; letter-spacing: .3px; }
.mode-pill {
  flex: none; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25);
  white-space: nowrap;
}
.mode-pill.pro { background: #FFFFFF; border-color: #FFFFFF; color: var(--navy); }

/* ───── Views ───── */
main { max-width: 1100px; margin: 0 auto; padding: 14px 16px 24px; }
.view { display: none; }
.view.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view-title { font-size: 20px; margin: 4px 0 2px; font-weight: 800; color: var(--navy); }
.view-sub { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ───── Search ───── */
.search-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 14px;
  padding: 0 12px; margin-bottom: 12px; transition: border-color .15s;
}
.search-wrap:focus-within { border-color: var(--teal); }
.search-ico { font-size: 15px; opacity: .7; }
.search-wrap input {
  flex: 1; border: 0; outline: 0; background: transparent; padding: 12px 10px; min-width: 0;
  font-size: 15px; color: var(--text);
}
.search-wrap input::-webkit-search-cancel-button { display: none; }
.search-clear { font-size: 13px; color: var(--muted); padding: 6px; display: none; }
.search-wrap.has-text .search-clear { display: block; }

/* ───── Mode switch ───── */
.mode-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--soft); border-radius: 14px; margin-bottom: 12px;
}
.mode-switch button {
  padding: 9px 6px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted);
  transition: background .15s, color .15s;
}
.mode-switch button.active { background: var(--card); color: var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.mode-switch button[data-mode="pro"].active { background: var(--navy); color: #FFFFFF; }

/* ───── Categories ───── */
.cat-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none; scroll-snap-align: start; padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--card); border: 1.5px solid var(--border); font-size: 13px; font-weight: 700;
}
.cat-chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.stats { font-size: 12.5px; color: var(--muted); margin: 2px 2px 10px; }

/* ───── Grid ───── */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative; display: flex; flex-direction: column; text-align: right;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .12s;
}
.card:active { transform: scale(.98); }
.card-img { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.card-img .ph { font-size: 46px; }
.badge-new {
  position: absolute; top: 8px; right: 8px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; padding: 1px 8px; border-radius: 6px; letter-spacing: .5px;
}
.badge-off {
  position: absolute; bottom: 8px; right: 8px; background: var(--navy); color: #FFFFFF;
  font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 6px;
}
.fav-btn {
  position: absolute; top: 6px; left: 6px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px;
  background: rgba(255,255,255,.92); box-shadow: 0 1px 6px rgba(0,0,0,.12);
}
.card-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card-ref { font-size: 11px; color: var(--muted); font-weight: 600; direction: ltr; text-align: right; }
.card-name { font-size: 14.5px; font-weight: 800; line-height: 1.35; margin: 0; }
.card-desc {
  font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 800; color: var(--teal); font-size: 16px; white-space: nowrap; }
.price.pro { color: var(--navy); }
.price-old { font-size: 12px; color: #999; text-decoration: line-through; white-space: nowrap; }
.unavail { font-size: 11px; color: var(--red); font-weight: 700; }

.empty { grid-column: 1 / -1; text-align: center; padding: 40px 16px; color: var(--muted); }
.empty div { font-size: 42px; }

/* ───── Bottom nav ───── */
.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: var(--card); border-top: 1px solid var(--border); box-shadow: 0 -2px 14px rgba(0,0,0,.06);
}
.bottom-nav button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; color: var(--muted); gap: 0;
}
.bottom-nav button span { font-size: 20px; line-height: 1.2; filter: grayscale(1); opacity: .7; }
.bottom-nav button.active { color: var(--teal); }
.bottom-nav button.active span { filter: none; opacity: 1; }
.badge {
  position: absolute; top: 6px; left: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; line-height: 18px; font-style: normal;
}
.badge:empty { display: none; }

/* ───── Sheet (details) ───── */
.sheet { position: fixed; inset: 0; z-index: 50; visibility: hidden; }
.sheet.open { visibility: visible; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: absolute; inset: auto 0 0 0; max-height: 94vh; max-height: 94dvh;
  background: var(--bg); border-radius: 22px 22px 0 0; overflow: hidden;
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; max-width: 720px; margin: 0 auto;
}
.sheet.open .sheet-panel { transform: none; }
.sheet-close {
  position: absolute; top: 10px; left: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.95); box-shadow: 0 1px 6px rgba(0,0,0,.15); font-size: 15px;
}
.sheet-body { overflow-y: auto; padding-bottom: calc(20px + var(--safe-bottom)); overscroll-behavior: contain; }
.d-hero { background: #fff; display: flex; align-items: center; justify-content: center; height: 280px; position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.d-hero img { height: 100%; width: 100%; object-fit: contain; padding: 18px; }
.d-hero .ph { font-size: 90px; }
.d-main { padding: 16px; }
.d-ref { font-size: 12px; color: var(--muted); font-weight: 600; }
.d-name { font-size: 22px; font-weight: 800; margin: 2px 0 0; line-height: 1.3; }
.d-en { font-size: 13px; color: var(--muted); direction: ltr; text-align: right; margin: 0 0 8px; }
.d-short { margin: 0 0 12px; }
.price-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.price-row + .price-row { border-top: 1px dashed var(--border); }
.price-row .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.price-row .val { font-weight: 800; font-size: 17px; white-space: nowrap; }
.price-row.client .val { color: var(--teal); }
.price-row.pro .val { color: var(--navy); }
.price-row.profit .val { color: var(--teal-bright); font-size: 15px; }
.lock-hint { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; padding-top: 6px; }
.lock-hint button { color: var(--navy); font-weight: 800; text-decoration: underline; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.actions .wide { grid-column: 1 / -1; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 14px; border-radius: 12px; font-weight: 800; font-size: 14px;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-gold { background: var(--navy); color: #FFFFFF; }
.btn-wa { background: #25D366; color: #fff; }
.btn-outline { border: 1.5px solid var(--teal); color: var(--teal); background: var(--card); width: 100%; }
.btn-ghost { background: var(--soft); color: var(--text); }
.section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.section h4 { margin: 0 0 6px; font-size: 15px; color: var(--navy); }
.section ul { margin: 0; padding: 0 18px 0 0; }
.section li { margin: 2px 0; }
.section p { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--teal-soft); color: var(--teal-ink); padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.tag.gold { background: var(--navy-soft); color: var(--navy); }
.related { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.related::-webkit-scrollbar { display: none; }
.rel-card { flex: none; width: 120px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-align: right; }
.rel-card .card-img { aspect-ratio: 1; }
.rel-card .card-img img { padding: 6px; }
.rel-card .ph { font-size: 32px; }
.rel-card div.t { padding: 6px 8px; font-size: 12px; font-weight: 700; line-height: 1.35; }
.rel-card div.t b { display: block; color: var(--teal); font-size: 12.5px; }
.disclaimer { font-size: 11.5px; color: var(--muted); text-align: center; margin: 8px 0 0; }

/* ───── Modal ───── */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); display: none; place-items: center; padding: 16px; }
.modal.open { display: grid; }
.modal-card { background: var(--card); border-radius: 20px; padding: 22px 18px 18px; width: 100%; max-width: 360px; text-align: center; animation: fade .2s ease; }
.modal-ico { font-size: 38px; }
.modal-card h3 { margin: 4px 0; font-size: 18px; }
.modal-card input {
  width: 100%; margin-top: 12px; padding: 12px; border-radius: 12px; border: 1.5px solid var(--border);
  text-align: center; font-size: 16px; outline: none; direction: ltr;
}
.modal-card input:focus { border-color: var(--teal); }
.error { color: var(--red); font-size: 13px; font-weight: 700; margin: 6px 0 0; visibility: hidden; }
.error.show { visibility: visible; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* ───── Calculator ───── */
.calc-results { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 12px; }
.calc-hit {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; text-align: right; font-weight: 700;
}
.calc-hit small { color: var(--muted); font-weight: 600; }
.calc-item {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px; margin-bottom: 8px;
}
.calc-item img, .calc-item .ph { width: 52px; height: 52px; object-fit: contain; flex: none; display: grid; place-items: center; font-size: 26px; }
.calc-item .info { flex: 1; min-width: 0; }
.calc-item .info b { display: block; font-size: 14px; line-height: 1.35; }
.calc-item .info small { color: var(--muted); font-size: 12px; }
.qty { display: flex; align-items: center; gap: 6px; flex: none; }
.qty button { width: 30px; height: 30px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-ink); font-weight: 800; font-size: 17px; }
.qty span { min-width: 20px; text-align: center; font-weight: 800; }
.calc-summary { background: var(--card); border: 2px solid var(--teal); border-radius: var(--radius); padding: 12px 14px; margin-top: 8px; }
.calc-summary .price-row .val { font-size: 16px; }
.calc-summary .total-profit .val { color: var(--teal-bright); font-size: 20px; }
.calc-empty { text-align: center; color: var(--muted); padding: 24px 0; }

/* ───── Account ───── */
.card-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.card-box h3 { margin: 0 0 6px; font-size: 16px; }
.level-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.level-table td { padding: 7px 4px; border-top: 1px solid var(--border); }
.level-table td:last-child { text-align: left; font-weight: 800; color: var(--navy); }
.level-table tr.me td { background: var(--teal-soft); }

/* ───── Toast ───── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px); left: 50%; z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #222; color: #fff; padding: 9px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 700;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* الأثمنة بالأرقام والحروف اللاتينية كيبانو من اليسار لليمين */
.price, .price-old, .price-row .val, .calc-hit small, .rel-card b, .level-table td:last-child, .badge-off, bdi { direction: ltr; unicode-bidi: isolate; }

/* ───── Footer (السيت) ───── */
.site-footer { margin: 28px -16px 0; padding: 22px 16px 10px; text-align: center; border-top: 1px solid var(--border); }
.site-footer .f-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; color: var(--navy); letter-spacing: .5px; }
.site-footer .f-brand img { width: 150px; height: auto; }
.site-footer p { margin: 6px 0; font-size: 13.5px; }
.f-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }

/* ───── شاشة كبيرة (الكمبيوتر) ───── */
@media (min-width: 900px) {
  body { padding-bottom: 0; padding-top: 0; }
  .topbar { padding-left: max(24px, calc((100vw - 1100px) / 2 + 16px)); padding-right: max(24px, calc((100vw - 1100px) / 2 + 16px)); }
  .brand h1 { font-size: 20px; }
  .brand p { font-size: 13px; }
  .bottom-nav {
    inset: auto auto 18px 50%; transform: translateX(-50%); width: 460px; height: 62px; padding: 0;
    border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.14);
  }
  main { padding-bottom: 100px; }
  .mode-switch { max-width: 420px; margin-inline: auto; }
  .search-wrap { max-width: 640px; margin-inline: auto; }
  .stats { text-align: center; }
  .sheet-panel { inset: 4vh 0 auto 0; max-height: 92vh; border-radius: 22px; }
  .sheet .sheet-panel { transform: translateY(30px); opacity: 0; transition: transform .2s, opacity .2s; }
  .sheet.open .sheet-panel { transform: none; opacity: 1; }
  .d-hero { height: 340px; }
  .toast { bottom: 96px; }
}

/* ───── خلفية بيضاء موحدة (بحال foreverliving.fr) ───── */
.card { transition: transform .12s, box-shadow .15s, border-color .15s; }
@media (hover: hover) {
  .card:hover { border-color: #D9D9D9; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
}
.card-img { border-bottom: 1px solid #F3F3F3; }
.fav-btn { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.sheet-panel { background: #fff; }
.d-hero { border-bottom: 1px solid var(--border); }
.section, .price-box, .card-box, .calc-item, .calc-hit { box-shadow: none; }
.cat-chip { background: #fff; }
.calc-empty, .empty { color: #888; }

/* ───── البانر (سلايدر) فـ الفوق ───── */
.hero { position: relative; overflow: hidden; border-radius: var(--radius); margin-bottom: 14px; aspect-ratio: 1600 / 879; max-width: 100%; background: transparent; touch-action: pan-y; }
.hero-track { display: flex; height: 100%; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.hero-slide { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.hero-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.65); box-shadow: 0 0 0 1px rgba(0,0,0,.15); transition: width .2s, background .2s; padding: 0; }
.hero-dots button.active { width: 22px; background: var(--teal); }
@media (prefers-reduced-motion: reduce) { .hero-track { transition: none; } }
@media (min-width: 900px) { .hero { max-width: 820px; margin-inline: auto; margin-bottom: 18px; } }

.brand-mark img { width: 84%; height: 84%; object-fit: contain; }
@media (min-width: 900px) { .brand-mark { width: 48px; height: 48px; } }

a.btn { text-decoration: none; }
