/* ─── Theme 3 — Arabic/Hebrew (RTL) Global Styles ──────────────────────── */

/* ═══ CSS CUSTOM PROPERTIES ══════════════════════════════════════════════ */
:root {
  /*
   * --MainColor and --MainColor_rgb are set at runtime by useGlobalTheme()
   * from appSettingsData.appColor (admin panel).
   * Provide fallback defaults so the UI looks correct before JS hydrates.
   */
  --MainColor:     #a88956;
  --MainColor_rgb: 168, 137, 86;

  /*
   * --font-family is also set at runtime by useGlobalTheme()
   * from appSettingsData.app_font_ar / app_font_en.
   */
  --font-family: "Cairo", "Tajawal", "Segoe UI", system-ui, sans-serif;

  /* ── Theme 3 design tokens — driven by admin color ── */
  --t3-accent:      var(--MainColor, #a88956);
  --t3-accent-dark: var(--MainColor, #8c6f3e);
  --t3-accent-soft: rgba(var(--MainColor_rgb, 168, 137, 86), 0.14);
  --t3-bg:          #f5f4f0;
  --t3-card-bg:     #ffffff;
  --t3-text:        #1c1c1c;
  --t3-text-muted:  #777;
  --t3-border:      #ede9e2;
  --t3-shadow:      0 4px 24px rgba(0, 0, 0, 0.07);
  --t3-radius:      12px;

  /* Aliases used in module CSS */
  --theme3-accent:      var(--t3-accent);
  --theme3-accent-soft: var(--t3-accent-soft);
  --theme3-text:        var(--t3-text);
  --theme3-bg:          var(--t3-bg);
}

/* ═══ GLOBAL RESET / BASE ════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  direction: rtl;
  font-family: var(--font-family, "Cairo"), "Cairo", "Tajawal", "Segoe UI", system-ui, sans-serif;
  background-color: var(--t3-bg);
  color: var(--t3-text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ═══ TYPOGRAPHY ══════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover { color: var(--t3-accent); }

/* ═══ SCROLLBAR ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--MainColor_rgb, 168, 137, 86), 0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--t3-accent); }

/* ═══ SELECTION ═══════════════════════════════════════════════════════════ */
::selection { background: var(--t3-accent-soft); color: var(--t3-accent-dark); }

/* ═══ FOCUS ═══════════════════════════════════════════════════════════════ */
:focus-visible { outline: 2px solid var(--t3-accent); outline-offset: 2px; }

/* ═══ IMAGES ══════════════════════════════════════════════════════════════ */
img { max-width: 100%; display: block; }

/* ═══ BOOTSTRAP OVERRIDES ═════════════════════════════════════════════════ */
.container, .container-fluid {
  --bs-gutter-x: 1.25rem;
}

/* ═══ LOADING MANAGER COMPAT ══════════════════════════════════════════════ */
.theme3-main-shell {
  min-height: 50vh;
}

/* ═══ WHATSAPP FAB (shared from theme1 class names) ══════════════════════ */
.fotter-socilIcon {
  position: fixed;
  bottom: 80px;
  inset-inline-end: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  z-index: 900;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  border: none;
  transition: transform 0.2s, opacity 0.2s;
}
.fotter-socilIcon:hover { transform: scale(1.08); opacity: 0.9; }

.whats {
  background: #25d366;
  color: #fff;
  text-decoration: none;
  bottom: 80px;
}

.share {
  background: var(--MainColor, #a88956);
  color: #fff;
  bottom: 136px;
  font-size: 1.1rem;
}

/* ═══ OFFCANVAS (Bootstrap) RTL ══════════════════════════════════════════ */
.offcanvas { direction: rtl; }

/* ═══ SWIPER CUSTOM BULLETS ═══════════════════════════════════════════════ */
.swiper-pagination-bullet {
  background: var(--t3-accent);
  opacity: 0.4;
}
.swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--t3-accent);
}
.swiper-button-next,
.swiper-button-prev {
  color: var(--t3-accent) !important;
}

/* ═══ DESIGN NOTICE (development placeholder) ════════════════════════════ */
.theme3-design-notice {
  font-family: system-ui, sans-serif;
  color: #1a1a1a;
}
