body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}
.modal-content {
  /* Уже есть overflow: hidden, но добавим явно */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* === CART MODAL CONTENT === */
#cart-items {
  padding: 0;
  margin: 0;
  list-style: none;
  overflow-y: auto;
  max-height: 400px;
  scrollbar-width: thin;
}

#cart-items .cart-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#cart-items .cart-item:last-child {
  border-bottom: none;
}

/* Разрешаем скролл для контента модального окна */
#cart-items,
.product-modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Для плавной прокрутки на iOS */
}
/* Скрываем полосу прокрутки для основного body */
body.modal-open::-webkit-scrollbar {
  display: none;
}

body.modal-open {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: center;
  transition: background 0.2s ease;
}

.cart-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cart-item img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-weight: 500;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: 0.95rem;
}

.cart-item-price {
  color: #3b82f6;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.cart-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  width: fit-content;
}

.cart-quantity button {
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 1.125rem;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-quantity button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.cart-quantity span {
  font-weight: 500;
  min-width: 1.75rem;
  text-align: center;
  color: white;
}

.cart-item-total {
  font-weight: 600;
  color: #3b82f6;
  white-space: nowrap;
  font-size: 1.1rem;
}

.total-row {
  padding: 1.25rem 1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
}

/* === MODAL FOOTER (for checkout) === */
.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Добавляем вертикальные отступы между элементами */
}

.modal-footer input,
.modal-footer textarea {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  color: white;
  font-size: 1rem;
}

.modal-footer textarea {
  resize: none;
  min-height: 80px;
}

.modal-footer button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(90deg, #3b82f6, #9333ea);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Ховер эффект */
.modal-footer button:hover:not(:disabled) {
  transform: scale(1.02);
}

/* Состояние disabled */
.modal-footer button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.success-message {
  color: #22c55e;
  font-weight: 500;
  text-align: center;
  margin-top: 0.5rem;
  display: none;
}

.consent-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  padding: 15px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.consent-toggle {
  position: relative;
  display: inline-block;
  width: 33px;
  height: 18px;
}

.consent-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.consent-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #4a5568;
  transition: .3s;
  border-radius: 24px;
}

.consent-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%); /* Центрирует по вертикали */
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.consent-checkbox:checked + .consent-slider {
  background-color: #3b82f6;
}

.consent-checkbox:checked + .consent-slider:before {
  transform: translate(18px, -50%); /* Сохраняет вертикальное центрирование */
}

.consent-checkbox:focus + .consent-slider {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.consent-text {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
}

.consent-text a {
  color: #59DEFA;
  text-decoration: none;
  border-bottom: 1px dotted #59DEFA;
}

.consent-text a:hover {
  border-bottom: 1px solid #59DEFA;
}

/* Адаптивность */
@media (max-width: 768px) {
  .consent-container {
    flex-direction: row;
    gap: 12px;
    padding: 12px;
  }
  
  .consent-text {
    font-size: 0.9rem;
  }
  
  .consent-toggle {
    width: 45px;
    height: 22px;
  }
  
  .consent-slider:before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
  }
  
  .consent-checkbox:checked + .consent-slider:before {
    transform: translate(28px, -50%);
  }
}

