/* =====================================================================
   بيورباك — Pure Pack · الستايل الأساسي
   الألوان كلها هنا كمتغيرات، ولوحة التحكم بتغطي عليها لو اتغيرت.
   ===================================================================== */

:root {
  /* ألوان الهوية (من اللوجو) */
  --brand:        #014A6D;
  --brand-dark:   #00344D;
  --accent:       #DEA80A;
  --accent-dark:  #B98A06;
  --surface:      #E4ECEF;
  --surface-warm: #FBF3DC;
  --text:         #0E2433;
  --text-muted:   #5B6F7C;
  --line:         #D3DEE4;
  --whatsapp:     #014A6D;

  --white: #fff;
  --surface-soft: #F3F7F9;
  --on-accent: #00344D;

  /* الخطوط */
  --font-head: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(14, 36, 51, .06);
  --shadow: 0 6px 24px -8px rgba(14, 36, 51, .18);
  --header-h: 64px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------------- Base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .5em; color: var(--text); letter-spacing: -.005em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.mono { font-family: var(--font-mono); font-feature-settings: 'zero' 0; }
.muted { color: var(--text-muted); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 1.25em; height: 1.25em; flex: none; }
[dir="rtl"] .ic-dir { transform: scaleX(-1); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 680px; }
.center { text-align: center; }
.center-row { justify-content: center; }

/* خلفية الشبكة الهندسية */
.blueprint {
  background-color: var(--surface-soft);
  background-image:
    linear-gradient(rgba(1, 74, 109, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 74, 109, .07) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font-head); font-weight: 600; font-size: 15px; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 16px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { filter: brightness(.93); }
.btn .ic { width: 20px; height: 20px; }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0;
  color: var(--brand); font-weight: 500; font-size: 14px;
}
.link-btn:hover { text-decoration: underline; }
.link-btn .ic { width: 16px; height: 16px; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
}
/* الـblur في طبقة لوحدها — لو اتحط على الهيدر نفسه بيحبس القائمة الثابتة جواه */
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.header-inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); flex: none; }
.brand-mark { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 19px; letter-spacing: .01em; color: var(--brand); }
.brand-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; white-space: nowrap; }
.brand-white .brand-name { color: #fff; }
.brand-white .brand-sub { color: rgba(255, 255, 255, .7); }

.main-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 40;
  background: #fff; padding: 20px var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 20px;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
  overflow-y: auto;
}
.main-nav.is-open { opacity: 1; transform: none; visibility: visible; }
.main-nav ul { display: flex; flex-direction: column; }
.main-nav a:not(.btn) {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 14px 4px; font-family: var(--font-head); font-weight: 500; font-size: 18px;
  color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line);
}
/* النقطة الصفرا من اللوجو على الرابط النشط */
.main-nav a[aria-current="page"]::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
}
.main-nav a[aria-current="page"] { color: var(--brand); }
.nav-order-mobile { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
}
.lang-switch:hover { border-color: var(--brand); color: var(--brand); }
.lang-switch span { display: none; }
.cart-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--radius-sm); background: var(--brand); color: #fff;
}
.cart-btn:hover { background: var(--brand-dark); }
.cart-count {
  position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--accent); color: var(--on-accent);
  font: 600 11px/20px var(--font-mono); text-align: center;
}
.cart-count.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
.header-order { display: none; }
.nav-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.nav-toggle .ic { width: 22px; height: 22px; }
.nav-toggle .ic-close { display: none; }
.nav-toggle[aria-expanded="true"] .ic-open { display: none; }
.nav-toggle[aria-expanded="true"] .ic-close { display: block; }
body.nav-open { overflow: hidden; }

@media (min-width: 560px) {
  .lang-switch span { display: inline; }
}
@media (min-width: 1024px) {
  :root { --header-h: 76px; }
  .brand-mark { width: 42px; height: 42px; }
  .main-nav {
    position: static; inset: auto; padding: 0; background: none; flex-direction: row; align-items: center;
    opacity: 1; visibility: visible; transform: none; overflow: visible; margin-inline: auto;
  }
  .main-nav ul { flex-direction: row; gap: 4px; }
  .main-nav a:not(.btn) { font-size: 15px; padding: 8px 12px; border: 0; border-radius: var(--radius-sm); }
  .main-nav a:not(.btn):hover { background: var(--surface-soft); color: var(--brand); }
  .main-nav a[aria-current="page"]::before { position: absolute; bottom: -2px; inset-inline-start: 50%; translate: 50% 0; width: 6px; height: 6px; }
  [dir="ltr"] .main-nav a[aria-current="page"]::before { translate: -50% 0; }
  .nav-order-mobile, .nav-toggle { display: none; }
  .header-actions { margin-inline-start: 0; }
  .header-order { display: inline-flex; }
}

/* ---------------- Sections ---------------- */
.section { padding-block: 56px; }
.section-surface { background: var(--surface); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-title { font-size: clamp(26px, 5vw, 40px); font-weight: 700; margin: 0; }
.eyebrow { font-size: 12px; letter-spacing: .14em; color: var(--brand); margin: 0 0 12px; text-transform: uppercase; }
/* الخط المونو بيفصل الحروف العربي — فبالعربي بنستخدم خط النص */
[dir="rtl"] .eyebrow, [dir="rtl"] .hero-badge { font-family: var(--font-body); letter-spacing: 0; font-weight: 500; }
.eyebrow-light { color: var(--accent); }
.lead { font-size: 18px; color: var(--text-muted); }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.more-link .ic { width: 18px; height: 18px; }
@media (min-width: 768px) { .section { padding-block: 88px; } .section-head { margin-bottom: 36px; } }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; padding-block: 36px 28px; border-bottom: 1px solid var(--line); }
.hero-watermark {
  position: absolute; width: 520px; height: 520px; inset-inline-end: -170px; bottom: -190px;
  opacity: .05; pointer-events: none;
}
.hero-watermark circle { fill: var(--accent); opacity: .9; }
.hero-grid { position: relative; display: grid; gap: 28px; }
.hero-title { font-size: clamp(36px, 9.5vw, 68px); font-weight: 700; line-height: 1.12; margin: 0 0 16px; color: var(--brand-dark); }
.hero-text { font-size: 17px; color: var(--text-muted); max-width: 34em; margin-bottom: 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-ctas .btn { flex: 1 1 160px; }
.hero-features { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; font-size: 14px; color: var(--text); }
.hero-features li { display: inline-flex; align-items: center; gap: 6px; }
.hero-features .ic { color: var(--whatsapp); width: 18px; height: 18px; stroke-width: 2.4; }

.hero-visual { position: relative; }
.hero-stage { position: relative; aspect-ratio: 1 / .9; max-width: 520px; margin-inline: auto; }
.hero-fallback, .hero-canvas { position: absolute; inset: 8% 14% 6%; width: 72%; height: 86%; }
.hero-bucket-svg { width: 100%; height: 100%; filter: drop-shadow(0 18px 24px rgba(1, 52, 77, .16)); }
.hero-canvas { opacity: 0; transition: opacity .6s; inset: 0; width: 100%; height: 100%; }
.hero-visual.is-3d .hero-canvas { opacity: 1; }
.hero-visual.is-3d .hero-fallback { opacity: 0; transition: opacity .4s; }
.dim { position: absolute; fill: none; stroke: var(--brand); stroke-width: 1.4; opacity: .45; vector-effect: non-scaling-stroke; }
.dim path { vector-effect: non-scaling-stroke; }
.dim-h { inset-inline-start: 9%; top: 16%; width: 14px; height: 70%; }
.dim-w { left: 27%; right: 27%; bottom: 2%; height: 14px; width: auto; }
.dim-label { position: absolute; font-size: 12px; color: var(--brand); opacity: .7; }
.dim-label-h { inset-inline-start: calc(9% + 18px); top: 48%; }
.dim-label-w { left: 50%; bottom: 14px; transform: translateX(-50%); }
.hero-badge, .pp-badge {
  position: absolute; font-size: 12px; border-radius: 6px; padding: 4px 10px; white-space: nowrap;
}
.hero-badge { top: 0; inset-inline-end: 0; background: #fff; border: 1px solid var(--line); color: var(--text-muted); }
.pp-badge { bottom: 10%; inset-inline-start: 0; background: var(--brand-dark); color: #fff; font-weight: 600; }

@media (min-width: 900px) {
  .hero { padding-block: 64px 56px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; }
  .hero-ctas .btn { flex: 0 0 auto; }
  .hero-watermark { width: 760px; height: 760px; inset-inline-end: auto; inset-inline-start: 38%; bottom: -330px; }
}

/* ---------------- خط التصنيع ---------------- */
.line-section { background: var(--brand-dark); color: #fff; padding-block: 56px 28px; overflow: hidden; }
.line-section .section-title { color: #fff; }
.line-head { display: grid; gap: 12px; margin-bottom: 24px; }
.line-head-side { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.line-text { color: rgba(255, 255, 255, .72); margin: 0; max-width: 36em; }
.line-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px; font-size: 13px;
}
.line-toggle:hover { background: rgba(255, 255, 255, .14); }
.line-toggle .ic { width: 14px; height: 14px; }
.line-toggle .when-paused, .line-toggle[aria-pressed="true"] .when-playing { display: none; }
.line-toggle[aria-pressed="true"] .when-paused, .line-toggle .when-playing { display: inline-flex; align-items: center; gap: 6px; }

.line-scroller {
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; cursor: grab;
}
.line-scroller::-webkit-scrollbar { display: none; }
.line-scroller.is-dragging { cursor: grabbing; }
.line-track { width: 1000px; margin-inline: auto; padding-inline: var(--gutter); }
.line-svg { width: 100%; height: auto; overflow: visible; user-select: none; }
.svg-mono { font-family: var(--font-mono); font-weight: 500; }
.svg-head { font-family: var(--font-head); }

.line-steps { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 6px; }
.line-step {
  position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 6px 8px; background: none; border: 0; color: rgba(255, 255, 255, .72);
  text-align: center; border-radius: var(--radius-sm); transition: color .3s, background-color .3s;
}
.line-step:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.step-dot {
  position: absolute; top: 0; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: var(--accent); transform: scale(0); transition: transform .35s var(--ease);
}
.step-num { font-size: 12px; color: var(--accent); opacity: .7; }
.step-title { font-family: var(--font-head); font-weight: 600; font-size: 16px; color: #fff; }
.step-text { font-size: 13px; line-height: 1.5; }
.line-step[aria-current="step"] { color: #fff; }
.line-step[aria-current="step"] .step-dot { transform: scale(1); }
.line-step[aria-current="step"] .step-num { opacity: 1; }
.line-hint { font-size: 12px; color: rgba(255, 255, 255, .5); margin: 10px auto 0; text-align: center; }
@media (min-width: 1000px) {
  .line-section { padding-block: 88px 48px; }
  .line-head { grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: 36px; }
  .line-head-side { justify-content: flex-end; text-align: end; }
  .line-scroller { overflow: visible; cursor: default; }
  .line-track { width: 100%; max-width: 1200px; }
  .line-hint { display: none; }
}

/* حركات المحطات */
.st-spot { opacity: 0; transition: opacity .5s; }
.st.is-active .st-spot { opacity: 1; }
.granules-fall circle { opacity: 0; }
.st.is-active .granules-fall circle { animation: fall 1s linear infinite; }
.st.is-active .granules-fall circle:nth-child(2) { animation-delay: .25s; }
.st.is-active .granules-fall circle:nth-child(3) { animation-delay: .5s; }
.st.is-active .granules-fall circle:nth-child(4) { animation-delay: .75s; }
@keyframes fall { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(52px); opacity: 0; } }
.st.is-active .granules-heap { animation: jiggle .5s ease-in-out infinite alternate; }
@keyframes jiggle { to { transform: translateY(2px); } }
.level-fill { transition: width .4s; }
.heat { transform-box: fill-box; transform-origin: left center; }
.st.is-active .heat { animation: heat 1.2s ease-in-out infinite alternate; }
@keyframes heat { from { transform: scaleX(.4); } to { transform: scaleX(1); } }
.led { opacity: .4; }
.st.is-active .led { animation: blink .6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } 0%, 100% { opacity: 1; } }
.roll-spin { transform-box: fill-box; transform-origin: center; }
.st.is-active .roll-spin { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan { opacity: 0; }
.scan-check { opacity: 0; transform-box: fill-box; transform-origin: center; }
.marker-ring { transform-box: fill-box; transform-origin: center; animation: ping 1.6s ease-out infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.bk-handle, .bk-sticker, .bk-check { opacity: 0; transition: opacity .25s; }
.mover.has-handle .bk-handle, .mover.has-sticker .bk-sticker, .mover.has-check .bk-check { opacity: 1; }
.line-section.is-paused * { animation-play-state: paused !important; }

/* ---------------- أرقام المصنع ---------------- */
.stats-section { background: var(--surface); padding-block: 36px; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding-inline-start: 14px; border-inline-start: 3px solid var(--accent); }
.stat-value { font-size: clamp(28px, 6vw, 40px); font-weight: 600; color: var(--brand); line-height: 1.1; }
[dir="rtl"] .stat-value { text-align: right; }
.stat-label { font-size: 14px; color: var(--text-muted); }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }

/* ---------------- كروت المنتجات ---------------- */
.p-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .p-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .p-grid-4 { grid-template-columns: repeat(4, 1fr); } .p-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.p-grid > * { min-width: 0; }

.p-card {
  height: 100%; display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .25s, border-color .25s, transform .25s var(--ease);
}
.p-card:hover { box-shadow: var(--shadow); border-color: #C3D2DA; }
.p-card-media {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3;
  background: var(--surface-soft); border-bottom: 1px solid var(--line);
}
.p-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.p-card-svg { width: 46%; height: auto; transition: transform .4s var(--ease); }
.p-card:hover .p-card-svg { transform: translateY(-4px) rotate(-2deg); }
.tag { position: absolute; top: 10px; font-size: 11px; padding: 2px 8px; border-radius: 6px; line-height: 1.6; }
.tag-360 { inset-inline-end: 10px; background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.tag-usage { inset-inline-start: 10px; background: var(--surface-warm); color: #7A5A00; }
.tag-food { background: #E3EEF4; color: #014A6D; }
.tag-chemical { background: #E3EEF4; color: #014A6D; }
.p-card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 14px 10px; }
.p-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.p-card-title { font-size: 17px; margin: 0; font-weight: 600; }
.p-card-title a { color: var(--text); text-decoration: none; }
.p-card-title a:hover { color: var(--brand); }
.p-card-cap { font-size: 14px; color: var(--text-muted); white-space: nowrap; }
.p-card-specs { font-size: 13px; color: var(--text-muted); margin: 4px 0 0; }
.qty-label { display: block; font-size: 12px; color: var(--text-muted); margin: 12px 0 6px; }
.p-card-actions { display: flex; gap: 8px; margin-top: auto; }
.p-card-actions .btn { flex: 1; padding-inline: 10px; }

.qty {
  display: inline-flex; align-items: stretch; height: 44px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff;
}
.qty:focus-within { border-color: var(--brand); }
.qty-btn { width: 36px; display: grid; place-items: center; background: var(--surface-soft); border: 0; color: var(--text); }
.qty-btn:hover { background: var(--surface); }
.qty-btn .ic { width: 16px; height: 16px; }
.qty-input {
  width: 64px; border: 0; text-align: center; font-size: 15px; font-weight: 500; background: #fff;
  -moz-appearance: textfield; appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { outline: none; }
.p-card .link-btn { align-self: flex-start; margin-top: 4px; }

/* ---------------- Marquee ---------------- */
.clients-section .section-title { margin-bottom: 28px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: marquee 40s linear infinite; }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  flex: none; width: 160px; height: 84px; display: grid; place-items: center; padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.marquee-item img { max-height: 56px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.marquee-item:hover img { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(calc(-50% - 8px)); } }
@keyframes marquee-rtl { to { transform: translateX(calc(50% + 8px)); } }

/* ---------------- CTA ---------------- */
.cta-section { padding-block: 0 56px; }
.cta-box {
  position: relative; overflow: hidden; display: grid; gap: 20px; align-items: center;
  background: var(--brand); color: #fff; border-radius: var(--radius-lg); padding: 32px 24px;
}
.cta-watermark { position: absolute; width: 220px; height: 220px; inset-inline-end: -90px; top: -80px; opacity: .08; pointer-events: none; }
.cta-title { color: #fff; font-size: clamp(24px, 5vw, 36px); margin-bottom: 6px; }
.cta-text { color: rgba(255, 255, 255, .8); margin: 0; }
.cta-box > * { position: relative; }
@media (min-width: 768px) {
  .cta-section { padding-bottom: 88px; }
  .cta-box { grid-template-columns: 1fr auto; padding: 48px 56px; }
  .cta-watermark { width: 320px; height: 320px; }
}

/* ---------------- Footer ---------------- */
.site-footer { background: var(--brand-dark); color: rgba(255, 255, 255, .78); padding-top: 48px; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-grid { display: grid; gap: 32px; padding-bottom: 32px; }
.footer-about { margin-top: 16px; max-width: 30em; font-size: 14px; }
.footer-h { font-size: 15px; color: #fff; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .ic { width: 18px; height: 18px; margin-top: 4px; color: var(--accent); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--radius-sm); font-size: 13px;
}
.footer-social a:hover { border-color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding-block: 18px 96px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.4fr; gap: 48px; }
  .footer-bottom { padding-bottom: 24px; }
}

/* ---------------- زرار واتساب الثابت ---------------- */
.wa-float {
  position: fixed; bottom: 18px; left: 18px; z-index: 45;
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
  background: var(--whatsapp); color: #fff; box-shadow: 0 8px 20px -6px rgba(1, 74, 109, .5);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float .ic { width: 30px; height: 30px; }
.wa-float::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--whatsapp);
  z-index: -1; animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(1.6); opacity: 0; } }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; bottom: 86px; left: 50%; z-index: 60; transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  background: var(--text); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { color: var(--accent); width: 18px; height: 18px; }

/* ---------------- Soon / 404 ---------------- */
.soon { min-height: 60vh; display: grid; place-items: center; }
.soon-mark { width: 84px; height: 84px; margin: 0 auto 20px; }
.soon .lead { margin: 12px 0 24px; }
.big-404 { font-size: 64px; color: var(--brand); margin: 0; line-height: 1; }

/* ---------------- Reveal on scroll ---------------- */
/* المحتوى ظاهر افتراضيًا — الأنيميشن بيشتغل بس لو JS اشتغل */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .wa-float::before { display: none; }
}

/* حركة دخول الهيرو عند فتح الصفحة (من غير ما تستنى السكرول) */
.js .rise { animation: rise .8s var(--ease) both; }
.hero-copy .rise:nth-child(2) { animation-delay: .06s; }
.hero-copy .rise:nth-child(3) { animation-delay: .12s; }
.hero-copy .rise:nth-child(4) { animation-delay: .18s; }
.hero-copy .rise:nth-child(5) { animation-delay: .24s; }
.hero-visual.rise { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-item[aria-hidden="true"] { display: none; }
}

/* كروت المنتجات على الموبايل: صورة أقصر عشان الكارت ميطولش */
@media (max-width: 559px) {
  .p-card-media { aspect-ratio: 2 / 1; }
  .p-card-svg { width: 28%; }
}

/* =====================================================================
   رأس الصفحات الداخلية + الكتالوج
   ===================================================================== */
.page-head { padding-block: 28px 24px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--brand); }
.page-title { font-size: clamp(28px, 6vw, 44px); margin: 0 0 6px; color: var(--brand-dark); }
.page-lead { color: var(--text-muted); margin: 0; max-width: 40em; }
@media (min-width: 768px) { .page-head { padding-block: 44px 36px; } }

.catalog { padding-block: 20px 64px; }
.cat-toolbar { display: grid; gap: 12px; margin-bottom: 18px; }
.search-box { position: relative; }
.search-box .ic { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--text-muted); }
.search-box input {
  width: 100%; height: 48px; padding-inline: 44px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 15px;
}
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(1, 74, 109, .12); }
.cat-toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-open { min-height: 42px; padding-inline: 14px; }
.filter-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font: 600 11px/20px var(--font-mono); }
.cat-count { margin: 0; font-size: 14px; color: var(--text-muted); }
.cat-count strong { color: var(--text); font-size: 15px; }
.sort { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; font-size: 14px; color: var(--text-muted); }
.sort select {
  height: 42px; padding-inline: 12px 32px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  appearance: none; -webkit-appearance: none; color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%235B6F7C' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 16px; background-position: left 10px center;
}
[dir="ltr"] .sort select { background-position: right 10px center; padding-inline: 12px 32px; }

.cat-layout { display: grid; gap: 24px; align-items: start; }
.cat-main { min-width: 0; }

/* درج الفلاتر (موبايل) */
.filters {
  position: fixed; inset: auto 0 0 0; z-index: 70; max-height: 86vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(14, 36, 51, .25);
  transform: translateY(105%); transition: transform .3s var(--ease); visibility: hidden;
}
.filters.is-open { transform: none; visibility: visible; }
.filters-scrim { position: fixed; inset: 0; z-index: 65; background: rgba(14, 36, 51, .45); }
.filters-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.filters-title { font-size: 18px; margin: 0; margin-inline-end: auto; }
.filters-close { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-soft); }
.filters-close .ic { width: 18px; height: 18px; }
.filters-body { overflow-y: auto; padding: 4px 18px 18px; }
.filters-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.filters-foot .btn { width: 100%; }

.f-group { border: 0; margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.f-group legend { font-family: var(--font-head); font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 10px; float: left; width: 100%; }
.f-group legend + * { clear: both; }
.chip-set { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-width: 56px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 14px; font-weight: 500; color: var(--text);
}
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin: 0; }
.check-n { margin-inline-start: auto; font-size: 12px; color: var(--text-muted); }
.check-box { margin-top: 14px; padding: 10px 12px; background: var(--surface-soft); border-radius: var(--radius-sm); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-btn { height: 42px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; font-weight: 500; }
.seg-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg-btn:disabled { opacity: .45; cursor: not-allowed; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--c);
  border: 1px solid rgba(14, 36, 51, .2); box-shadow: inset 0 0 0 3px #fff;
}
.swatch[aria-pressed="true"], .swatch[aria-checked="true"] { box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--brand); }
.swatch[aria-pressed="true"]::after, .swatch[aria-checked="true"]::after {
  content: ''; position: absolute; top: -3px; inset-inline-end: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
}

.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.active-chips:empty { display: none; }
.active-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  background: #E3EEF4; color: var(--brand); border: 0; border-radius: 999px; font-size: 13px; font-weight: 500;
}
.active-chip:hover { background: #D3E4EE; }
.active-chip .ic { width: 14px; height: 14px; }

.p-card[hidden] { display: none; }
.p-card.card-in { animation: card-in .45s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.empty-state { text-align: center; padding: 48px 16px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.empty-mark { width: 56px; height: 56px; margin: 0 auto 14px; opacity: .8; }
.empty-state h2 { font-size: 20px; }
.empty-state p { color: var(--text-muted); max-width: 30em; margin-inline: auto; }

@media (min-width: 1024px) {
  .cat-toolbar { grid-template-columns: 1fr auto; align-items: center; }
  .filter-open { display: none; }
  .cat-layout { grid-template-columns: 260px 1fr; }
  .filters {
    position: sticky; top: calc(var(--header-h) + 16px); inset: auto; z-index: 1; max-height: none;
    transform: none; visibility: visible; box-shadow: none; border: 1px solid var(--line); border-radius: var(--radius);
  }
  .filters-close, .filters-foot, .filters-scrim { display: none !important; }
  .filters-head { padding: 14px 18px; }
}

/* =====================================================================
   صفحة المنتج
   ===================================================================== */
.product-page { padding-block: 20px 64px; }
.pd-grid { display: grid; gap: 24px; margin-top: 8px; }
.pd-grid > * { min-width: 0; }

.viewer {
  position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none;
}
.viewer:active { cursor: grabbing; }
.viewer:focus-visible { outline-offset: 3px; }
.viewer-fallback { position: absolute; inset: 14% 22% 10%; display: grid; place-items: center; transition: transform .4s var(--ease); }
.viewer-svg { width: 100%; height: 100%; filter: drop-shadow(0 16px 20px rgba(1, 52, 77, .14)); }
.viewer-canvas, .viewer-spin, .viewer-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer-spin, .viewer-photo { object-fit: contain; padding: 6%; transition: transform .2s; }
.viewer-photo { background: #fff; }
.viewer-dim {
  position: absolute; top: 12px; inset-inline-end: 12px; font-size: 12px; padding: 3px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; color: var(--text-muted);
}
.viewer.is-photo .viewer-dim, .viewer.is-photo .viewer-hint { display: none; }
.viewer-tools {
  position: absolute; inset: auto 12px 12px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  pointer-events: none;
}
.viewer-tools > * { pointer-events: auto; }
.viewer-hint {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--brand-dark); color: #fff; font-size: 13px; transition: opacity .4s;
}
.viewer-hint .ic { width: 16px; height: 16px; }
.viewer-hint.is-hidden { opacity: 0; }
.viewer-zoom { display: flex; gap: 6px; }
.vbtn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--line); color: var(--text);
}
.vbtn:hover { border-color: var(--brand); color: var(--brand); }
.vbtn .ic { width: 18px; height: 18px; }

.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.thumb {
  position: relative; aspect-ratio: 5 / 4; display: grid; place-items: center; gap: 2px; padding: 6px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); overflow: hidden;
}
.thumb[aria-pressed="true"] { border: 2px solid var(--brand); background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.thumb-svg { width: 34px; height: 34px; }
.thumb .mono { font-size: 11px; color: var(--text-muted); }

.pd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag-inline { font-size: 12px; padding: 3px 10px; border-radius: 6px; background: var(--surface-warm); color: #7A5A00; }
.tag-inline.tag-food { background: #E3EEF4; color: #014A6D; }
.tag-inline.tag-chemical { background: #E3EEF4; color: #014A6D; }
.tag-pp { background: var(--surface-soft); color: var(--text); border: 1px solid var(--line); }
.tag-print { background: #E3EEF4; color: #014A6D; }
.pd-title { font-size: clamp(28px, 6vw, 42px); color: var(--brand-dark); margin-bottom: 10px; }
.pd-desc { color: var(--text-muted); font-size: 16px; }
.pd-block { margin-top: 22px; }
.pd-label { display: block; font-family: var(--font-head); font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.pd-label .muted { font-family: var(--font-body); font-weight: 500; }
.chip-set a.chip { display: inline-grid; place-items: center; text-decoration: none; }
.chip[aria-current="page"] { border: 2px solid var(--brand-dark); color: var(--brand-dark); font-weight: 600; }

.buy-box { margin-top: 22px; padding: 16px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.buy-row { display: flex; gap: 10px; }
.buy-row-2 { margin-top: 10px; }
.buy-row-2 { flex-wrap: wrap; }
.buy-row-2 .btn { flex: 1 1 140px; padding-inline: 10px; }
.qty-lg { height: 52px; }
.qty-lg .qty-btn { width: 44px; }
.qty-lg .qty-input { width: 84px; font-size: 17px; }
.buy-now { flex: 1; }
.buy-note { font-size: 13px; color: var(--text-muted); margin: 10px 0 0; }

.try-print {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 14px 16px;
  border: 1.5px dashed #B9CCD6; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: linear-gradient(90deg, var(--surface-warm), #fff);
}
.try-print:hover { border-color: var(--accent); }
.try-print strong { display: block; font-family: var(--font-head); font-size: 15px; }
.try-print .muted { font-size: 13px; }
.try-print-cta { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; white-space: nowrap; }
.try-print-cta .ic { width: 18px; height: 18px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td { padding: 11px 4px; border-top: 1px solid var(--line); text-align: start; vertical-align: top; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 1px solid var(--line); }
.spec-table th { font-weight: 500; color: var(--text-muted); width: 45%; }
.spec-table td.mono { font-size: 14px; }

.section-tight { padding-top: 56px; }
.section-title-sm { font-size: clamp(22px, 4vw, 30px); }

@media (min-width: 900px) {
  .product-page { padding-top: 28px; }
  .pd-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
  .pd-media { position: sticky; top: calc(var(--header-h) + 20px); }
}

/* =====================================================================
   صفحة الطلب + التأكيد
   ===================================================================== */
.order-page { background: var(--surface-soft); min-height: 70vh; padding-bottom: 56px; }
.order-top { background: #fff; border-bottom: 1px solid var(--line); padding-block: 14px; overflow-x: auto; }
.stepper { display: flex; align-items: center; gap: 8px; min-width: max-content; font-size: 14px; color: var(--text-muted); }
.step { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.step-n {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; font-size: 12px; font-weight: 600;
}
.step.is-current { color: var(--text); font-weight: 600; }
.step.is-current .step-n { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.step.is-done { color: #014A6D; }
.step.is-done .step-n { background: var(--whatsapp); border-color: var(--whatsapp); color: transparent; position: relative; }
.step.is-done .step-n::after { content: ''; position: absolute; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.step-line { width: 28px; height: 1.5px; background: var(--line); }

.order-grid { display: grid; gap: 16px; padding-top: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-title { font-size: 18px; margin: 0; }
.summary { padding: 18px; }
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.small-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; }
.small-link .ic { width: 16px; height: 16px; }
.sum-list { display: flex; flex-direction: column; }
.sum-item { display: grid; grid-template-columns: 52px 1fr; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sum-thumb { grid-row: span 2; width: 52px; height: 52px; display: grid; place-items: center; background: var(--surface-soft); border-radius: var(--radius-sm); }
.sum-thumb svg { width: 34px; height: 34px; }
.sum-thumb img { width: 100%; height: 100%; object-fit: contain; }
.sum-info { display: flex; flex-direction: column; min-width: 0; }
.sum-name { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none; line-height: 1.4; }
.sum-name:hover { color: var(--brand); }
.sum-meta { font-size: 13px; color: var(--text-muted); }
.sum-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-sm { height: 38px; }
.qty-sm .qty-btn { width: 32px; }
.qty-sm .qty-input { width: 70px; font-size: 14px; }
.sum-remove { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--text-muted); }
.sum-remove:hover { color: #7A5A00; border-color: #E6C877; background: #FBF3DC; }
.sum-remove .ic { width: 18px; height: 18px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; font-weight: 600; }
.sum-total strong { font-size: 18px; color: var(--brand-dark); }
.sum-empty { text-align: center; padding: 20px 0 6px; }
.sum-empty-t { font-family: var(--font-head); font-weight: 600; font-size: 17px; margin-bottom: 4px; }

.factory-card { overflow: hidden; display: none; }
.factory-map { display: block; height: 130px; }
.factory-map svg { width: 100%; height: 100%; }
.factory-body { padding: 16px 18px 18px; }
.factory-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 14px; font-size: 14px; }
.factory-list li { display: flex; gap: 8px; align-items: flex-start; }
.factory-list .ic { width: 18px; height: 18px; color: var(--brand); margin-top: 3px; }
.factory-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.factory-actions .btn { padding-inline: 8px; font-size: 14px; }

.order-form-card { padding: 20px 18px; }
.order-title { font-size: clamp(24px, 5vw, 32px); margin-bottom: 18px; color: var(--brand-dark); }
.form-alert { background: #FBF3DC; color: #7A5A00; border: 1px solid #E6C877; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.form-grid { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.form-grid .field { margin-bottom: 0; }
.form-grid { margin-bottom: 14px; }
.field > label, .field > legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 6px; }
.field .muted { font-weight: 400; font-size: 13px; }
.req { color: #7A5A00; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #C3D2DA; border-radius: var(--radius-sm);
  background-color: #fff; font-size: 16px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-inline-end: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%235B6F7C' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: left 12px center;
}
[dir="ltr"] .field select { background-position: right 12px center; }
[dir="rtl"] .field input[type="tel"] { text-align: right; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(1, 74, 109, .14); }
.field [aria-invalid="true"] { border-color: #B98A06 !important; background-color: #FBF3DC; }
.field-err { color: #7A5A00; font-size: 13px; margin: 0; }
.field-err:empty { display: none; }

.radio-cards { display: grid; grid-template-columns: 1fr; gap: 8px; }
.radio-card { position: relative; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; }
.radio-card input { width: 20px; height: 20px; accent-color: var(--brand-dark); margin: 0; }
.radio-card:has(input:checked) { border-color: var(--brand-dark); background: #F2F7FA; }
.radio-card:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.brand-note { margin: 8px 0 0; padding: 8px 12px; background: var(--surface-warm); border-radius: var(--radius-sm); font-size: 14px; }

.upload {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer;
  border: 1.5px dashed #AFC3CE; border-radius: var(--radius); background: var(--surface-soft); transition: border-color .2s, background-color .2s;
}
.upload:hover, .upload.is-drag { border-color: var(--brand); background: #EEF5F9; }
.upload:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.upload-ic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm); background: #DCEAF2; color: var(--brand); }
.upload-ic svg { width: 22px; height: 22px; }
.upload-text { display: flex; flex-direction: column; min-width: 0; }
.upload-text strong { font-family: var(--font-head); font-size: 15px; overflow-wrap: anywhere; }
.upload-text .muted { font-size: 13px; }
.upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.has-err .upload { border-color: #B98A06; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }
.form-after { font-size: 13px; color: var(--text-muted); text-align: center; margin: 10px 0 0; }

@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .radio-cards { grid-template-columns: repeat(3, 1fr); }
  .order-form-card { padding: 28px; }
}
@media (min-width: 1000px) {
  .order-grid { grid-template-columns: 1fr 360px; align-items: start; padding-top: 28px; gap: 20px; }
  .order-aside { order: 2; position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
  .order-form-card { order: 1; padding: 32px; }
  .factory-card { display: block; }
}

.thanks { min-height: 62vh; display: grid; place-items: center; }
.thanks-ic { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--whatsapp); color: #fff; box-shadow: 0 0 0 10px rgba(1, 74, 109, .14); }
.thanks-ic .ic { width: 38px; height: 38px; stroke-width: 2.6; }
.thanks-no { font-size: 18px; margin: 10px 0; }
.thanks-no strong { font-size: 22px; color: var(--brand-dark); background: var(--surface-warm); padding: 2px 10px; border-radius: 6px; }
.thanks .lead { margin-bottom: 22px; }
.thanks-small { font-size: 13px; margin-top: 10px; }
.brand-img { width: auto; max-width: 140px; height: 38px; object-fit: contain; }

/* =====================================================================
   طباعة اللوجو / الجودة / من نحن / تواصل
   ===================================================================== */
.print-page { padding-block: 24px 64px; }
.pt-grid { display: grid; gap: 24px; }
.pt-stage .viewer { aspect-ratio: 1 / 1; max-height: 520px; margin-inline: auto; }
.pt-method-info { margin: 12px 0 0; padding: 10px 14px; background: var(--surface-warm); border-radius: var(--radius-sm); font-size: 14px; }
.pt-method-info:empty { display: none; }
.pt-controls { display: flex; flex-direction: column; gap: 4px; }
.pt-label { font-weight: 600; font-size: 15px; display: block; margin-bottom: 6px; }
.pt-controls .field { margin-bottom: 16px; }
.pt-controls .swatch[aria-checked="true"] { box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--brand); }
.pt-controls input[type="text"] { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #C3D2DA; border-radius: var(--radius-sm); font-size: 16px; }
.pt-controls input[type="text"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(1, 74, 109, .14); }
.pt-controls .seg { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.demo-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.demo { margin: 0; padding: 18px 10px 12px; text-align: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.demo-svg { width: 62%; height: auto; margin: 0 auto 8px; filter: drop-shadow(0 8px 10px rgba(1, 52, 77, .12)); }
.demo figcaption { display: flex; flex-direction: column; font-size: 14px; }
.demo-note { font-size: 13px; margin-top: 12px; }
.section-tight .section-title-sm { margin-bottom: 18px; }
@media (min-width: 900px) {
  .pt-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
  .pt-stage { position: sticky; top: calc(var(--header-h) + 20px); }
  .demo-row { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

/* الجودة */
.pp-card {
  display: grid; gap: 20px; align-items: center; padding: 28px 24px; color: #fff;
  background: var(--brand-dark); border-radius: var(--radius-lg);
}
.pp-card-ic svg { width: 84px; height: 84px; }
.pp-card-title { color: #fff; font-size: 26px; margin-bottom: 8px; }
.pp-card-text { color: rgba(255, 255, 255, .8); margin-bottom: 14px; max-width: 46em; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-tags li { padding: 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 14px; }
.cert-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 20px; }
.cert { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cert-img { display: grid; place-items: center; aspect-ratio: 4 / 3; margin-bottom: 12px; background: var(--surface-soft); border-radius: var(--radius-sm); overflow: hidden; }
.cert-img img { width: 100%; height: 100%; object-fit: contain; }
.cert h3 { font-size: 17px; margin: 0 0 4px; }
.cert p { margin: 0; font-size: 14px; }
@media (min-width: 640px) { .cert-grid { grid-template-columns: repeat(2, 1fr); } .pp-card { grid-template-columns: auto 1fr; padding: 36px; gap: 28px; } }
@media (min-width: 960px) { .cert-grid { grid-template-columns: repeat(3, 1fr); } }

/* من نحن */
.about-grid { display: grid; gap: 28px; }
.about-text p { font-size: 17px; line-height: 1.95; color: var(--text); max-width: 46em; }
.facts { padding: 20px; align-self: start; }
.facts .card-title { margin-bottom: 14px; }
.facts .dl { margin-bottom: 16px; }
.gal-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.gal-item { position: relative; display: block; padding: 0; border: 0; aspect-ratio: 4 / 3; background: var(--surface); border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gal-item:hover img { transform: scale(1.04); }
.gal-cap { position: absolute; inset: auto 0 0 0; padding: 18px 12px 10px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(0, 34, 52, .8)); text-align: start; }
.gal-play { position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--brand-dark); }
.gal-play .ic { width: 26px; height: 26px; }
.gal-iframe { border: 0; width: 100%; height: 100%; }
@media (min-width: 768px) { .about-grid { grid-template-columns: 1.6fr 1fr; gap: 48px; } .gal-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

/* تواصل */
.contact-grid { display: grid; gap: 24px; }
.contact-list { display: flex; flex-direction: column; gap: 18px; margin-bottom: 22px; }
.contact-list li { display: flex; gap: 14px; }
.ci-ic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm); background: #E3EEF4; color: var(--brand); }
.contact-list strong { display: block; font-family: var(--font-head); font-size: 15px; }
.contact-list p { margin: 2px 0 0; color: var(--text-muted); overflow-wrap: anywhere; }
.contact-form-card { padding: 22px 20px; }
.contact-form-card .card-title { margin-bottom: 14px; }
.cf-ok { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #E3EEF4; color: #014A6D; border-radius: var(--radius-sm); font-weight: 500; }
.cf-ok .ic { color: var(--whatsapp); }
.map-section { padding-bottom: 64px; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.map-frame { position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; } .contact-form-card { padding: 32px; } .map-frame { aspect-ratio: 21 / 9; } }

/* على الشاشات الضيقة الأزرار الطويلة تنزل سطر جديد بدل ما تعمل سكرول أفقي */
@media (max-width: 520px) {
  .btn { white-space: normal; text-align: center; line-height: 1.35; }
}

/* هيدر بيخفّ ويبقى ظله أوضح عند النزول + شريط تقدّم الصفحة */
.site-header { transition: box-shadow .3s, background-color .3s; }
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(0, 52, 77, .45); }
.site-header .header-inner { transition: height .3s var(--ease); }
@media (min-width: 1024px) { .site-header.is-scrolled .header-inner { height: 64px; } }
.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 120; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), #EDC65A); }
[dir="rtl"] .scroll-progress span { transform-origin: 100% 50%; }
html.intro-open .scroll-progress { display: none; }

.form-ok { background: #E3EEF4; color: #014A6D; border-color: #9DB6C4; }

/* جردل صغير على الجنب بينزل مع السكرول (مؤشر تقدّم + رجوع لأعلى) */
.scroll-bucket {
  position: fixed; z-index: 90; right: 8px; top: 92px; width: 34px; height: calc(100vh - 188px); height: calc(100svh - 188px); padding: 0; border: 0; background: none;
  cursor: pointer; display: block; -webkit-tap-highlight-color: transparent;
}
.scroll-bucket[hidden] { display: none; }
.scroll-bucket:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sb-rail { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; border-radius: 2px; background: rgba(1, 74, 109, .18); overflow: hidden; }
.sb-rail i { position: absolute; top: 0; left: 0; right: 0; height: 0; border-radius: 2px; background: linear-gradient(180deg, var(--accent), #EDC65A); }
.sb-bucket { position: absolute; top: 0; left: 0; width: 34px; height: 36px; display: block; transform-origin: 50% 20%; filter: drop-shadow(0 4px 6px rgba(0, 38, 58, .35)); will-change: transform; }
.sb-bucket svg { width: 100%; height: 100%; overflow: visible; }
.sb-check { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .25s, transform .35s cubic-bezier(.3, 1.8, .5, 1); }
.scroll-bucket.is-end .sb-check { opacity: 1; transform: scale(1); }
.scroll-bucket.is-top .sb-rail { opacity: .6; }
.scroll-bucket:hover .sb-bucket { filter: drop-shadow(0 6px 10px rgba(222,168,10, .55)); }
html.intro-open .scroll-bucket { display: none; }
@media (max-width: 899px) {
  .scroll-bucket { right: 2px; width: 26px; top: 76px; height: calc(100vh - 166px); height: calc(100svh - 166px); }
  .sb-bucket { width: 26px; height: 28px; }
  .sb-rail { width: 3px; margin-left: -1.5px; }
}
@media print { .scroll-bucket { display: none; } }

/* =====================================================================
   B2B: كارت المنتج (اسم في لافتة كلاسيك + 3 مواصفات + اطلب الآن)
   ===================================================================== */
.btn-xl { min-height: 58px; padding: 15px 28px; font-size: 17px; border-radius: 14px; }
.btn-glass { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); }
.btn-glass:hover { background: rgba(255,255,255,.16); border-color: #fff; }

.p-card-media, .viewer {
  background: radial-gradient(ellipse at 50% 38%, #0B5278 0%, #013B57 55%, #00263A 100%);
}
.p-card-media { aspect-ratio: 1 / 1; border-bottom: 0; }
.p-card-media img { padding: 4% 4% 16%; filter: drop-shadow(0 14px 14px rgba(0,0,0,.3)); transition: transform .5s var(--ease); }
.p-card:hover .p-card-media img { transform: translateY(-3px); }
.p-badge {
  position: absolute; inset-inline: 12%; bottom: 14px; z-index: 1; padding: 8px 14px; text-align: center;
  font: 600 15px/1.35 var(--font-head); color: #014A6D; letter-spacing: .01em;
  background: #fff; border: 1px solid #014A6D; border-radius: 4px; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px rgba(1,74,109,.35), 0 6px 14px -6px rgba(0,0,0,.5);
}
.p-specs { margin: 0 0 14px; display: grid; gap: 0; }
.p-spec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.p-spec:last-child { border-bottom: 0; }
.p-spec dt { color: var(--text-muted); }
.p-spec dd { margin: 0; font-weight: 600; color: var(--text); }
.p-card-cta { margin-top: auto; }

.pd-keyspecs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.pd-keyspecs > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.pd-keyspecs dt { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.pd-keyspecs dd { margin: 0; font-weight: 600; font-size: 17px; }
.pd-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pd-cta .btn { flex: 1 1 200px; }
.viewer[data-static] { cursor: default; }
.viewer-default { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5%; filter: drop-shadow(0 18px 18px rgba(0,0,0,.35)); }
.viewer[data-static] .viewer-tools, .viewer[data-static] .viewer-dim, .viewer[data-static] .viewer-hint { display: none; }

/* صفحة طلب عرض السعر */
.fs-plain { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.fs-plain > legend, .pick-field > legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 12px; font: 600 18px/1.3 var(--font-head); color: var(--text); }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; }
.pick-field { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick-box { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s, background .2s, box-shadow .2s; }
.pick-name { font-weight: 600; font-size: 15px; }
.pick-cap { font-size: 13px; color: var(--text-muted); }
.pick:hover .pick-box { border-color: #9DB6C4; }
.pick input:checked + .pick-box { border-color: var(--brand); background: #EEF5F9; box-shadow: 0 0 0 3px rgba(1,74,109,.12); }
.pick input:focus-visible + .pick-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.how-card, .factory-card { padding: 20px; }
.how-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.how-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.how-list .mono { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--brand-dark); font-weight: 600; }
.form-after { text-align: center; color: var(--text-muted); font-size: 14px; margin: 12px 0 0; }
.pick-other { width: 100%; margin-top: 10px; }
.pick-other[hidden] { display: none; }

.tag-usage, .tag-food, .tag-chemical { background: #fff; color: #014A6D; border: 1px solid rgba(1,74,109,.25); }

/* =====================================================================
   الكتالوج (سادة / مطبوعة) + كروت الصور
   ===================================================================== */
.cat-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 26px 0 8px; }
.seg { position: relative; display: inline-flex; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg-btn { position: relative; z-index: 1; padding: 10px 22px; border: 0; background: none; border-radius: 999px; font: 600 15px var(--font-head); color: var(--text-muted); cursor: pointer; transition: color .3s; }
.seg-btn .mono { font-size: 12px; opacity: .7; margin-inline-start: 4px; }
.seg-btn[aria-selected="true"] { color: #fff; }
.seg-thumb { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; border-radius: 999px; background: var(--brand); transition: transform .45s var(--ease), width .45s var(--ease); }
.cat-bar .search-box { flex: 1 1 260px; max-width: 380px; }
.cat-group { margin-top: 34px; }
.cat-group-head { margin-bottom: 18px; }
.cat-group-head .muted { margin: 4px 0 0; }
.cat-none { text-align: center; color: var(--text-muted); padding: 60px 0; }
.p-cell[hidden], .cat-group[hidden] { display: none; }
.cell-pop { animation: cell-pop .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes cell-pop { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }

/* صور المنتجات الحقيقية: خلفية فاتحة والصورة مالية الإطار */
.p-card-media { background: #F4F7F9; aspect-ratio: 1 / 1; overflow: hidden; }
.p-card-media img { width: 100%; height: 100%; padding: 0; object-fit: cover; filter: none; transition: transform .8s var(--ease); }
.p-card:hover .p-card-media img { transform: scale(1.06); }
.p-card-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%); transform: translateX(-120%); transition: transform .9s var(--ease); pointer-events: none; }
.p-card:hover .p-card-media::after { transform: translateX(120%); }
.p-badge { box-shadow: 0 6px 18px -8px rgba(0,52,77,.45); z-index: 2; }
.p-card:hover { transform: translateY(-6px); box-shadow: 0 22px 40px -22px rgba(1,74,109,.45); border-color: rgba(1,74,109,.3); }
.tag-usage { z-index: 2; }
@media (prefers-reduced-motion: reduce) { .cell-pop { animation: none; } .p-card:hover, .p-card:hover .p-card-media img { transform: none; } }

/* معرض صور المنتج */
.gallery { position: relative; }
.gal-stage { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-lg); overflow: hidden; background: #F4F7F9; border: 1px solid var(--line); touch-action: pan-y; }
.gal-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .6s var(--ease), transform 1.1s var(--ease); }
.gal-img.is-on { opacity: 1; transform: none; }
.gal-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.92); color: var(--brand); cursor: pointer; transition: transform .25s var(--ease), background .25s; }
.gal-nav:hover { background: #fff; transform: scale(1.08); }
.gal-nav .ic { width: 20px; height: 20px; }
.gal-prev { inset-inline-start: 12px; }
.gal-next { inset-inline-end: 12px; }
.gal-prev .ic { transform: scaleX(-1); }
[dir="rtl"] .gal-prev .ic { transform: none; }
[dir="rtl"] .gal-next .ic { transform: scaleX(-1); }
.gal-count { position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgba(0,52,77,.85); color: #fff; font-size: 12px; }
.gal-count b { font-weight: 500; }
.gal-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 10px; }
.gal-thumb { aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; background: #F4F7F9; cursor: pointer; opacity: .65; transition: opacity .3s, border-color .3s, transform .3s var(--ease); }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gal-thumb:hover { opacity: 1; transform: translateY(-2px); }
.gal-thumb.is-on { opacity: 1; border-color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .gal-img { transition: opacity .2s; transform: none; } }

/* الاسم في شريط تحت الصورة (من غير ما يغطي المنتج) */
.p-card-media { aspect-ratio: 5 / 6; background: #fff; }
.p-card-media img { position: absolute; inset: 0 0 58px 0; width: 100%; height: calc(100% - 58px); background: #F4F7F9; }
.p-card-media::before { content: ''; position: absolute; inset: auto 0 0 0; height: 58px; background: #fff; z-index: 1; }
.p-card-media .p-badge { bottom: 10px; inset-inline: 12px; z-index: 2; }
.p-card-media::after { bottom: 58px; }

/* =====================================================================
   رأس الصفحات بالصور
   ===================================================================== */
.page-head.ph { position: relative; overflow: hidden; border: 0; color: #fff; padding-block: 34px 34px; background: radial-gradient(700px 300px at 85% 40%, #0B5278 0%, transparent 70%), linear-gradient(135deg, #00263A 0%, #013B57 55%, #014A6D 100%); }
.page-head.ph::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(90deg, #000, transparent 70%); }
.page-head.ph .container { position: relative; z-index: 2; }
.ph .page-title { color: #fff; }
.ph .page-lead { color: rgba(255,255,255,.82); }
.ph .crumbs, .ph .crumbs a { color: rgba(255,255,255,.7); }
.ph .crumbs a:hover { color: var(--accent); }
.ph .eyebrow { color: var(--accent); }
.ph-photos { position: absolute; z-index: 1; inset-block: 0; inset-inline-end: 3%; width: 46%; display: flex; align-items: center; justify-content: center; gap: 14px; pointer-events: none; opacity: .38; }
.ph-img { width: 23%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; border: 3px solid #fff; background: #fff; box-shadow: 0 24px 40px -18px rgba(0,0,0,.6); animation: ph-in 1.1s var(--ease) both; }
.ph-img0 { transform: rotate(-6deg) translateY(10px); animation-delay: .05s; }
.ph-img1 { transform: rotate(3deg) translateY(-14px); animation-delay: .15s; }
.ph-img2 { transform: rotate(-3deg) translateY(12px); animation-delay: .25s; }
.ph-img3 { transform: rotate(6deg) translateY(-8px); animation-delay: .35s; }
@keyframes ph-in { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
@media (min-width: 800px) {
  .page-head.ph { padding-block: 56px 56px; min-height: 250px; display: flex; align-items: center; }
  .page-head.ph > .container { width: 100%; }
  .ph-photos { opacity: 1; width: 44%; inset-inline-end: 4%; gap: 18px; }
  .ph-img { width: 24%; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) { .ph-img { animation: none; } }

/* ---------------- زر "قيّمنا" العايم ---------------- */
.rev-float { position: fixed; left: 12px; bottom: 86px; z-index: 44; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; transition: transform .3s var(--ease); }
.rev-float:hover { transform: translateY(-3px); }
.rev-ic { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 8px 20px -6px rgba(1,74,109,.55); border: 3px solid #fff; position: relative; }
.rev-ic .ic { width: 28px; height: 28px; }
.rev-ic::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: wa-pulse 3.2s ease-out 1s infinite; }
.rev-txt { padding: 3px 9px; border-radius: 999px; background: var(--brand-dark); color: #fff; font: 600 11px/1.4 var(--font-head); white-space: nowrap; box-shadow: 0 6px 14px -6px rgba(0,0,0,.5); }
@media (max-width: 480px) { .rev-float { left: 8px; } }
@media (min-width: 800px) { .ph .page-lead { max-width: min(36em, 50%); } .ph .page-title { max-width: 50%; } }
.rev-float { bottom: 96px; }
/* زر التقييم على اليمين، والواتساب على الشمال */
.rev-float { left: auto; right: 10px; bottom: 12px; }
@media (max-width: 480px) { .rev-float { left: auto; right: 6px; } .rev-ic { width: 50px; height: 50px; } }

/* الموبايل: منتجين جنب بعض */
@media (max-width: 559px) {
  .p-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-card { border-radius: 12px; }
  .p-card-media { aspect-ratio: 1 / 1.1; }
  .p-card-media img { inset: 0 0 42px 0; height: calc(100% - 42px); }
  .p-card-media::before { height: 42px; }
  .p-card-media::after { bottom: 42px; }
  .p-card-media .p-badge { inset-inline: 6px; bottom: 6px; padding: 5px 4px; font-size: 12px; line-height: 1.25; box-shadow: none; }
  .p-card-media .tag { font-size: 10px; padding: 1px 6px; top: 6px; }
  .p-card-body { padding: 8px 10px 10px; }
  .p-spec { font-size: 11.5px; padding: 6px 0; }
  .p-specs { margin-bottom: 10px; }
  .p-card-cta { min-height: 38px; padding: 8px 6px; font-size: 13px; }
  .p-card:hover { transform: none; }
}
