/* ========== BODY & BASE ========== */
body, html {
  height: 100%;
  min-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;

  font-family: 'Almarai', sans-serif;
  background: #222240;
  margin: 0;
  color: #232343;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ========== HEADER ========== */
.offer-header {
  background: #222240;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;   /* وسط الهيدر */
  flex-direction: row;
  padding: 10px 16px;
  width: 100vw;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  gap: 800px;                /* مسافة بين الشعار والأيقونات */
}

.offer-logo {
  max-height: 70px;
  height: 70px;
  width: auto;
  display: block;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.side-menu-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  display: flex;
  align-items: center;
}

.header-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  transition: filter 0.15s;
  cursor: pointer;
}

.login-btn:hover .header-icon,
.side-menu-btn:hover .header-icon {
  filter: brightness(1.6) saturate(1.2);
}

@media (max-width: 900px) {
  .offer-header {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0;
    width: 100vw;
    z-index: 3000;
    background: #222240;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    height: 60px;
    gap: 0 !important;
    padding: 0 0 0 0;
  }
  .offer-logo {
    display: block;
    margin: 0 auto !important;
    position: relative;
    left: 0; right: 0;
    max-height: 60px;
    height: 60px;
  }
  .header-right {
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    height: 80px;
    display: flex;
    align-items: center;
    gap: 9px;
  }
}

@media (max-width: 1050px) and (min-width: 901px) {
  .offer-header {
    justify-content: space-between !important;
    gap: 0 !important;
    padding-left: 25px;
    padding-right: 25px;
  }
}

@media (max-width: 450px) {
  .offer-header {
    height: 50px;
  }
  .offer-logo {
    max-height: 50px;
    height: 50px;
  }
  .header-right {
    height: 50px;
  }
}
/* إضافة هام: دفع محتوى الصفحة للأسفل حتى لا يختفي خلف الهيدر الثابت */
@media (max-width: 900px) {
  body {
    padding-top: 50px;
  }
}
@media (max-width: 600px) {
  body {
    padding-top: 50px;
  }
}

/* ========== SIDER ========== */
/* سايدر جانبي منبثق */
.side-nav-drawer {
  position: fixed;
  top: 0;
  left: -290px;    /* <== كان right: -290px */
  width: 240px;
  height: 100vh;
  background: #fff;
  box-shadow: 5px 0 24px #7a51e01f; /* <== حذف - من الشادو */
  z-index: 3200;
  transition: left 0.26s cubic-bezier(.6,0,.4,1); /* <== كان right */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px 0 24px 12px; /* <== عكس البادينغ */
  overflow-y: auto;
}
.side-nav-drawer.open {
  left: 0;        /* <== كان right: 0 */
}

.side-nav-content a {
  color: #afafaf;
  text-align: right;
  text-decoration: none;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  transition: color 0.18s, background 0.17s;
  padding: 8px 8px 8px 0;
  width: 100%;
}
.side-nav-content .nav-icon {
  width: 26px;
  height: 26px;
  margin-left: 15px;
  filter: grayscale(70%) brightness(1.1);
  transition: filter 0.18s;
}
.side-nav-label {
  font-size: 15px;
  color: #afafaf;
  font-family: 'Almarai', sans-serif;
  transition: color 0.18s;
  font-weight: normal;
}
.side-nav-content a.active,
.side-nav-content a:hover {
  color: #9e67ff;
  background: #f5f0ff;
}
.side-nav-content a.active .side-nav-label,
.side-nav-content a:hover .side-nav-label {
  color: #9e67ff;
  font-weight: bold;
}
.side-nav-content a.active .nav-icon,
.side-nav-content a:hover .nav-icon {
  filter: grayscale(0%) brightness(1.15);
  filter: grayscale(0%) brightness(1.15);
}
.side-nav-close {
  background: none;
  border: none;
  font-size: 31px;
  color: #8f8ff2;
  cursor: pointer;
  padding: 5px 14px 8px 0;
  margin-bottom: 10px;
  margin-right: -4px;
  margin-left: auto;
  display: block;
  transition: color 0.18s;
}
.side-nav-close:hover { color: #c43eec; }

.side-nav-overlay {
  display: none;
  position: fixed;
  top: 0; right: 0; left: 0; bottom: 0;
  background: #23234344;
  z-index: 3190;
  transition: opacity 0.21s;
}

.side-nav-drawer.open ~ .side-nav-overlay {
  display: block;
}

/* سايدر فقط للشاشات الكبيرة (يمكنك ضبط الرقم حسب رغبتك) */
@media (max-width: 901px) {
  .side-nav-drawer, .side-nav-overlay {
    display: none !important;
  }
}
/* ========== FOOTER ========== */
.footer {
  background: #222240;
  color: #fff;
  padding: 10px 0 10px 0;
  width: 100vw;
  box-sizing: border-box;
  margin-top: auto;
}
.footer-container {
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

/* الصف الجديد الذي يجمع الشعارات، الروابط، السوشيال */
.footer-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 3px;
  flex-wrap: wrap;
  direction: rtl; /* لترتيب صحيح بالعربي */
}

/* يمين: الشعارات */
.footer-logos {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 30px;
  margin-bottom: 0;
  flex: 1;
    padding-left: 25px;
    padding-right: 25px;
}
.footer-logo {
  height: 50px;
  display: block;
}
.footer-logo-second {
  height: 45px;
  opacity: 1;
}

/* وسط: الروابط */
.footer-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex: 3;
  margin-bottom: 0;
  flex-wrap: wrap;
}
.footer-links a {
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  font-weight: 400;
  letter-spacing: .13px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color .18s, background .18s;
}
.footer-links a:hover {
  color: #a777fb;
  background: #fff1;
}

/* يسار: السوشيال */
.footer-social {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0;
  margin-top: 0;
  flex: 1;
}
.footer-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transition: filter 0.15s;
  cursor: pointer;
  display: block;
}
.footer-icon:hover {
  filter: brightness(1.2) saturate(1.4);
}


/* خط فاصل */
.footer-separator {
  border: none;
  border-top: 1.3px solid #fff;
  opacity: .43;
  margin: 10px auto 8px auto;
  width: 100%;
}

/* الحقوق */
.footer-copy {
  color: #fff;
  font-size: 14.5px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.3px;
  margin-top: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.footer-date {
  direction: ltr;
  unicode-bidi: embed;
  margin: 0 0 0 6px;
  font-weight: 400;
}

/* تجاوب */
@media (max-width: 900px) {
  .footer-row {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    text-align: center;
  }
  .footer-logos, .footer-links, .footer-social {
    justify-content: center !important;
    margin-bottom: 10px;
  }
    .footer {
    padding-bottom: 100px;
  }
}

@media (max-width: 800px) {
  .footer-container { padding: 0 4vw; }
  .footer-logos { gap: 13px; }
  .footer-logo { height: 55px; }
  .footer-logo-second { height: 45px; }
  .footer-links { gap: 6px; }
  .footer-social { gap: 20px; }
  .footer-separator { width: 98%; }
  .footer-copy { font-size: 10px;}
}

@media (max-width: 600px) {
  .footer-row {
    gap: 5px;
  }
  .footer-links {
    gap: 6px;
    font-size: 11px;
  }
  .footer-links a {
    font-size: 10px !important;
    font-weight: 400 !important;
    padding: 10px 5px;
    letter-spacing: 0;
  }
}

/* ========== BOTTOM NAV (NAVBAR) ========== */
.bottom-nav {
  display: none;
}
@media (max-width: 900px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    background: #fff;
    border-top: 1px solid #f8f5f5;
    z-index: 2500;
    justify-content: space-around;
    align-items: center;
    padding: 4px 0 3px 0;
    height: 65px;
  }
  .bottom-nav a {
    color: #afafaf; /* اللون الافتراضي */
    text-align: center;
    font-size: 10px;
    flex: 1;
    transition: color 0.2s;
    padding: 0 3px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .bottom-nav .bottom-nav-label {
    font-size: 10px;
    color: #afafaf; /* الافتراضي رمادي */
    margin-top: 2px;
    font-family: 'Almarai', sans-serif;
    transition: color 0.2s, font-weight 0.2s;
    font-weight: normal;
  }
  .bottom-nav .nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 3px;
    display: block;
    filter: grayscale(70%) brightness(1.1); /* رمادي فاتح افتراضي */
    transition: filter 0.2s;
  }

  .bottom-nav a.active,
  .bottom-nav a:hover {
    color: #9e67ff;
  }
  .bottom-nav a.active .bottom-nav-label,
  .bottom-nav a:hover .bottom-nav-label {
    color: #9e67ff; /* نشط أو Hover */
    font-weight: bold;
  }
  .bottom-nav a.active .nav-icon,
  .bottom-nav a:hover .nav-icon {
    filter: grayscale(0%) brightness(1.15) drop-shadow(0 0 1px #9e67ff);
  }

  /* زر تسجيل الدخول */
  .bottom-nav a.login-nav-btn {
    color: #a777fb !important;
    font-weight: bold;
  }
  .bottom-nav a.login-nav-btn .bottom-nav-label {
    color: #a777fb !important;
    font-weight: bold;
  }
  /* إخفاء أزرار الدخول والقائمة الجانبية في الشاشات الصغيرة */
  .login-btn,
  .side-menu-btn {
    display: none !important;
  }
}

/* ========== SIDE NAV (SIDEBAR) ========== */
.side-nav {
  display: none;
}
@media (min-width: 901px) {
  .side-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: #fff;
    border-right: 1px solid #f3f3fa;
    min-width: 120px;
    min-height: 100vh;
    padding: 24px 16px 24px 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 2400;
    box-shadow: 0 0 14px #eee5ff4a;
  }
  .side-nav a {
    color: #afafaf;
    text-align: right;
    text-decoration: none;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    transition: color 0.22s;
    padding: 6px 8px 6px 0;
    border-radius: 10px 0 0 10px;
    min-width: 100px;
  }
  .side-nav .nav-icon {
    width: 28px;
    height: 28px;
    margin-left: 8px;
    filter: grayscale(70%) brightness(1.1);
    transition: filter 0.2s;
  }
  .side-nav-label {
    font-size: 15px;
    color: #afafaf;
    font-family: 'Almarai', sans-serif;
    transition: color 0.2s;
    font-weight: normal;
  }
  .side-nav a.active,
  .side-nav a:hover {
    color: #9e67ff;
    background: #f5f0ff;
  }
  .side-nav a.active .side-nav-label,
  .side-nav a:hover .side-nav-label {
    color: #9e67ff;
    font-weight: bold;
  }
  .side-nav a.active .nav-icon,
  .side-nav a:hover .nav-icon {
    filter: grayscale(0%) brightness(1.15) drop-shadow(0 0 1px #9e67ff);
  }
}
/* اخفاء البوتوم ناف في الشاشات الكبيرة */
@media (min-width: 901px) {
  .bottom-nav {
    display: none !important;
  }
}
@media (max-width: 901px) {
  .side-nav {
    display: none !important;
  }
  .bottom-nav {
    display: flex;
  }
}
