/* ===========================================================
   متجر نوفمبر - الأنماط الرئيسية
   الألوان معرّفة مرة واحدة هنا (متغيرات CSS)
   =========================================================== */
@font-face { font-family: "El Messiri"; src: url("../assets/fonts/el-messiri-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "El Messiri"; src: url("../assets/fonts/el-messiri-arabic-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "El Messiri"; src: url("../assets/fonts/el-messiri-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF; }
@font-face { font-family: "Tajawal"; src: url("../assets/fonts/tajawal-arabic-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; src: url("../assets/fonts/tajawal-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; src: url("../assets/fonts/tajawal-arabic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; src: url("../assets/fonts/tajawal-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; src: url("../assets/fonts/tajawal-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Tajawal"; src: url("../assets/fonts/tajawal-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Tajawal"; src: url("../assets/fonts/tajawal-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../assets/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }

:root {
  /* لوحة الألوان */
  --turq: #369694;        /* تركواز الشعار */
  --turq-deep: #164E4C;   /* تركواز غامق */
  --white: #FBFCFA;       /* أبيض فاتح */
  --beige: #F3EADB;       /* بيج فاتح */
  --coral: #FF5757;       /* مرجاني */
  --ink: #1F2B2B;         /* نص */
  --ink-soft: #4A5757;    /* نص ثانوي (تباين AA على الأبيض والبيج) */

  --font-display: "El Messiri", "Tajawal", system-ui, sans-serif;
  --font-section: "IBM Plex Sans Arabic", "Tajawal", system-ui, sans-serif; /* أسماء الأقسام الرئيسية */
  --font-body: "Tajawal", system-ui, "Segoe UI", Tahoma, sans-serif;

  --s: 1;          /* مقياس الواجهة (يحسبه JavaScript) */
  --hdr: 76px;     /* ارتفاع الشريط العلوي */
  --travel: 0px;   /* مسافة قصة التمرير */
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 12px); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font-body); font-weight: 400; line-height: 1.7; text-align: center;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }

.skip-link { position: fixed; top: -60px; right: 12px; z-index: 200; background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* ---------- الشريط العلوي ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--white);
  transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.intro-on .site-header { opacity: 0; }
.site-header.solid { background: rgba(251, 252, 250, .98); color: var(--ink); box-shadow: 0 1px 0 rgba(22, 78, 76, .12); }
.header-inner {
  max-width: 1280px; margin: 0 auto; height: 76px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand-medal {
  width: 52px; height: 52px; border-radius: 50%; background: var(--white);
  display: grid; place-items: center; box-shadow: 0 0 0 2px rgba(54, 150, 148, .35);
}
.brand-medal img { width: 44px; height: auto; }
.brand-text { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.15; }
.brand-ar { font-family: var(--font-display); font-weight: 700; font-size: 21px; }
.brand-en { font-weight: 300; font-size: 11px; letter-spacing: .18em; direction: ltr; opacity: .9; }
.main-nav { display: flex; gap: 6px; }
.main-nav a {
  text-decoration: none; font-size: 15.5px; font-weight: 500; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  transition: background-color .25s ease;
}
.main-nav a:hover { background: rgba(54, 150, 148, .22); }
.main-nav .nav-wa { display: inline-flex; align-items: center; gap: 6px; background: var(--coral); color: var(--ink); font-weight: 700; margin-inline-start: 6px; }
.main-nav .nav-wa:hover { background: #ff6b6b; }
.nav-wa svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
/* الشاشات المتوسطة (آيباد): نص أقصر للزر حتى يتسع الشريط */
@media (min-width: 721px) and (max-width: 1240px) { .nav-wa-long { display: none; } .main-nav .nav-wa { margin-inline-start: 2px; } }

@media (max-width: 1060px) {
  .header-inner { padding: 0 16px; gap: 12px; }
  .main-nav { gap: 2px; }
  .main-nav a { font-size: 14px; padding: 7px 9px; }
  .brand-medal { width: 46px; height: 46px; } .brand-medal img { width: 39px; }
  .brand-ar { font-size: 19px; }
}
@media (max-height: 500px) and (min-width: 721px) {
  .header-inner { height: 60px; }
  .brand-medal { width: 40px; height: 40px; } .brand-medal img { width: 34px; }
  .scroll-cue { display: none; }
}
@media (max-width: 900px) and (min-height: 501px), (max-width: 720px) {
  .header-inner { height: auto; flex-direction: column; gap: 4px; padding: 10px 0 6px; }
  .brand { padding: 0 16px; }
  .brand-medal { width: 42px; height: 42px; } .brand-medal img { width: 36px; }
  .brand-ar { font-size: 18px; }
  .main-nav { width: 100%; overflow-x: auto; scrollbar-width: none; padding: 0 12px 4px; justify-content: safe center; -webkit-mask: linear-gradient(90deg, transparent, #000 28px); mask: linear-gradient(90deg, transparent, #000 28px); }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { font-size: 14px; padding: 6px 12px; }
}

/* ---------- المقدمة ---------- */
#intro {
  position: fixed; inset: 0; z-index: 100; background: var(--turq-deep);
  display: grid; place-items: center; overflow: hidden;
}
.no-intro #intro, .no-intro .skip-intro { display: none; }
.intro-logo {
  width: min(52vmin, 340px); aspect-ratio: 1; border-radius: 50%; background: var(--white);
  display: flex; align-items: center; justify-content: center; padding: 11%;
  box-shadow: 0 0 0 10px rgba(54, 150, 148, .35), 0 30px 80px rgba(0, 0, 0, .25);
  opacity: 0; transform: scale(.86);
}
.intro-logo img { width: 100%; height: auto; }
.bands { position: absolute; inset: 0; display: flex; pointer-events: none; }
.bands i { flex: 1; transform: translate3d(0, 101%, 0); will-change: transform; }
.bands i:nth-child(1), .bands i:nth-child(7) { background: var(--turq); }
.bands i:nth-child(2), .bands i:nth-child(6) { background: var(--beige); }
.bands i:nth-child(3), .bands i:nth-child(5) { background: var(--coral); }
.bands i:nth-child(4) { background: var(--white); }
.skip-intro {
  position: fixed; z-index: 101; bottom: max(20px, env(safe-area-inset-bottom)); left: 20px;
  font: 500 14px/1 var(--font-body); color: var(--white); background: rgba(251, 252, 250, .12);
  border: 1px solid rgba(251, 252, 250, .45); border-radius: 999px; padding: 12px 18px; cursor: pointer;
}
.skip-intro:hover { background: rgba(251, 252, 250, .22); }

/* ---------- قصة التمرير ---------- */
.story { position: relative; height: calc(100svh + var(--travel)); background: var(--turq-deep); }
.reduce .story { height: auto; }
.stage {
  position: sticky; top: 0; height: 100svh; min-height: 360px; overflow: hidden; z-index: 0; isolation: isolate;
  background: var(--turq-deep); color: var(--white);
}
.reduce .stage { position: relative; }
.plate {
  position: absolute; inset: -12% -4% -4%; will-change: transform; transform-origin: 0 0;
  background:
    radial-gradient(60% 45% at 50% 40%, rgba(54, 150, 148, .55), rgba(54, 150, 148, 0) 70%),
    radial-gradient(70% 40% at 50% 112%, rgba(243, 234, 219, .38), rgba(243, 234, 219, 0) 70%);
}

.hero-col {
  position: relative; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--hdr) + 8px) 16px calc(56px * var(--s));
}
.laptop-wrap {
  --lw: calc(460px * var(--s));
  position: relative; width: var(--lw); height: calc(var(--lw) * 1.08); flex-shrink: 0;
  will-change: transform; transform-origin: 50% 60%;
}
.tall .laptop-wrap { --lw: calc(266px * var(--s)); margin-top: calc(var(--lw) * .5); }

/* اللابتوب */
.laptop { position: absolute; inset: 0; perspective: calc(3200px * var(--s)); perspective-origin: 50% -10%; will-change: opacity; }
.lap-3d { position: absolute; left: 0; right: 0; top: calc(var(--lw) * .02); height: calc(var(--lw) * .64); transform-style: preserve-3d; }
.lid {
  position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 100%;
  transform: rotateX(-102deg); will-change: transform;
}
.lid-face { position: absolute; inset: 0; border-radius: calc(var(--lw) * .03) calc(var(--lw) * .03) calc(var(--lw) * .008) calc(var(--lw) * .008); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* إطار ألمنيوم رفيع ثم حافة سوداء ثم الزجاج */
.lid-front {
  background: #161d1d;
  padding: calc(var(--lw) * .024) calc(var(--lw) * .022) calc(var(--lw) * .034);
  box-shadow: 0 0 0 calc(var(--lw) * .005) #b9c3c2, 0 0 0 calc(var(--lw) * .007) #8d9998, inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.lid-front::after { /* انعكاس الزجاج */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .13) 0 22%, rgba(255, 255, 255, 0) 22.2% 100%);
}
.cam { position: absolute; top: calc(var(--lw) * .009); left: 50%; width: calc(var(--lw) * .008); aspect-ratio: 1; border-radius: 50%; background: #34403f; box-shadow: 0 0 0 1px #0b1111; transform: translateX(-50%); }
.lid-back {
  transform: rotateX(180deg);
  background: linear-gradient(165deg, #dfe6e5 0%, #c4cecd 55%, #b3bfbe 100%);
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 0 0 1px #8d9998;
}
.lid-mark { width: 20%; aspect-ratio: 1; border-radius: 50%; background: var(--white); display: grid; place-items: center; padding: 3%; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.screen { position: relative; height: 100%; border-radius: calc(var(--lw) * .004); overflow: hidden; background: #0d2121; }
.screen-glow { position: absolute; inset: 0; background: linear-gradient(180deg, var(--white), var(--beige)); opacity: 0; }
.screen-ui { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--lw) * .02); opacity: 0; }
.sc-medal { width: 26%; aspect-ratio: 1; border-radius: 50%; background: var(--white); display: grid; place-items: center; padding: 3%; box-shadow: 0 0 0 calc(var(--lw) * .008) rgba(54, 150, 148, .25); }
.sc-line { width: 46%; height: calc(var(--lw) * .014); border-radius: 99px; background: var(--turq-deep); opacity: .85; }
.sc-line.short { width: 30%; background: var(--turq); opacity: .6; }
.sc-cards { display: flex; gap: calc(var(--lw) * .02); margin-top: calc(var(--lw) * .01); }
.sc-cards i { width: calc(var(--lw) * .1); height: calc(var(--lw) * .07); border-radius: calc(var(--lw) * .01); background: var(--white); box-shadow: 0 0 0 1px rgba(22, 78, 76, .15); }
.sc-cards i:nth-child(2) { background: var(--coral); opacity: .85; }

/* قاعدة اللابتوب بمنظور واقعي ولوحة مفاتيح ظاهرة (نفس تصميم صور ورش العمل) */
.deck { position: absolute; left: -15%; right: -15%; top: 100%; }
.deck svg { display: block; width: 100%; height: auto; overflow: visible; }
.lap-shadow {
  position: absolute; left: -16%; right: -16%; top: calc(var(--lw) * 1.0); height: calc(var(--lw) * .1);
  background: radial-gradient(50% 50% at 50% 45%, rgba(0, 0, 0, .45), transparent 72%); filter: blur(6px); opacity: 0;
}

/* أغلفة المنتجات الحقيقية */
.papers { position: absolute; inset: 0; pointer-events: none; }
.paper {
  position: absolute; left: 50%; top: 40%; margin: 0;
  background: var(--white); padding: calc(var(--lw) * .008); border-radius: calc(var(--lw) * .012);
  box-shadow: 0 calc(var(--lw) * .03) calc(var(--lw) * .06) rgba(0, 0, 0, .28), 0 0 0 1px rgba(255, 255, 255, .5);
  opacity: 0; transform-origin: 0 0; will-change: transform, opacity;
}
.paper img { border-radius: calc(var(--lw) * .006); width: 100%; height: auto; }
.p-portrait { width: calc(var(--lw) * .27); }
.p-landscape { width: calc(var(--lw) * .36); }
.tall .p-portrait { width: calc(var(--lw) * .26); }
.tall .p-landscape { width: calc(var(--lw) * .34); }

/* نص الواجهة */
.hero-copy { position: relative; max-width: min(100%, calc(900px * var(--s))); margin-top: calc(26px * var(--s)); will-change: transform, opacity; }
.h1 {
  margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.22;
  font-size: max(28px, calc(64px * var(--s)));
  text-wrap: balance;
}
.tall .h1 { font-size: max(26px, calc(33px * var(--s))); }
.lead {
  margin: calc(10px * var(--s)) auto 0; font-weight: 300; opacity: .92;
  font-size: max(11.5px, calc(19px * var(--s))); line-height: 1.75; text-wrap: balance;
}
.tall .lead { font-size: max(12px, calc(15.5px * var(--s))); }
.reveal { opacity: 0; }
.no-intro .reveal, .reduce .reveal { opacity: 1; }

.scroll-cue { position: absolute; bottom: calc(18px * var(--s)); left: 50%; width: 26px; height: 40px; margin-left: -13px; border: 1.5px solid rgba(251, 252, 250, .55); border-radius: 14px; opacity: 0; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--white); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80%, 100% { transform: translateY(14px); opacity: 0; } }

/* الورقة البيضاء الصاعدة في نهاية القصة */
.sheet {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 58%;
  background: var(--white); border-radius: 50% 50% 0 0 / 14% 14% 0 0; box-shadow: 0 -30px 60px rgba(251, 252, 250, .18);
  transform: translate3d(0, 100%, 0); will-change: transform;
}
.reduce .sheet, .reduce .scroll-cue { display: none; }

/* ---------- الأقسام ---------- */
.sec { position: relative; padding: clamp(48px, 7vw, 96px) 16px; max-width: 1200px; margin: 0 auto; }
.h2 {
  margin: 0 auto 28px; font-family: var(--font-display); font-weight: 700; color: var(--turq-deep);
  font-size: clamp(24px, 3vw, 38px); line-height: 1.3; text-wrap: balance;
}

/* 2. كيف تطلب: شريط نحيف بأربع محطات متساوية على خط واحد */
.how { position: relative; z-index: 2; margin-top: -40svh; padding-top: 0; }
.reduce .how { margin-top: 0; padding-top: clamp(28px, 4vw, 48px); }
.steps {
  --ico: 54px; --pad: 18px;
  position: relative; list-style: none; margin: 0 auto;
  padding: var(--pad) clamp(10px, 2.5vw, 34px);
  max-width: 980px; background: var(--beige); border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(22, 78, 76, .07);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(6px, 2vw, 26px);
}
/* الخط المنقّط الذي يربط الأيقونات */
.steps::before {
  content: ""; position: absolute; top: calc(var(--pad) + var(--ico) / 2); height: 1.5px;
  right: 12.5%; left: 12.5%; background: repeating-linear-gradient(90deg, var(--turq) 0 5px, transparent 5px 11px); opacity: .5;
}
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.step-ico {
  position: relative; z-index: 1; width: var(--ico); height: var(--ico); border-radius: 50%; background: var(--white);
  display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(54, 150, 148, .25), 0 0 0 6px var(--beige);
}
.step-ico svg { width: 50%; height: 50%; fill: none; stroke: var(--turq); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wa-ico svg { width: 44%; height: 44%; stroke: none; }
.wa-ico .fill { fill: var(--turq); }
/* رقم الخطوة: دائرة مرجانية صغيرة على طرف الأيقونة */
.step-n {
  position: absolute; z-index: 2; top: -4px; right: calc(50% - var(--ico) / 2 - 6px);
  width: 22px; height: 22px; border-radius: 50%; background: var(--coral); color: var(--ink);
  font: 700 12px/22px var(--font-body); box-shadow: 0 0 0 3px var(--beige);
}
/* نصوص بنفس الارتفاع وفي المنتصف */
.step p {
  --lines: 2;
  margin: 0; width: 100%; max-width: 13em; color: var(--ink);
  font-size: 15px; font-weight: 500; line-height: 1.5; text-wrap: balance;
  min-height: calc(var(--lines) * 1.5em); display: flex; align-items: center; justify-content: center;
}

/* تبقى الخطوات الأربع في صف واحد على كل الأجهزة */
@media (max-width: 900px) {
  .steps { --ico: 48px; --pad: 16px; border-radius: 30px; }
  .step p { --lines: 3; font-size: 13px; }
}
@media (max-width: 480px) {
  .steps { --ico: 42px; --pad: 14px; padding-inline: 6px; column-gap: 4px; border-radius: 24px; }
  .step { gap: 6px; }
  .step-n { width: 19px; height: 19px; font-size: 11px; line-height: 19px; top: -3px; }
  .step p { --lines: 4; font-size: 11.5px; line-height: 1.45; max-width: none; }
}
@media (max-width: 400px) { .step p { --lines: 5; } }


/* ---------- عناصر مشتركة ---------- */
.h2.lined { display: flex; align-items: center; gap: clamp(12px, 2vw, 22px); max-width: 920px; }
.h2.lined::before, .h2.lined::after { content: ""; flex: 1; height: 1.5px; background: rgba(22, 78, 76, .32); border-radius: 2px; }
.h2.lined span { flex-shrink: 0; max-width: 80%; }
.h2.on-dark { color: var(--white); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 700 16px/1 var(--font-display); text-decoration: none; border: 0; border-radius: 999px;
  padding: 13px 24px; min-height: 46px; transition: transform .18s var(--ease), box-shadow .2s ease, background-color .2s ease;
}
.btn:active { transform: scale(.96); }
.wa-svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-coral { background: var(--coral); color: var(--ink); box-shadow: 0 6px 16px rgba(255, 87, 87, .28); }
.btn-coral:hover { box-shadow: 0 8px 22px rgba(255, 87, 87, .38); transform: translateY(-1px); }
.btn-deep { background: var(--turq-deep); color: var(--white); box-shadow: 0 6px 16px rgba(22, 78, 76, .3); }
.btn-deep:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--turq-deep); box-shadow: inset 0 0 0 1.5px var(--turq-deep); font-size: 15px; }
.btn-ghost:hover { background: rgba(54, 150, 148, .1); }

/* ---------- 3. تسوق حسب القسم ---------- */
.shop { padding-top: clamp(56px, 7vw, 96px); }
.cats {
  --badge: clamp(104px, 11vw, 132px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px);
  margin-top: calc(var(--badge) / 2 + 22px);
}
.cat {
  position: relative; background: #fff; border-radius: 28px;
  padding: calc(var(--badge) / 2 + 28px) clamp(14px, 1.8vw, 22px) 22px;
  box-shadow: 0 0 0 1px rgba(22, 78, 76, .08), 0 14px 34px rgba(22, 78, 76, .08);
  transition: box-shadow .3s ease, transform .3s var(--ease);
  scroll-margin-top: calc(var(--hdr) + var(--badge) / 2 + 20px);
}
.cat.on { box-shadow: 0 0 0 2px var(--turq), 0 18px 40px rgba(22, 78, 76, .14); }
/* الأيقونة: نصفها خارج المربع */
.cat-badge {
  position: absolute; top: calc(var(--badge) / -2); left: 50%; width: var(--badge); height: var(--badge);
  margin-left: calc(var(--badge) / -2); display: grid; place-items: center;
}
.cat-badge img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; transition: opacity .3s ease, transform .4s var(--ease); filter: drop-shadow(0 10px 14px rgba(22, 78, 76, .14)); }
.cat-badge .ic-on { opacity: 0; }
.cat.on .ic-on, .cat:hover .ic-on { opacity: 1; }
.cat.on .ic, .cat:hover .ic { opacity: 0; }
.cat:hover .cat-badge img { transform: translateY(-4px); }
.cat-name { margin: 0 0 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2vw, 25px); color: var(--turq-deep); }
.subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sub-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; position: relative;
  font: 500 15px/1.4 var(--font-body); color: var(--ink); text-align: center; text-decoration: none;
  background: var(--white); border: 1px solid rgba(22, 78, 76, .14); border-radius: 14px; padding: 11px 16px; min-height: 46px; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .15s var(--ease);
}
.sub-btn .n { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); min-width: 28px; height: 24px; line-height: 24px; padding: 0 7px; border-radius: 12px; background: var(--beige); color: var(--turq-deep); font-size: 13px; font-weight: 700; }
.sub-btn:hover { border-color: var(--turq); background: #fff; color: var(--turq-deep); }
.sub-btn:active { transform: scale(.98); }
.sub-btn.on { background: var(--turq-deep); color: var(--white); border-color: var(--turq-deep); }
.sub-btn.on .n { background: var(--coral); color: var(--ink); }

/* على الشاشات الضيقة: البطاقات الثلاث جنباً إلى جنب في شريط يُسحب أفقياً */
@media (max-width: 760px) {
  .cats {
    --badge: 104px;
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78%, 300px);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: -16px; padding: calc(var(--badge) / 2 + 6px) 16px 18px; margin-top: 4px;
  }
  .cats::-webkit-scrollbar { display: none; }
  .cat { scroll-snap-align: center; }
}

/* لوحة النتائج */
.panel {
  margin-top: 28px; background: #fff; border-radius: 26px; padding: clamp(16px, 2.4vw, 28px);
  box-shadow: 0 0 0 1px rgba(22, 78, 76, .1), 0 20px 50px rgba(22, 78, 76, .1);
  scroll-margin-top: calc(var(--hdr) + 14px);
  opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .45s var(--ease);
}
.panel.open { opacity: 1; transform: none; }
.panel-head { display: flex; align-items: center; justify-content: center; position: relative; padding: 0 48px; margin-bottom: 16px; }
.panel-title { margin: 0; font-family: var(--font-display); font-size: clamp(19px, 2vw, 24px); color: var(--turq-deep); }
.panel-sub { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
.panel-close { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--beige); color: var(--turq-deep); font-size: 26px; line-height: 1; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 18px; }
.chip { font: 500 14px/1 var(--font-body); padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(22, 78, 76, .18); background: var(--white); color: var(--ink); cursor: pointer; min-height: 38px; }
.chip span { color: var(--ink-soft); font-size: 12.5px; margin-inline-start: 4px; }
.chip.on { background: var(--turq-deep); color: var(--white); border-color: var(--turq-deep); }
.chip.on span { color: var(--beige); }
.more-wrap { margin-top: 22px; }
.more-wrap:empty { display: none; }

/* بطاقة المنتج */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(12px, 1.8vw, 22px); }
.pcard {
  display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(22, 78, 76, .09), 0 8px 22px rgba(22, 78, 76, .06);
  transition: transform .35s var(--ease), box-shadow .35s ease;
}
.pcard:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(54, 150, 148, .35), 0 16px 34px rgba(22, 78, 76, .12); }
.pimg { aspect-ratio: 4 / 5; width: 100%; background: linear-gradient(180deg, var(--beige), #efe3cf); overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s var(--ease); }
.pcard:hover .pimg img { transform: scale(1.04); }
.pbody { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 14px 16px; flex: 1; }
.pname {
  margin: 0; font: 700 15.5px/1.5 var(--font-body); color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em;
}
.pmeta { margin: 0; font-size: 13px; color: var(--ink-soft); min-height: 1.4em; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfoot { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 28px; margin-top: auto; }
.price { font: 700 18px/1 var(--font-display); color: var(--turq-deep); }
.price small { font: 500 12.5px var(--font-body); }
.pformat { font-size: 12px; font-weight: 500; color: var(--turq-deep); background: rgba(54, 150, 148, .12); padding: 4px 9px; border-radius: 99px; }
.btn-order { width: 100%; margin-top: 6px; background: var(--coral); color: var(--ink); font-size: 15px; min-height: 44px; padding: 11px 14px; }
.btn-order:hover { box-shadow: 0 8px 18px rgba(255, 87, 87, .32); }

@media (max-width: 600px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pbody { padding: 10px 9px 12px; gap: 4px; }
  .pname { font-size: 13.5px; }
  .pmeta { font-size: 11.5px; }
  .price { font-size: 16px; }
  .btn-order { font-size: 14px; min-height: 42px; padding: 10px 8px; gap: 6px; }
  .btn-order .wa-svg { width: 18px; height: 18px; }
  .panel { padding: 14px 10px; border-radius: 22px; }
}

/* ---------- 4. مطويات حسب الصف: الفصل الأول ثم الفصل الثاني ---------- */
.band-beige { background: var(--beige); }
.term-block + .term-block { margin-top: clamp(26px, 4vw, 44px); padding-top: clamp(26px, 4vw, 44px); position: relative; }
/* فاصل بين الفصلين: خط منقّط وفي وسطه نقطة */
.term-block + .term-block::before {
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(22, 78, 76, .35) 0 6px, transparent 6px 13px);
}
.term-block + .term-block::after {
  content: ""; position: absolute; top: -6px; left: 50%; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px var(--beige);
}
.term-title { margin: 0 0 16px; font: 700 clamp(15px, 1.6vw, 19px)/1.4 var(--font-display); color: var(--turq-deep); }
.term-title span { display: inline-block; background: var(--white); padding: 6px 18px; border-radius: 999px; box-shadow: 0 0 0 1px rgba(22, 78, 76, .12); }
.grade-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); }
.grade {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  background: #fff; border-radius: 22px; padding: 18px 8px 16px; font-family: var(--font-body);
  box-shadow: 0 0 0 1px rgba(22, 78, 76, .08), 0 8px 20px rgba(22, 78, 76, .06);
  transition: transform .3s var(--ease), box-shadow .3s ease;
}
.grade img { width: clamp(54px, 5.6vw, 72px); height: auto; transition: transform .4s var(--ease); }
.grade:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--turq), 0 14px 30px rgba(22, 78, 76, .14); }
.grade:hover img { transform: rotate(-6deg) scale(1.05); }
.g-name { font: 700 15.5px/1.45 var(--font-display); color: var(--turq-deep); text-wrap: balance; }
.grade:active { transform: scale(.97); }
@media (max-width: 900px) { .grade-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .g-name { font-size: 13.5px; } .grade { padding: 14px 6px 12px; border-radius: 18px; } }

/* ---------- 5. طلب خاص: شريط مرجاني نحيف يمر تحت الجوال، والزر نصفه خارج الشريط ---------- */
.request { padding-top: 24px; padding-bottom: clamp(56px, 6vw, 80px); }
.req { --ph: 156px; position: relative; max-width: 720px; margin: calc(var(--ph) * 1.2) auto 0; }
.req-bar { background: var(--coral); border-radius: 34px; padding-inline-start: calc(var(--ph) + clamp(14px, 3vw, 40px)); padding-inline-end: clamp(16px, 3vw, 36px); box-shadow: 0 14px 30px rgba(255, 87, 87, .22); }
.req-text { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 0 40px; min-height: 140px; }
.req-title { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: clamp(14.5px, 1.65vw, 20px); line-height: 1.4; text-wrap: balance; }
.req-sub { margin: 2px 0 0; color: var(--ink); font-size: clamp(12px, 1.15vw, 14px); font-weight: 500; }
.req-btn { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); white-space: nowrap; min-height: 44px; padding: 10px 20px; font-size: 14.5px; box-shadow: 0 8px 18px rgba(22, 78, 76, .3); }
.req-btn:hover { transform: translate(-50%, calc(50% - 2px)); }
.req-btn:active { transform: translate(-50%, 50%) scale(.96); }
.req-phone { position: absolute; right: clamp(4px, 2vw, 26px); bottom: -14px; width: var(--ph); height: auto; filter: drop-shadow(0 18px 24px rgba(31, 43, 43, .28)); transform: rotate(-6deg); transform-origin: 50% 100%; }
/* الآيباد: نفس نسبة الجوال إلى الشريط */
@media (min-width: 601px) and (max-width: 1024px) {
  .req { --ph: 146px; max-width: 620px; }
  .req-text { min-height: 132px; padding: 24px 0 38px; }
}
@media (max-width: 600px) {
  .req { --ph: 116px; max-width: none; }
  .req-bar { border-radius: 26px; padding-inline-end: 12px; }
  .req-text { padding: 12px 0 28px; min-height: 0; }
  .req-btn { font-size: 13px; min-height: 40px; padding: 8px 14px; }
  .req-btn .wa-svg { width: 17px; height: 17px; }
}

/* ---------- 6. الخدمات ---------- */
.svc-list { display: grid; gap: 18px; max-width: 1040px; margin: 0 auto; }
.svc {
  display: grid; grid-template-columns: clamp(110px, 18%, 190px) 1fr auto; grid-template-areas: "media title btn" "media text btn"; align-items: center; gap: 6px clamp(14px, 3vw, 36px);
  background: #fff; border-radius: 26px; padding: 16px clamp(16px, 3vw, 34px);
  box-shadow: 0 0 0 1px rgba(22, 78, 76, .09), 0 10px 26px rgba(22, 78, 76, .06);
}
.svc-media { grid-area: media; aspect-ratio: 1; display: grid; place-items: center; background: var(--beige); border-radius: 22px; padding: 8%; }
.svc-media img, .svc-art { width: 100%; height: 100%; object-fit: contain; }
.svc-copy { grid-area: text; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.svc .btn { grid-area: btn; }
.svc-title { grid-area: title; margin: 0; line-height: 1.35; font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 2vw, 24px); color: var(--turq-deep); white-space: nowrap; letter-spacing: -.01em; }
.svc-copy p { margin: 0; max-width: 46em; font-size: 15.5px; line-height: 1.8; color: var(--ink); }
.svc-copy .svc-note { font-size: 13.5px; font-weight: 700; color: var(--turq-deep); background: rgba(54, 150, 148, .12); padding: 5px 12px; border-radius: 99px; line-height: 1.5; }
@media (max-width: 760px) {
  .svc { grid-template-columns: 84px 1fr; grid-template-areas: "title title" "media text" "btn btn"; gap: 10px 12px; padding: 14px; }
  .svc-title { font-size: clamp(15px, 4.6vw, 19px); text-align: center; }
  .svc .btn { width: 100%; }
  .svc-copy p { font-size: 14px; line-height: 1.75; }
}

/* ---------- 7. المنتجات المختارة ---------- */
.featured .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1160px; margin: 0 auto; }
@media (max-width: 1000px) { .featured .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; } }

@media (max-width: 600px) { .featured .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 8. آراء العملاء: سطران يُسحبان باليد ---------- */
.reviews { padding: clamp(48px, 7vw, 90px) 0; background: linear-gradient(180deg, var(--white), var(--beige)); }
.reviews .h2 { padding: 0 16px; }
.rev-wrap { position: relative; }
#rev-rows { display: grid; gap: 14px; }
.rev-row {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 6px max(16px, calc((100vw - 1200px) / 2)); cursor: grab; overscroll-behavior-x: contain;
  -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.rev-row::-webkit-scrollbar { display: none; }
.rev-row.drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.rev-row:nth-child(2) { padding-inline-start: max(60px, calc((100vw - 1200px) / 2 + 60px)); }
.rev { flex: 0 0 auto; margin: 0; width: min(76vw, 330px); scroll-snap-align: center; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1px rgba(22, 78, 76, .1), 0 10px 22px rgba(22, 78, 76, .07); }
.rev-img img { width: 100%; height: auto; pointer-events: none; }
.rev-text { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px 16px; }
.rev-stars { color: #F5B300; font-size: 20px; letter-spacing: 2px; }
.rev-stars span { color: #ddd5c6; }
.rev-text blockquote { margin: 0; font-size: 15px; line-height: 1.7; }
.rev-text figcaption { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.rev-nav {
  position: absolute; top: 50%; z-index: 2; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--white); color: var(--turq-deep); font-size: 28px; line-height: 38px; box-shadow: 0 4px 14px rgba(22, 78, 76, .18);
}
.rev-prev { right: max(8px, calc((100vw - 1260px) / 2)); }
.rev-next { left: max(8px, calc((100vw - 1260px) / 2)); }
@media (hover: none) { .rev-nav { display: none; } }
.rev-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-soft); }
@media (hover: hover) { .rev-hint { display: none; } }

/* زر «يسعدنا تقييمك» */
.rate-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; cursor: pointer;
  font: 700 15px/1 var(--font-display); color: var(--turq-deep); background: var(--white);
  border: 0; border-radius: 999px; padding: 11px 20px 11px 22px; min-height: 44px;
  box-shadow: 0 0 0 1.5px var(--turq), 0 8px 18px rgba(22, 78, 76, .12);
  transition: transform .2s var(--ease), box-shadow .2s ease;
}
.rate-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1.5px var(--turq), 0 12px 24px rgba(22, 78, 76, .18); }
.rate-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--coral); color: var(--white); font-size: 15px; }

/* نافذة التقييم */
.rdialog { width: min(440px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 26px; background: var(--white); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.rdialog::backdrop { background: rgba(22, 78, 76, .55); backdrop-filter: blur(3px); }
.rdialog[open] { animation: pd-in .35s var(--ease); }
.rd { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px 22px 20px; text-align: center; }
.rd h3 { margin: 0; font: 700 22px/1.3 var(--font-display); color: var(--turq-deep); }
.rd-sub { margin: -6px 0 4px; font-size: 14px; color: var(--ink-soft); }
.rd-close { position: absolute; top: 10px; left: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--beige); color: var(--turq-deep); font-size: 24px; cursor: pointer; }
.rd label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--turq-deep); text-align: start; }
.rd input, .rd textarea { font: 400 15px/1.5 var(--font-body); color: var(--ink); background: #fff; border: 1.5px solid rgba(22, 78, 76, .2); border-radius: 14px; padding: 10px 12px; min-height: 44px; }
.rd input:focus, .rd textarea:focus { outline: none; border-color: var(--turq); box-shadow: 0 0 0 3px rgba(54, 150, 148, .2); }
.rd-stars { border: 0; margin: 0; padding: 0; display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; }
.rd-stars legend { width: 100%; font-size: 14px; font-weight: 700; color: var(--turq-deep); margin-bottom: 4px; }
.rd-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rd-stars label { font-size: 34px; line-height: 1; color: #ddd5c6; cursor: pointer; transition: color .15s, transform .15s; }
.rd-stars input:checked ~ label, .rd-stars label:hover, .rd-stars label:hover ~ label { color: #F5B300; }
.rd-stars input:focus-visible + label { outline: 3px solid var(--coral); border-radius: 6px; }
.rd .btn { margin-top: 4px; }
.rd-note { margin: 0; font-size: 12px; color: var(--ink-soft); }
.rd-done { margin: 0; font-size: 14px; font-weight: 700; color: #1d7a4f; }

/* ---------- 9. لماذا متجر نوفمبر؟ ---------- */
.why { background: var(--turq-deep); color: var(--white); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 22px); max-width: 860px; margin: 0 auto 34px; }
.stat { display: flex; flex-direction: column-reverse; align-items: center; background: rgba(251, 252, 250, .07); border: 1px solid rgba(251, 252, 250, .16); border-radius: 22px; padding: 18px 8px; }
.stat dd { margin: 0; font: 700 clamp(38px, 5vw, 58px)/1.1 var(--font-display); color: var(--coral); }
.stat dt { font-size: clamp(13px, 1.5vw, 16px); opacity: .92; }
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 22px); }
.feat { position: relative; background: var(--beige); color: var(--ink); border-radius: 24px; padding: 40px 18px 22px; margin-top: 28px; }
.feat-ico { position: absolute; top: -28px; left: 50%; margin-left: -28px; width: 56px; height: 56px; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: 0 0 0 6px var(--turq-deep); }
.feat-ico svg { width: 28px; height: 28px; color: var(--turq); }
.feat-ico svg.stroke { fill: none; stroke: var(--turq); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.feat h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.4; color: var(--turq-deep); }
.feat p { margin: 0 auto; max-width: 24em; font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); }
@media (max-width: 600px) {
  .feats { gap: 8px; }
  .feat { padding: 34px 8px 14px; border-radius: 18px; }
  .feat-ico { width: 46px; height: 46px; margin-left: -23px; top: -23px; box-shadow: 0 0 0 4px var(--turq-deep); }
  .feat-ico svg { width: 23px; height: 23px; }
  .feat h3 { font-size: 14px; }
  .feat p { font-size: 12px; line-height: 1.6; }
  .stat { padding: 12px 4px; border-radius: 16px; }
}

/* ---------- 10. الفوتر ---------- */
.site-footer { background: var(--turq-deep); color: var(--white); padding: 10px 16px 28px; border-top: 1px solid rgba(251, 252, 250, .12); }
.foot-medal { width: 92px; height: 92px; border-radius: 50%; background: var(--white); display: grid; place-items: center; margin: 24px auto 14px; box-shadow: 0 0 0 4px rgba(54, 150, 148, .5); }
.foot-medal img { width: 78px; }
.foot-line { margin: 0 0 18px; font: 600 clamp(18px, 2.2vw, 24px)/1.5 var(--font-display); }
.socials { list-style: none; margin: 0 0 20px; padding: 0; display: flex; justify-content: center; gap: 14px; }
.socials a { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: var(--turq-deep); background: var(--white); transition: transform .2s var(--ease), background-color .2s ease, color .2s ease; }
.socials a:hover { background: var(--coral); color: var(--ink); transform: translateY(-3px); }
.socials svg { width: 24px; height: 24px; }
.foot-copy { margin: 0; font-size: 13px; opacity: .8; }



/* ---------- بطاقة المنتج: الصورة والاسم قابلان للضغط ---------- */
button.pimg { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; font: inherit; }
.pview {
  position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 8px); opacity: 0; white-space: nowrap;
  background: rgba(22, 78, 76, .9); color: var(--white); font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 99px;
  transition: opacity .25s ease, transform .3s var(--ease);
}
.pcard:hover .pview, button.pimg:focus-visible .pview { opacity: 1; transform: translate(-50%, 0); }
.plink { all: unset; cursor: pointer; }
.plink:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 4px; }
.plink:hover { color: var(--turq-deep); }
@media (hover: none) { .pview { opacity: 1; transform: translate(-50%, 0); font-size: 11.5px; padding: 5px 10px; bottom: 8px; } }

/* ---------- معرض الصور ---------- */
.gallery { position: relative; }
.g-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px;
  background: var(--beige); aspect-ratio: 4 / 5;
}
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.g-slide img { width: 100%; height: 100%; object-fit: contain; }
.g-nav {
  position: absolute; top: calc(50% - 40px); width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(251, 252, 250, .92); color: var(--turq-deep); font-size: 30px; line-height: 40px; box-shadow: 0 4px 14px rgba(22, 78, 76, .18);
}
.g-prev { right: 10px; }
.g-next { left: 10px; }
.g-thumbs { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.g-thumb { width: 58px; aspect-ratio: 4 / 5; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--beige); cursor: pointer; opacity: .65; transition: opacity .2s, border-color .2s; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb.on { border-color: var(--turq); opacity: 1; }
.gallery.single .g-nav, .gallery.single .g-thumbs { display: none; }

/* ---------- نافذة المنتج ---------- */
.modal-open { overflow: hidden; }
.pdialog {
  width: min(980px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 28px;
  background: var(--white); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); overflow: auto;
}
.pdialog::backdrop { background: rgba(22, 78, 76, .55); backdrop-filter: blur(3px); }
.pdialog[open] { animation: pd-in .4s var(--ease); }
@keyframes pd-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.pd { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 34px); padding: clamp(16px, 3vw, 30px); align-items: start; }
.pd-close { position: absolute; top: 12px; left: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--beige); color: var(--turq-deep); font-size: 28px; line-height: 1; cursor: pointer; }
.pd-info { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 18px; }
.pd-title { margin: 0; font-family: var(--font-display); font-size: clamp(21px, 2.4vw, 28px); line-height: 1.4; color: var(--turq-deep); text-wrap: balance; }
.pd-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pd-facts li { font-size: 13px; font-weight: 500; color: var(--turq-deep); background: rgba(54, 150, 148, .12); padding: 5px 11px; border-radius: 99px; }
.pd-desc { margin: 0; font-size: 15.5px; line-height: 1.9; max-width: 34em; }
.pd-price { margin: 0; font: 700 26px/1 var(--font-display); color: var(--turq-deep); }
.pd-price small { font: 500 14px var(--font-body); }
.pd-order { width: min(100%, 340px); }
.pd-page { font-size: 14px; color: var(--turq-deep); }
@media (max-width: 720px) {
  .pdialog { border-radius: 22px; }
  .pd { grid-template-columns: 1fr; padding: 12px 12px 18px; }
  .pd-info { padding-top: 0; }
  .pd-desc { font-size: 14.5px; }
}

/* ---------- صفحة المنتج ---------- */
.ppage-main { max-width: 1100px; margin: 0 auto; padding: calc(var(--hdr) + 24px) 16px 56px; }
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 13.5px; color: var(--ink-soft); margin: 0 0 18px; padding: 0; list-style: none; }
.crumbs a { color: var(--turq-deep); }
.crumbs li + li::before { content: "‹"; margin-inline-end: 6px; color: var(--ink-soft); }
.ppage .pd { padding: 0; }
.ppage .site-header { background: rgba(251, 252, 250, .96); color: var(--ink); box-shadow: 0 1px 0 rgba(22, 78, 76, .12); }

/* ---------- أشرطة الانتقال بين الصفحات (نفس أشرطة بداية الموقع) ---------- */
.page-bands { position: fixed; inset: 0; z-index: 120; display: flex; pointer-events: none; }
.page-bands i { flex: 1; transform: translate3d(0, 0, 0); transition: transform .62s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
.page-bands i:nth-child(1), .page-bands i:nth-child(7) { background: var(--turq); }
.page-bands i:nth-child(2), .page-bands i:nth-child(6) { background: var(--beige); }
.page-bands i:nth-child(3), .page-bands i:nth-child(5) { background: var(--coral); }
.page-bands i:nth-child(4) { background: var(--white); }
.page-bands i:nth-child(4) { transition-delay: 0s; }
.page-bands i:nth-child(3), .page-bands i:nth-child(5) { transition-delay: .06s; }
.page-bands i:nth-child(2), .page-bands i:nth-child(6) { transition-delay: .12s; }
.page-bands i:nth-child(1), .page-bands i:nth-child(7) { transition-delay: .18s; }
.page-bands.out i { transform: translate3d(0, -101%, 0); }
.page-bands.cover-start i { transform: translate3d(0, 101%, 0); transition: none; }
.page-bands.covering i { transform: translate3d(0, 0, 0); }
.reduce .page-bands { display: none; }
html:not(.js) .page-bands { display: none; }
html:not(.bands-in) .page-bands-home { display: none; }

/* ---------- صفحات التصنيفات والصفوف ---------- */
.cpage .site-header { background: rgba(251, 252, 250, .96); color: var(--ink); box-shadow: 0 1px 0 rgba(22, 78, 76, .12); }
.chero {
  position: relative; overflow: hidden; background: var(--turq-deep); color: var(--white);
  padding: calc(var(--hdr) + clamp(26px, 4vw, 44px)) 16px clamp(46px, 6vw, 70px);
}
.chero::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 46px;
  background: var(--white); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.chero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 50% 0%, rgba(54, 150, 148, .55), transparent 70%);
}
.chero > * { position: relative; z-index: 1; }
.chero .crumbs { color: rgba(251, 252, 250, .8); margin-bottom: 10px; }
.chero .crumbs a { color: var(--white); }
.chero .crumbs li + li::before { color: rgba(251, 252, 250, .6); }
.chero-icon { width: clamp(70px, 9vw, 96px); height: auto; margin: 0 auto 10px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .2)); }
.chero-title { margin: 0; font: 700 clamp(26px, 4vw, 44px)/1.3 var(--font-display); text-wrap: balance; }
.chero-sub { margin: 6px 0 0; font-size: clamp(14px, 1.5vw, 17px); font-weight: 300; opacity: .9; }
.cmain { max-width: 1200px; margin: 0 auto; padding: clamp(18px, 3vw, 30px) 16px clamp(48px, 6vw, 80px); }
.cfilters { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.cfilters .chips { margin: 0; }
.cempty { max-width: 520px; margin: 10px auto 0; background: var(--beige); border-radius: 26px; padding: 28px 20px; }
.cempty h2 { margin: 0 0 6px; font: 700 20px/1.4 var(--font-display); color: var(--turq-deep); }
.cempty p { margin: 0 0 14px; color: var(--ink); }
.cother { margin-top: clamp(36px, 5vw, 56px); }
.cother h2 { margin-bottom: 14px; }
.cother .subs-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cother .sub-btn { width: auto; display: inline-flex; padding: 10px 18px; }
.chip.hidden-by-filter { display: none; }
.pcard[hidden] { display: none; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* فلاتر صفحات التصنيفات على الجوال: سطر واحد يُسحب أفقياً */
@media (max-width: 700px) {
  .cfilters { align-items: stretch; margin-inline: -16px; }
  .cfilters .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; }
  .cfilters .chips::-webkit-scrollbar { display: none; }
  .cfilters .chip { flex-shrink: 0; }
  .chero-title { font-size: 25px; }
}
@media (max-width: 600px) {
  .feats { grid-template-columns: 1fr; gap: 34px; max-width: 420px; margin: 0 auto; }
  .feat { padding: 32px 16px 16px; }
  .feat h3 { font-size: 16px; }
  .feat p { font-size: 13px; }
}

/* تصفح أخف: المتصفح لا يرسم البطاقات البعيدة عن الشاشة حتى تقترب */
.cmain .pcard { content-visibility: auto; contain-intrinsic-size: auto 470px; }
.pcard, .grade, .svc { contain: layout paint; }
/* ظهور ناعم للأقسام عند الوصول إليها (مرة واحدة) */
.js .rv { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
.js .rv.in { opacity: 1; transform: none; }
.reduce .rv { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ملاحظة صغيرة أسفل بطاقة القسم (تُكتب في data/categories.json) */
.cat { display: flex; flex-direction: column; }
.cat .subs { flex: 0 0 auto; }
.cat-note { margin: auto 0 0; padding-top: 14px; font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--turq-deep); text-wrap: balance; }
.cat-note { position: relative; }
.cat-note::before { content: ""; display: block; height: 1px; margin: 0 10% 12px; background: rgba(22, 78, 76, .14); }
.cat-note span { color: var(--coral); }

/* وصف المنتج بنقاط + المقولة + إضافة التخصيص */
.pd-desc { max-width: 34em; text-align: start; }
.pd-desc p { margin: 0 0 8px; font-size: 15px; line-height: 1.8; }
.pd-points { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 6px; }
.pd-points li { position: relative; padding-inline-start: 22px; font-size: 14.5px; line-height: 1.7; }
.pd-points li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--turq); }
.pd-quote { margin: 12px 0 0 !important; padding: 10px 14px; background: var(--beige); border-radius: 14px; color: var(--turq-deep); font-weight: 700; text-align: center; font-size: 14.5px !important; }
.pd-addon { margin: -4px 0 0; padding: 8px 14px; border-radius: 12px; background: rgba(255, 87, 87, .12); color: #9e2a2a; font-size: 14px; font-weight: 700; line-height: 1.6; text-align: center; max-width: 30em; }
.paddon { margin: 0; font-size: 12px; font-weight: 700; color: #b23a3a; }
.g-thumbs { flex-wrap: wrap; }
