/* ==========================================
   3alam El Kotob — Paper / Flyer style
   Palette: paper, cream, latte, tan, cocoa, ink
   ========================================== */

:root {
  --paper: #f1e6d6;
  --cream: #fbf5ea;
  --latte: #d9c3a5;
  --tan: #b8936b;
  --cocoa: #4a3326;
  --ink: #2e2119;
  --muted: #7a6554;
  --line: #e0cfb6;
  --shadow: 0 10px 28px rgba(74, 51, 38, .12);
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1f1812;
    --cream: #2a2018;
    --latte: #4a3a2c;
    --tan: #cfa97c;
    --cocoa: #f1e6d6;
    --ink: #f6ecdc;
    --muted: #b9a68f;
    --line: #3b2e22;
    --shadow: 0 10px 28px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1f1812;
  --cream: #2a2018;
  --latte: #4a3a2c;
  --tan: #cfa97c;
  --cocoa: #f1e6d6;
  --ink: #f6ecdc;
  --muted: #b9a68f;
  --line: #3b2e22;
  --shadow: 0 10px 28px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Cairo', sans-serif;
  color: var(--ink);
  line-height: 1.75;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .35), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(184, 147, 107, .15), transparent 45%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
body { overflow-x: clip; }
img, svg { max-width: 100%; }
.container { max-width: 1080px; margin: auto; padding: 0 20px; }

:focus-visible { outline: 3px solid var(--tan); outline-offset: 3px; border-radius: 8px; }

/* ---------- Brand (franco) ---------- */
.brand {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--cocoa);
  direction: ltr;
  line-height: 1;
  white-space: nowrap;
}
.brand.small { font-size: 1.6rem; margin-bottom: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.nav-links { display: flex; gap: 24px; font-weight: 600; }
.nav-links a { color: var(--muted); transition: color .3s var(--ease); }
.nav-links a:hover { color: var(--cocoa); }
.nav-actions { display: flex; gap: 8px; align-items: center; }

.pill-btn {
  white-space: nowrap;
  background: var(--cream); border: 1px solid var(--line); color: var(--ink);
  border-radius: 99px; padding: 7px 16px; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: .95rem;
  transition: border-color .3s var(--ease), transform .3s var(--ease), background-color .3s var(--ease);
}
.pill-btn:hover { border-color: var(--tan); }
.badge {
  display: inline-block; background: var(--cocoa); color: var(--paper);
  border-radius: 99px; padding: 0 8px; font-size: .8rem; margin-right: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--cocoa); color: var(--paper);
  border: 2px solid var(--cocoa); padding: 11px 30px; border-radius: 99px;
  font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
  text-align: center;
  transition: transform .4s var(--ease), background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), opacity .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: var(--ink); border-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--cocoa); border-color: var(--tan); }
.btn.ghost:hover { background: var(--cream); border-color: var(--cocoa); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn:active, .pill-btn:active { transform: scale(.97); }

/* لمعة بتعدّي على الزرار الأساسي لما تحوم عليه */
.btn.shine { position: relative; overflow: hidden; }
.btn.shine::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%);
  transform: translateX(130%);
  transition: transform .9s var(--ease);
}
.btn.shine:hover::after { transform: translateX(-130%); }

/* ==========================================
   Hero / Flyer
   ========================================== */
.hero { padding: 28px 0 10px; }

.flyer {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 10px 32px;
  background:
    radial-gradient(60% 75% at 88% 12%, color-mix(in srgb, var(--tan) 24%, transparent), transparent 70%),
    radial-gradient(55% 70% at 4% 100%, color-mix(in srgb, var(--latte) 45%, transparent), transparent 70%),
    var(--cream);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: clamp(30px, 5vw, 48px) clamp(14px, 4.5vw, 48px);
  container-type: inline-size; container-name: flyer;
  --t: 15cqi; /* عمود واحد: الحروف بتكبر مع عرض الكارت */
}
@media (min-width: 861px) { .flyer { --t: 8.2cqi; } } /* عمودين: العمود النصي أضيق */
/* إطار متقطّع داخلي */
.flyer::before {
  content: ""; position: absolute; inset: 9px; z-index: 0;
  border: 1.5px dashed var(--latte); border-radius: 22px; pointer-events: none;
}
/* ملمس ورق خفيف */
.flyer::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .2  0 0 0 0 .1  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.flyer-text, .scene { position: relative; z-index: 1; }

/* أركان مزخرفة */
.flyer > .corner {
  position: absolute; z-index: 1; width: 26px; height: 26px; pointer-events: none;
  border: 0 solid var(--tan); opacity: .85;
  animation: fadeIn 1.2s var(--ease) 1.2s backwards;
}
.corner.tl { top: 18px; left: 18px; border-width: 2px 0 0 2px; border-top-left-radius: 10px; }
.corner.tr { top: 18px; right: 18px; border-width: 2px 2px 0 0; border-top-right-radius: 10px; }
.corner.bl { bottom: 18px; left: 18px; border-width: 0 0 2px 2px; border-bottom-left-radius: 10px; }
.corner.br { bottom: 18px; right: 18px; border-width: 0 2px 2px 0; border-bottom-right-radius: 10px; }

.flyer-text { text-align: center; }

/* أيقونة الكتاب بين خطّين */
.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 4px;
  animation: riseIn .9s var(--ease) .1s backwards;
}
.eyebrow .ln { display: block; width: 64px; height: 1px; }
.eyebrow .ln-a { background: linear-gradient(to left, transparent, var(--tan)); }
.eyebrow .ln-b { background: linear-gradient(to right, transparent, var(--tan)); }
.open-book-icon { display: block; width: 46px; color: var(--cocoa); }

.logo-title {
  display: inline-block;
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: clamp(2rem, var(--t), 4.8rem);
  max-width: 100%;
  line-height: 1.05;
  color: var(--cocoa);
  letter-spacing: .5px;
  padding: .08em .2em .12em;
  /* العنوان بيتكتب كأنه بالقلم لما الصفحة تفتح */
  animation: writeIn 2s var(--ease-in-out) .2s backwards;
}

/* خط مزخرف بيتّرسم تحت العنوان */
.swash { display: block; width: min(300px, 72%); height: auto; margin: -2px auto 4px; overflow: visible; }
.swash path:first-child {
  fill: none; stroke: var(--tan); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: drawLine 1s var(--ease-in-out) 1.7s backwards;
}
.swash .gem { fill: var(--tan); animation: fadeIn .6s var(--ease) 2.5s backwards; }

.logo-ar {
  font-family: 'Aref Ruqaa', 'Amiri', serif;
  font-weight: 700;
  font-size: clamp(1.4rem, calc(var(--t) * .55), 2.3rem);
  line-height: 1.3;
  color: var(--muted);
  animation: riseIn 1s var(--ease) 1.7s backwards;
}
.tagline {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: 'Amiri', serif; font-size: clamp(1rem, calc(var(--t) * .3), 1.4rem);
  text-wrap: balance; text-align: center;
  color: var(--muted); margin-top: 2px;
  animation: riseIn 1s var(--ease) 2s backwards;
}
.tg-line { display: block; flex: none; width: 34px; height: 1px; }
.tg-a { background: linear-gradient(to left, var(--tan), transparent); }
.tg-b { background: linear-gradient(to right, var(--tan), transparent); }

@keyframes writeIn {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

/* الشريط: ختم أنيق بحلقة رفيعة وزخرفة على الجنبين */
.ribbon {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 18px;
  background: var(--cocoa); color: var(--paper);
  padding: 6px 24px; border-radius: 99px; font-weight: 700;
  font-size: clamp(.85rem, calc(var(--t) * .26), 1.05rem);
  max-width: 100%; text-align: center; text-wrap: balance;
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 4.5px var(--tan);
  animation: riseIn 1s var(--ease) 2.2s backwards;
}
.ribbon b { font-weight: 900; font-size: 1.15em; letter-spacing: .5px; }
.ribbon .orn { color: var(--tan); font-size: .75em; line-height: 1; }

.hero-cta {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px;
  animation: riseIn 1s var(--ease) 2.4s backwards;
}
.hero-cta .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 28px; flex: 1 1 150px; max-width: 220px; }
.hero-cta .arr { width: 18px; height: 18px; flex: none; transition: transform .5s var(--ease); }
.hero-cta .btn:hover .arr { transform: translateX(-4px); }

.hero-note {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: .9rem; margin-top: 14px;
  animation: riseIn 1s var(--ease) 2.6s backwards;
}
.hero-note svg { width: 18px; height: 18px; flex: none; }
.hero-note span { text-wrap: balance; overflow-wrap: anywhere; }

/* ---------- المشهد (كتب + قهوة) ---------- */
.scene { max-width: 420px; margin: 0 auto; width: 100%; container-type: inline-size; }
.scene > svg { width: 100%; height: auto; display: block; overflow: visible; }

.float-a { animation: floatY 6s ease-in-out infinite; }
.float-b { animation: floatY 7.5s ease-in-out -2.5s infinite; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
.s-shadow { transform-box: fill-box; transform-origin: center; animation: shadowPulse 6s ease-in-out infinite; }
@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: .12; }
  50%      { transform: scaleX(.93); opacity: .08; }
}

/* البخار بيطلع من الكوب */
.steam {
  opacity: .75; stroke-dasharray: 7 7;
  animation: steamFlow 2.6s linear infinite, steamFade 3.2s ease-in-out infinite;
}
@keyframes steamFlow { to { stroke-dashoffset: -28; } }
@keyframes steamFade { 0%, 100% { opacity: .35; } 50% { opacity: .85; } }

/* نجوم صغيرة بتلمع */
.sparkle {
  fill: var(--tan); transform-box: fill-box; transform-origin: center;
  animation: twinkle 3.4s ease-in-out infinite;
}
.sparkle.s2 { animation-delay: -1.2s; animation-duration: 4s; }
.sparkle.s3 { animation-delay: -2.1s; animation-duration: 3s; }
@keyframes twinkle {
  0%, 100% { transform: scale(.4) rotate(0deg); opacity: .25; }
  50%      { transform: scale(1) rotate(45deg); opacity: 1; }
}

/* ختم دوّار */
.seal {
  position: absolute; top: 2%; right: 2%; z-index: 2;
  width: clamp(68px, 27cqi, 120px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; color: var(--cocoa);
  background: var(--cream); border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 0 0 5px var(--cream), inset 0 0 0 6px var(--latte);
  animation: sealIn 1.2s var(--ease) 2.2s backwards;
}
.seal-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 28s linear infinite; }
.seal-ring text {
  fill: currentColor; font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 7.4px;
}
.seal-mark { position: relative; width: 32%; height: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sealIn {
  from { opacity: 0; transform: scale(.6) rotate(-30deg); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.stat {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 18px; padding: 16px; text-align: center;
}
.stat strong { display: block; font-size: 1.7rem; color: var(--cocoa); font-weight: 900; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Sections ---------- */
.section { padding: 46px 0; }
.section-title { text-align: center; margin-bottom: 26px; }
.section-title h2 { font-family: 'Amiri', serif; font-size: 2.2rem; color: var(--cocoa); }
.section-title p { color: var(--muted); }
.more-wrap { text-align: center; margin-top: 24px; }

/* ---------- Offers (ticket cards) ---------- */
.offers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 20px; }
.offers-grid.collapsed .offer:nth-child(n+7) { display: none; } /* لازم يطابق OFFERS_VISIBLE */
.offers-grid:not(.collapsed) .offer:nth-child(n+7) { animation: fadeIn .7s var(--ease) backwards; }

.offer {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.offer:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
/* شريط لوني رفيع فوق الكارت بدل ما يبان مسطّح */
.offer::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; z-index: 3;
  background: linear-gradient(90deg, var(--tan), var(--cocoa));
}
/* صورة العرض (اختيارية): كل الصور بتاخد نفس المساحة فالكروت متساوية،
   والصورة بتظهر كاملة من غير قص، وخلفيتها نسخة مغبّشة منها.
   لو صورك مستطيلة غيّر 1 / 1 إلى 4 / 3 مثلًا. الكروت اللي من غير صورة بتفضل زي ما هي. */
.offer-img {
  position: relative; overflow: hidden; aspect-ratio: 1 / 1;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.offer-img img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .8s var(--ease); }
.offer:hover .offer-img img:not(.offer-bg) { transform: scale(1.04); }
.offer-img img.offer-bg {
  position: absolute; top: -24px; left: -24px;
  width: calc(100% + 48px); height: calc(100% + 48px); max-width: none;
  object-fit: cover; filter: blur(22px) saturate(1.1); opacity: .55;
}
/* الشارة بتطلع فوق الصورة */
.offer.has-pic .offer-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2; margin: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.offer.has-pic .offer-top { padding-top: 16px; }
.offer-top { padding: 22px 22px 16px; }
.offer-badge {
  display: inline-block; background: var(--cocoa); color: var(--paper);
  border-radius: 99px; padding: 1px 14px; font-size: .85rem; font-weight: 700; margin-bottom: 8px;
}
/* شارة التوفير: شكل ختم، وشارة "عرض" العادية خفيفة */
.offer-badge.save { background: var(--cocoa); box-shadow: 0 0 0 2px var(--cream), 0 0 0 3.5px var(--tan); }
.offer-badge.plain { background: var(--cream); color: var(--cocoa); border: 1.5px solid var(--tan); }
.offer.has-pic .offer-badge.plain { background: var(--cream); }
.offer h3 { font-family: 'Amiri', serif; font-size: 1.5rem; line-height: 1.3; color: var(--cocoa); }
.offer-items { list-style: none; margin-top: 10px; display: grid; gap: 1px; color: var(--muted); font-size: .94rem; }
.offer-items li { padding: 2px 0; border-bottom: 1px dotted var(--line); }
.offer-items li:last-child { border-bottom: none; }
.offer-items li::before { content: "◆ "; color: var(--tan); font-size: .6em; vertical-align: .15em; margin-left: 4px; }
.offer-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.offer-more .offer-items { margin-top: 0; overflow: hidden; min-height: 0; }
.offer.open .offer-more { grid-template-rows: 1fr; }
.items-toggle {
  background: none; border: none; cursor: pointer; padding: 2px 0; margin-top: 4px;
  color: var(--muted); font-family: inherit; font-weight: 600; font-size: .88rem;
  transition: color .3s var(--ease);
}
.items-toggle:hover { color: var(--cocoa); }
.items-toggle .chev { display: inline-block; transition: transform .5s var(--ease); }
.offer.open .items-toggle .chev { transform: rotate(180deg); }
.offer-note { color: var(--muted); margin-top: 6px; font-size: .94rem; }
.offer-gift {
  margin-top: 12px; padding: 8px 14px; font-size: .92rem; font-weight: 600; color: var(--cocoa);
  background: color-mix(in srgb, var(--tan) 16%, var(--cream));
  border: 1.5px dashed var(--tan); border-radius: 14px;
}
.offer-bottom {
  position: relative; margin-top: auto; border-top: 2px dashed var(--latte);
  padding: 14px 22px 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.offer-bottom::before, .offer-bottom::after {
  content: ""; position: absolute; top: -11px; width: 20px; height: 20px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 50%;
}
.offer-bottom::before { right: -11px; }
.offer-bottom::after { left: -11px; }
.offer-bottom { background: color-mix(in srgb, var(--paper) 55%, var(--cream)); }
.offer-price { display: flex; flex-direction: column; line-height: 1.25; }
.offer-price strong { font-size: 1.7rem; color: var(--cocoa); font-weight: 900; }
.offer-now { display: flex; align-items: center; gap: 8px; }
.offer-was { color: var(--muted); font-size: .9rem; }
.pct {
  flex: none; background: var(--tan); color: var(--cream); border-radius: 99px;
  padding: 0 10px; font-size: .75rem; font-weight: 800; line-height: 1.7; white-space: nowrap;
}

.add {
  background: transparent; color: var(--cocoa); border: 1.5px solid var(--tan);
  border-radius: 99px; padding: 5px 16px; cursor: pointer;
  font-family: inherit; font-weight: 700; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.add:active { transform: scale(.95); }
.add:hover { background: var(--cocoa); color: var(--paper); border-color: var(--cocoa); }

/* ---------- Cards (وصل حديثًا) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 22px; }
.card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cover {
  position: relative; overflow: hidden;
  height: 170px; display: flex; align-items: flex-end; padding: 16px;
  background: linear-gradient(135deg, var(--c1, #8d6a4f), var(--c2, #5a3e2b));
  color: #fbf5ea; font-family: 'Amiri', serif; font-size: 1.35rem; line-height: 1.3;
  border-bottom: 5px solid rgba(251, 245, 234, .25);
}
/* لو الكتاب ليه صورة: الصورة بتغطي الغلاف الورقي، ومن غيرها بيظهر الغلاف الورقي زي ما هو */
.cover.has-img { height: 240px; }
.cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: var(--paper);
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-body h3 { font-size: 1.05rem; color: var(--cocoa); }
.author { color: var(--muted); font-size: .9rem; }
.card-desc {
  color: var(--muted); font-size: .9rem; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; }
.price { font-weight: 800; color: var(--cocoa); }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 28px 14px 20px; text-align: center; cursor: pointer;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-family: inherit;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s var(--ease);
}
.cat-tile::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--cat-bg);
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--tan); }
.cat-tile .ic { font-size: 2rem; line-height: 1.3; }
.cat-tile h3 { font-family: 'Amiri', serif; font-size: 1.25rem; line-height: 1.4; color: var(--cocoa); }
.cat-tile .n { color: var(--muted); font-size: .9rem; }

/* ---------- Catalog: search + tabs + list ---------- */
.tools { display: grid; gap: 14px; justify-items: center; margin-bottom: 10px; }
.search { position: relative; width: min(520px, 100%); }
.search input {
  width: 100%; padding: 12px 48px 12px 18px; border-radius: 99px;
  border: 1px solid var(--latte); background: var(--cream); color: var(--ink);
  font-family: inherit; font-size: 1rem;
  transition: border-color .3s var(--ease), box-shadow .4s var(--ease);
}
.search input:focus {
  outline: none; border-color: var(--tan);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tan) 25%, transparent);
}
.search .si { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); pointer-events: none; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  background: var(--cream); border: 1px solid var(--line); color: var(--ink);
  padding: 7px 18px; border-radius: 99px; cursor: pointer;
  font-family: inherit; font-weight: 600;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.chip small { font-weight: 400; opacity: .7; margin-right: 4px; }
.chip:hover { border-color: var(--tan); }
.chip.active { background: var(--cocoa); color: var(--paper); border-color: var(--cocoa); }

.result-meta { text-align: center; color: var(--muted); margin: 12px 0 16px; min-height: 1.7em; }

.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 10px; align-items: start; }
.list, .grid { transition: opacity .3s var(--ease), transform .3s var(--ease); }
.list.is-swapping, .grid.is-swapping { opacity: 0; transform: translateY(10px); }

.row {
  background: var(--cream); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: inset -5px 0 0 var(--cat-bg, var(--latte));
  padding: 9px 18px 9px 12px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  transition: border-color .3s var(--ease);
}
.row:hover { border-color: var(--tan); }
.row-main { flex: 1 1 120px; min-width: 0; }
.thumb {
  flex: none; width: 44px; height: 60px; border-radius: 8px; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line);
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.row-title { font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.row-sub { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.row-price { color: var(--cocoa); font-weight: 800; font-size: .88rem; white-space: nowrap; }
.row-count {
  display: none; background: var(--cocoa); color: var(--paper);
  border-radius: 99px; font-size: .75rem; padding: 0 8px; min-width: 24px; text-align: center;
}
.row-count.on { display: inline-block; }

.add-sm {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--tan); background: transparent; color: var(--cocoa);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.add-sm:hover { background: var(--cocoa); color: var(--paper); border-color: var(--cocoa); }
.add-sm:active { transform: scale(.88); }

.toggle {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: .85rem; padding: 4px 8px; border-radius: 99px;
  transition: color .3s var(--ease);
}
.toggle:hover { color: var(--cocoa); }
.toggle .chev { display: inline-block; transition: transform .5s var(--ease); }
.row.open .toggle .chev { transform: rotate(180deg); }

.parts {
  flex-basis: 100%; display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease);
}
.row.open .parts { grid-template-rows: 1fr; }
.parts-inner { overflow: hidden; min-height: 0; }
.part {
  display: flex; align-items: center; gap: 10px; padding: 7px 2px;
  border-top: 1px solid var(--line);
}
.part:first-child { margin-top: 6px; }
.part-title { flex: 1; min-width: 0; font-size: .95rem; overflow-wrap: anywhere; }
.part .add-sm { width: 32px; height: 32px; font-size: 1.15rem; }

.empty-list { grid-column: 1 / -1; text-align: center; padding: 34px 0; color: var(--muted); display: grid; gap: 6px; justify-items: center; }

/* ---------- Steps (إزاي تطلب) ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 14px; }
.step {
  position: relative; background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 18px 24px; text-align: center;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-n {
  position: absolute; top: -14px; right: 50%; transform: translateX(50%);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cocoa); color: var(--paper); font-weight: 800; font-size: .95rem;
  box-shadow: 0 0 0 5px var(--paper);
}
.step-ic { font-size: 2rem; line-height: 1.3; }
.step h3 { color: var(--cocoa); margin: 2px 0; }
.step p { color: var(--muted); font-size: .93rem; }
.step p b { color: var(--cocoa); }
/* خط متقطّع بيوصل الخطوات ببعض */
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; left: -20px; width: 20px;
  border-top: 2px dashed var(--latte);
}

.how-note {
  margin-top: 26px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  background: var(--cream); border: 1.5px dashed var(--latte);
  border-radius: var(--radius); padding: 20px 26px;
}
.how-note h3 { font-family: 'Amiri', serif; font-size: 1.35rem; color: var(--cocoa); }
.how-note p { color: var(--muted); font-size: .95rem; }
.how-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Reviews ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; text-align: right;
}
.quote p { font-family: 'Amiri', serif; font-size: 1.2rem; margin-bottom: 10px; }
.quote b { color: var(--muted); }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 34px; box-shadow: var(--shadow);
  padding: 40px 24px; text-align: center; max-width: 640px; margin: auto;
}
.contact-card h2 { font-family: 'Amiri', serif; font-size: 2rem; color: var(--cocoa); }
.contact-sub { color: var(--muted); margin-bottom: 18px; }
.contact-list { list-style: none; display: grid; gap: 10px; max-width: 360px; margin: 0 auto; }
.contact-list li {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1px solid var(--latte);
  border-radius: 99px; padding: 8px 18px;
}
.contact-list a { font-weight: 700; color: var(--cocoa); }
.contact-list a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center; padding: 34px 0 calc(44px + env(safe-area-inset-bottom, 0px));
  margin-top: 30px; border-top: 1px solid var(--line); color: var(--muted);
}
.site-footer .brand { display: block; }
.site-footer p { font-family: 'Amiri', serif; font-size: 1.2rem; color: var(--cocoa); }

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(30, 20, 12, .5);
  opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); z-index: 40;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(420px, 100%);
  background: var(--cream); z-index: 50; transform: translateX(-100%); transition: transform .6s var(--ease);
  display: flex; flex-direction: column; padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  border-right: 1px solid var(--line);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer-head h3 { font-family: 'Amiri', serif; font-size: 1.5rem; color: var(--cocoa); }

.view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.view.show { animation: fadeIn .45s var(--ease); }

.items { flex: 1; overflow-y: auto; }
.item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.item-info { min-width: 0; }
.item-info strong { display: block; overflow-wrap: anywhere; line-height: 1.4; }
.item small { color: var(--muted); display: block; }
.item-side { display: grid; justify-items: end; gap: 4px; flex: none; }
.line-price { font-weight: 800; color: var(--cocoa); font-size: .92rem; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--latte);
  background: var(--paper); color: var(--ink); cursor: pointer; font-size: 1rem;
  transition: border-color .3s var(--ease), transform .25s var(--ease);
}
.qty button:hover { border-color: var(--cocoa); }
.qty button:active { transform: scale(.88); }
/* عدّاد التوفير: شكل تذكرة صغيرة بخرم على الجنبين */
.saving {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  margin: 10px 0 2px; padding: 10px 18px; font-size: .95rem; font-weight: 600; color: var(--cocoa);
  background: color-mix(in srgb, var(--tan) 18%, var(--cream));
  border: 1.5px dashed var(--tan); border-radius: 14px;
  animation: fadeIn .5s var(--ease);
}
.saving::before, .saving::after {
  content: ""; position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: var(--cream); border: 1.5px dashed var(--tan); border-radius: 50%;
}
.saving::before { right: -8px; }
.saving::after { left: -8px; }
.saving b { font-size: 1.15rem; font-weight: 900; font-variant-numeric: tabular-nums; }

.total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1rem; padding: 10px 0 16px; color: var(--cocoa); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.view-form { overflow-y: auto; gap: 0; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--cocoa); }
.field input, .field textarea {
  width: 100%; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--latte); background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: 1rem; resize: vertical;
  transition: border-color .3s var(--ease), box-shadow .4s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--tan);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tan) 25%, transparent);
}
.form-actions { display: grid; gap: 8px; margin-top: 6px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%;
  transform: translate(-50%, 120px); background: var(--cocoa); color: var(--paper);
  padding: 11px 22px; border-radius: 99px; z-index: 60; font-weight: 600;
  width: max-content; max-width: calc(100vw - 32px); text-align: center;
  opacity: 0; pointer-events: none;
  transition: transform .6s var(--ease), opacity .4s var(--ease);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Smooth motion helpers ---------- */
.badge.bump { animation: bump .5s var(--ease); }
@keyframes bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* انتقال ناعم بين الوضع الفاتح والليلي */
.theme-anim,
.theme-anim *,
.theme-anim *::before,
.theme-anim *::after {
  transition: background-color .5s var(--ease), color .5s var(--ease),
              border-color .5s var(--ease), box-shadow .5s var(--ease),
              fill .5s var(--ease), stroke .5s var(--ease) !important;
}

/* ---------- Mobile menu ---------- */
.menu-btn { display: none; font-size: 1.15rem; line-height: 1.2; }
.mobile-menu { display: none; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; left: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 30; display: flex; align-items: center; gap: 10px;
  background: #128c7e; color: #fff; border-radius: 99px; padding: 10px 18px 10px 14px;
  font-weight: 700; box-shadow: 0 8px 22px rgba(18, 140, 126, .35);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  animation: fadeIn .9s var(--ease) 3s backwards;
}
.wa-float:hover { transform: translateY(-3px); }
.wa-float svg { width: 28px; height: 28px; flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-block; }
  .mobile-menu {
    display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
    box-shadow: inset 0 1px 0 var(--line);
    transition: grid-template-rows .5s var(--ease), opacity .3s var(--ease), visibility 0s linear .5s;
  }
  .mobile-menu.open {
    grid-template-rows: 1fr; opacity: 1; visibility: visible;
    transition: grid-template-rows .5s var(--ease), opacity .4s var(--ease) .05s, visibility 0s;
  }
  .mobile-menu-inner { overflow: hidden; min-height: 0; }
  .mobile-menu-inner::before { content: ""; display: block; height: 6px; }
  .mobile-menu-inner::after { content: ""; display: block; height: 14px; }
  .mobile-menu a {
    display: block; margin: 2px 20px; padding: 10px 16px; border-radius: 14px;
    font-weight: 600; color: var(--ink); transition: background-color .3s var(--ease);
  }
  .mobile-menu a:hover, .mobile-menu a:focus-visible { background: var(--cream); }
  .wa-float { padding: 12px; }
  .wa-float span { display: none; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }

  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .flyer { grid-template-columns: 1fr; border-radius: 24px; gap: 14px; }
  .scene { max-width: 300px; }
  .seal { top: 0; right: -4px; }
  .section { padding: 36px 0; }
}

@media (max-width: 480px) {
  .cart-text { display: none; }
  .scene { max-width: 250px; }
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child)::after {
    display: block; top: 100%; left: 50%; width: 0; height: 20px;
    border-top: none; border-left: 2px dashed var(--latte);
  }
  .brand { font-size: 1.6rem; }
  .pill-btn { padding: 6px 12px; }
  .list { grid-template-columns: 1fr; }
}

/* ---------- Share button ---------- */
.share-btn {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; border: 1.5px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.share-btn svg { width: 17px; height: 17px; }
.share-btn:hover { border-color: var(--tan); color: var(--cocoa); }
.share-btn:active { transform: scale(.88); }
.row .share-btn { width: 32px; height: 32px; }
.offer-actions { display: flex; align-items: center; gap: 8px; }
/* زرار المشاركة عايم فوق كارت العرض (ناحية الشمال) عشان يفضل مكان للسعر والزرار تحت */
.share-float {
  position: absolute; top: 14px; left: 12px; z-index: 4;
  background: var(--cream); border-color: var(--latte); color: var(--cocoa);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
}
.share-float:hover { background: var(--cream); border-color: var(--cocoa); }
.card-foot .offer-actions { gap: 6px; }

/* ---------- Item sheet (تفاصيل + مشاركة) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(30, 20, 12, .55); animation: fadeIn .4s var(--ease); }
.sheet {
  position: relative; width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--cream); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow); animation: sheetIn .6s var(--ease);
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.sheet:focus { outline: none; }
.sheet-close { position: absolute; top: 12px; left: 12px; z-index: 3; }
.sheet-media {
  height: min(300px, 40vh); background: var(--paper); border-bottom: 1px solid var(--line);
}
.sheet-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sheet .cover { height: 170px; }
.sheet-content { padding: 18px 22px 22px; display: grid; gap: 10px; justify-items: start; }
.sheet-content .offer-badge { margin-bottom: 0; }
.sheet-title { font-family: 'Amiri', serif; font-size: 1.7rem; line-height: 1.3; color: var(--cocoa); }
.sheet-sub { color: var(--muted); font-size: .92rem; margin-top: -6px; }
.sheet-desc { color: var(--muted); font-size: .94rem; }
.sheet-list { margin-top: 0; max-height: 170px; overflow-y: auto; width: 100%; }
.sheet-content .offer-gift { margin-top: 0; width: 100%; }
.sheet-price { display: flex; align-items: baseline; gap: 10px; }
.sheet-price strong { font-size: 1.8rem; color: var(--cocoa); font-weight: 900; }
.sheet-price s { color: var(--muted); }
.sheet-actions { display: grid; gap: 8px; width: 100%; }
.sheet-actions .row-count { background: var(--paper); color: var(--cocoa); margin-right: 6px; }
.btn.wa-share {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #128c7e; border-color: #128c7e; color: #fff;
}
.btn.wa-share:hover { background: #0e7064; border-color: #0e7064; }
.btn.wa-share svg { width: 22px; height: 22px; flex: none; }
.sheet-link { display: flex; gap: 8px; width: 100%; align-items: center; }
.sheet-link input {
  flex: 1; min-width: 0; padding: 7px 14px; border-radius: 99px; text-align: left;
  border: 1px solid var(--latte); background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: .82rem;
}
.sheet-link input:focus { outline: none; border-color: var(--tan); }

@media (max-width: 480px) {
  .sheet-wrap { place-items: end center; padding: 0; }
  .sheet {
    width: 100%; max-height: 92dvh; border-radius: 26px 26px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* ==========================================
   Responsive: لابتوب / تابلت / موبايل
   ========================================== */

/* لابتوب كبير: مساحة أوسع شوية */
@media (min-width: 1280px) {
  .container { max-width: 1180px; }
  .offers-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

/* لابتوب صغير وتابلت أفقي */
@media (max-width: 1024px) {
  .step { padding: 28px 14px 22px; }
  .step p { font-size: .9rem; }
  .nav-links { gap: 18px; }
}

/* تابلت (عمودي وأفقي صغير) */
@media (min-width: 601px) and (max-width: 860px) {
  .scene { max-width: 340px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .cat-tile { padding: 24px 8px 16px; }
  .cat-tile h3 { font-size: 1.05rem; }
  .steps { gap: 24px 20px; }
  .how-note { padding: 20px 22px; }
}

/* زرار الواتساب العايم على الشاشات الصغيرة: ناحية اليمين عشان ما يغطيش أزرار الإضافة اللي ناحية الشمال */
@media (max-width: 860px) {
  .wa-float { left: auto; right: 14px; }
}

/* موبايل */
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 30px 0; }
  .section-title { margin-bottom: 20px; }
  .section-title h2 { font-size: 1.8rem; }
  .hero { padding-top: 18px; }
  .flyer > .corner { width: 20px; height: 20px; }
  .corner.tl, .corner.tr { top: 14px; }
  .corner.bl, .corner.br { bottom: 14px; }
  .corner.tl, .corner.bl { left: 14px; }
  .corner.tr, .corner.br { right: 14px; }
  .eyebrow .ln { width: 40px; }
  .tg-line { width: 22px; }
  .ribbon { padding: 6px 18px; gap: 8px; max-width: calc(100% - 10px); }
  .hero-cta .btn { padding: 9px 22px; }
  .hero-note { font-size: .85rem; }
  .stats { gap: 8px; margin-top: 18px; }
  .stat { padding: 12px 6px; border-radius: 14px; }
  .stat strong { font-size: 1.35rem; }
  .stat span { font-size: .8rem; line-height: 1.4; display: block; }
  .cat-grid { gap: 12px; }
  .cat-tile { padding: 22px 8px 16px; }
  .cat-tile h3 { font-size: 1.05rem; }
  .offers-grid { gap: 16px; }
  .offer-top { padding: 20px 18px 14px; }
  .offer-bottom { padding: 12px 18px 14px; }
  .grid { gap: 14px; }
  .cover.has-img { height: 260px; }
  .how-note { padding: 18px; text-align: center; justify-content: center; }
  .how-actions { justify-content: center; width: 100%; }
  .contact-card { padding: 30px 16px; border-radius: 26px; }
  .contact-list li { padding: 8px 14px; }
  .contact-list a { overflow-wrap: anywhere; }
  .site-footer { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

  /* التابات: صف واحد بيتحرّك أفقي بدل ما ياخد 3 صفوف */
  .tools { width: 100%; }
  .filters {
    flex-wrap: nowrap; justify-content: flex-start; width: 100%;
    overflow-x: auto; padding-bottom: 6px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; white-space: nowrap; padding: 7px 14px; }

  /* صفوف الكتب: أزرار أكبر عشان الصوابع */
  .add-sm, .share-btn, .row .share-btn { width: 40px; height: 40px; }
  .part .add-sm { width: 36px; height: 36px; }
  .row { padding: 10px 16px 10px 10px; }

  /* السلة والنافذة بعرض الشاشة */
  .drawer { padding-left: 16px; padding-right: 16px; }
  .sheet-content { padding: 16px 18px 20px; }
  .sheet-title { font-size: 1.5rem; }
  .sheet-link { flex-wrap: wrap; }
  .sheet-link input { flex-basis: 100%; }
  .sheet-link .add { width: 100%; }
}

/* موبايل صغير جدًا (320 - 380) */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  .brand { font-size: 1.3rem; }
  .pill-btn { padding: 6px 9px; }
  .badge { margin-right: 2px; padding: 0 6px; }
  .nav { gap: 6px; }
  .offer h3 { font-size: 1.3rem; }
  .offer-price strong { font-size: 1.45rem; }
  .stat strong { font-size: 1.2rem; }
  .section-title h2 { font-size: 1.6rem; }
}

/* شاشات اللمس: مفيش hover يفضل شغال بعد اللمس */
@media (hover: none) {
  .offer:hover, .card:hover, .step:hover, .cat-tile:hover { transform: none; box-shadow: none; }
  .offer:hover .offer-img img:not(.offer-bg) { transform: none; }
}

/* شاشة الموبايل في الوضع الأفقي: النافذة متاخدش الشاشة كلها */
@media (max-height: 480px) and (orientation: landscape) {
  .sheet-media { height: 140px; }
  .sheet-wrap { padding: 8px; }
  .sheet { max-height: calc(100dvh - 16px); }
}

/* لما الكارت يضيق (موبايل صغير): نشيل الزخارف الزيادة والأزرار تاخد العرض كله */
@container flyer (max-width: 360px) {
  .tg-line, .ribbon .orn { display: none; }
  .eyebrow .ln { width: 28px; }
  .hero-cta .btn { flex-basis: 100%; max-width: none; }
}
/* تابلت عمودي: الكلام مايتمطّش أكتر من اللازم */
@container flyer (min-width: 560px) and (max-width: 760px) {
  .flyer-text { max-width: 520px; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
