

.cart-container {
  position: fixed;
  top: 110px;
  right: 140px;
  width: 300px;
  background: #fff;
  border: 2px solid #ff7d19;
  padding: 45px 15px 15px 15px; /* ↑ увеличили верхний паддинг */
  z-index: 9999;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  font-family: 'PT Sans Narrow', sans-serif;
}

#cart-items {
  max-height: 300px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 768px) {
  #cart-items {
    max-height: 180px; /* 3 полные + чуть видна 4-я */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* плавный свайп на iOS/Android */
  }
}

#cart-items li {
  margin-bottom: 8px;
  font-size: 1rem;
}
#cart-total {
  font-size: 1.1rem;
  color: #3a341c;
}

.cart-qty {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 1rem;
}
.remove-item {
  background-color: transparent;
  border: none;
  color: red;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .cart-container {
    width: 90%;
    right: 5%;
    top: auto;
    bottom: 0;
    border-radius: 8px 8px 0 0;
  }
}


.add-to-cart {
  background-color: #ff8d33 !important;
  color: #ffffff !important;
  border: 2px solid #ff8d33 !important;
  padding: 0.4rem 1.5rem;
  font-size: 1.2rem;
  border-radius: 20px;
  margin-top: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-to-cart:hover {
  background-color: orange !important;
  border-color: orange !important;
  color: #ffffff !important;
}



#cart {
  display: none; /* Спрятана по умолчанию */
}
#cart.active {
  display: block;
}

.cart {
  position: relative;
  z-index: 1000; /* корзина поверх остального */
}

.close-cart-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  font-weight: bold;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 1010; /* кнопка выше корзины */
  pointer-events: auto; /* чтобы клик точно проходил */
}

/* Стили для кнопки корзины */
.cart-toggle-btn {
  position: fixed;
  z-index: 9999; /* Выше navbar и scrollToMenu (z-index: 9999) */
  background: linear-gradient(135deg, #ff8d33, #ff5e00);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 100, 0, 0.4);
}

/* Мобильная версия (≤768px): Рядом с бургером */
@media (max-width: 768px) {
  .cart-toggle-btn {
    top: 15px; /* Выравнивание по вертикали с бургером */
    right: 80px; /* Левее бургера */
    width: 40px;
    height: 40px;
  }
  .cart-icon {
    width: 18px;
    height: 18px;
  }
  .cart-count {
    font-size: 0.65rem;
    padding: 1px 5px;
  }
}

/* Десктопная версия (>768px): Рядом с областью навигации */
@media (min-width: 769px) {
  .cart-toggle-btn {
    top: 35px; /* Чуть ниже верхнего края навигации */
    right: 185px; /* Примерно в области последней ссылки "Як нас знайти?" */
  }
}

.cart-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(255, 100, 0, 0.5);
}

.cart-icon {
  width: 22px;
  height: 22px;
  fill: white;
  transition: transform 0.3s ease;
}

.cart-toggle-btn:hover .cart-icon {
  transform: rotate(-10deg) scale(1.1);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  font-family: 'PT Sans Narrow', sans-serif;
}


/* Модалка для подтверждения заказа */
/* Стиль модалки */
.modal-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 5px;
}

.order-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  font-family: 'PT Sans Narrow', sans-serif;
}

.order-modal-content {
  background: white;
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
  box-sizing: border-box;
  position: relative; /* Важно для позиционирования крестика */
}

/* На экранах от 768px (планшеты и десктоп) */
@media (min-width: 768px) {
  .order-modal-content {
    width: 75%;
    max-width: 650px; /* Ограничиваем ширину */
    padding: 25px;
  }
}

/* Крестик — большой, круглый, удобный */
.close-modal {
  font-size: 32px;
  cursor: pointer;
  color: #000;
  font-weight: bold;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 50%;
  transition: background 0.2s;
}

.close-modal:hover {
  background: #ddd;
}

.order-modal-content h2 {
  margin-top: 0;
}

.order-modal-content label {
  display: block;
  margin: 10px 0;
  font-size: 0.95rem;
}

.order-modal-content input,
.order-modal-content textarea {
  width: 100%;
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-top: 3px;
  box-sizing: border-box;
}

.confirm-order-btn {
  margin-top: 15px;
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.confirm-order-btn:hover {
  background: #45a049;
}



.hidden {
  display: none !important;
}
/* Модалка для подтверждения заказа - END */

/* Окно спасибо */
.thank-you {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  color: #28a745;
  font-size: 2rem;
  font-weight: bold;
  padding: 20px 40px;
  border-radius: 15px;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  animation: none;
  font-family: 'Quicksand', sans-serif; /* если хочешь особый стиль */
  box-shadow: 0 0 30px rgba(40, 167, 69, 0.3);
  text-align: center;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  10%, 90% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.thank-you.show {
  animation: fadeInOut 2.8s ease-in-out forwards;
}
/* Окно спасибо - END */

.qty-control button {
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  user-select: none;
}

.qty-control button:hover {
  background-color: #ddd;
}

.qty-control input.qty-input {
  pointer-events: none;
  font-size: 16px;
}

/* Блокировка скролла фона при открытой модалке */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
#order-modal-content {
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
/* === СТИЛИ ДЛЯ КНОПКИ КОРЗИНЫ === */
#toggle-cart {
  position: fixed;
  z-index: 99999;
  background: linear-gradient(135deg, #ff8d33, #ff5e00);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 100, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  top: 35px; /* Выравнивание по высоте с меню */
  pointer-events: auto !important;
}

#toggle-cart:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(255, 100, 0, 0.5);
}

.cart-icon {
  width: 22px;
  height: 22px;
  fill: white;
  transition: transform 0.3s ease;
}

#toggle-cart:hover .cart-icon {
  transform: rotate(-10deg) scale(1.1);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* === МОБИЛЬНАЯ ВЕРСИЯ: кнопка слева от бургера === */
@media (max-width: 992px) {
  #toggle-cart {
    top: 15px;
    right: 80px; /* Ближе к бургеру (было 80px) */
    width: 40px;
    height: 40px;
  }
  .cart-icon {
    width: 18px;
    height: 18px;
  }
  .cart-count {
    font-size: 0.65rem;
    padding: 1px 5px;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
  }
}

/* === ДЕСКТОПНАЯ ВЕРСИЯ: кнопка рядом с .container, но не уезжает за экран === */
@media (min-width: 993px) {
  #toggle-cart {
    top: 35px;
    right: max(20px, calc((100% - 1200px) / 2 + 60px));
    width: 50px;
    height: 50px;
  }
}

/* === МОБИЛЬНАЯ ВЕРСИЯ: кнопка слева от бургера (с 992px и ниже) === */
@media (max-width: 992px) and (min-width: 768px) {
  #toggle-cart {
    top: 40px !important; /* было 55px или 35px — теперь ниже на 5px */
  }
}