/* --- Бейдж количества товаров в корзине --- */
.cart-icon-badge-wrapper {
  position: relative;
  display: inline-block;
}
.cart-badge {
  background: #dc3545 !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.72rem;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  border: 2px solid #fff;
  z-index: 2;
  top: 0;
  right: 0;
  transform: translate(40%,-40%);
}
/* --- Общие переменные и базовые настройки --- */
:root {
  --bg-gradient: linear-gradient(90deg, #1e3a8a 0%, #1e40af 100%);
  --primary-color: #3b82f6;
  --text-color: #fff;
  --footer-shadow: 0 -4px 24px rgba(0,0,0,0.10);
  --navbar-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* --- Футер --- */
.footer {
  background: var(--bg-gradient);
  color: var(--text-color);
  border-top: 2.5px solid var(--primary-color);
  box-shadow: var(--footer-shadow);
  padding-top: 48px;
  padding-bottom: 24px;
  width: 100%;
  margin-top: 60px;
}

.footer a, .footer h6, .footer .small {
  color: var(--text-color);
  text-decoration: none;
}

.footer h6 {
  font-size: 1.1rem !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 18px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  color: #fff !important;
}

.footer ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.footer ul li {
  margin-bottom: 12px !important;
}

.footer a {
  color: rgba(255,255,255,0.75) !important;
  transition: color 0.2s ease !important;
  font-size: 0.95rem !important;
}

.footer a:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

.footer p {
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.95rem !important;
  margin-bottom: 10px !important;
  line-height: 1.6 !important;
}

.footer hr {
  border-color: rgba(255,255,255,0.1) !important;
  margin: 24px 0 16px 0 !important;
}

/* --- Хедер и навигация --- */
/* --- Информация о звонке и режиме работы --- */
.navbar .work-info {
  font-size: 1.04rem;
  color: var(--text-color);
  font-weight: 500;
  line-height: 1.2;
  margin-right: 28px;
  padding: 0 0 0 2px;
  min-width: auto;  /*  Важно: убери min-width: auto; или задай конкретное значение */
  max-width: 200px; /* Задай максимальную ширину, чтобы текст обрезался */
  text-align: left;
  overflow: hidden;
  transition: box-shadow 0.2s;
  border-radius: 8px;
  white-space: nowrap; /* Запрещаем перенос */
  text-overflow: ellipsis; /* Добавляем многоточие */
  display: block;     /*  Чтобы max-width работала */
}

.navbar .work-info .work-label {
  font-size: 0.93rem;
  color: #eaeaea;
  font-weight: 400;
  letter-spacing: 0.2px;
  margin-bottom: 2px;
  display: block;
  text-align: left;
  opacity: 0.85;
}

.navbar .work-info .work-value {
  font-size: 1.13rem;
  color: #fff;
  text-shadow: 0 1px 4px #000;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  text-align: left;
  line-height: 1.15;
  gap: 10px;
  margin-bottom: 2px;
}

.navbar {
  background: var(--bg-gradient);
  min-height: 58px;
  padding: 0;
  width: 100%;
  border-bottom: 2.5px solid var(--primary-color);
  box-shadow: var(--navbar-shadow);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.navbar .container-fluid {
  padding: 0 18px;
  max-width: 100vw;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.navbar .row.w-100 {
  --bs-gutter-x: 0;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .col-auto {
  gap: 12px;
  min-width: 0;
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: flex-start;
}

.navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--text-color);
  line-height: 1;
  padding: 0 10px 0 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.navbar .navbar-brand img {
  max-height: 32px;
  width: auto;
  filter: drop-shadow(0 0 2px var(--text-color));
  margin-right: 8px;
}

.navbar a[href="/"]:not(.navbar-brand) {
  color: var(--text-color);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 1px;
  text-decoration: none;
  text-shadow: 0 1px 4px #000;
  line-height: 1;
  margin-left: 0;
  display: inline-block;
  transition: color 0.3s ease;
}

@media (max-width: 900px) {
  .navbar a[href="/"]:not(.navbar-brand) {
    display: inline-block !important;
    font-size: 1.08rem;
    font-weight: 700;
    margin-left: 0;
    letter-spacing: 0.5px;
    color: var(--text-color);
    text-shadow: 0 1px 4px #000;
  }
  .navbar .d-none.d-md-block {
    display: inline-block !important;
  }
}

.navbar a[href="/"]:not(.navbar-brand):hover,
.navbar a[href="/"]:not(.navbar-brand):focus {
  color: var(--primary-color);
  outline: none;
}

/* --- Кнопка обратного звонка --- */
.callback-btn {
  display: inline-block;
  background: var(--primary-color);
  color: #fff !important;
  font-weight: 700;
  font-size: 1.13rem;
  padding: 0.65rem 2.1rem;
  border: none;
  border-radius: 22px;
  box-shadow: 0 6px 24px 0 rgba(59,130,246,0.18);
  white-space: nowrap;
  text-align: center;
  margin: 0 0 0 18px;
  transition: all 0.18s ease-in-out;
  letter-spacing: 0.7px;
  cursor: pointer;
}

.callback-btn:hover,
.callback-btn:focus {
  background: #2563eb;
  color: #fff !important;
  box-shadow: 0 6px 24px 0 rgba(59,130,246,0.28), 0 0 8px var(--primary-color);
  text-decoration: none;
  outline: none;
}

/* --- Поисковая строка --- */
.search-row {
  display: flex;
  margin-top: 22px;
  margin-bottom: 28px;
}

.search-row form {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
  border: 1.5px solid var(--primary-color);
  min-height: 36px;
  position: relative;
}

.search-row input[type="search"] {
  width: 100%;
  min-width: 0;
  font-size: 1rem;
  padding-left: 14px;
  padding-right: 36px;
  height: 36px;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.search-row button[type="submit"] {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--primary-color);
  font-size: 1.1rem;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* --- Ссылки корзины и ЛК --- */
.cart-link, .login-link {
  color: #fff;
  text-shadow: 0 1px 4px #000;
  text-decoration: none;
  font-size: 1rem;
  margin-left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  padding: 0 2px;
  cursor: pointer;
}

.cart-link span, .login-link span {
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 500;
  vertical-align: middle;
  color: #fff;
  text-shadow: 0 1px 4px #000;
}

/* Уменьшить иконки корзины и входа */
.cart-link svg, .login-link svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-bottom: 2px;
  flex-shrink: 0;
}

/* --- Способы оплаты (footer) --- */
.payment-systems {
  margin-top: 1rem;
}

.payment-icons {
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  padding: 0 !important;
}

.payment-icon {
  background: rgba(255,255,255,0.12) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15) !important;
  transition: all 0.2s ease !important;
  min-width: 56px !important;
  height: 44px !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  position: relative !important;
  overflow: hidden !important;
}

.payment-icon:hover {
  background: rgba(255,255,255,0.2) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 4px 12px rgba(0,0,0,0.15) !important;
  border-color: rgba(255,255,255,0.2) !important;
}

.payment-icon img {
  max-width: 90% !important;
  max-height: 90% !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1) !important;
}

@media (max-width: 768px) {
  .payment-icons {
    gap: 10px !important;
  }
  
  .payment-icon {
    min-width: 50px !important;
    height: 40px !important;
    padding: 8px 10px !important;
  }
}

@media (max-width: 576px) {
  .payment-icons {
    justify-content: center !important;
    gap: 10px !important;
  }
  
  .payment-icon {
    min-width: 48px !important;
    height: 38px !important;
    padding: 8px 10px !important;
  }
}

/* --- Переопределение Bootstrap кнопок --- */
.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
  font-weight: 600;
  transition: all 0.18s ease-in-out;
  box-shadow: 0 2px 8px 0 rgba(59,130,246,0.2);
}

.btn-primary:hover {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 4px 16px 0 rgba(59,130,246,0.3);
  text-decoration: none;
}

.btn-primary:focus,
.btn-primary:active {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.25rem rgba(59,130,246,0.5);
}

.btn-primary.disabled,
.btn-primary:disabled {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  opacity: 0.65;
}

/* --- Bootstrap кнопки успеха --- */
.btn-success {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
  color: #fff !important;
  font-weight: 600;
  transition: all 0.18s ease-in-out;
  box-shadow: 0 2px 8px 0 rgba(16,185,129,0.2);
}

.btn-success:hover {
  background-color: #059669 !important;
  border-color: #059669 !important;
  color: #fff !important;
  box-shadow: 0 4px 16px 0 rgba(16,185,129,0.3);
  text-decoration: none;
}

.btn-success:focus,
.btn-success:active {
  background-color: #047857 !important;
  border-color: #047857 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.25rem rgba(16,185,129,0.5);
}

/* --- Bootstrap кнопки опасности --- */
.btn-danger {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #fff !important;
  font-weight: 600;
  transition: all 0.18s ease-in-out;
}

.btn-danger:hover {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
  text-decoration: none;
}

/* --- Bootstrap кнопки вторичные --- */
.btn-secondary {
  background-color: #6b7280 !important;
  border-color: #6b7280 !important;
  color: #fff !important;
  font-weight: 600;
  transition: all 0.18s ease-in-out;
}

.btn-secondary:hover {
  background-color: #4b5563 !important;
  border-color: #4b5563 !important;
  color: #fff !important;
  text-decoration: none;
}

/* --- Bootstrap кнопки с контуром --- */
.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  font-weight: 600;
  transition: all 0.18s ease-in-out;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
  text-decoration: none;
}

/* --- Сброс стилей для form-control --- */
.form-control {
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.form-control:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(59,130,246,0.1) !important;
}

.form-control::placeholder {
  color: #9ca3af;
  opacity: 1;
}