/**
 * Стили для Dynamic Rendering (боты).
 * Самодостаточные — работают без search-page.css.
 */
.search-page-custom { max-width: 100%; margin: 0 auto; }
.search-page-custom .search-page-layout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.search-page-custom .search-page-filter {
  flex: 0 0 210px;
  max-width: 210px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  padding: 20px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.search-page-custom .search-page-filter-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1d1a1a;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}
.search-page-custom .search-page-content { flex: 1 1 auto; min-width: 0; }
.search-page-custom .search-page-layout.no-filter .search-page-filter { display: none; }
.search-page-custom .sp-grid-wrapper { position: relative; }
.search-page-custom .sp-catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
}
.search-page-custom .sp-catalog-item { height: 100%; }
@media (max-width: 1199px) { .search-page-custom .sp-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) { .search-page-custom .sp-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .search-page-custom .sp-catalog-grid { grid-template-columns: 1fr; } }

/* Карточка товара — как в React */
.search-page-custom .custom-product-card-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f7f7f7;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.search-page-custom .custom-product-card-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.search-page-custom .custom-product-card-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}
.search-page-custom .custom-product-card-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
}
.search-page-custom .custom-product-card-rating-star { color: #d7dbe0; font-size: 13px; }
.search-page-custom .custom-product-card-rating-star.is-active { color: #f5a623; }
.search-page-custom .custom-product-card-rating-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}
.search-page-custom .custom-product-card-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 210px;
  padding: 10px;
  background: #fff;
  text-align: center;
}
.search-page-custom .custom-product-card-image img {
  max-width: 100%;
  max-height: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.search-page-custom .custom-product-card-stickers {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.search-page-custom .custom-product-card-sticker {
  min-width: 40px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.search-page-custom .custom-product-card-sticker.sticker-hit { background: #ff6f00; }
.search-page-custom .custom-product-card-sticker.sticker-new { background: #28a745; }
.search-page-custom .custom-product-card-sticker.sticker-stock { background: #9b0023; }
.search-page-custom .custom-product-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #9b0023;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.search-page-custom .custom-product-card-badge.badge--secondary {
  right: 12px; left: auto;
  background: #6c757d;
}
.search-page-custom .custom-product-card-badge.badge--sale {
  right: 12px; left: auto;
  background: #dc3545;
  color: #fff;
}
.search-page-custom .custom-product-card-info {
  display: flex;
  flex-direction: column;
  padding: 12px 14px 14px;
  flex: 1 1 auto;
  min-height: 210px;
}
.search-page-custom .custom-product-card-meta { margin-bottom: 10px; }
.search-page-custom .custom-product-card-price-from {
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.search-page-custom .custom-product-card-price-from-value { font-size: 16px; font-weight: 600; color: #1d1a1a; }
.search-page-custom .custom-product-card-price-from-qty { font-size: 16px; color: #777; }
.search-page-custom .custom-product-card-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 2px;
}
.search-page-custom .custom-product-card-meta-label { color: #777; }
.search-page-custom .custom-product-card-meta-value { color: #333; font-weight: 500; }
.search-page-custom .custom-product-card-meta-value--green { color: #28a745; }
.search-page-custom .custom-product-card-meta-value--red { color: #dc3545; }
.search-page-custom .custom-product-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: #1d1a1a;
  margin-bottom: 10px;
  text-decoration: none;
}
.search-page-custom .custom-product-card-title:hover { color: #9b0023; }
.search-page-custom .custom-product-card-price-row {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.search-page-custom .custom-product-card-price { font-size: 16px; font-weight: 700; color: #1d1a1a; }
.search-page-custom .custom-product-card-old-price {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}
.search-page-custom .search-results-empty {
  text-align: center;
  padding: 60px 20px;
}
.search-page-custom .search-results-empty-title {
  font-size: 24px;
  font-weight: 600;
  color: #1d1a1a;
  margin: 0 0 10px 0;
}
.search-page-custom .custom-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 30px 0;
  padding: 20px 0;
  flex-wrap: wrap;
}
.search-page-custom .custom-pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}
.search-page-custom .custom-pagination-item:hover {
  background: #f5f5f5;
  border-color: #9B0023;
  color: #9B0023;
}
.search-page-custom .custom-pagination-item.active {
  background: #9B0023;
  border-color: #9B0023;
  color: #fff;
}

/* Фильтр: секции */
.search-page-custom .search-filter-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}
.search-page-custom .search-filter-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.search-page-custom .search-filter-section-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: #333; }
.search-page-custom .search-filter-section-content { max-height: none; }
.search-page-custom .search-filter-section.expanded .search-filter-section-content { max-height: none; }
.search-page-custom .search-filter-price-inputs {
  display: flex;
  gap: 6px;
  margin-bottom: 0;
  flex-wrap: wrap;
  align-items: center;
}
.search-page-custom .search-filter-price-inputs input {
  flex: 1;
  min-width: 60px;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: #fafafa;
  color: #333;
}
.search-page-custom .search-filter-price-inputs input:focus {
  outline: none;
  border-color: #9b0023;
  background: #fff;
}
.search-page-custom .search-filter-checkbox-list,
.search-page-custom .search-filter-radio-list {
  max-height: 200px;
  overflow-y: auto;
  font-size: 13px;
  padding-right: 4px;
}
.search-page-custom .search-filter-reset-wrapper { margin-top: 12px; }
.search-page-custom .search-filter-reset-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  color: #9b0023;
  border-radius: 4px;
  border: 1px solid rgba(155, 0, 35, 0.2);
  background: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.search-page-custom .search-filter-reset-btn:hover {
  background: rgba(155, 0, 35, 0.05);
  border-color: #9b0023;
}
.search-page-custom .search-filter-placeholder {
  font-size: 13px;
  color: #999;
  text-align: center;
  padding: 20px 0;
}

.search-page-custom .selection-section-description {
  width: 100%;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.6;
  color: #1d1a1a;
}
.search-page-custom .selection-section-description--top {
  padding: 28px 0 24px;
  margin-bottom: 4px;
}
.search-page-custom .selection-section-description--bottom {
  padding: 24px 0 28px;
  margin-top: 8px;
  clear: both;
}
.search-page-custom .selection-section-description--full-width {
  width: 100%;
}
.search-page-custom .selection-section-description__content {
  max-width: 100%;
  color: #383838;
}
.search-page-custom .selection-section-description__content p,
.search-page-custom .selection-section-description__content ul,
.search-page-custom .selection-section-description__content li,
.search-page-custom .selection-section-description__content table,
.search-page-custom .selection-section-description__content th,
.search-page-custom .selection-section-description__content td {
  color: #383838;
}
.search-page-custom .selection-section-description__content p { margin: 0 0 12px; }
.search-page-custom .selection-section-description__content p:last-child { margin-bottom: 0; }
.search-page-custom .selection-section-description__content ul,
.search-page-custom .selection-section-description__content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.search-page-custom .selection-section-description__content li {
  margin-bottom: 6px;
  padding-left: 5px;
}
.search-page-custom .selection-section-description__content li:last-child { margin-bottom: 0; }
.search-page-custom .selection-section-description__content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin: 16px 0;
  font-size: 14px;
}
.search-page-custom .selection-section-description__content th,
.search-page-custom .selection-section-description__content td {
  padding: 12px 16px;
  border: 1px solid #e8e8e8;
  text-align: left;
}
.search-page-custom .selection-section-description__content th {
  background: #f8f9fa;
  font-weight: 600;
  color: #1d1a1a;
}
.search-page-custom .selection-section-description__content tr:nth-child(even) td { background: #fafafa; }
.search-page-custom .selection-section-description__content tr:hover td { background: #f5f5f5; }
.search-page-custom .selection-section-description__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.search-page-custom .selection-section-description__content a {
  color: #9b0023;
  text-decoration: none;
}
.search-page-custom .selection-section-description__content a:hover { text-decoration: underline; }

.search-page-custom .selection-categories-carousel {
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.search-page-custom .selection-categories-carousel-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  box-sizing: border-box;
}
.search-page-custom .selection-categories-carousel-scroll::-webkit-scrollbar { display: none; }
.search-page-custom .selection-categories-carousel-item {
  flex: 0 0 auto;
  width: 180px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  padding: 15px;
  border: 1px solid #f0f0f0;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  box-sizing: border-box;
}
.search-page-custom .selection-categories-carousel-item:hover {
  border-color: #9b0023;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.search-page-custom .selection-categories-carousel-image {
  width: 110px;
  height: 110px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: #f8f9fa;
  flex-shrink: 0;
}
.search-page-custom .selection-categories-carousel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-page-custom .selection-categories-carousel-name {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #1d1a1a;
  line-height: 1.3;
}
.search-page-custom .selection-categories-carousel-item:hover .selection-categories-carousel-name {
  color: #9b0023;
}
.search-page-custom .selection-categories-carousel-count {
  font-size: 12px;
  color: #888;
}

/* Фильтр: ссылки вместо чекбоксов */
.search-page-custom .search-filter-checkbox-item,
.search-page-custom .search-filter-radio-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px 0;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}
.search-page-custom .search-filter-checkbox-item:hover,
.search-page-custom .search-filter-radio-item:hover {
  color: #9b0023;
}
.search-page-custom .search-filter-checkbox-item span,
.search-page-custom .search-filter-radio-item span {
  color: #333333;
  line-height: 1.4;
}
.search-page-custom .search-filter-checkbox-item:hover span,
.search-page-custom .search-filter-radio-item:hover span {
  color: #9b0023;
}
.search-page-custom .search-filter-checkbox-item.is-checked span,
.search-page-custom .search-filter-radio-item.is-checked span {
  color: #9b0023;
  font-weight: 600;
}
.search-page-custom .search-filter-checkbox-item.is-disabled,
.search-page-custom .search-filter-radio-item.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}
.search-page-custom .search-filter-price-form button[type="submit"] {
  margin-top: 8px;
  padding: 8px 16px;
  background: #9b0023;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.search-page-custom .search-filter-price-form button[type="submit"]:hover {
  background: #7a001b;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.search-page-custom .search-loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #9B0023;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}
