/* استایل هدر */
.store-header {
  position: fixed;
  top: 0;
  width: 100%;
  max-width: 480px;
  padding: 15px;
  z-index: 1000;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.6s ease; /* افزایش مدت زمان و استفاده از ease */
  background: var(--theme-color);
  animation: fadeIn 0.7s ease-in-out;
}

.store-header.shrink {
  padding: 10px 15px;
  background: var(--theme-color);
  justify-content: space-between;
  align-items: center;
  top: 5px;
  border-radius: 0 0 10px 10px;
  transition: all 0.6s ease; /* نرم‌تر کردن تغییر */
}

.store-header.search-active .header-content {
  opacity: 0;
  visibility: hidden;
  height: 0;
  transition: all 0.6s ease; /* نرم‌تر کردن تغییر */
}

/* استایل عنوان فروشگاه */
.store-title {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex-grow: 0;
  justify-content: center;
  margin: 0;
  transition: all 0.4s ease; /* نرم‌تر کردن تغییر */
}

.store-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease; /* افزایش مدت زمان */
  border: 2px solid var(--border-color);
}

.store-header.shrink .store-logo {
  display: none !important;
}

.store-header h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease; /* نرم‌تر کردن تغییر */
  color: var(--text-color);
}

.store-header.shrink h1 {
  display: none !important;
}

/* استایل دکمه همبرگر */
.hamburger-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.6s ease; /* افزایش مدت زمان */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: static;
}

.store-header.shrink .hamburger-btn {
  width: 35px;
  height: 35px;
  padding: 6px;
  transition: all 0.6s ease; /* نرم‌تر کردن تغییر */
}

.hamburger-btn.active {
  background: rgba(231, 76, 60, 0.3);
  transform: rotate(90deg) translateY(-50%);
  transition: all 0.6s ease; /* نرم‌تر کردن تغییر */
}

.hamburger-btn i {
  font-size: 1.6rem;
  color: var(--text-color);
  transition: all 0.6s ease; /* افزایش مدت زمان */
}

.store-header.shrink .hamburger-btn i {
  font-size: 1.2rem;
  transition: all 0.6s ease; /* نرم‌تر کردن تغییر */
}

/* استایل دکمه جستجو */
.search-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  transition: all 0.4s ease; /* افزایش مدت زمان */
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.search-btn i {
  font-size: 1.6rem;
  color: var(--text-color);
  transition: all 0.4s ease; /* نرم‌تر کردن تغییر */
}

.store-header.shrink .search-btn i {
  font-size: 1.2rem;
  transition: all 0.4s ease; /* نرم‌تر کردن تغییر */
}

/* استایل کانتینر جستجو */
.search-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 480px;
  height: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s ease; /* افزایش مدت زمان */
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  padding: 0 15px;
  box-sizing: border-box;
  background: var(--theme-color);
}

.store-header.search-active .search-container {
  height: 70px;
  opacity: 1;
  visibility: visible;
  transition: all 0.6s ease; /* نرم‌تر کردن تغییر */
}

/* استایل رپر جستجو */
.search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-grow: 1;
  position: relative;
  margin-left: 50px;
  transition: all 0.4s ease; /* نرم‌تر کردن تغییر */
}

/* استایل سلکت‌باکس */
#parent-category-select {
  padding: 10px 15px;
  font-size: 1rem;
  border: none;
  border-radius: 25px 0 0 25px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-color);
  cursor: pointer;
  width: 130px;
  height: 45px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease; /* افزایش مدت زمان */
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M8 12l-6-6h12l-6 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 15px center;
  padding-left: 35px;
}

#parent-category-select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease; /* نرم‌تر کردن تغییر */
}

/* استایل ورودی جستجو */
#product-search {
  width: 100%;
  padding: 10px 20px;
  border: none;
  border-radius: 0 25px 25px 0;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-color);
  font-size: 1rem;
  font-family: "Vazir", Arial, sans-serif;
  height: 45px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease; /* افزایش مدت زمان */
}

#product-search:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease; /* نرم‌تر کردن تغییر */
}

#product-search::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* استایل دکمه لغو */
.cancel-btn {
  background: rgba(231, 76, 60, 0.8);
  border: none;
  padding: 8px;
  cursor: pointer;
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease; /* افزایش مدت زمان */
}

.cancel-btn:hover {
  background: rgba(231, 76, 60, 1);
  transition: all 0.4s ease; /* نرم‌تر کردن تغییر */
}

.cancel-btn i {
  font-size: 1.2rem;
  color: #fff;
  transition: all 0.4s ease; /* نرم‌تر کردن تغییر */
}
