.header {
  position: relative;
  width: 100%;
  min-height: 50px;
  border-bottom: 0.4px solid #000000;
  padding: 7px 0;
  z-index: 1000;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__left,
.header__right,
.header__center {
  display: flex;
  align-items: center;
  flex: 1;
}

.header__left {
  gap: 15px;
}

.header__right {
  gap: 10px;
  justify-content: flex-end;
}

.header__center {
  justify-content: center;
}

.header__logo {
  display: inline-flex;
  color: var(--color-primary);
  transition: opacity 0.3s ease;
}

.header__logo:hover {
  opacity: 0.7;
}

.header__burger {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--color-primary);
  transition: color 0.3s ease;
}

.header__burger:hover {
  color: var(--color-secondary-dark);
}

.header__burger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.header__burger-icon span {
  display: block;
  width: 15px;
  height: 1px;
  background-color: currentColor;
}

.header__burger-text {
  font-size: 12px;
  font-weight: 400;
}

.header__lang {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
}

.header__lang-text {
  font-family: "Switzer", sans-serif;
}

.header__lang-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.header__search-toggle,
.header__action {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.header__search-toggle svg,
.header__action svg {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header__search-toggle svg path[fill="black"],
.header__action svg path[fill="black"] {
  fill: currentColor;
  transition: fill 0.3s ease;
}

.header__action svg path[stroke="black"] {
  stroke: currentColor;
  transition: stroke 0.3s ease;
}

.header__search-toggle:hover,
.header__action:hover {
  color: var(--color-secondary-dark);
}

.header__search-toggle:hover svg,
.header__action:hover svg {
  transform: translateY(-5px) scale(1.1);
}

.header__action--badge {
  position: relative;
}

.header__badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background-color: var(--color-white);
  color: var(--color-primary);
  font-size: 9px;
  font-weight: 500;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: end;
  justify-content: center;
  border: 1px solid var(--color-secondary-dark);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.header__action:hover .header__badge {
  background-color: var(--color-secondary-dark);
  color: var(--color-primary);
}

.header__cart {
  display: flex;
  align-items: end;
  gap: 8px;
}

.header__cart-price {
  font-family: "Switzer", sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #f8f8f8;
  padding: 15px 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transform: translateY(-20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: -1;
}

.search-panel.is-active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  z-index: 999;
}

.search-panel__input {
  width: 100%;
  padding: 15px;
  border: none;
  background-color: #f8f8f8;
  border-bottom: 1px solid var(--color-primary);
  font-size: 18px;
  outline: none;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background-color: #f8f8f8;
  z-index: 1002;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.drawer--left {
  left: 0;
  transform: translateX(-100%);
}

.drawer--right {
  right: 0;
  transform: translateX(100%);
}

.drawer.is-active {
  transform: translateX(0);
}

.drawer__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 20px 30px;
  border-bottom: 1px solid #000;
}

.drawer__title {
  font-size: 20px;
  font-weight: 500;
}

.drawer__close {
  position: relative;
  width: 18px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer__close::before,
.drawer__close::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  transition: background-color 0.3s ease;
}

.drawer__close::before {
  transform: rotate(45deg);
}

.drawer__close::after {
  transform: rotate(-45deg);
}

.drawer__close:hover {
  transform: rotate(90deg) scale(1.1);
}

.drawer__close:hover::before,
.drawer__close:hover::after {
  background-color: var(--color-secondary-dark);
}

.drawer__nav,
.drawer__content {
  padding: 30px;
}

.drawer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer__list a {
  font-size: 18px;
  font-weight: 400;
  transition: color 0.3s ease;
}

.drawer__list a:hover {
  color: var(--color-secondary-dark);
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.account-form__input {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  outline: none;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.overlay.is-active {
  opacity: 1;
  visibility: visible;
}

body.no-scroll {
  overflow: hidden;
}

.cart-drawer {
  display: flex;
  flex-direction: column;
  height: calc(100% - 73px);
  padding: 20px 30px !important;
}

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eaeaea;
}

.cart-item__img-wrap {
  width: 80px;
  height: 105px;
  background-color: #f7f7f7;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.cart-item__title {
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.3;
}

.cart-item__price {
  font-size: 14px;
  font-weight: 500;
  color: #666;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-quantity {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cart-quantity__btn {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-quantity__num {
  font-size: 13px;
  padding: 0 8px;
}

.cart-item__remove {
  background: none;
  border: none;
  font-size: 12px;
  color: #999;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color var(--transition-base);
}

.cart-item__remove:hover {
  color: #000;
}

.cart-drawer__footer {
  border-top: 1px solid #eaeaea;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cart-drawer__total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-primary);
}

.cart-drawer__checkout {
  text-align: center;
  text-decoration: none;
  padding: 14px 0;
  border-radius: 40px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Выпадающий список результатов поиска */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--color-white, #ffffff);
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.08);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  border-radius: 0 0 8px 8px;
}

.search-results-dropdown.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #f9f9f9;
}

.search-result-item__img-wrap {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-result-item__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-item__img-wrap .placeholder {
  font-size: 10px;
  color: #999;
}

.search-result-item__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-item__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.search-result-item__price {
  font-size: 13px;
  font-weight: 600;
}

/* Стили для цены WooCommerce внутри поиска (зачеркнутые старые цены) */
.search-result-item__price del {
  color: #aaa;
  font-weight: 400;
  margin-right: 5px;
  font-size: 12px;
}
.search-result-item__price ins {
  text-decoration: none;
}

.search-loading,
.search-no-results {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

/* ==========================================
   СТИЛІ ДЛЯ МІНІ-КОШИКА WOOCOMMERCE В POP-UP
   ========================================== */

/* Контейнер всього вмісту кошика */
.widget_shopping_cart_content {
  display: flex;
  flex-direction: column;
  height: 100%; /* Займає всю висоту відкритого меню */
  padding: 20px 30px; /* Додаємо відступи від країв екрану */
}

/* Область з товарами (робимо скрол, якщо товарів багато) */
.woocommerce-mini-cart.cart_list {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px; /* Відстань між товарами */
}

/* Окремий товар */
.woocommerce-mini-cart-item.mini_cart_item {
  position: relative;
  padding-bottom: 20px;
  border-bottom: 1px solid #eaeaea;
}

/* Посилання, яке містить картинку ТА текст */
.woocommerce-mini-cart-item a:not(.remove) {
  display: flex;
  align-items: flex-start;
  gap: 15px; /* Відстань між картинкою і текстом */
  font-size: 14px;
  color: var(--color-primary, #000);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.3;
  padding-right: 30px; /* Місце для кнопки видалення */
  margin-bottom: 10px;
}

/* Зображення товару */
.woocommerce-mini-cart-item a:not(.remove) img {
  width: 80px;
  height: 105px;
  object-fit: cover;
  background-color: #f7f7f7;
  flex-shrink: 0; /* Щоб картинка не стискалась */
}

/* Кнопка видалення (хрестик) */
.woocommerce-mini-cart-item a.remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background-color: #f7f7f7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999 !important;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  transition: all 0.3s ease;
  z-index: 2;
}

.woocommerce-mini-cart-item a.remove:hover {
  background-color: #eaeaea;
  color: #000 !important;
}

/* Кількість та ціна (вирівнюємо по лінії тексту, пропускаючи картинку) */
.woocommerce-mini-cart-item .quantity {
  font-family: "Switzer", sans-serif;
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  padding-left: 0px; /* Ширина картинки (80px) + Gap (15px) */
}

.woocommerce-mini-cart-item .quantity .amount {
  color: #000;
}

.woocommerce-Price-amount{
  font-family: "Switzer", sans-serif;
}

/* Футер кошика (Разом та кнопки) */
.woocommerce-mini-cart__total.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-primary, #000);
  padding: 20px 0;
  margin: 0;
  border-top: 1px solid #eaeaea; /* Лінія над сумою */
}

/* Контейнер кнопок */
.woocommerce-mini-cart__buttons.buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-bottom: 20px;
}

/* Загальний базовий стиль для обох кнопок у кошику */
.woocommerce-mini-cart__buttons .button {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 400;
  border-radius: var(--radius-l); /* Твій радіус */
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition-base);
}

/* Кнопка "Переглянути кошик" (Бежева - аналог .btn-secondary) */
.woocommerce-mini-cart__buttons .button:not(.checkout) {
  background-color: var(--color-secondary-dark);
  color: #000;
}

.woocommerce-mini-cart__buttons .button:not(.checkout):hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Кнопка "Оформлення замовлення" (Темна - аналог .btn-primary) */
.woocommerce-mini-cart__buttons .button.checkout {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.woocommerce-mini-cart__buttons .button.checkout:hover {
  background-color: var(--color-secondary-dark);
  color: #000;
}

/* Приховування порожніх бейджів */
.header__badge.is-hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .header {
    padding: 11px 0;
  }

  .header__search-toggle,
  .header__lang {
    display: none;
  }

  .header__right > .header__action {
    display: none;
  }

  .header__logo svg {
    width: 100px;
    height: auto;
  }

  .drawer {
    max-width: 100%;
  }
}
