/* Корзина иконка */
.cart-icon {
  position: fixed;
  top: 30px;
  right: 30px;
  background: var(--primary);
  color: var(--text);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(73, 44, 255, 0.3);
  transition:
    transform 0.2s ease,
    background 0.2s;
}
.cart-icon:hover {
  transform: scale(1.05);
  background: var(--primary-hover);
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4757;
  color: white;
  font-size: 12px;
  font-weight: bold;
  min-width: 20px;
  height: 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-family: var(--font-text);
}

/* Модальное окно */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 0.2s,
    opacity 0.2s;
}
.modal.show {
  visibility: visible;
  opacity: 1;
}
.modal-content {
  background: #111;
  border-radius: 24px;
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  border: 1px solid #333;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  font-family: var(--font-text);
  color: var(--text);
}
.close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 32px;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s;
}
.close-btn:hover {
  color: var(--primary);
}

/* Список товаров */
.cart-items-list {
  margin: 20px 0;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
  padding: 15px 0;
  flex-wrap: wrap;
  gap: 10px;
}
.cart-item-info {
  flex: 2;
}
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qty-btn {
  background: #222;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.qty-btn:hover {
  background: var(--primary);
}
.qty-count {
  font-size: 18px;
  min-width: 30px;
  text-align: center;
}
.remove-item {
  background: none;
  border: none;
  color: #ff6b6b;
  font-size: 18px;
  cursor: pointer;
  margin-left: 10px;
}
.remove-item:hover {
  color: #ff1a1a;
}
.cart-total {
  font-size: 24px;
  font-weight: bold;
  text-align: right;
  margin: 20px 0;
  padding-top: 10px;
}
.cart-icon.hidden {
    display: none;
}

/* Форма заказа */
#orderForm {
  margin-top: 20px;
}
#orderForm .oferta {
  opacity: 1;
  color: var(--text);
  display: inline-block;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #ccc;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-family: var(--font-text);
  transition: border 0.2s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}
.submit-order {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 40px;
  font-weight: bold;
  font-size: 18px;
  width: 100%;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
}
.submit-order:hover {
  background: var(--primary-hover);
  transform: scale(1.01);
}
.close-modal-btn {
  background: #333;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 40px;
  margin-top: 20px;
  cursor: pointer;
  width: 100%;
}
.close-modal-btn:hover {
  background: #555;
}

/* Стили для тёмной темы компонента intl-tel-input */
.iti--allow-dropdown .iti__dropdown-content {
  background-color: #1e1e1e; /* Тёмный фон для выпадающего списка */
  border: 1px solid #333; /* Цвет границы */
}

.iti__search-input {
  background-color: #2d2d2d; /* Тёмный фон для поля поиска */
  border-color: #555; /* Цвет границы поля поиска */
  color: #ffffff; /* Белый цвет текста в поле поиска */
}

/* Стили для строк стран в выпадающем списке */
.iti__country {
  color: #ffffff; /* Белый цвет текста для всех строк */
}

.iti__country.iti__highlight {
  background-color: #3a3a3a; /* Цвет фона при наведении */
}

/* Стили для выбранной страны */
.iti__country.iti__selected {
  background-color: #333333; /* Фон для выбранной страны */
  font-weight: bold; /* Выделение жирным шрифтом */
}

.iti__dropdown-content {
  background-color: var(--bg);
}

.notification {
  position: fixed;
  bottom: 20px;
  right: 30px;
  color: var(--text);
  max-width: 300px;
  background: var(--bg);
  padding: 12px 24px;
  border-radius: 40px;
  z-index: 3000;
  box-shadow: 0 4px 12px #b9b4b44d;
  animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

@media (max-width: 768px) {
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item-info span {
    display: inline-block;
    margin-bottom: 10px;
  }

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