﻿/* =========================================================
   Mariam Home — مريم هوم
   Organized: 1) Variables  2) Base  3) Layout  4) Components
              5) Pages  6) Responsive  7) Motion
   ========================================================= */

/* ---------- 1) VARIABLES ---------- */
:root {
  /* Colors — taken from the Mariam Home logo */
  --color-bg: #FDF6EE;          /* warm cream */
  --color-bg-alt: #F8ECDF;      /* deeper cream for bands */
  --color-surface: #FFFFFF;
  --color-primary: #D63F6C;     /* logo pink (AA with white text) */
  --color-primary-dark: #B52E58;
  --color-primary-soft: #FCE4EB;
  --color-teal: #2BA79F;        /* logo teal — decorative */
  --color-teal-dark: #1B7A74;   /* teal for text/icons (AA) */
  --color-teal-soft: #DDF2EF;
  --color-yellow: #F4B83A;      /* logo yellow — decorative */
  --color-yellow-soft: #FDF0D2;
  --color-text: #3B2A24;        /* warm charcoal-brown */
  --color-text-muted: #6B5A52;
  --color-border: #EADCCD;
  --color-error: #B3261E;
  --color-success: #1B7A74;

  /* Typography */
  --font-heading: "Cairo", system-ui, sans-serif;
  --font-body: "Tajawal", system-ui, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-2xl: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --fs-3xl: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Shape & depth */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(59, 42, 36, 0.06), 0 2px 8px rgba(59, 42, 36, 0.05);
  --shadow: 0 6px 24px rgba(59, 42, 36, 0.08);
  --shadow-lg: 0 18px 48px rgba(59, 42, 36, 0.14);

  --container: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 0.25s var(--ease);
}

/* ---------- 2) BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* لينك "الريفيوهات" في القائمة: الهيدر الثابت مايغطّيش أول السكشن */
#reviews { scroll-margin-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.35;
  margin: 0 0 var(--space-3);
  color: var(--color-text);
  text-wrap: balance;
}
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
img { max-width: 100%; display: block; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--color-primary-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible {
  outline: 3px solid var(--color-teal-dark);
  outline-offset: 3px;
  border-radius: 6px;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; inset-inline-start: var(--space-4); top: -60px; z-index: 200;
  background: var(--color-text); color: #fff; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm); transition: top var(--t);
}
.skip-link:focus { top: var(--space-3); color: #fff; }

/* ---------- 3) LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.section { padding-block: var(--space-8); }
.section--alt { background: var(--color-bg-alt); }
.section-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-6);
}
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head h2 { font-size: var(--fs-2xl); margin: 0; }
.section-head p { color: var(--color-text-muted); margin: var(--space-2) 0 0; max-width: 56ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-sm);
  color: var(--color-teal-dark); margin-bottom: var(--space-2);
}
.eyebrow::before {
  content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--color-primary);
}

/* ---------- 4) COMPONENTS ---------- */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-5);
  border-radius: var(--radius-pill); border: 2px solid transparent;
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-base);
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-primary); color: #fff; box-shadow: 0 6px 16px rgba(214, 63, 108, 0.25); }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--color-text); border-color: var(--color-text); }
.btn--outline:hover { background: var(--color-text); color: #fff; }
.btn--teal { background: var(--color-teal-dark); color: #fff; }
.btn--teal:hover { background: #135E59; color: #fff; }
.btn--whatsapp { background: #1E8E4E; color: #fff; width: 100%; }
.btn--whatsapp:hover { background: #17733F; color: #fff; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: var(--fs-sm); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--color-text);
  transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: var(--color-primary-soft); color: var(--color-primary); }
.icon-btn svg { width: 22px; height: 22px; }
.badge {
  position: absolute; top: 2px; inset-inline-start: 0;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--color-primary); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  font-family: var(--font-heading);
}
.badge[data-count="0"] { display: none; }
.badge.bump { animation: bump 0.4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.35); } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 246, 238, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  transition: box-shadow var(--t), background var(--t);
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(59, 42, 36, 0.08); background: rgba(253, 246, 238, 0.98); }
.header-inner { display: flex; align-items: center; gap: var(--space-4); height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text); }
.logo:hover { color: var(--color-text); }
.logo img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-family: var(--font-heading); font-size: 1.375rem; font-weight: 800; color: var(--color-primary); }
.logo-text small { font-family: var(--font-heading); font-size: 0.6875rem; letter-spacing: 0.3em; color: var(--color-text); font-weight: 700; }
.main-nav { margin-inline-start: auto; }
.nav-list { display: flex; gap: var(--space-1); }
.nav-list a {
  display: block; padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  color: var(--color-text); font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-sm);
}
.nav-list a:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }
.nav-list a[aria-current="page"] { background: var(--color-primary); color: #fff; }
.header-actions { display: flex; align-items: center; gap: var(--space-1); }
.menu-toggle { display: none; }
.lang-form { display: contents; }
.lang-btn {
  min-width: 44px; height: 36px; padding: 0 var(--space-2);
  border: 1.5px solid var(--color-primary); border-radius: var(--radius-pill);
  background: transparent; color: var(--color-primary);
  font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-sm);
  cursor: pointer; transition: background var(--t), color var(--t);
}
.lang-btn:hover { background: var(--color-primary); color: #fff; }

/* Hero */
.hero { padding-block: var(--space-7) var(--space-8); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-7); align-items: center; }
.hero h1 { font-size: var(--fs-3xl); font-weight: 800; margin-bottom: var(--space-4); }
.hero h1 .accent { color: var(--color-primary); }
.hero-sub { font-size: var(--fs-lg); color: var(--color-text-muted); max-width: 46ch; margin-bottom: var(--space-6); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-points { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-6); color: var(--color-text-muted); font-size: var(--fs-sm); }
.hero-points li { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero-points svg { width: 18px; height: 18px; color: var(--color-teal-dark); }
.hero-media { position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 5 / 4; object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 120px;
  box-shadow: var(--shadow-lg);
}
.hero-media::before {
  content: ""; position: absolute; inset: -18px -18px auto auto; width: 120px; height: 120px;
  border-radius: 50%; background: var(--color-yellow-soft); z-index: -1;
}
.hero-media::after {
  content: ""; position: absolute; inset: auto auto -22px -22px; width: 160px; height: 160px;
  border-radius: 50%; background: var(--color-teal-soft); z-index: -1;
}
.hero-tag {
  position: absolute; bottom: var(--space-5); inset-inline-start: calc(-1 * var(--space-5));
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--color-surface); padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-tag span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); }
.hero-tag svg { width: 22px; height: 22px; }
.hero-tag strong { display: block; font-family: var(--font-heading); font-size: var(--fs-sm); }
.hero-tag small { color: var(--color-text-muted); font-size: var(--fs-xs); }

/* Category cards */
.category-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); }
.category-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3);
  padding: var(--space-6) var(--space-3); background: var(--color-surface);
  border-radius: var(--radius); border: 1px solid var(--color-border);
  color: var(--color-text); transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: var(--color-text); }
.category-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; transition: transform var(--t); }
.category-card:hover .category-icon { transform: scale(1.06) rotate(-4deg); }
.category-icon svg { width: 34px; height: 34px; }
.category-icon--pink { background: var(--color-primary-soft); color: var(--color-primary); }
.category-icon--teal { background: var(--color-teal-soft); color: var(--color-teal-dark); }
.category-icon--yellow { background: var(--color-yellow-soft); color: #9A6A06; }
.category-card h3 { font-size: var(--fs-base); margin: 0; }
.category-card small { color: var(--color-text-muted); font-size: var(--fs-xs); }

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
.product-card {
  display: flex; flex-direction: column; background: var(--color-surface);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-media { position: relative; background: var(--color-bg-alt); aspect-ratio: 1; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-flag {
  position: absolute; top: var(--space-3); inset-inline-start: var(--space-3);
  background: var(--color-yellow); color: var(--color-text);
  font-family: var(--font-heading); font-size: var(--fs-xs); font-weight: 700;
  padding: 2px var(--space-3); border-radius: var(--radius-pill);
}
.product-body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); flex: 1; }
.product-cat { font-size: var(--fs-xs); color: var(--color-teal-dark); font-weight: 700; }
/* بادج عدد المبيعات — ملوّن وبأيقونة عشان يبان جنب الاسم */
.product-sold {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 700;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}
.product-sold svg { width: 14px; height: 14px; flex: none; }
.product-name { font-size: var(--fs-base); margin: 0; line-height: 1.5; }
.product-name a { color: var(--color-text); }
.product-name a:hover { color: var(--color-primary); }
.product-media { display: block; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: auto; padding-top: var(--space-3); }
.price { font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-lg); color: var(--color-text); white-space: nowrap; }
.price small { font-size: var(--fs-xs); font-weight: 600; color: var(--color-text-muted); margin-inline-start: 2px; }
.add-btn {
  display: inline-flex; align-items: center; gap: var(--space-1);
  min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-pill);
  border: 0; background: var(--color-primary-soft); color: var(--color-primary-dark);
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-sm);
  transition: background var(--t), color var(--t);
}
.add-btn:hover { background: var(--color-primary); color: #fff; }
.add-btn svg { width: 18px; height: 18px; }
.add-btn.is-added { background: var(--color-teal-dark); color: #fff; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: var(--space-8) var(--space-4); color: var(--color-text-muted); }

/* Trust / features */
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.trust-item { text-align: center; padding: var(--space-5) var(--space-3); }
.trust-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--color-surface); color: var(--color-primary); box-shadow: var(--shadow-sm); margin-bottom: var(--space-4); }
.trust-item:nth-child(even) .trust-icon { color: var(--color-teal-dark); }
.trust-icon svg { width: 30px; height: 30px; }
.trust-item h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2); }
.trust-item p { color: var(--color-text-muted); font-size: var(--fs-sm); margin: 0; }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.testimonial {
  display: flex; flex-direction: column; gap: var(--space-4); margin: 0;
  background: var(--color-surface); padding: var(--space-6); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stars { display: flex; gap: 2px; color: var(--color-yellow); }
.stars svg { width: 18px; height: 18px; }
.testimonial blockquote { margin: 0; font-size: var(--fs-base); }
.testimonial figcaption { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-family: var(--font-heading); font-weight: 800; background: var(--color-primary-soft); color: var(--color-primary-dark); }
/* الألوان بتلف كل 3 كروت عشان الريفيوهات عددها متغيّر */
.testimonial:nth-child(3n+2) .avatar { background: var(--color-teal-soft); color: var(--color-teal-dark); }
.testimonial:nth-child(3n) .avatar { background: var(--color-yellow-soft); color: #8A5E05; }
.stars svg.is-empty { opacity: .25; }
.testimonial blockquote p { margin: 0; white-space: pre-line; }

/* ===== Slider (آراء العملاء) — scroll-snap + reviews-slider.js ===== */
.slider { position: relative; }
.slider-track {
  --per-view: 3; --gap: var(--space-5);
  display: flex; gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding-block: var(--space-2) var(--space-4); outline: none;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track:focus-visible { box-shadow: 0 0 0 3px var(--color-primary-soft); border-radius: var(--radius); }
.slider-track > * {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  scroll-snap-align: start; min-width: 0;
}
.slider-nav { display: flex; justify-content: center; gap: var(--space-3); margin-top: var(--space-3); }
.slider-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text);
  cursor: pointer; box-shadow: var(--shadow-sm); transition: background var(--t), color var(--t), border-color var(--t);
}
.slider-btn:hover, .slider-btn:focus-visible { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.slider-btn svg { width: 20px; height: 20px; }
/* لو الكروت كلها باينة مفيش داعي للأسهم */
.slider.is-static .slider-nav { display: none; }

/* ===== ريفيوهات الصور (سكرين شوتس) — سلايدر + Lightbox ===== */
.shots { margin-top: var(--space-8); }
.shots-head { text-align: center; margin-bottom: var(--space-6); }
.review-shots-title { font-size: var(--fs-xl); margin: 0 0 var(--space-2); }
.shots-sub { margin: 0; color: var(--color-text-muted); font-size: var(--fs-sm); }

/* سلايدر الصور: الكروت كلها 3:4 بنفس الحجم */
.shots-track {
  --per-view: 4; --gap: var(--space-5);
  padding: var(--space-5) var(--space-2) var(--space-5); /* مساحة للشريط اللاصق والميلة جوه الـ overflow */
}
.shot {
  --tilt: -1.2deg; --tape: var(--color-primary-soft);
  position: relative; display: block; aspect-ratio: 3 / 4;
  padding: var(--space-2); background: var(--color-surface);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transform: rotate(var(--tilt)); transition: transform var(--t), box-shadow var(--t);
}
.shot:nth-child(3n+2) { --tilt: 1deg;    --tape: var(--color-teal-soft); }
.shot:nth-child(3n)   { --tilt: -0.5deg; --tape: var(--color-yellow-soft); }
/* الشريط اللاصق فوق الصورة */
.shot::before {
  content: ""; position: absolute; z-index: 1; top: -10px; inset-inline-start: 50%;
  width: 84px; height: 22px; translate: 50% 0; rotate: -3deg;
  background: var(--tape); opacity: .9; border-radius: 3px;
  box-shadow: 0 1px 3px rgba(59, 42, 36, 0.12);
}
/* الافتراضي: الصورة كاملة في نص الكارت (مربعة/عريضة) */
.shot img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  border-radius: var(--radius-sm); background: #fff;
}
/* الطويلة (الكلاس من الـ JS): تملا الكارت من فوق وتتقص من تحت — كاملة في الـ Lightbox */
.shot.is-tall img { object-fit: cover; object-position: top; }
/* أيقونة التكبير ظاهرة على طول عشان العميلة تعرف إنها تدوس وتكبّر */
.shot-zoom {
  position: absolute; inset-block-end: var(--space-4); inset-inline-end: var(--space-4); z-index: 1;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); color: var(--color-primary); box-shadow: var(--shadow-sm);
  transition: background var(--t), color var(--t), scale var(--t);
}
.shot-zoom svg { width: 18px; height: 18px; }
.shot:hover, .shot:focus-visible { transform: rotate(0) translateY(-4px); box-shadow: var(--shadow-lg); }
.shot:hover .shot-zoom, .shot:focus-visible .shot-zoom { background: var(--color-primary); color: #fff; scale: 1.1; }
.shot:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }

/* Lightbox — <dialog> بيدّي فوكس تراب وEsc جاهزين */
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  padding: var(--space-4); border: 0; background: transparent; color: #fff;
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3); }
.lightbox::backdrop { background: rgba(30, 20, 17, 0.88); }
.lightbox-figure { margin: 0; display: grid; justify-items: center; gap: var(--space-3); min-width: 0; touch-action: pan-y; }
.lightbox-figure img {
  max-width: 100%; max-height: calc(100dvh - 7rem); width: auto; height: auto;
  border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg);
  animation: lb-in .25s var(--ease);
}
.lightbox-count { font-size: var(--fs-sm); opacity: .85; }
.lightbox-btn {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 0; cursor: pointer; background: rgba(255, 255, 255, 0.14); color: #fff;
  transition: background var(--t);
}
.lightbox-btn:hover, .lightbox-btn:focus-visible { background: var(--color-primary); }
.lightbox-btn svg { width: 22px; height: 22px; }
.lightbox-close { position: absolute; inset-block-start: var(--space-4); inset-inline-end: var(--space-4); z-index: 1; }
.lightbox.is-single .lightbox-prev, .lightbox.is-single .lightbox-next { visibility: hidden; }
@keyframes lb-in { from { opacity: 0; scale: .96; } to { opacity: 1; scale: 1; } }

.placeholder-note { text-align: center; color: var(--color-text-muted); font-size: var(--fs-xs); margin-top: var(--space-5); }

/* Newsletter strip */
.newsletter {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: center;
  background: var(--color-primary); color: #fff; border-radius: var(--radius-lg);
  padding: var(--space-7); position: relative; overflow: hidden;
}
.newsletter::after {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  border: 36px solid rgba(255, 255, 255, 0.1); inset: -90px auto auto -70px; pointer-events: none;
}
.newsletter h2 { color: #fff; font-size: var(--fs-xl); margin-bottom: var(--space-2); }
.newsletter p { margin: 0; color: #fff; }
.newsletter-form { display: flex; gap: var(--space-2); position: relative; z-index: 1; }
.newsletter-form input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 var(--space-5);
  border-radius: var(--radius-pill); border: 2px solid transparent; background: #fff; color: var(--color-text);
}
.newsletter-form input:focus { outline: none; border-color: var(--color-text); }
.newsletter-form .btn { background: var(--color-text); color: #fff; min-height: 52px; }
.newsletter-form .btn:hover { background: #000; }
.newsletter-msg { grid-column: 1 / -1; margin: 0; font-weight: 700; min-height: 1.5em; position: relative; z-index: 1; }

/* Footer */
.site-footer { background: var(--color-text); color: #EFE3D8; padding-top: var(--space-8); margin-top: var(--space-8); }
.site-footer a { color: #EFE3D8; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: var(--space-7); padding-bottom: var(--space-7); }
.footer-brand p { color: #D6C6B8; margin-top: var(--space-4); max-width: 38ch; font-size: var(--fs-sm); }
.footer-brand .logo-text strong { color: #FF8FB0; }
.footer-brand .logo-text small { color: #EFE3D8; }
.site-footer h2 { color: #fff; font-size: var(--fs-base); margin-bottom: var(--space-4); }
.footer-links { display: grid; gap: var(--space-2); font-size: var(--fs-sm); }
.footer-contact { display: grid; gap: var(--space-3); font-size: var(--fs-sm); }
.footer-contact li { display: flex; gap: var(--space-3); align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 4px; color: #FF8FB0; }
.socials { display: flex; gap: var(--space-2); margin-top: var(--space-5); }
.socials a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); transition: background var(--t), transform var(--t);
}
.socials a:hover { background: var(--color-primary); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-block: var(--space-5); font-size: var(--fs-xs); color: #CDBCAE; text-align: center; }

/* Cart drawer */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(40, 26, 20, 0.45); z-index: 90;
  opacity: 0; visibility: hidden; transition: opacity var(--t), visibility var(--t);
}
.cart-overlay.is-open { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 100;
  width: min(420px, 100%); background: var(--color-bg);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  transform: translateX(-100%); visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0.35s;
}
[dir="ltr"] .cart-drawer { transform: translateX(100%); }
.cart-drawer.is-open { transform: translateX(0); visibility: visible; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border); }
.cart-head h2 { margin: 0; font-size: var(--fs-lg); }
.cart-items { flex: 1; overflow-y: auto; padding: var(--space-4) var(--space-5); display: grid; gap: var(--space-3); align-content: start; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--space-3); align-items: center; background: var(--color-surface); padding: var(--space-3); border-radius: var(--radius-sm); }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.cart-item h3 { font-size: var(--fs-sm); margin: 0 0 var(--space-1); }
.cart-item .item-price { font-size: var(--fs-sm); color: var(--color-text-muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-pill); margin-top: var(--space-2); }
.qty button { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 50%; font-size: 1.1rem; line-height: 1; }
.qty button:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }
.qty span { min-width: 28px; text-align: center; font-weight: 700; font-family: var(--font-heading); }
.remove-btn { align-self: start; width: 36px; height: 36px; border: 0; background: transparent; border-radius: 50%; color: var(--color-text-muted); display: grid; place-items: center; }
.remove-btn:hover { background: #FBE3E1; color: var(--color-error); }
.remove-btn svg { width: 18px; height: 18px; }
.cart-empty { text-align: center; padding: var(--space-8) var(--space-4); color: var(--color-text-muted); }
.cart-empty svg { width: 56px; height: 56px; margin: 0 auto var(--space-4); color: var(--color-border); }
.cart-foot { padding: var(--space-5); border-top: 1px solid var(--color-border); background: var(--color-surface); display: grid; gap: var(--space-3); }

/* الـ attribute "hidden" بيتلغي لو العنصر عليه display في الـ CSS — القاعدة دي بترجّعه يشتغل في كل الموقع */
[hidden] { display: none !important; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-heading); font-weight: 700; }
.cart-total .price { font-size: var(--fs-xl); }
.cart-note { margin: 0; font-size: var(--fs-xs); color: var(--color-text-muted); text-align: center; }

/* Toast */
.toast {
  position: fixed; bottom: var(--space-5); left: 50%; z-index: 120;
  transform: translate(-50%, 140%); background: var(--color-text); color: #fff;
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill); box-shadow: var(--shadow-lg);
  font-weight: 700; font-size: var(--fs-sm); transition: transform 0.35s var(--ease), opacity 0.35s, visibility 0.35s;
  opacity: 0; visibility: hidden;
  max-width: calc(100% - 2rem); text-align: center;
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* Forms */
.field { display: grid; gap: var(--space-2); }
.field label { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-sm); }
.field input, .field textarea, .field select, .search-input, .sort-select {
  width: 100%; min-height: 50px; padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface);
  transition: border-color var(--t), box-shadow var(--t);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .search-input:focus, .sort-select:focus {
  outline: none; border-color: var(--color-teal-dark); box-shadow: 0 0 0 4px var(--color-teal-soft);
}
.field.has-error input, .field.has-error textarea { border-color: var(--color-error); }
.field-error { color: var(--color-error); font-size: var(--fs-xs); font-weight: 700; min-height: 1.2em; }

/* Page hero (inner pages) */
.page-hero { padding-block: var(--space-7) var(--space-6); text-align: center; }
.page-hero h1 { font-size: var(--fs-2xl); margin-bottom: var(--space-2); }
.page-hero p { color: var(--color-text-muted); max-width: 56ch; margin-inline: auto; }
.breadcrumb { display: flex; justify-content: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

/* ---------- 5) PAGES ---------- */

/* Products page */
.shop-toolbar { display: grid; gap: var(--space-4); margin-bottom: var(--space-6); }
.filter-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  min-height: 42px; padding: 0 var(--space-4); border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-border); background: var(--color-surface);
  font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-sm);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.chip:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.chip[aria-pressed="true"] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.search-wrap { position: relative; flex: 1 1 260px; }
.search-wrap svg { position: absolute; top: 50%; inset-inline-start: var(--space-4); transform: translateY(-50%); width: 20px; height: 20px; color: var(--color-text-muted); pointer-events: none; }
.search-input { padding-inline-start: 48px; border-radius: var(--radius-pill); }
.sort-select { width: auto; flex: 0 1 240px; border-radius: var(--radius-pill); cursor: pointer; }
.results-count { color: var(--color-text-muted); font-size: var(--fs-sm); margin: 0; }

/* Product details page */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: start; }
.pd-media { position: relative; background: var(--color-bg-alt); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.pd-media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pd-info { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-3); }
.pd-info .product-cat { font-size: var(--fs-sm); }
.pd-title { font-size: var(--fs-2xl); margin: 0; }
.pd-price { font-size: var(--fs-xl); margin: 0; color: var(--color-primary); }
.pd-desc { color: var(--color-text-muted); margin: 0; max-width: 52ch; }
.pd-buy { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.qty--lg { margin: 0; background: var(--color-surface); }
.qty--lg button { width: 46px; height: 46px; font-size: 1.3rem; }
.qty--lg span { min-width: 36px; font-size: var(--fs-lg); }
.pd-add { flex: 1 1 200px; }
.pd-perks { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); color: var(--color-text-muted); font-size: var(--fs-sm); }
.pd-perks li { display: inline-flex; align-items: center; gap: var(--space-2); }
.pd-perks svg { width: 18px; height: 18px; color: var(--color-teal-dark); }

/* About page */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
.split img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
.mission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.mission-card { background: var(--color-surface); padding: var(--space-6); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.mission-card h3 { font-size: var(--fs-lg); }
.mission-card p { margin: 0; color: var(--color-text-muted); }
.values-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-6); align-items: start; }
.card { background: var(--color-surface); border-radius: var(--radius); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.contact-form { display: grid; gap: var(--space-4); }
.form-success { background: var(--color-teal-soft); color: var(--color-teal-dark); padding: var(--space-4); border-radius: var(--radius-sm); font-weight: 700; margin: 0; }
.info-list { display: grid; gap: var(--space-5); }
.info-list li { display: flex; gap: var(--space-4); align-items: flex-start; }
.info-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--color-primary-soft); color: var(--color-primary); flex-shrink: 0; }
.info-icon svg { width: 22px; height: 22px; }
.info-list h3 { font-size: var(--fs-base); margin: 0; }
.info-list p { margin: 0; color: var(--color-text-muted); }
.map-placeholder {
  margin-top: var(--space-5); aspect-ratio: 16 / 10; border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--color-bg-alt) 0 14px, var(--color-bg) 14px 28px);
  border: 1.5px dashed var(--color-border); display: grid; place-items: center; text-align: center;
  color: var(--color-text-muted); font-size: var(--fs-sm); padding: var(--space-4);
}

/* ---------- 6) RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .main-nav {
    position: fixed; top: var(--header-h); inset-inline: 0; bottom: 0;
    background: var(--color-bg); padding: var(--space-5) var(--space-4);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity var(--t), transform var(--t), visibility var(--t);
    margin: 0;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; gap: var(--space-2); }
  .nav-list a { font-size: var(--fs-lg); padding: var(--space-3) var(--space-5); border-radius: var(--radius); }
  .header-actions { margin-inline-start: auto; }
  .hero-grid, .split, .contact-grid, .newsletter, .pd-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 560px; margin-inline: auto; width: 100%; }
  .trust-grid, .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .testimonial-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .testimonial-track { --per-view: 2; }
  .shots-track { --per-view: 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  /* على الموبايل: كارت وحتة من اللي بعده عشان يبان إنه بيتسحب */
  .testimonial-track { --per-view: 1.15; --gap: var(--space-3); }
  /* على الموبايل: كارتين وحتة عشان يبان إنه بيتسحب */
  .shots-track { --per-view: 2.2; --gap: var(--space-3); padding-inline: var(--space-1); }
  .shot { padding: 6px; }
  .shot-zoom { width: 28px; height: 28px; inset-block-end: 12px; inset-inline-end: 12px; }
  .shot-zoom svg { width: 15px; height: 15px; }
  .shot::before { width: 60px; height: 18px; }
  /* على الموبايل الأسهم تحت الصورة عشان الصورة تاخد العرض كله */
  .lightbox[open] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; padding: var(--space-3); }
  .lightbox-figure { grid-column: 1 / -1; grid-row: 1; }
  .lightbox-prev { grid-row: 2; justify-self: end; }
  .lightbox-next { grid-row: 2; justify-self: start; }
  .section { padding-block: var(--space-7); }
  .logo img { width: 44px; height: 44px; }
  .category-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .product-body { padding: var(--space-3); }
  .product-foot { flex-direction: column; align-items: stretch; }
  .add-btn { justify-content: center; }
  .price { font-size: var(--fs-base); }
  .hero-tag { inset-inline-start: var(--space-3); bottom: var(--space-3); }
  .hero-ctas .btn { flex: 1 1 auto; }
  .newsletter { padding: var(--space-6) var(--space-5); }
  .newsletter-form { flex-direction: column; }
  .mission-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .sort-select { flex: 1 1 100%; }
  .card { padding: var(--space-5); }
}
@media (max-width: 380px) {
  .trust-grid, .values-grid { grid-template-columns: 1fr; }
  .logo-text small { display: none; }
}

/* ---------- 7) MOTION ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   8) PERFORMANCE FIXES + PRODUCT GALLERY + CHECKOUT
   ========================================================= */

/* الهيرو بقى <picture> */
.hero-media picture { display: block; }

/* الكروت اللي برّه الشاشة المتصفح يأجّل رسمها (أسرع في صفحة المنتجات الطويلة) */
.product-grid .product-card { content-visibility: auto; contain-intrinsic-size: auto 420px; }

/* الـ backdrop-filter تقيل على الموبايل وبيقصّ القائمة الـ fixed جوه الهيدر */
@media (max-width: 900px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--color-bg); }
}

.field.has-error select { border-color: var(--color-error); }
.field label small { font-weight: 400; color: var(--color-text-muted); }
.field textarea[rows] { min-height: 0; }

/* صور المنتج المصغّرة */
.pd-thumbs {
  display: flex; gap: var(--space-2); padding: var(--space-3);
  overflow-x: auto; background: var(--color-surface);
}
.pd-thumb {
  flex: 0 0 auto; width: 64px; height: 64px; padding: 0; border-radius: var(--radius-sm);
  border: 2px solid transparent; overflow: hidden; background: var(--color-bg-alt); cursor: pointer;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb[aria-pressed="true"] { border-color: var(--color-primary); }
.pd-old-price { font-size: var(--fs-base); color: var(--color-text-muted); margin-inline-start: var(--space-3); font-weight: 400; }

/* ---------- Checkout ---------- */
.checkout-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--space-6); align-items: start;
}
.checkout-grid[hidden], .checkout-empty[hidden], .checkout-done[hidden] { display: none; }
.checkout-form, .checkout-summary {
  background: var(--color-surface); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-sm);
}
.checkout-form { display: grid; gap: var(--space-4); }
.checkout-summary { position: sticky; top: calc(var(--header-h) + var(--space-4)); display: grid; gap: var(--space-4); }
.checkout-title { font-size: var(--fs-lg); margin: 0; }
.checkout-submit { width: 100%; min-height: 56px; font-size: var(--fs-base); }

.checkout-notice {
  margin: 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  background: var(--color-yellow-soft); color: var(--color-text); font-size: var(--fs-sm); font-weight: 700;
}

.summary-list { display: grid; gap: var(--space-3); max-height: 420px; overflow-y: auto; }
.summary-item {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center;
  padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border);
}
.summary-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--color-bg-alt); }
.summary-item__info { display: grid; gap: 2px; }
.summary-item__name { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-sm); line-height: 1.4; }
.summary-item__meta { color: var(--color-text-muted); font-size: var(--fs-xs); }
.summary-item__sum { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline; }
.summary-total { font-family: var(--font-heading); font-weight: 800; }
.summary-total .price { font-size: var(--fs-xl); color: var(--color-primary); }
.summary-hint { margin: 0; font-size: var(--fs-xs); color: var(--color-text-muted); }

.checkout-empty, .checkout-done {
  max-width: 520px; margin-inline: auto; text-align: center;
  background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-7) var(--space-5);
  box-shadow: var(--shadow-sm); display: grid; gap: var(--space-4); justify-items: center;
}
.checkout-empty svg { width: 56px; height: 56px; color: var(--color-border); }
.checkout-empty p, .checkout-done p { margin: 0; color: var(--color-text-muted); }
.checkout-done h2 { margin: 0; }
.checkout-done__icon {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: var(--color-teal-soft); color: var(--color-teal-dark);
}
.checkout-done__icon svg { width: 36px; height: 36px; }

@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; order: -1; } /* الملخص فوق الفورم على الموبايل */
}
@media (max-width: 640px) {
  .checkout-form, .checkout-summary { padding: var(--space-5) var(--space-4); }
}

/* Contact map (iframe من Google Maps) */
.contact-map { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: var(--radius); margin-top: var(--space-5); }
.form-success[hidden] { display: none; }
