@import url("https://fonts.googleapis.com/css2?family=Vesper+Libre:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;600;700&display=swap");

:root {
  --calendar-icon-url: url("../images/calendar-unified.svg");
  --cart-icon-url: url("../images/cart-unified.svg");
}

/* Global box sizing + prevent horizontal overflow on mobile */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  overflow-x: hidden;
}

/* ====== HEADER BASE ====== */
.main-header {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 5%;        /* 🔹 خففنا الارتفاع */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  height: 70px;
}

/* 🔹 كبرنا اللوغو شوي */
.logo img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: #000;
  font-family: "Vesper Libre", serif;
  font-size: 18px;
  font-weight: 700;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #71b247;
}

.profile-btn a {
  background: #71b247;
  color: #fff;
  padding: 10px 20px;
  border-radius: 25px;
  font-family: "Vesper Libre", serif;
  font-size: 16px;
  white-space: nowrap;
}

/* ====== MENU TOGGLE (hidden on desktop) ====== */
.menu-toggle {
  display: none;
  font-size: 30px;
  cursor: pointer;
  user-select: none;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 20px 0;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.3s ease;
    z-index: 3100;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .profile-btn {
    display: none;
  }
}

body {
  padding-top: 85px; /* كان 90، خففناه شوي */
  font-family: "Vesper Libre", serif;
}

body:lang(ar),
input:lang(ar),
textarea:lang(ar),
select:lang(ar),
button:lang(ar) {
  font-family: "Tajawal", sans-serif;
}

/* ====== موبايل فقط (تصفير ارتفاع الهيدر تقريبا) ====== */
@media (max-width: 768px) {
  .main-header {
    padding: 0px 5%;        /* 🔹 صفرنا تقريبا المسافة فوق وتحت */
    height: 70px;           /* 🔹 ارتفاع مضبوط للهيدر */
  }

  .logo img {
    width: 100px;            /* 🔸 نفس حجم اللوغو اللي عجبك */
    height: 100px;
  }

  .menu-toggle {
    font-size: 28px;
  }
}

/* Footer */
.footer {
  background: #fff;
  border-top: 3px solid #71b247;
  padding: 60px 6% 20px;
  font-family: "Vesper Libre", serif;
}

/* شبكة الأعمدة */
.footer-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: flex-start;
  margin-top: 30px; /* نزل الأعمدة شوي */
}

/* ✅ تقليل المسافة بين اللوغو والنص */
.footer-logo {
  width: 180px;
  margin-bottom: -60px; /* قللناها لتقريب النص للوغو */
}

.footer-col.about p {
  color: #000;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 5px;
  width: 90%;
  margin-left: 5px;
}


/* Connect + App Download */
.bottom-left {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 60px;
  margin-top: 20px;
}
.bottom-left h4 {
  color: #71b247;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.socials, .apps {
  display: flex;
  gap: 10px;
  align-items: center;
}
.socials img { width: 35px; transition: transform .2s; }
.socials img:hover { transform: scale(1.1); }
.apps img { width: 45px; }

/* ✅ نحرك App Download تحت Support */
.app-download {
  position: relative;
  top: 90px;     /* نزلها تحت Support */
  left: -430px;  /* حركها شوي لليسار لتصير محاذية للـ Support */
}

/* الأعمدة التانية */
.footer-col h4 {
  color: #71b247;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a {
  text-decoration: none;
  color: #000;
  font-size: 16px;
  font-weight: 600;
}
.footer-col ul li a:hover {
  color: #71b247;
}

/* الخط الفاصل */
.footer-line {
  border: none;
  border-top: 1px solid #eee;
  margin: 40px 0 20px;
}

/* الصف السفلي */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(137, 137, 137, 0.75);
  font-weight: 600;
}
.footer-bottom p {
  font-size: 15px;
}

/* مربع اللغة */
.language-box {
  background: rgba(241, 241, 241, 0.44);
  border: 1px solid #d9d9d9;
  border-radius: 15px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.language-box span {
  color: #d9d9d9;
  font-size: 16px;
  font-weight: 700;
}
.earth-icon { width: 25px; }
.arrow-icon { width: 10px; }

/* Responsive */
@media (max-width: 1000px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
  .bottom-left {
    flex-direction: column;
    gap: 20px;
  }
  .app-download {
    position: static;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 650px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
  .footer-col {
    text-align: center;
  }
  .bottom-left {
    flex-direction: column;
    align-items: center;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
}

/* ✅ App Download مضبوط وتحوّل شوي لليسار */
.app-download {
  position: fixed;
  top: 185px;       /* نفس الارتفاع تقريبًا */
  left: 30%;        /* حركناه شوي لليسار (من 48 إلى 44) */
  transform: translateX(-50%);
  text-align: left;
}

.app-download h4 {
  color: #71b247;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.app-download .apps {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-download .apps img {
  width: 45px;
  transition: transform 0.2s ease;
}

.app-download .apps img:hover {
  transform: scale(1.1);
}

/* ✅ نزل الأعمدة شوي لتحت */
.footer-col:not(.about) {
  transform: translateY(50px);
}

/* ✅ تصميم الفوتر على الموبايل */
@media (max-width: 768px) {
  .footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 35px;
  }

  .footer-logo {
    width: 150px;
    margin-bottom: 10px;
  }

  .footer-col.about p {
    width: 95%;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.6;
  }

  .footer-col {
    text-align: center;
    transform: none !important; /* لإلغاء النزول السابق */
  }

  .footer-col h4 {
    color: #71b247;
    margin-bottom: 10px;
  }

  .footer-col ul {
    padding: 0;
  }

.footer-col ul li {
    margin-bottom: 6px;
  }

  /* ✅ Connect */
  .bottom-left {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 0;
  }

  .socials img {
    width: 30px;
  }

  /* ✅ App Download تحت Connect */
  .app-download {
    position: static;
    text-align: center;
    margin-top: 20px;
    transform: none;
  }

  .app-download h4 {
    color: #71b247;
    margin-bottom: 10px;
  }

  .app-download .apps {
    justify-content: center;
  }

  /* ✅ ضبط الفوتر السفلي */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    margin-top: 40px;
  }

  .language-box {
    margin: 0 auto;
  }
}

/* Footer override: keep App Download in normal flow */
.app-download {
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

/* ===== Custom Select (Global) ===== */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select select {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.custom-select-toggle {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dbe7ef;
  background: #fff;
  font-size: 15px;
  font-family: "Inter", sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: 0.2s ease;
}

.custom-select.open .custom-select-toggle {
  border-color: #00a3c8;
  box-shadow: 0 0 0 4px rgba(0, 163, 200, 0.15);
}

.custom-select-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
}

.custom-select.open .custom-select-arrow {
  transform: rotate(-135deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  padding: 8px;
  display: none;
  z-index: 20;
}

.custom-select.open .custom-select-menu {
  display: grid;
  gap: 6px;
}

.custom-select-group {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 6px 10px 2px;
}

.custom-select-option {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f5f8fb;
  color: #0f172a;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s ease;
}

.custom-select-option:hover {
  border-color: rgba(0, 163, 200, 0.4);
  color: #00a3c8;
  background: #edf7fb;
}

.custom-select-option.is-selected {
  border-color: #00a3c8;
  background: #e7f7fc;
  color: #008aa8;
}

.custom-select-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ====== Hembla Calendar ====== */
.hembla-calendar {
  position: absolute;
  width: 320px;
  border-radius: 18px;
  background: #f7f9fb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  border: 1px solid #dfe8ef;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1200;
}

.hembla-calendar.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hembla-calendar__header {
  background: linear-gradient(90deg, #14a5c9, #7dd4e8);
  color: #fff;
  padding: 12px 16px;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.hembla-calendar__title {
  font-size: 14px;
}

.hembla-calendar__body {
  padding: 12px 16px 14px;
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  row-gap: 10px;
}

.hembla-calendar__month {
  text-align: center;
  font-weight: 700;
  color: #0b6b88;
}

.hembla-calendar__nav {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #e8f3f6;
  color: #0b6b88;
  font-weight: 700;
  cursor: pointer;
}

.hembla-calendar__weekdays,
.hembla-calendar__days {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.hembla-calendar__weekdays span {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.hembla-calendar__day,
.hembla-calendar__empty {
  height: 30px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-weight: 600;
  color: #1f2937;
}

.hembla-calendar__day {
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hembla-calendar__day:hover {
  background: #e7f5fb;
  color: #0b6b88;
}

.hembla-calendar__day.is-selected {
  background: #0ea5c8;
  color: #fff;
}

.hembla-calendar__day.is-today {
  border: 1px solid #0ea5c8;
}

.hembla-calendar__footer {
  text-align: center;
  padding: 8px 12px 12px;
  font-size: 11px;
  color: #7b8794;
}

/* ===== Validation ===== */
.form-error {
  margin: 12px 0 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff3f3;
  border: 1px solid #ffb4b4;
  color: #b42318;
  font-weight: 700;
  font-size: 14px;
  display: none;
}
.form-error.is-visible {
  display: block;
}
.field-error {
  border-color: #ff7a7a !important;
  box-shadow: 0 0 0 4px rgba(255, 122, 122, 0.18);
}
.field-error-pill {
  box-shadow: 0 0 0 3px rgba(255, 122, 122, 0.25);
  border-color: #ff7a7a !important;
}

/* ===== Toast ===== */
.toast-wrap {
  position: fixed;
  right: 20px;
  top: 90px;
  display: grid;
  gap: 10px;
  z-index: 1200;
  pointer-events: none;
}
.toast {
  min-width: 260px;
  max-width: 340px;
  background: #0f172a;
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25);
  display: grid;
  gap: 4px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast__title {
  font-weight: 700;
  font-size: 14px;
}
.toast__desc {
  font-size: 13px;
  opacity: 0.85;
}
