:root {
  --ivory: #FAF6EE;
  --card: #FFFFFF;
  --gold: #B8955A;
  --gold-text: #7E5F2C;
  --ink: #3B2F22;
  --muted: #6B5B47;
  --line: #D9CBB0;
  --wa: #2E7D4F;
  --radius: 14px;
  --font-body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-head: 'Reem Kufi', 'IBM Plex Sans Arabic', sans-serif;
  --font-latin: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
a { color: var(--gold-text); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 20px calc(110px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
.loading, .empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* Home */
.home { display: flex; flex-direction: column; align-items: center; gap: 32px; padding-top: 4vh; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mark {
  width: 84px; height: 84px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-latin); font-size: 32px; color: var(--gold-text);
}
.name { margin: 8px 0 0; font-family: var(--font-latin); font-weight: 500; font-size: 40px; letter-spacing: 4px; line-height: 1.2; }
.tagline { margin: 0; color: var(--muted); }

.home-grid { width: 100%; max-width: 440px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.home-btn {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 14px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 500;
  transition: border-color .15s, transform .15s;
}
.home-btn:hover { border-color: var(--gold); }
.home-btn:active { transform: scale(.98); }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-btn .icon { color: var(--gold); }

@media (min-width: 768px) {
  .home { padding-top: 10vh; }
  .home-grid { max-width: 640px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-btn { flex-direction: column; justify-content: center; min-height: 140px; text-align: center; }
  .home-btn .icon { width: 32px; height: 32px; }
}
@media (min-width: 1100px) {
  .home-grid { max-width: 1000px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .name { font-size: 52px; }
}

/* Sections */
.section { max-width: 760px; margin: 0 auto; }
.section h2 { font-family: var(--font-head); font-weight: 500; font-size: 34px; margin: 12px 0 20px; line-height: 1.4; outline: none; }
.section h3 { font-family: var(--font-head); font-weight: 500; font-size: 22px; margin: 32px 0 12px; }
.section h4 { margin: 0; font-size: 17px; font-weight: 600; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 4px; color: var(--gold-text); text-decoration: none; font-weight: 500;
}
.prose p { margin: 0 0 12px; }

.service { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.service h3 { margin: 0 0 6px; font-size: 20px; }
.service p { margin: 0; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.thumb { padding: 0; border: 0; background: var(--ivory); border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.price-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.price-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.price-list li:last-child { border-bottom: 0; }
.price { color: var(--gold-text); font-weight: 600; white-space: nowrap; overflow-wrap: normal; }
.packages { display: grid; gap: 12px; }
@media (min-width: 640px) { .packages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.package { background: var(--card); border: 1.5px solid var(--gold); border-radius: var(--radius); padding: 18px; }
.package-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.package p { margin: 0; color: var(--muted); }
.steps { margin: 0; padding-inline-start: 24px; }
.steps li { margin-bottom: 10px; }
.steps li::marker { color: var(--gold-text); font-weight: 600; }

.fold { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; }
.fold summary { cursor: pointer; padding: 14px 18px; font-weight: 600; min-height: 48px; list-style-position: inside; }
.fold > :not(summary) { margin: 0; padding: 0 18px 16px; }
.fold ul { padding-inline-start: 38px; }
.fold li { margin-bottom: 6px; }

.contacts { display: grid; gap: 12px; margin-top: 8px; }
.contact-link {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  min-height: 64px; padding: 14px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 500;
}
.contact-link .icon { color: var(--gold); }
.muted { color: var(--muted); font-weight: 400; }

/* Floating order button */
.fab { position: fixed; inset-inline-start: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 10; }
.fab[hidden] { display: none; }
.fab a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: 999px;
  background: var(--wa); color: #fff; text-decoration: none; font-weight: 600;
  box-shadow: 0 6px 18px rgba(59, 47, 34, .22);
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(30, 24, 17, .9); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox img { max-height: 88vh; border-radius: 10px; }
.lightbox-close { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 30px; cursor: pointer; }

.error { text-align: center; padding: 64px 0; }
.btn { min-height: 48px; padding: 10px 24px; border-radius: 999px; border: 1px solid var(--gold); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
