/* --- Обёртка и затемнение --- */
.LR6-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.LR6-hidden {
  display: none !important;
}

/* --- Модальное окно --- */
.LR6-cart-modal {
  background: #fff;
  padding: 2rem 2.5rem;
  width: 90%;
  max-width: 600px;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: fadeIn 0.3s ease;
  border: 1px solid #f0f0f0;
}

/* --- Кнопка закрытия --- */
.LR6-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s ease;
}

.LR6-close-btn:hover {
  color: #333;
}

/* --- Шаги --- */
.LR6-cart-step {
  margin-top: 2rem;
}

/* --- Инпуты и форма --- */
.LR6-cart-modal input,
.LR6-cart-modal textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1.2rem;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fafafa;
  transition: border 0.2s ease, background 0.2s ease;
}

.LR6-cart-modal input:focus,
.LR6-cart-modal textarea:focus {
  border-color: #007bff;
  background: #fff;
  outline: none;
}

.LR6-cart-modal textarea {
  min-height: 100px;
  resize: vertical;
}

/* --- Кнопки --- */
.LR6-btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: linear-gradient(135deg, #007bff, #0056d8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.LR6-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.LR6-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* --- Группа кнопок --- */
.LR6-btn-group {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

/* --- Элементы корзины --- */
.LR6-cart-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.LR6-cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.item-controls button {
  margin-right: 0.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  background: #f5f5f5;
  border: 1px solid #ccc;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.item-controls button:hover {
  background: #e6e6e6;
}

/* --- Общая сумма --- */
#LR6-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
  background: #f8f9fb;
  border: 1px solid #e3e6ec;
  border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
  font-weight: 600;
  font-size: 1.05rem;
  color: #111;
  letter-spacing: 0.3px;
}

#LR6-cart-total::before {
  content: "Итого:";
  font-weight: 700;
  color: #444;
  font-size: 1.05rem;
}

#LR6-cart-total span {
  font-weight: 800;
  font-size: 1.2rem;
  color: #007bff;
}

/* --- Переключение доставки --- */
.LR6-delivery-method {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.LR6-info-block {
  margin-bottom: 1.2rem;
}

/* --- Анимация --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Адаптив --- */
@media (max-width: 500px) {
  .LR6-cart-modal {
    padding: 1.2rem;
  }

  .LR6-cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .LR6-cart-item img {
    width: 100%;
    height: auto;
  }

  .LR6-btn-group {
    flex-direction: column;
  }
}

