.header-wrapper {
  width: 100%;
  margin: 18px 0
}

.header-box {
  max-width: var(--bp-lg);
  margin: 0 auto;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-md);
}

/* ردیف بالا */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.logo {
  font-size: var(--font-xl);
  font-weight: 900;
  color: var(--color-primary);
}

.search-box {
  flex: 1;
  display: flex;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
  max-width: 560px;
  /* بزرگ ولی کنترل‌شده */
}

.search-box input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
  outline: none
}

.search-box button {
  border: 0;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer
}

.contact {
  text-align: right;
  min-width: 160px
}

.contact label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 2px;
  text-align: right
}

.contact .phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-weight: 700
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px
}

.btn-login {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--color-dark);
  color: #fff;
  cursor: pointer
}

.cart {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

/* ردیف پایین (داخل همان باکس) */
.header-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--color-nav);
  border-radius: 999px;
  padding: 8px 14px;
  /* چون داخل header-box است، به صورت طبیعی از چهارطرف کمی فاصله دارد */
}

/* دکمه‌های لینک‌گونه */
.btn-linklike {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: var(--transition)
}

.btn-linklike:hover {
  color: var(--color-primary);
  background: rgba(239, 68, 68, .06)
}

/* چینش سه‌قسمتی */
.nav-start,
.nav-end {
  flex: 0 0 auto;
  position: relative
}

.nav-center {
  flex: 1
}


.nav-center ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
}

.nav-center a {
  font-size: var(--font-base);
  padding: var(--space-xs) var(--space-sm);
  transition: var(--transition);
}

.nav-center a:hover {
  color: var(--color-primary)
}

/* فاصله زیاد بین منوی وسط با دکمه‌های دوطرف */
.nav-center {
  padding: 0 48px
}

/* مگا منو */
.nav-start {
  position: relative;
  display: inline-block;
}

.btn-cat {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* مگا منو */
.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 700px;
  background: #ffd6d6;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}
.nav-toggle{
    display: none;
}
.nav-start:hover .mega-menu {
  display: block;
}

.mega-content {
  display: flex;
  gap: 20px;
}

/* ستون راست: دسته‌بندی */
.categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 200px;
}

.categories a {
  display: block;
  padding: 10px 15px;
  border-radius: 10px;
  background: #fcdede;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: 0.3s;
}

.categories a:hover,
.categories a.active {
  background: #ff4d4d;
  color: white;
}

/* ستون چپ: محتوا */
.mega-items {
  flex: 1;
  position: relative;
}

.mega-item {
  display: none;
  position: absolute;
  inset: 0;
}

.mega-item.show {
  display: block;
}

.mega-item img {
  width: 100%;
  border-radius: 10px;
}

.mega-item .badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
}

/* منوی موبایل تمام صفحه */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%; /* ابتدا خارج صفحه */
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  z-index: 2000;
  padding: 20px;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0; /* وقتی باز شد */
}

.mobile-menu-header {
  display: flex;
  justify-content: flex-end;
}

.mobile-menu-header .close-menu {
  font-size: 32px;
  cursor: pointer;
}

.mobile-menu ul {
  list-style: none;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-menu ul li a {
  font-size: 18px;
  text-decoration: none;
  color: var(--color-dark);
}




/* ریسپانسیو */
@media (max-width: var(--bp-md)) {
  .header-top {
    justify-content: center;
    text-align: center;
  }

  .search-box {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .contact {
    order: 2;
  }

  .logo {
    order: 1;
  }

  .nav-center ul {
    gap: var(--space-md);
  }

}

/* زیر 992px */
@media (max-width: 992px) {
    .header-box{
        margin:var(--space-md) ;
    }
  .header-top {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .search-box {
    order: 3;
    width: 100%;
    max-width: none;
  }
  .contact {
    order: 2;
  }

.logo {
    order: 1;
  }

  .nav-start{
    display: none;
  }
   .nav-center{
    display: none;
   }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    cursor: pointer;
  }



  .mega-menu {
    width: min(92vw, 760px);
  }
  
}


/* زیر 768px */
@media (max-width: 768px) {
  .nav-center ul {
    gap: 18px;
    overflow: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .nav-center ul::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
  }

  .hero__slider,
  .hero__banner {
    flex: none;
  }

  .c-slider {
    --slider-aspect: 16/9;
  }

  .hero__banner {
    min-height: 220px;
  }
}

@media (max-width: 768px) {
  .features {
    grid-template-columns: 1fr;
  }
}



