/**
 * Глобальные стили макетов (katalog, order, chart/cart, product, store).
 * Дубликаты из разных файлов объединены в одно определение.
 */

:root {
  --bg-slate-50: #f8fafc;
  /* Тема: те же значения ранее дублировались в stylesheet.css :root */
  --background-white: var(--bg-slate-50);
  --background: linear-gradient(to right, #e8354a, #d41229);
  --text-color: #111827;
  --black: #212529;
  --white: #ffffff;
  --grey: #6c757d;
  --red: #dc3545;
  --border-color: #fca5a5;
  --box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  --hover-color: #dc2626;
  --catalog-filter-sticky-top: 124px;
}

body {
  background-color: var(--bg-slate-50);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: var(--text-color);
}
.alert {
  position: fixed;
  top: 7%;
  right: 1%;
  padding: 8px;
  z-index: 999999;
  background-color: #ffffff;
  color: var(--text-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}
.alert i {
  color: var(--text-color);
}
.alert .btn-close {
  position: initial;
  display: block;
}
.alert.alert-success {
  border: none;
}
/* Градиенты бренда */
.bg-brand-gradient {
  background: linear-gradient(to right, #e8354a, #d41229);
}

.text-brand-gradient {
  background: linear-gradient(to right, #e8354a, #d41229);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Стекло (шапка) */
.glass-header {
  background-color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Декоративное свечение */
.bg-glow-red {
  position: fixed;
  background-color: rgba(239, 68, 68, 0.2);
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

/* Появление при скролле */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Карточки товара (сетка каталога / главная) */
.product-card {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08) !important;
  border-color: #fca5a5;
}

.product-img-placeholder {
  transition: transform 0.3s ease;
}

.product-card:hover .product-img-placeholder {
  transform: scale(1.1);
}

/* Кнопка бренда */
.btn-brand {
  background: linear-gradient(to right, #e8354a, #d41229);
  color: white;
  border: none;
  transition: all 0.3s ease;
}

.btn-brand:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.hover-danger {
  transition: color 0.2s ease;
}

.hover-danger:hover {
  color: #dc2626 !important;
}

/* Утилиты из макетов (Bootstrap-дополнения) */
.rounded-4 {
  border-radius: 1rem !important;
}

.rounded-5 {
  border-radius: 1.5rem !important;
}

.icon-lg {
  width: 40px;
  height: 40px;
}

.z-index-1 {
  z-index: 1;
  position: relative;
}

/* Чекбоксы/радио: фирменный красный в checked-состоянии */
.form-check-input:checked,
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: #dc2626;
  border-color: #dc2626;
  accent-color: #dc2626;
}

/* Пагинация */
.page-link {
  color: #4b5563;
  border: none;
  margin: 0 4px;
  border-radius: 50% !important;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 0.2s ease;
}

.page-link:hover {
  background-color: #fee2e2;
  color: #dc2626;
}

.page-item.active .page-link {
  background-color: #dc2626;
  color: white;
}

/* Формы: фокус (order) */
.form-control:focus,
.form-select:focus {
  border-color: #fca5a5;
  box-shadow: 0 0 0 0.25rem rgba(239, 68, 68, 0.25);
}

/* Радио-карточки (оформление заказа) */
.option-card-wrapper input[type="radio"] {
  display: none;
}

.option-card-wrapper {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.option-card-wrapper .option-card,
.option-card-wrapper .option-card * {
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}

/* Радио/чекбокс: запрет текстовой каретки возле label */
#shipping-method label,
#payment-method label,
.radio label,
.checkbox label,
.ocfilter-option label,
.ocf-option-values label,
.catalog-filter-card .form-check-label {
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
  cursor: pointer;
}

.option-card {
  border: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  height: 100%;
}

.option-card:hover {
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
}

.option-card-wrapper input[type="radio"]:checked + .option-card {
  border-color: #dc2626;
  background-color: rgba(239, 68, 68, 0.02);
}

.option-card-wrapper
  input[type="radio"]:checked
  + .option-card
  .icon-container {
  background-color: #dc2626 !important;
  color: white !important;
}

.option-card-wrapper input[type="radio"]:checked + .option-card .check-circle {
  border-color: #dc2626;
  background-color: #dc2626;
}

.option-card-wrapper
  input[type="radio"]:checked
  + .option-card
  .check-circle::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
}

.check-circle {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.conditional-content {
  display: none;
  animation: global-conditional-fade-in 0.3s ease;
}

@keyframes global-conditional-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Корзина (chart.html) */
.cart-item {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.cart-item:hover {
  border-color: rgba(239, 68, 68, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.qty-btn:hover {
  background-color: #f1f5f9;
  color: #dc2626;
}

/* Карточка товара: галерея и опции (product.html) */
.gallery-thumbnail {
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
  border-color: #dc2626;
  opacity: 1;
}

.color-selector {
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.2s;
}

.color-selector.active {
  box-shadow:
    0 0 0 2px white,
    0 0 0 4px #dc2626;
}

.nav-pills-custom .nav-link {
  color: #6c757d;
  font-weight: 600;
  border-radius: 2rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s;
}

.nav-pills-custom .nav-link.active {
  background-color: #f8d7da;
  color: #dc2626;
}
.d-lg-flex {
  display: flex;
}
.align-items-end {
  align-items: flex-end;
}
.py-2 {
  padding-block: 8px;
}
.px-3 {
  padding-inline: 16px;
}
.border {
  border: 1px solid #dee2e6;
}
.badge {
  font-size: 14px;
  display: inline-block;
}
.mb-3 {
  margin-bottom: 16px;
}
.display-6 {
  font-size: 40px;
}
.border-0 {
  border-width: 0;
}
.flex-column {
  flex-direction: column;
}
.h-100 {
  height: 100%;
}
.list-unstyled {
  padding-left: 0;
  list-style: none;
}
.mb-2 {
  margin-bottom: 8px;
}
.mb-3 {
  margin-bottom: 16px;
}
.p-4 {
  padding: 24px;
}
.rounded-circle {
  border-radius: 50%;
}
.justify-content-between {
  justify-content: space-between;
}
.justify-content-center {
  justify-content: center;
}
.position-absolute {
  position: absolute;
}
.end-0 {
  right: 0;
}
.top-0 {
  top: 0;
}
.m-3 {
  margin: 16px;
}
.p-2 {
  padding: 8px;
}
.bg-dark {
  background-color: #212529;
}
.text-white {
  color: #ffffff;
}
.rg-3 {
  row-gap: 16px;
}
@media (min-width: 768px) {
  .p-md-4 {
    padding: 1.5rem !important;
  }
}
.conditional-content {
  display: block;
  animation: fadeIn 0.3s ease;
}
.mt-3 {
  margin-bottom: 16px;
}
.mr-3 {
  margin-right: 16px;
}
.adressBox {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 16px;
}
.adressInfo {
  width: calc((100% - 32px) / 3);
}
.btn-white {
  background: #ffffff;
}
