:root{
  --bg:#ffffff;
  --text:#111;
  --muted:#6b6b6b;
  --line:#e7e7e7;
  --btn:#111;
  --btnText:#fff;
  --max:1100px;

  /* HEADER */
  --headerPadY: 12px;
  --headerLogoH: 66px;
  --headerH: calc(var(--headerLogoH) + (var(--headerPadY) * 2));
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
html, body{width:100%; overflow-x:hidden}

body{
  margin:0;
  font-family:"Tajawal", system-ui, -apple-system, Segoe UI, Arial;
  background:var(--bg);
  color:var(--text);

  /* عشان الهيدر fixed */
  padding-top: var(--headerH);
}

img, iframe{max-width:100%; display:block}

.container{
  width:min(var(--max), calc(100% - 32px));
  margin-inline:auto;
}

a{color:inherit; text-decoration:none}
.muted{color:var(--muted); margin:0}
.hidden{display:none !important}

/* ================= HEADER (FIXED - NEVER DISAPPEAR) ================= */
.header{
  position:fixed;
  top:0; left:0; right:0;
  z-index:9999;

  background:#fff;
  border-bottom:1px solid #eee;
}

.header .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  padding: var(--headerPadY) 16px;
  direction:ltr; /* يثبت اللوجو شمال والمنيو يمين */
}

/* logo left */
.header .logo{
  height: var(--headerLogoH);
  width:auto;
  object-fit:contain;
  flex:0 0 auto;
}

/* socials center */
.header .social-icons{
  flex:1;
  display:flex;
  justify-content:center;
  gap:10px;
  margin:0;
  min-width:0;
}

.header .social-icons a{
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:transparent;
}
.header .social-icons i{color:var(--text); font-size:14px}

/* menu right */
.header .menu-toggle{
  font-size:28px;
  cursor:pointer;
  user-select:none;
  line-height:1;
  flex:0 0 auto;
}

/* hide nav normally */
.header .nav{ display:none; }

/* dropdown nav */
.header .nav.open{
  display:flex;
  flex-direction:column;
  gap:12px;

  position:fixed;
  top: var(--headerH);
  left:0;
  right:0;

  background:#fff;
  padding:16px;

  border-top:1px solid #eee;
  box-shadow:0 10px 25px rgba(0,0,0,.08);
  z-index:9998;
  direction:rtl;
}

.header .nav.open a{
  font-size:16px;
  padding:10px 0;
  border-bottom:1px solid #f0f0f0;
}
.header .nav.open a:last-child{border-bottom:none}

/* تكبير على التابلت/لاب */
@media (min-width:768px){
  :root{
    --headerPadY: 14px;
    --headerLogoH: 72px;
  }
}

/* ================= HERO ================= */
.hero{
  min-height:70vh;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid var(--line);
  background:
    linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)),
    url("../images/hero.jpeg") center / cover no-repeat;
}
.hero-content{
  text-align:center;
  padding:48px 16px;
  color:#fff;
}
.hero h1{margin:0; font-size:44px; letter-spacing:2px}
.hero p{margin:10px 0 22px; color:rgba(255,255,255,.85); font-size:16px}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border:1px solid #fff;
  background:transparent;
  color:#fff;
  border-radius:999px;
  font-size:15px;
  transition:.2s ease;
}
.btn:hover{background:#fff; color:#111}

/* ================= SECTIONS ================= */
section{padding:54px 0}
h2{margin:0; font-size:26px; letter-spacing:.2px}

/* ================= GALLERY ================= */
.gallery{
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.section-head{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:8px;
  margin-bottom:22px;
}
.section-head h2{font-size:26px; font-weight:500}
.section-head .muted{font-size:13px; font-weight:400; color:#777}

/* Category cards */
.filters.filter-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin:18px 0 24px;
}

.filter-btn.filter-card{
  width:100%;
  border:none;
  background:#f6f6f6;
  border-radius:18px;
  padding:16px 16px;
  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;

  box-shadow:0 10px 28px rgba(0,0,0,0.08);
  transition:.2s ease;
  -webkit-tap-highlight-color: transparent;
  color:#111;
}

.filter-btn.filter-card .cat-title{
  font-size:20px;
  font-weight:500;
  letter-spacing:.2px;
  color:#111;
}

.filter-btn.filter-card:active{transform:scale(0.98)}
.filter-btn.filter-card.active{background:#111}
.filter-btn.filter-card.active .cat-title{color:#fff}

/* امنع الـ focus يغمّق */
.filter-btn.filter-card:focus,
.filter-btn.filter-card:focus-visible{
  outline:none;
  background:#f6f6f6;
}

/* Gallery grid */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.g-item{
  margin:0;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  cursor:pointer;
  background:#fafafa;
  position:relative;
}

.g-item img{
  width:100%;
  height:220px;
  object-fit:cover;
  transition:transform .2s ease;
}

@media (hover:hover){
  .g-item:hover img{transform:scale(1.04)}
}

.g-item .order-btn{
  position:absolute;
  left:10px;
  bottom:10px;
  border:1px solid rgba(0,0,0,.25);
  background:rgba(255,255,255,.92);
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  cursor:pointer;
  display:flex;
  gap:8px;
  align-items:center;
}

/* ================= ORDER FORM (BOTTOM) ================= */
.order h2{text-align:center; margin-bottom:18px}

#orderForm{
  width:100%;
  max-width:720px;
  margin-inline:auto;
  display:grid;
  gap:12px;
  direction:rtl;
}

#orderForm input,
#orderForm select,
#orderForm textarea,
#orderForm button{
  width:100%;
  max-width:100%;
}

#orderForm input,
#orderForm select,
#orderForm textarea{
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  font-family:inherit;
  font-size:16px; /* مهم لأندرويد */
  line-height:1.2;
  outline:none;
  background:#fff;
  text-align:right;
}

#orderForm textarea{min-height:120px; resize:vertical}

#orderForm button{
  padding:14px 16px;
  border:1px solid #111;
  background:#111;
  color:#fff;
  border-radius:999px;
  cursor:pointer;
  font-family:inherit;
  font-size:16px;
}

#orderForm .two{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

/* ================= CONTACT ================= */
.contact{text-align:center}
.contact-line{margin:10px 0; line-height:1.8}
.link{border-bottom:1px solid transparent; padding-bottom:2px}
.link:hover{border-bottom-color:var(--text)}

.map-wrap{
  width:min(900px, calc(100% - 32px));
  margin:18px auto 0;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
}
.contact iframe{width:100%; height:320px; border:0}

/* ================= FOOTER ================= */
.footer{
  border-top:1px solid var(--line);
  padding:18px 0;
  text-align:center;
  color:var(--muted);
}

/* ================= LIGHTBOX ================= */
.lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.82);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:18px;
}
.lightbox.open{display:flex}
.lightbox img{
  max-width:min(980px, 92vw);
  max-height:82vh;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background:#000;
}
.lb-close, .lb-nav{
  position:absolute;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:transparent;
  color:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
}
.lb-close{top:14px; right:14px; width:42px; height:42px}
.lb-nav{top:50%; transform:translateY(-50%); width:46px; height:46px}
.lb-prev{right:14px}
.lb-next{left:14px}

/* ================= MODAL (Order from image) — Android/iPhone FIX ================= */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  z-index:10000;

  padding:14px;
  padding-bottom:calc(14px + env(safe-area-inset-bottom));
  height:100dvh;
}
.modal.open{
  display:flex;
  align-items:center;
  justify-content:center;
}

.modal-card{
  width:min(520px, 96vw); /* نفس شكل الموبايل حتى على اللاب */
  background:#fff;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.08);
  position:relative;
  overflow:hidden;

  max-height:calc(100dvh - 28px);
  display:flex;
  flex-direction:column;
  min-height:0;
}

.modal-close{
  position:absolute;
  top:10px; right:10px;
  width:40px; height:40px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
  display:grid;
  place-items:center;
  z-index:10;
}

.modal-grid{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}

.modal-preview{
  padding:12px;
  background:#fafafa;
  border-bottom:1px solid #eee;
}
.modal-preview img{
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid #eee;
}
#orderImgLabel{margin-top:8px}

.modal-form{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;

  overflow:auto;
  -webkit-overflow-scrolling:touch;
  min-height:0;

  direction:rtl;
  padding-bottom:calc(12px + env(safe-area-inset-bottom) + 80px);
}

.modal-form h3{margin:0 0 6px}

.modal-form input,
.modal-form select,
.modal-form textarea{
  width:100%;
  padding:12px;
  border:1px solid #e7e7e7;
  border-radius:12px;
  font-family:inherit;
  font-size:16px;
  line-height:1.2;
  text-align:right;
  background:#fff;
}

.modal-form textarea{min-height:110px; resize:vertical}

.modal-form .two{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

/* زر الإرسال ثابت وغمق */
.btn-block{
  position:sticky;
  bottom:10px;
  z-index:2;

  padding:14px 16px;
  border:1px solid #111;
  background:#111;
  color:#fff;
  border-radius:999px;
  cursor:pointer;
  font-family:inherit;
  font-size:16px;

  box-shadow:0 10px 25px rgba(0,0,0,.15);
}

/* ===== Ramadan Greeting ===== */
.ramadan-greeting{
  margin-top:34px;
  text-align:center;
  animation:fadeUp 1s ease forwards;
}

.ramadan-main{
  font-size:34px;
  font-weight:800;
  color:#fff;
  letter-spacing:1px;
  margin:0;
  animation:pulseGlow 2.5s ease-in-out infinite;
}

.ramadan-sub{
  font-size:18px;
  margin-top:8px;
  color:rgba(255,255,255,.9);
}

/* حركة دخول ناعمة */
@keyframes fadeUp{
  from{opacity:0; transform:translateY(15px);}
  to{opacity:1; transform:translateY(0);}
}

/* نبض خفيف للنص */
@keyframes pulseGlow{
  0%{transform:scale(1);}
  50%{transform:scale(1.04);}
  100%{transform:scale(1);}
}


/* ================= RAMADAN OVERLAY (B/W) ================= */
/* خلي الهيرو يبقى مرجع للـ overlay */
.hero{ position: relative; overflow:hidden; }

/* طبقة الزينة فوق الصورة لكن من غير ما تعطل الضغط */
.ramadan-overlay{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:3;
}

/* الهلال (أبيض/رمادي فاتح) */
.ramadan-crescent{
  position:absolute;
  left:14px;
  top:18px;
  width:56px;
  height:56px;
  border-radius:50%;
  box-shadow: 16px 0 0 0 rgba(255,255,255,.85);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.25));
  opacity:.95;
  animation: cresFloat 3.2s ease-in-out infinite;
}
@keyframes cresFloat{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(6px); }
}

/* الفانوس (شكل أنضف: سلك + جسم + لمعة داخلية) */
.ramadan-lantern{
  position:absolute;
  top:-12px;
  width:34px;
  height:54px;
  border:2px solid rgba(255,255,255,.9);
  border-radius:10px;
  background: rgba(0,0,0,.10);
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
  transform-origin: top center;
  animation: swing 3.6s ease-in-out infinite;
}

/* السلك */
.ramadan-lantern::before{
  content:"";
  position:absolute;
  top:-80px;
  left:50%;
  width:2px;
  height:76px;
  transform:translateX(-50%);
  background: rgba(255,255,255,.55);
}

/* اللمعة الداخلية */
.ramadan-lantern::after{
  content:"";
  position:absolute;
  inset:10px 8px 12px 8px;
  border-radius:8px;
  background: radial-gradient(circle at 50% 35%,
    rgba(255,255,255,.9) 0%,
    rgba(255,255,255,.35) 35%,
    rgba(255,255,255,.08) 60%,
    rgba(255,255,255,0) 75%);
  opacity:.85;
  animation: glow 1.6s ease-in-out infinite;
}

@keyframes swing{
  0%,100%{ transform: rotate(-4deg); }
  50%{ transform: rotate(5deg); }
}
@keyframes glow{
  0%,100%{ opacity:.55; }
  50%{ opacity:.95; }
}

/* أماكن الفوانيس */
.ramadan-lantern.l1{ left:14%; animation-duration:3.8s; }
.ramadan-lantern.l2{ left:46%; width:38px; height:60px; animation-duration:4.2s; }
.ramadan-lantern.l3{ left:78%; animation-duration:3.4s; }

/* النجوم (مربعات مائلة صغيرة) بتنزل */
.ramadan-star{
  position:absolute;
  width:10px;
  height:10px;
  border:2px solid rgba(255,255,255,.75);
  transform: rotate(45deg);
  top:-20px;
  opacity:.9;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.25));
  animation: fall 4.6s linear infinite;
}
@keyframes fall{
  0%{ transform: translateY(-30px) rotate(45deg); opacity:0; }
  10%{ opacity:.9; }
  100%{ transform: translateY(110vh) rotate(45deg); opacity:0; }
}

/* توزيع النجوم + اختلاف السرعات */
.ramadan-star.s1{ left:8%;  animation-duration:5.2s; animation-delay:.2s; }
.ramadan-star.s2{ left:22%; animation-duration:4.4s; animation-delay:1.1s; }
.ramadan-star.s3{ left:55%; animation-duration:6.0s; animation-delay:.6s; }
.ramadan-star.s4{ left:71%; animation-duration:4.8s; animation-delay:1.6s; }
.ramadan-star.s5{ left:90%; animation-duration:5.6s; animation-delay:.9s; }

/* على الموبايل نقلل الزحمة */
@media (max-width: 480px){
  .ramadan-crescent{ width:46px; height:46px; left:10px; top:14px; }
  .ramadan-lantern.l2{ display:none; }
}
