.site-header {
  padding-block: 20px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo img {
  width: 60px;
  height: auto;
}

.site-header__nav ul {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-header__dropdown {
  position: relative;
}

.menu-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-secondary);
  font-weight: 300;
  font-size: 15px;
  transition: color 0.3s ease-in-out, font-weight 0.3s ease-in-out;
}

.menu-link__label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.menu-link:hover {
  color: var(--color-primary);
  font-weight: 700;
}

.menu-link.active-link {
  color: var(--color-primary);
  font-weight: 700;
}

.menu-link.active-link::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--color-primary);
}

.menu-chevron {
  transform: rotate(0deg);
  opacity: 0.7;
}

.site-header__dropdown-panel {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  padding-top: 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 40;
}

.site-header__dropdown:hover .site-header__dropdown-panel,
.site-header__dropdown:focus-within .site-header__dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-header__dropdown-inner {
  padding: 10px 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(143, 65, 12, 0.12);
  border: 1px solid rgba(143, 65, 12, 0.08);
}

.site-header__dropdown-item {
  display: block;
  padding: 10px 18px;
  color: var(--color-secondary);
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-header__dropdown-item:hover {
  background: rgba(143, 65, 12, 0.06);
  color: var(--color-primary);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--color-primary);
}

.site-header__actions a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  transition: opacity 0.2s ease;
}

.site-header__actions a:hover,
.site-header__cart:hover {
  opacity: 0.75;
}

.site-header__cart {
  position: relative;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
  display: flex;
  align-items: center;
}

.site-header__cart-badge {
  position: absolute;
  top: -7px;
  left: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.site-header__user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: inherit;
}

.site-header__burger {
  display: none;
  background: none;
  border: none;
  padding: 0;
  color: var(--color-secondary);
}

.site-header__mobile {
  display: none;
  padding-top: 16px;
}

.site-header__mobile ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}

.site-header__mobile-sub {
  margin-top: 8px;
  padding-inline-start: 14px;
  gap: 10px !important;
}

.site-header__mobile-sub a {
  color: var(--color-secondary);
  font-size: 14px;
}

.site-header__mobile-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .site-header {
    padding-block: 14px;
  }

  .site-header__inner {
    gap: 12px;
  }

  .site-header__logo img {
    width: 48px;
  }

  .site-header__nav {
    display: none;
  }

  .site-header__burger {
    display: flex;
    color: var(--color-primary);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
  }

  .site-header__mobile {
    display: block;
    margin-top: 8px;
    padding: 14px 16px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(143, 65, 12, 0.1);
  }

  .site-header__mobile ul {
    gap: 12px;
  }

  .site-header__mobile .menu-link {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 15px;
  }

  .site-header__mobile .menu-link::before,
  .site-header__mobile-sub a::before,
  .site-header__mobile-user::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    opacity: 0.4;
  }

  .site-header__mobile .menu-link.active-link::before {
    opacity: 1;
    background: var(--color-primary);
  }

  .site-header__mobile .menu-link.active-link::after {
    display: none;
  }

  .site-header__mobile-sub {
    margin-top: 6px;
    padding-inline-start: 18px;
    gap: 8px !important;
  }

  .site-header__mobile-sub a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .site-header__mobile-user::before {
    display: none;
  }

  .site-header__actions {
    gap: 10px;
  }

  /* Keep cart + account; hide search on compact header */
  .site-header__actions a[aria-label='جستجو'] {
    display: none;
  }

  .site-header__user-name {
    display: none;
  }

  .site-header__cart,
  .site-header__user {
    width: 40px;
    height: 40px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .site-header__actions {
    gap: 6px;
  }
}
