/* =========================================================
   منيو مخابز وحلويات قاسيون — التنسيقات
   ---------------------------------------------------------
   الفهرس:
   1. الألوان والخطوط (غيّري من هون)
   2. أساسيات
   3. الواجهة (الشعار والعنوان)
   4. شريط التابات والبحث
   5. الأقسام الرئيسية
   6. الأقسام الفرعية والأصناف
   7. الفوتر وزر الرجوع للأعلى
   8. الحركات (Animations)
   9. الشاشات (Responsive)
   ========================================================= */


/* ---------- 1. الألوان والخطوط ---------- */
:root {
  /* الخلفية والنصوص */
  --cream:      #FBF7EE;   /* لون الخلفية */
  --ink:        #1C1712;   /* لون النص الأساسي */
  --ink-soft:   #5B5146;   /* لون النص الثانوي */

  /* الذهبي */
  --gold:       #C08A24;
  --gold-light: #F2D27A;
  --gold-dark:  #8E6416;
  --gold-grad:  linear-gradient(100deg, #9C6E17 0%, #D9A93E 35%, #F6DC8C 55%, #C9962E 80%, #9C6E17 100%);

  /* الخطوط */
  --font-title: 'Aref Ruqaa', serif;            /* العناوين */
  --font-body:  'Tajawal', system-ui, sans-serif;  /* النصوص */
  --font-price: 'Barlow Condensed', sans-serif;  /* الأسعار */

  /* المقاسات */
  --page-width:  1120px;
  --price-col:   62px;     /* عرض عمود السعر بالأصناف متعددة الأحجام */
}


/* ---------- 2. أساسيات ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

.gold-text {
  background: var(--gold-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}


/* ---------- 3. الواجهة (الشعار والعنوان) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 20px 64px;   /* الرقم الأخير = المسافة بين العنوان والتابات */
}

/* القوس الذهبي بالزاوية */
.hero-arc {
  position: absolute;
  width: min(110vw, 820px);
  aspect-ratio: 1;
  top:  calc(min(110vw, 820px) * -0.62);
  left: calc(min(110vw, 820px) * -0.5);
  border-radius: 50%;
  border: clamp(26px, 5vw, 52px) solid transparent;
  background: var(--gold-grad) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  animation: spin 40s linear infinite;
}

.hero-logo {
  position: relative;
  width: min(62vw, 300px);
  aspect-ratio: 1;
  opacity: 0;
  animation: logo-in 1.4s cubic-bezier(.2, .9, .25, 1.2) .2s forwards,
             float 6s ease-in-out 1.6s infinite;
}
.hero-logo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 18px 30px rgba(140, 98, 20, .35));
}
/* لمعة بتمرّ على الشعار */
.hero-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .65) 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: 150% 0;
  mix-blend-mode: soft-light;
  animation: shine 4.5s ease-in-out 2s infinite;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(40px, 9vw, 76px);
  line-height: 1.15;
  margin-top: 34px;
}
.hero .tagline {
  font-family: var(--font-title);
  font-size: clamp(22px, 5vw, 34px);
  margin-top: 6px;
}
.hero .fade-up {
  opacity: 0;
  animation: fade-up .9s ease forwards;
}


/* ---------- 4. شريط التابات والبحث ---------- */
.menu-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 247, 238, .88);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  transition: box-shadow .3s;
}
.menu-nav.is-stuck { box-shadow: 0 10px 30px -18px rgba(90, 60, 10, .35); }

/* التابات الرئيسية */
.main-tabs {
  position: relative;
  display: flex;
  justify-content: center;
  gap: clamp(6px, 3vw, 34px);
  max-width: 900px;
  margin: 0 auto;
  padding: 6px 12px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-tabs::-webkit-scrollbar { display: none; }

.main-tabs button {
  all: unset;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(17px, 4.3vw, 24px);
  padding: 4px 10px 10px;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color .35s, transform .35s;
  -webkit-tap-highlight-color: transparent;
}
.main-tabs button:hover { color: var(--ink); }
.main-tabs button.is-active { color: var(--ink); transform: translateY(-1px); }

/* الخط الذهبي تحت التاب المختار */
.main-tabs .indicator {
  position: absolute;
  bottom: 4px;
  height: 4px;
  border-radius: 4px;
  background: var(--gold-grad);
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
  transition: left .5s cubic-bezier(.65, 0, .25, 1), width .5s cubic-bezier(.65, 0, .25, 1);
}

/* التابات الفرعية */
.sub-tabs {
  display: flex;
  gap: 4px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  transition: opacity .35s;
}
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tabs a:first-child { margin-inline-start: auto; }
.sub-tabs a:last-child  { margin-inline-end: auto; }

.sub-tabs a {
  flex: none;
  position: relative;
  padding: 6px 12px 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .3s;
}
.sub-tabs a::after {   /* النقطة تحت التاب المختار */
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--gold);
  transform: scale(0);
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.sub-tabs a.is-active { color: var(--gold-dark); font-weight: 800; }
.sub-tabs a.is-active::after { transform: scale(1); }

/* البحث */
.search {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 10px;
}
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 30px;
  padding: 11px 44px 11px 18px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: rgba(192, 138, 36, .10);
  transition: background .3s, box-shadow .3s;
}
.search input:focus {
  background: #fff;
  box-shadow: 0 6px 24px -10px rgba(140, 98, 20, .45);
}
.search svg {
  position: absolute;
  right: 30px;
  top: 11px;
  width: 20px;
  height: 20px;
  color: var(--gold);
  pointer-events: none;
}

.price-note {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 22px 16px 0;
}
.no-results {
  display: none;
  text-align: center;
  padding: 40px 0;
  color: var(--ink-soft);
}


/* ---------- 5. الأقسام الرئيسية ---------- */
main {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 18px 60px;
}

.group { padding-top: 40px; }

/* خط فاصل بين الأقسام الرئيسية */
.group + .group::before {
  content: "";
  display: block;
  height: 1.5px;
  max-width: 440px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 220px;
  padding: 40px 0 10px;
}
.group-head h2 {
  font-family: var(--font-title);
  font-size: clamp(38px, 8vw, 64px);
  line-height: 1.1;
}
.group-head p {
  max-width: 30ch;
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-soft);
}
.group-pic {
  flex: none;
  width: clamp(150px, 34vw, 300px);
  filter: drop-shadow(0 22px 26px rgba(80, 50, 10, .28));
  will-change: transform;
}


/* ---------- 6. الأقسام الفرعية والأصناف ---------- */
.section {
  padding: 34px 0 8px;
  scroll-margin-top: 150px;
}

.section h3 {
  font-family: var(--font-title);
  font-size: clamp(30px, 6.4vw, 42px);
  line-height: 1.2;
}
/* الخط الذهبي مع النقطة تحت عنوان القسم */
.section h3::after {
  content: "";
  display: block;
  width: min(100%, 360px);
  height: 11px;
  margin-top: 2px;
  background:
    radial-gradient(circle 5.5px at 5.5px 50%, var(--gold) 96%, transparent 100%) no-repeat,
    var(--gold-grad) center / 100% 3px no-repeat;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(.65, 0, .25, 1) .1s;
}
.section.is-visible h3::after { transform: scaleX(1); }

.section-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.section-body {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  margin-top: 12px;
}

/* صورة القسم */
.section-pic {
  flex: none;
  align-self: center;
  width: clamp(120px, 22vw, 220px);
  filter: drop-shadow(0 18px 22px rgba(80, 50, 10, .28));
  opacity: 0;
  transform: translateX(-40px) rotate(-8deg);
  transition: opacity 1s ease .3s, transform 1.2s cubic-bezier(.2, .8, .2, 1) .3s;
}
.section.is-visible .section-pic { opacity: 1; transform: none; }

/* قائمة الأصناف: عمودين */
.section-body > div { flex: 1; }   /* حاوية أقسام الأحجام */

.items {
  flex: 1;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
}
/* عمود واحد: للأقسام القصيرة أو متعددة الأحجام */
.items.single,
.items.sizes { grid-template-columns: 1fr; max-width: 640px; }

/* الصنف */
.item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 2px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.section.is-visible .item { opacity: 1; transform: none; }

.item .name {
  margin-inline-end: auto;
  font-size: 17px;
  font-weight: 500;
}
.item .name small {      /* ملاحظة صغيرة تحت اسم الصنف */
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-soft);
}

/* النقاط بين الاسم والسعر (بتنضاف لحالها) */
.item .dots {
  flex: 1;
  min-width: 16px;
  border-bottom: 2px dotted rgba(192, 138, 36, .45);
  transform: translateY(-4px);
}

.item .price {
  font-family: var(--font-price);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .02em;
  white-space: nowrap;
  direction: ltr;
}
/* كلمة JD بعد السعر */
.items:not(.sizes) .price::after {
  content: "JD";
  margin-left: 3px;
  font-size: 12px;
  color: var(--gold-dark);
}

/* أقسام الأحجام (البيتزا، العصائر) */
.size-labels {
  display: flex;
  justify-content: flex-end;
  max-width: 640px;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.size-labels span,
.items.sizes .price {
  width: var(--price-col);
  text-align: center;
}
.items.sizes .price.na { color: #C9BCA5; }   /* الحجم غير متوفر */

/* إضاءة خفيفة لما يمرّ الماوس على الصنف */
.item::before {
  content: "";
  position: absolute;
  inset: 0 -10px;
  z-index: -1;
  border-radius: 12px;
  background: radial-gradient(120px 40px at var(--mx, 50%) 50%, rgba(242, 210, 122, .35), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
}
.item:hover::before { opacity: 1; }

/* إخفاء نتائج البحث */
.is-hidden { display: none !important; }


/* ---------- 7. الفوتر وزر الرجوع للأعلى ---------- */
footer {
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  padding: 60px 20px 40px;
  text-align: center;
  background: var(--ink);
  color: #EFE6D2;
}
footer::before {   /* الشريط الذهبي فوق الفوتر */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: var(--gold-grad);
  background-size: 200% 100%;
  animation: shimmer 5s linear infinite;
}
footer .footer-logo { width: 110px; margin: 0 auto 14px; border-radius: 50%; }
footer .footer-title { font-family: var(--font-title); font-size: 28px; }
footer .about {
  max-width: 560px;
  margin: 14px auto 0;
  font-size: 14px;
  line-height: 1.8;
  color: #CFC4AE;
}
footer .social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 20px;
  list-style: none;
}
footer .social a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--gold-light);
  text-decoration: none;
}
footer .social svg { width: 20px; height: 20px; }
footer small {
  display: block;
  margin-top: 26px;
  font-size: 12px;
  color: #9D917C;
}

.to-top {
  position: fixed;
  z-index: 30;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left:   calc(20px + env(safe-area-inset-left));
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #E8DCC4;
  color: #6B5A3E;
  box-shadow: 0 10px 24px -10px rgba(90, 70, 40, .35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px) scale(.8);
  pointer-events: none;
  transition: .4s;
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 22px; height: 22px; }

/* شريط تقدّم القراءة فوق الصفحة */
.progress {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  width: 0;
  height: 3px;
  background: var(--gold-grad);
}


/* ---------- 8. الحركات ---------- */
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes float   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes logo-in { from { opacity: 0; transform: scale(.6) rotate(-25deg); } to { opacity: 1; transform: none; } }
@keyframes shine   { 0% { background-position: 150% 0; } 45%, 100% { background-position: -60% 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.section-pic img { animation: float 7s ease-in-out infinite; }

/* بدون جافاسكربت (أو قبل ما يشتغل): كل شي ظاهر */
.no-js .item,
.no-js .section-pic { opacity: 1; transform: none; }
.no-js .section h3::after { transform: none; }

/* للي مفعّلين "تقليل الحركة" بجهازهم */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .item, .section-pic, .hero .fade-up, .hero-logo { opacity: 1 !important; transform: none !important; }
  .section h3::after { transform: none !important; }
}


/* ---------- 9. الشاشات ---------- */

/* شاشات كبيرة جداً */
@media (min-width: 1400px) {
  main { max-width: 1240px; }
  .item .name { font-size: 18px; }
  .item .price { font-size: 20px; }
}

/* لابتوب صغير */
@media (max-width: 1024px) {
  .items { column-gap: 36px; }
  .group-pic { width: clamp(150px, 30vw, 240px); }
}

/* تابلت */
@media (max-width: 860px) {
  .items { grid-template-columns: 1fr; }
  .items.single, .items.sizes, .size-labels { max-width: none; }
  .section-body { flex-direction: column; }
  .section-pic { order: -1; align-self: center; width: 170px; margin-bottom: -6px; }
  .group-head { min-height: 0; padding-top: 24px; }
  .item .name { font-size: 16px; }
  :root { --price-col: 52px; }
}

/* موبايل */
@media (max-width: 560px) {
  .hero { padding: 44px 16px 48px; }
  .hero h1 { margin-top: 26px; }
  main { padding: 0 14px 50px; }

  .group-head { flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
  .group-pic { width: 150px; align-self: center; }
  .group-head p { max-width: none; }

  .main-tabs { justify-content: flex-start; gap: 2px; padding: 4px 8px 8px; }
  .main-tabs button { font-size: 18px; padding: 6px 8px 10px; }
  .main-tabs button:first-of-type { margin-inline-start: auto; }
  .main-tabs button:last-of-type  { margin-inline-end: auto; }

  .sub-tabs { padding: 8px; }
  .sub-tabs a { font-size: 14px; padding: 6px 9px 10px; }
  .search { padding: 0 12px 10px; }
  .search svg { right: 26px; }
  .search input { font-size: 14px; }

  .section { padding-top: 26px; scroll-margin-top: 140px; }
  .item { padding: 8px 0; gap: 8px; }
  .item .price { font-size: 17px; }
  :root { --price-col: 44px; }
}

/* موبايل صغير */
@media (max-width: 400px) {
  .hero h1 { font-size: 36px; }
  .main-tabs { gap: 0; }
  .main-tabs button { font-size: 15px; padding: 6px 5px 10px; }
  .item .name { font-size: 15px; }
  :root { --price-col: 40px; }
}
