/* prog-common.css — дополнительные стили */

/* Модал карточки товара (AJAX) */
.b-product-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-main, #f0f5ff);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.b-product-modal_inner {
  min-height: 100%;
  padding: 0 20px 120px;
  max-width: 680px;
  margin: 0 auto;
  box-sizing: border-box;
}
.b-product-modal_loader {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.b-product-modal_loader::after {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0,0,0,.1);
  border-top-color: #5badff;
  border-radius: 50%;
  animation: productModalSpin .7s linear infinite;
}
@keyframes productModalSpin {
  to { transform: rotate(360deg); }
}

/* Быстрый поиск: выпадающий список */
.b-search_result-item {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  min-height: 20px;
  padding: 0;
  font-family: "Wix Madefor Text", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  color: #1c1c1c;
  color: var(--color-text-main, #1c1c1c);
  text-decoration: none;
  background-image: none;
}

.b-search_result-item::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  margin-right: 10px;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='1'%3E%3Ccircle cx='7.5' cy='7.5' r='5.25' stroke='%231C1C1C' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M15.75 15.75L11.25 11.25' stroke='%231C1C1C' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 18px 18px;
  background-repeat: no-repeat;
}

.b-search_result-item mark {
  background: none;
  font-weight: 700;
  color: inherit;
}

.b-search_result-empty {
  font-family: "Wix Madefor Text", sans-serif;
  font-size: 16px;
  line-height: normal;
  color: #1c1c1c;
  color: var(--color-text-main, #1c1c1c);
  opacity: 0.5;
}

.b-search_result-brand {
  font-weight: 400;
}

.b-search.result.has-match .b-search_start {
  display: block;
  margin: 0 0 20px;
}

.menu_item:after {
  left: 0;
  right: 0;
}

.menu_item-counter {
  position: absolute;
  top: 8px;
  right: calc(50% - 24px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #5badff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  z-index: 3;
}

.b-product_bottom [hidden],
.b-product_bottom-price-old[hidden] {
  display: none !important;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-page-background);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}
#preloader.is-hidden {
  opacity: 0;
  pointer-events: none;
}
#preloader .preloader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-elem-2);
  border-top-color: var(--color-elem-1);
  border-radius: 50%;
  animation: preloader-spin 0.7s linear infinite;
}
@keyframes preloader-spin {
  to { transform: rotate(360deg); }
}


/* Catalog filter loading overlay */
.b-catalog--loading .js-catalog-list {
  pointer-events: none;
  opacity: 0.4;
  transition: opacity 0.15s;
}
.b-catalog__filter-loader {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(255,255,255,0.92);
  border-radius: 50px;
  padding: 10px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
}
.b-catalog__filter-loader .f-spinner {
  --f-spinner-width: 20px;
  --f-spinner-height: 20px;
  flex-shrink: 0;
}
.b-catalog--loading .b-catalog__filter-loader {
  display: flex;
}
