.star {
  font-size: 24px;
  color: gray;
  cursor: pointer;
}

.star.checked {
  color: gold; /* Цвет для заполненных звезд */
}

.card-text {
  display: flex;            /* Используем Flexbox для родительского контейнера */
  flex-direction: column;   /* Устанавливаем вертикальное направление */
  align-items: center;      /* Центрируем содержимое по горизонтали */
}

.stars-container {
  display: flex;            /* Размещаем звезды в одном ряду */
}

.votes-count-container {
  margin: 0px;              /* Отступ сверху для отделения от звезд */
}

.votes-count {
  font-size: 16px;         /* Размер шрифта для текста голосов (можно настроить) */
  color: #555;           /* Цвет для текста голосов (можно настроить) */
}

.spinner-wrapper {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 9999;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#custom-alert {
  position: fixed; /* Фиксированная позиция */
  top: 5%;    /* Расстояние от нижнего края окна */
  left: 50%;       /* Центровка элемента позади экрана */
  transform: translateX(-50%); /* Исправление для центровки */
  z-index: 1000;   /* Высокое значение z-index для поверхностного отображения */
  width: auto;     /* Автоматическая ширина */
  max-width: 90%;  /* Ограничение максимальной ширины */
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* Тень для визуального отделения */
}

/* Apple Card */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 20px -10px;
}

.product-card {
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin: 10px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.product-image-container {
  position: relative;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.badge {
  position: absolute;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: #ffffff;
}

.discount-badge {
  background-color: #28a745; /* Зелёный */
  top: 10px;
  right: 10px;
}

.sale-badge {
  background-color: #dc3545; /* Красный */
  top: 10px;
  left: 10px;
}

.product-info {
  padding: 15px;
}

.product-title {
  font-size: 1.25rem;
  color: #333;
}

.product-price {
  font-size: 1.5rem;
  color: #000;
  margin: 10px 0;
}

.product-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.category-container {
  display: flex;
  justify-content: center; /* Центрирование контейнера */
  align-items: center;
  padding: 20px 0; /* Вертикальные отступы сверху и снизу */
  gap: 20px;
}

.category-group {
  display: flex;
  flex-direction: column;
  width: 20%; /* Ширина блока 25% от родительского контейнера */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

h1 {
  font-weight: bold;
  color: #333;
}

.btn,
.form-control {
  border-radius: .25rem;
}

.btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
}

.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

.btn:hover {
  opacity: 0.8;
}

#spinner .spinner {
  border: 0.3em solid rgba(0, 123, 255, 0.2);
  border-top: 0.3em solid #007bff;
  width: 3rem;
  height: 3rem;
}