/* ===== Block 8 — Cart (AJAX корзина) ===== */

/* Скрываем корзину по умолчанию */
#cart-section {
  display: none;
}

/* Основной контейнер корзины */
#cart-section .cart-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 25px 20px;
    background: #fff8f0; /* нежный фон */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    font-family: 'Montserrat', sans-serif;
}

/* Заголовок корзины */
#cart-section .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

/* Строка товара */
#cart-section .cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0e5db;
    font-size: 1rem;
}

/* Поля ввода */
#cart-section input[type="text"],
#cart-section input[type="tel"] {
    width: 100%;
    padding: 8px 12px;
    margin: 5px 0 15px 0;
    border: 1px solid #e0d4c0;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* Лейблы */
#cart-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

/* Чекбокс доставки */
#cart-section .delivery-label {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

#cart-section .delivery-label input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

/* Кнопка оформления */
#cart-section #checkout-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background-color: #d69c6a;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#cart-section #checkout-btn:hover {
    background-color: #c68650;
}

/* Итоговая сумма */
#cart-section .cart-total {
    font-weight: 600;
    margin-bottom: 15px;
    text-align: right;
}

/* Состав заказа */
#cart-section .cart-item-name {
    flex: 1;
}

#cart-section .cart-item-qty,
#cart-section .cart-item-total {
    margin-left: 15px;
    width: 70px;
    text-align: right;
}


.remove-cart-item {
  background: none;
  border: none;
  font-size: 22px;
  color: #c44;
  cursor: pointer;
  margin-left: 15px;
  transition: color 0.2s ease;
}

.remove-cart-item:hover {
  color: #a22;
}

/* Итог */
.cart-total {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 25px;
  color: #3A2A23;
}

/* Чекбокс доставки */
#delivery-needed {
  margin-right: 10px;
}
label {
  font-size: 18px;
  color: #3c2f2f;
  display: inline-flex;
  align-items: center;
  margin-bottom: 35px;
}

/* Кнопка оформления */
#checkout-btn {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(45deg, #D4A373, #E0B986);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: background 0.3s ease, transform 0.2s ease;
}

#checkout-btn:hover {
  background: linear-gradient(45deg, #c38a5d, #d7a86e);
  transform: translateY(-3px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .cart-section {
    padding: 70px 15px;
  }

  .cart-section .section-title {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cart-item-name {
    font-size: 18px;
  }

  .cart-item-total {
    font-size: 16px;
  }

  #checkout-btn {
    font-size: 18px;
    padding: 14px 32px;
  }
}

/* ===== Modal Order Window ===== */
.order-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  display: none;
}

.order-modal-content {
  position: relative;
  background: #fffdf9;
  border: 2px solid #D4A373;
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  animation: fadeInUp 0.3s ease;
}

.order-modal-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  margin-bottom: 15px;
  color: #3A2A23;
}

.order-modal-content p {
  font-size: 18px;
  margin-bottom: 25px;
  color: #4b3d3d;
}

.order-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 28px;
  color: #c44;
  cursor: pointer;
}
.order-modal-close:hover {
  color: #a22;
}

#order-modal-ok {
  padding: 14px 36px;
  background: linear-gradient(45deg, #D4A373, #E0B986);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
#order-modal-ok:hover {
  background: linear-gradient(45deg, #c38a5d, #d7a86e);
  transform: translateY(-2px);
}

/* Анимация появления */
@keyframes fadeInUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== Cart Popup Toast (по центру) ===== */
.cart-popup-msg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(45deg, #D4A373, #E0B986);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 20px 32px;
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  z-index: 10000;
  display: none;
  opacity: 0.95;
  animation: fadeInUp 0.3s ease;
}

/* ========================= */
/* Empty Cart                */
/* ========================= */
.cart-empty {
  font-size: 18px;
  font-style: italic;
  color: #888;
  text-align: center;
  margin-top: 20px;
}
