/* ============================================
   mogod_web_2 - التنسيقات الأساسية
   RTL + مطابقة تصميم التطبيق
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  font-family: var(--font-arabic);
  -webkit-text-size-adjust: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--background-color);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* ========== صفحة Splash (شاشة البداية) - مطابقة 100% ========== */
.splash-screen {
  background-color: var(--splash-background);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.splash-screen .splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.splash-screen .splash-logo {
  width: min(150px, 50vw);
  height: min(150px, 50vw);
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
}

/* ========== Snackbar (مطابق لـ Get.snackbar في التطبيق) ========== */
.snackbar {
  position: fixed;
  bottom: max(24px, var(--safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-family: var(--font-arabic);
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: snackbar-in 0.25s ease-out;
}

.snackbar--error {
  background-color: rgba(211, 47, 47, 0.95);
  color: #fff;
}

.snackbar--success {
  background-color: rgba(46, 125, 50, 0.95);
  color: #fff;
}

.snackbar__title {
  font-weight: 700;
  font-size: 15px;
}

.snackbar__message {
  font-weight: 500;
}

@keyframes snackbar-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ========== شارة عدد السلة — تظهر في كل الصفحات على أيقونة السلة ========== */
.has-basket-badge {
  position: relative;
}

.basket-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #E15630;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}

.basket-badge.is-visible {
  display: flex;
}
