/* 🌌 Общий фон и текст */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url("/uploads/bg.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow-x: hidden;
}

/* 🔰 Логотип и заголовок */
header {
  text-align: center;
  padding: 20px 16px;
}

.logo {
  max-width: 120px;
  margin-bottom: 12px;
}

/* 🔘 Переключатель категорий */
.category-switch {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

.category-switch button {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px 24px;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.category-switch button:hover {
  background: rgba(255,255,255,0.2);
}

/* 🔍 Поиск */
.search-input {
  display: block;
  margin: 12px auto 24px;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  width: 80%;
  max-width: 480px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  color: #fff;
}

/* 📦 Секции */
section {
  padding: 32px 5vw;
}

section.hidden {
  display: none;
}

section.visible {
  display: block;
}


/* 🧸 Карточка товара */
.card {
  max-width: 320px;
  margin: 24px auto;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  color: #fff;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  transform: translateY(40px);
}


.card img {
  width: 100%;
  border-radius: 12px;
  margin: 12px 0;
  object-fit: cover;
}

/* 🛒 Корзина */
.cart {
  position: relative;
  margin: 32px auto;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  padding: 24px;
  max-width: 320px;
  box-shadow: 0 0 32px rgba(0,0,0,0.3);
  color: #fff;
  z-index: 100;
}



/* 🧮 Кастомізація + ✅ Оформлення */
.custom-modal,
.checkout-modal {
  position: relative;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  padding: 24px;
  width: 100vw;
  max-width: 480px;
  max-height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 0 32px rgba(0,0,0,0.3);
  color: #fff;
  animation: fadeInUp 0.6s ease forwards;
  animation-fill-mode: forwards;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 480px) {
  .custom-modal,
  .checkout-modal {
    padding: 24px;
    width: 95vw;
    max-width: 100%;
    border-radius: 16px;
  }
}



/* 🌫️ Затемнение фона */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* 🔘 Кнопки */
button {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: rgba(255,255,255,0.3);
}

/* 🎞️ Анимация появления */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Заголовки категорий */
section h2 {
  text-align: center;
  font-size: clamp(24px, 5vw, 36px);
  margin-bottom: 16px;
}

/* Центрирование сетки */
#productGrid, #availableGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  justify-content: center;
}


/* Адаптация для мобильных */
@media (max-width: 480px) {
  .cart {
    position: static;
    margin: 24px auto;
    max-width: 90%;
  }

  .category-switch {
    flex-direction: column;
    align-items: center;
  }

  .search-input {
    width: 90%;
  }

  section h2 {
    font-size: 24px;
  }
}
.product-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
}

.form-row label {
  font-weight: 500;
  margin-bottom: 4px;
}

.form-row input,
.form-row textarea,
.form-row select {
  padding: 6px;
  font-size: 14px;
}

.form-group {
  border: 1px solid #ccc;
  padding: 12px;
  border-radius: 6px;
}
.product-card {
  text-align: center;
}
.custom-modal {
  margin: 0 auto;
  align-self: center;
  transform: none !important;
  opacity: 1 !important;
  position: relative !important;
}


@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-modal {
  display: flex;
  flex-direction: column;
  justify-content: center;
}


.modal-content {
  overflow-y: auto;
  max-height: calc(100vh - 48px); /* учёт паддинга и кнопки закрытия */
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


table.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

table.admin-table th,
table.admin-table td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  vertical-align: top;
  text-align: left;
}

table.admin-table th {
  background-color: #f0f0f0;
  color: #000;
  font-weight: bold;
}


table.admin-table img {
  display: inline-block;
  margin: 2px;
  border-radius: 4px;
}
.checkout-modal {
  max-width: 400px;
  margin: auto;
  padding: 16px;
  font-family: sans-serif;
}

.checkout-modal h3 {
  text-align: center;
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.radio-group {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

button[type="submit"] {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  background-color: #2e89ff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.checkout-form {
  max-width: 420px;
  margin: auto;
  padding: 24px;
  font-family: 'Segoe UI', sans-serif;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 0 24px rgba(0,0,0,0.4);
  color: #fff;
}

.checkout-form h3 {
  font-size: clamp(18px, 5vw, 22px);
  margin-bottom: 12px;
  text-align: left;
  color: #fff;
}

.checkout-form .form-group {
  margin-bottom: 18px;
}

.checkout-form .form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

.checkout-form .form-group input,
.checkout-form .form-group select,
.checkout-form .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  outline: none;
  transition: border 0.3s;
}

.checkout-form .form-group input:focus,
.checkout-form .form-group select:focus,
.checkout-form .form-group textarea:focus {
  border-color: #2e89ff;
}

.checkout-form .radio-group {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.checkout-form .radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}

.checkout-form textarea {
  resize: vertical;
  min-height: 60px;
}

.checkout-form button[type="submit"] {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background: linear-gradient(135deg, #2e89ff, #6a5af9);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.checkout-form button[type="submit"]:hover {
  background: linear-gradient(135deg, #1c6edc, #5a4ae0);
}
.payment-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
  font-size: 15px;
}

.payment-icon {
  font-size: 24px;
}

.payment-text {
  color: #fff;
  line-height: 1.4;
}

.qr-image {
  width: 100px;
  border-radius: 8px;
  margin-top: 8px;
}
.payment-methods {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 8px;
}

.payment-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.payment-option input {
  display: none;
}

.payment-icon {
  width: 48px;
  height: 48px;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: border 0.2s ease;
}

.payment-option input:checked + .payment-icon {
  border-color: #007aff;
}

.payment-preview {
  margin-top: 12px;
  text-align: center;
}
.checkout-table {
  width: 100%;
  border-collapse: collapse;
}

.checkout-table th {
  text-align: left;
  padding: 8px;
  vertical-align: top;
  width: 120px;
}

.checkout-table td {
  padding: 8px;
}










.carousel-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  padding: 20px;
}

.carousel-image-box {
  max-width: 90%;
  max-height: 80%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.carousel-nav {
  font-size: 2rem;
  background: none;
  color: white;
  border: none;
  margin: 10px;
  cursor: pointer;
  padding: 10px;
  user-select: none;
}

.carousel-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  background: none;
  color: white;
  border: none;
  cursor: pointer;
  user-select: none;
}
.carousel-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
}

.carousel-image-box {
  max-width: 90%;
  max-height: 80%;
  overflow: hidden;
}

.carousel-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.carousel-nav {
  font-size: 2rem;
  background: none;
  color: white;
  border: none;
  margin: 10px;
  cursor: pointer;
}

.carousel-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  background: none;
  color: white;
  border: none;
  cursor: pointer;
}
.carousel-image:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}
.stats-block {
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  color: #222; /* ← добавлено */
}

