/* =====================================================
   Movmart — Premium public stylesheet
   ===================================================== */
:root {
  --red: #e30613;
  --red-2: #b8040f;
  --red-3: #ff3346;
  --black: #0d0d0d;
  --black-2: #1a1a1a;
  --gray: #f6f6f7;
  --gray-2: #ececee;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-red: 0 8px 24px rgba(227,6,19,0.32);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --header-h: 68px;
  --transition: 0.25s cubic-bezier(.4,.0,.2,1);
}

[data-theme="dark"] {
  --black: #ffffff;
  --black-2: #f3f4f6;
  --gray: #1a1a1a;
  --gray-2: #262626;
  --text: #f3f4f6;
  --muted: #a1a1aa;
  --border: #2a2a2a;
  --bg: #0e0e10;
  --card: #161618;
}

* { box-sizing: border-box; }
*:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Cairo', 'Segoe UI', Tahoma, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,13,13,0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  color: #fff;
  border-bottom: 3px solid var(--red);
  height: var(--header-h);
}

.site-header .row {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: #fff;
}
.brand img {
  height: 44px; width: 44px; object-fit: contain;
  background: #fff; padding: 4px; border-radius: 10px;
}
.brand .name { font-size: 18px; font-weight: 800; letter-spacing: 0.3px; }
.brand .name b { color: var(--red); }

.header-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.icon-btn:hover { background: var(--red); border-color: var(--red); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }

/* ============ Hero ============ */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--black) 0%, #1a1a1a 50%, var(--black) 100%);
  color: #fff;
  padding: 60px 20px 70px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(227,6,19,0.30), transparent 60%),
    radial-gradient(40% 40% at 100% 100%, rgba(227,6,19,0.18), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero .badge {
  display: inline-block;
  background: rgba(227,6,19,0.18);
  border: 1px solid rgba(227,6,19,0.5);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #ffd6d9;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.hero h1 .accent { color: var(--red-3); }
.hero .subtitle {
  font-size: clamp(15px, 2vw, 18px);
  opacity: 0.85;
  margin: 0 0 28px;
}

.hero-actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn-primary:hover { background: var(--red-2); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(227,6,19,0.45); }
.btn-ghost {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); }
.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 30px; font-size: 17px; }

/* ============ Section ============ */
section { padding: 50px 0; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 {
  font-size: clamp(22px, 3vw, 32px);
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.section-head h2 .accent { color: var(--red); }
.section-head p { color: var(--muted); margin: 0; }

/* ============ PDF Preview ============ */
.pdf-section { background: var(--gray); padding: 60px 0; }
[data-theme="dark"] .pdf-section { background: var(--gray); }

.pdf-frame-wrap {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.pdf-frame-wrap iframe {
  width: 100%;
  height: 720px;
  border: 0;
  display: block;
  background: #525659;
}
.pdf-frame-wrap .toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border);
}
.pdf-frame-wrap .toolbar h3 { margin: 0; font-size: 16px; }

@media (max-width: 600px) {
  .pdf-frame-wrap iframe { height: 500px; }
}

/* ============ Gallery ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
@media (max-width: 768px) {
  .gallery { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
}
.gal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: var(--transition);
  aspect-ratio: 3 / 4;
}
.gal-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.gal-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.5), transparent 40%);
  opacity: 0;
  transition: opacity var(--transition);
}
.gal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--red); }
.gal-card:hover img { transform: scale(1.06); }
.gal-card:hover::after { opacity: 1; }
.gal-card .num {
  position: absolute; top: 8px; right: 8px;
  background: var(--red); color: #fff;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  z-index: 2;
}

/* Fade-in on scroll */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============ Lightbox ============ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.96);
  display: none;
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(227,6,19,0.4);
  user-select: none;
}
.lb-controls {
  position: absolute; bottom: 24px;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
  background: rgba(0,0,0,0.6); padding: 8px 12px; border-radius: 999px;
}
.lb-controls button, .lb-close, .lb-nav {
  background: rgba(255,255,255,0.12);
  color: #fff; border: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.lb-controls button:hover, .lb-close:hover, .lb-nav:hover { background: var(--red); }
.lb-close { position: absolute; top: 16px; left: 16px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 24px; }
.lb-prev { right: 16px; }
.lb-next { left: 16px; }
.lb-counter {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  color: #fff; background: rgba(0,0,0,0.5);
  padding: 6px 14px; border-radius: 999px; font-size: 14px;
}

/* ============ Branches ============ */
.branches { background: var(--gray); }
.branch-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.branch-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 6px;
  transition: var(--transition);
}
.branch-card:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.branch-card h4 { margin: 0 0 4px; font-size: 17px; }
.branch-card p { margin: 0; color: var(--muted); font-size: 14px; }
.branch-card .actions { margin-top: 10px; display: flex; gap: 8px; }

/* ============ Floating Actions ============ */
.fab-stack {
  position: fixed; bottom: 18px; left: 18px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 60;
}
.fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 26px; height: 26px; }
.fab-whatsapp { background: #25d366; }
.fab-share    { background: var(--black); border: 2px solid var(--red); }
.fab-top      { background: var(--red); }

/* ============ Share Sheet ============ */
.share-sheet {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 100;
}
.share-sheet.open { display: flex; }
.share-card {
  background: var(--card);
  width: 100%; max-width: 420px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 22px; padding-bottom: 30px;
  text-align: center;
}
.share-card h3 { margin: 0 0 16px; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.share-grid button {
  background: var(--gray);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 14px 6px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--text);
  transition: var(--transition);
  font-family: inherit;
}
.share-grid button:hover { background: var(--red); color: #fff; }
.share-grid button svg { width: 26px; height: 26px; }

/* ============ Footer ============ */
.site-footer {
  background: var(--black);
  color: #fff;
  padding: 40px 20px 24px;
  border-top: 4px solid var(--red);
  margin-top: 40px;
}
.site-footer .row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-footer .brand .name { color: #fff; }
.social { display: flex; gap: 10px; }
.social a {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
  transition: var(--transition);
}
.social a:hover { background: var(--red); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; }
.copyright { text-align: center; color: rgba(255,255,255,0.5); font-size: 13px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 16px; }
.copyright .accent { color: var(--red-3); font-weight: 700; }

/* ============ Empty / Skeleton ============ */
.empty {
  text-align: center; padding: 60px 20px;
  color: var(--muted); font-size: 17px;
}
.empty .icon {
  width: 64px; height: 64px; margin: 0 auto 14px;
  background: var(--gray); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--red); font-size: 30px;
}

.skeleton {
  background: linear-gradient(90deg, var(--gray) 0%, var(--gray-2) 50%, var(--gray) 100%);
  background-size: 200% 100%;
  animation: skeleton 1.4s linear infinite;
  border-radius: var(--radius);
}
@keyframes skeleton { 0% { background-position: 0 0; } 100% { background-position: -200% 0; } }

/* ============ PWA install prompt ============ */
.pwa-prompt {
  position: fixed; bottom: 18px; right: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: none;
  align-items: center; gap: 12px;
  max-width: 320px;
  z-index: 60;
}
.pwa-prompt.show { display: flex; }
.pwa-prompt p { margin: 0; font-size: 13px; flex: 1; }
.pwa-prompt button { padding: 6px 12px; font-size: 12px; }

/* Responsive */
@media (max-width: 540px) {
  .hero { padding: 40px 16px; }
  .gal-card { aspect-ratio: 3 / 4; }
  .brand .name { font-size: 15px; }
  .brand img { height: 38px; width: 38px; }
  .site-header { height: 60px; }
  :root { --header-h: 60px; }
  .fab { width: 50px; height: 50px; }
  .fab svg { width: 22px; height: 22px; }
}
