/* GENERAL HEADER */
#header { 
    width: 100%;
    background-image: url('/images/bg.png');
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    transition: 0.3s ease;
}

/* TOP HEADER (Big mode) */
.top-header {
    display: flex;
justify-content: space-around;
    align-items: center;
    padding: 8px 40px;
    transition: 0.3s;font-family: 'Roboto', sans-serif;
    padding-left: 7rem;
        padding-right: 7rem;
}

.top-header .logo img {
    height: 53px;
    transition: 0.3s;
}

.search-box input {
    width: 100%;
    height: 50px;
    border-radius: 30px;
    border: none;
    padding: 0 20px;
    outline: none;
}

.search-box button {
    margin-left: -45px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.actions .item {
    margin-left: 25px;
    color: white;
    font-weight: 500;
}

/* BOTTOM HEADER */
.bottom-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 12px 40px;
    border-top: 1px solid #ffffff22;
    transition: 0.3s;justify-content: center;
}

.bottom-header .bottom-logo {
    opacity: 0;
    transform: translateY(-20px);
    transition: 0.3s ease;
}

.bottom-header .bottom-logo img {
    height: 40px;
}


/* ------------------------------ */
/* SMALL MODE WHEN SCROLL         */
/* ------------------------------ */

#header.small .top-header {
    padding: 6px 30px;
}

#header.small .top-header .logo img {
    height: 0; /* hide old logo */
    opacity: 0;
}

#header.small .search-box input {
    width: 350px;
    height: 38px;
}

#header.small .actions .item {
    font-size: 14px;
}

/* Logo appears in bottom bar */
#header.small .bottom-header .bottom-logo {
    opacity: 1;
    transform: translateY(0);
    margin-right: 100px;
}
/* Hide top header when scrolling */
#header.small .top-header {
    height: 0;
    opacity: 0;
    padding: 0 40px;
    overflow: hidden;
    transition: 0.3s ease;
}
.lang-dropdown .flag-icon {
  width: 20px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
}

.lang-dropdown .dropdown-toggle {
  display: flex;
  align-items: center;
  color: white;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.lang-dropdown .dropdown-menu {
  right: 0;
  left: auto;
  background: #0f1e213d;
}

.lang-dropdown .dropdown-menu li a {
  display: flex;
  align-items: center;
}

.lang-dropdown .dropdown-menu li a:hover {
  background: #fff;
}
.nav-right-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;margin: 20px;
}

.lang-dropdown .dropdown-toggle {
  display: flex;
  align-items: center;
  color: white;
  font-weight: 500;
  cursor: pointer;
}
.dropdown-toggle{
   display: flex;
   align-items: center;
    gap: 5px;
    background: none;
    color: #fff;
    border: none;}
.dropdown {
  position: relative;
}

/* Dropdown toggle link */
.dropdown-toggle {
  cursor: pointer;
}

/* The dropdown menu */
.dropdown-menu {
  
  display: none;
  position: absolute;
  background: #0138273d;
  top: 100%;           /* directly below parent */
  left: 0;
  min-width: 320px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 4px solid #00845a99
}

/* Keep menu visible when hovering either the toggle or the menu itself */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

/* Dropdown links */
.dropdown-menu li a {
  display: block;
  padding: 10px 15px;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}

.dropdown-menu li a:hover {
  background: #ffffffec;
  color: #000;
}
.lang-dropdown .flag-icon {
  width: 20px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
}

.lang-dropdown .dropdown-toggle {
  display: flex;
  align-items: center;
  color: white;
  font-weight: 500;
  cursor: pointer;
}

.top-bar-left span{display: flex;    align-items: center;
    gap: 8px;}
.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
}
 .search-box {
    position: relative;
    width: 50%;

}


.search-box .search-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.search-box .search-btn img {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}
.menu-nav {
    display: flex;
    gap: 25px;
    list-style: none;
}
.menu-nav a{    
  color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;

    align-items: center;
    gap: 6px;
    transition: background-color 0.2s 
ease, color 0.2s 
ease;
    white-space: nowrap;}
    /* ============= إظهار / إخفاء الهيدر ============= */

.header-desktop {
  display: block;
}

.header-mobile {
  display: none;
}

@media (max-width: 768px) {
  .header-desktop {
    display: none;
  }
  .header-mobile {
    display: block;
  }
}

/* ============= أساسيات عامة ============= */

body {
  margin: 0;
}

body.no-scroll {
  overflow: hidden;  /* لمنع تحريك الصفحة وقت المنيو مفتوحة */
}

/* ============= HEADER MOBILE ============= */

.header-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  font-family: 'Roboto', sans-serif;
}

/* الشريط العلوي */

.mobile-bar {
  height: 56px;
  background: #00a36c;            /* غيّر اللون كما تريد */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.mobile-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-logo {
  height: 28px;
}

.mobile-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-icon-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #fff;
}


.mobile-flag {
  border-radius: 50%;
}

/* زر المنيو (الأيقونة اللي على اليسار) */
.menu-btn img {
height: 17px;
    width: 19px;
}

/* ============= MOBILE MENU (DRAWER) ============= */

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  max-width: 420px;               /* عرض البانيل */
  background: #f3eee7;
  transform: translateX(-100%);   /* مخفية في اليسار */
  transition: transform 0.3s ease;
  z-index: 10000;

  display: flex;
  flex-direction: column;
}

.mobile-menu.open {
  transform: translateX(0);       /* تظهر من اليسار */
}

/* ترويسة المنيو */

.mobile-menu-top {
  background: #00a36c;
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-logo {
  height: 40px;
}

.mobile-menu-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.mobile-menu-close img {
  height: 18px;
}

/* جسم المنيو */

.mobile-menu-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #ffffff;
}

/* عناصر المستوى الأول (Home, Services, ...) */

.mobile-menu-item,
.mobile-dropdown-toggle {
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid #ddd;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  text-decoration: none;

  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
}

/* ============= DROPDOWN "Services" ============= */

.mobile-dropdown {
  border-bottom: 1px solid #ddd;
}

.mobile-dropdown-toggle {
  border: none;
  cursor: pointer;
}

.chevron {
  font-size: 12px;
}

/* القائمة الفرعية */

.mobile-dropdown-menu {
  display: none;
  padding: 6px 0 10px 12px;
}

.mobile-dropdown-menu a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  text-transform: none;
  color: #444;
  text-decoration: none;
}

.mobile-dropdown-menu a::before {
  content: "–  ";
}

/* وقت اللي dropdown مفتوح */

.mobile-dropdown.open .mobile-dropdown-menu {
  display: block;
}

.mobile-dropdown.open .chevron {
  transform: rotate(180deg);
}

/* فوتر تحت المنيو (لو تحب تحط سوشال ميديا) */

.mobile-menu-footer {
  padding: 10px 16px;
  border-top: 1px solid #ddd;
  background: #f3eee7;
  text-align: center;
}
/* المسافة للـ Desktop (الهيدر الكبير: top + bottom) */
.page-content {
  padding-top: 140px; /* عدّل الرقم حسب ارتفاع الهيدر عندك */
}

/* ديسكتوب: ارتفاع الهيدر الكبير (top + bottom) */
@media (min-width: 769px) {
    body {
        padding-top: 147px; /* جرّب 150، زيد أو نقص حسب ارتفاع هيدر الديسكتوب الحقيقي */
    }
}

/* موبايل: ارتفاع الهيدر الموبايل الصغير */
@media (max-width: 768px) {
    body {
        padding-top: 56.4px; /* تقريبًا ارتفاع header-mobile (56px) */
    }
    .lang-dropdown .dropdown-toggle{
            text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    }
    .search-box {width: 100%;}
    
}
.mobile-search-container {
  display: none;
  background: #1414143f;
  padding: 8px 12px;
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-search-container.open {
  display: block !important;
}

.mobile-search-form {
  position: relative;
  margin-top: 55px;
}

.mobile-search-container input[type="text"] {
  width: 100%;
  padding: 8px 70px 8px 12px; /* مساحة لزرّين على اليمين */
  border-radius: 20px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 14px;
}

/* زر البحث */
.mobile-search-submit {
  position: absolute;
  top: 50%;
  right: 40px;     /* قبل زر الـ close */
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.mobile-search-submit img {
  height: 19px;
}

/* زر الإغلاق */
.mobile-search-close {
  position: absolute;
  top: 50%;
  right: 10px;     /* في أقصى اليمين */
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.mobile-search-close img {
  height: 14px;
  opacity: 0.7;
}
.header-search-wrapper {
    position: relative;
    max-width: 420px;
    width: 100%;
}

.header-search {
    display: flex;
    align-items: center;
    width: 100%;
}

.header-search__input {
    flex: 1;
    padding: 6px 10px;
    border-radius: 4px 0 0 4px;
    border: 1px solid #d1d5db;
    outline: none;
}

.header-search__btn {
    padding: 6px 12px;
    border-radius: 0 4px 4px 0;
    border: 1px solid #d1d5db;
    border-left: none;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

/* dropdown box */
.header-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #0138273d;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.18);
    border: 1px solid #e5e7eb31;
    z-index: 200;
    display: none;          /* hidden by default */
    max-height: 320px;
    overflow-y: auto;
    border-bottom: 4px solid #00845a99;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    
}
* {
    scrollbar-width: thin;
    scrollbar-color: #041027 #02996c4d;
}
/* واحد من النتائج */
.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
}

.search-suggestion-item:hover {
    background: #f3f4f6;
    color: #000;
}
.search-suggestion-thumb:hover {
    background: #e2e8f0;
}
.search-suggestion-thumb {
    flex: 0 0 46px;
    height: 46px;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-suggestion-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-suggestion-text {
    flex: 1;
    min-width: 0;
}

.search-suggestion-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-price {
    font-size: 13px;
    color: #16a34a;
}

/* "no results" */
.search-suggestion-empty {
    padding: 8px 10px;
    font-size: 13px;
    color: #ffffff;
}
/* Category header (red-ish) */
.mcat { border-bottom: 1px solid #e9e9e9; }

.mcat-toggle{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background: transparent;
  border: 0;
  padding: 12px 0;
  cursor: pointer;
      text-transform: uppercase;
    font-weight
: 600;
    font-size: 14px;
    color: #333;
}

.mcat-name{
  font-weight: 600;
  color: #333;
  border-radius: 4px;
}

.mcat-chevron{
  font-size: 18px;
  transform: rotate(0deg);
  transition: transform .2s ease;
}

/* Subcategories dropdown */
.mcat-menu{
  display:none;
  padding: 8px 0 12px 14px;
}

.mcat-sub{
  font-size: 14px;
  display:block;
  padding: 8px 0;
  color: #222;
  text-decoration:none;
}

/* Open state */
.mcat.open .mcat-menu{ display:block; }
.mcat.open .mcat-chevron{ transform: rotate(90deg); }
/* --- إعدادات الموبايل العامة --- */
@media (max-width: 768px) {
    /* إخفاء الهيدر القديم للموبايل إذا لزم الأمر أو تعديله */
    .header-mobile {
        display: block;
    }

    /* --- 1. Top Mobile Bar (للشعار فقط) --- */
    .mobile-top-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 53px;
        background: #00a36c;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        z-index: 998;
        transition: transform 0.3s ease-in-out;
    }
    
    /* كلاس لإخفاء الهيدر عند السكرول */
    .mobile-top-bar.hidden {
        transform: translateY(-100%);
    }

    .mobile-top-bar img {
        max-height: 28px;
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #333;
        position: relative;
        background: none;
        border: none;
        cursor: pointer;
    }

    /* حجم الأيقونات */
    .nav-item img, .nav-item svg {
        width: 24px;
        height: 24px;
        margin-bottom: 2px;
        transition: 0.3s;
    }

    /* عند الضغط أو التفعيل - اللون الأخضر */
    .nav-item.active img, 
    .nav-item:hover img,
    .nav-item.active svg,
    .nav-item:hover svg {
        filter: none; /* إرجاع الألوان */
        /* إذا كانت الأيقونات صور عادية ولا يمكن تلوينها بالكود، يمكن استخدام filter لتغيير اللون للأخضر */
        /* filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%); */
    }
    
    /* أيقونة المنزل في الوسط (اختياري لجعلها مميزة) */
    .nav-item.home-icon img, .nav-item.home-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Badge للكارت (الرقم الأحمر/الأخضر) */
    .cart-badge {
        position: absolute;
        top: 5px;
        right: 25%; /* تعديل المكان حسب حجم الأيقونة */
        background-color: #6200ea; /* لون البنفسجي في الصورة */
        color: white;
        font-size: 10px;
        font-weight: bold;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* إصلاح مشاكل الـ drawer والقائمة الجانبية */
    .mobile-menu {
        z-index: 1000; /* فوق كل شيء */
        padding-bottom: 70px; /* مساحة للقائمة السفلية */
    }
    
    .mobile-search-container {
        top: 0;
        height: 100vh;
        z-index: 1001;
    }
}

/* إخفاء القائمة السفلية في الديسك توب */
@media (min-width: 768px) {
    .mobile-bottom-nav, .mobile-top-bar {
        display: none;
    }
}
@media (max-width: 768px) {
    .mobile-top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between; /* توزيع العناصر بالتساوي */
        padding: 0 15px;
        background-color: #00a669; /* لون أخضر تكنوواي */
        height: 48px;
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        transition: transform 0.3s ease;
    }

    .top-bar-left {
        display: flex;
        gap: 15px; /* المسافة بين الأيقونتين */
    }

    .top-bar-center {
        flex: 2; /* تعطي مساحة أكبر للمنتصف لضمان التوسيط */
        display: flex;
        justify-content: center;
    }

    .top-bar-right {
      display: flex;
      gap: 15px;
    }

    .top-bar-icon img {
        width: 20px; /* حجم الأيقونات الجديدة */
        height: auto;
    }

    .mobile-logo-img {
        max-height: 40px;
        width: auto;
    }

    /* كلاس الإخفاء عند السكرول الذي أضفناه سابقاً */
    .mobile-top-bar.hidden {
        transform: translateY(-100%);
    }
}
@media (max-width: 768px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: space-around; /* توزيع متساوي */
        align-items: center; /* توسيط عمودي دقيق */
        padding: 0 5px;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        height: 50px;
        background: #ffffff;
        border-top: 1px solid #eee;
    }

    /* توحيد سلوك الروابط والأزرار */
    .nav-item, .mobile-icon-btn {
        background: none;
        border: none;
        padding: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1; /* جعل كل عنصر يأخذ نفس المساحة */
        height: 100%;
        text-decoration: none;
        position: relative;
    }

    /* التحكم في حجم الأيقونات */
    .nav-item img, .mobile-icon-btn img {
        width: 20px; /* حجم موحد ومناسب */
        height: 20px;
        object-fit: contain;
        /* لجعل الأيقونات بيضاء تماماً مثل الصورة */
    }

    /* تعديل مكان الـ Badge */
    .cart-badge {
        position: absolute;
        top: 10px; /* تحريكها للأعلى قليلاً */
        right: 15%; 
        background-color: #6200ea; /* البنفسجي */
        color: white;
        font-size: 10px;
        min-width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #00a669; /* فريم أخضر حول الرقم لجمالية أكثر */
    }

    /* منع ظهور أي تأثير رمادي عند الضغط في الموبايل */
    .nav-item:focus, .mobile-icon-btn:focus {
        outline: none;
    }
}
/* تنسيق خاص لقائمة اقتراحات الموبايل */
#mobile-search-suggestions {
    position: absolute;
    top: 100px; /* تحت الهيدر */
    left: 13;
    right: 13;
    width: 95%;
    background: #fff;
    z-index: 1002;
    max-height: 70vh; /* حتى لا تغطي الشاشة كاملة */
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#mobile-search-suggestions .search-suggestion-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}