/* ===== OPTIMIZED: 1768230933_home.css =====
 * Generated: 2026-01-12 15:15:33
 * Duplicates removed, conflicts resolved
 * ============================= */

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
  padding: 60px 30px;
  margin: 0;
  margin-bottom: 50px;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-lg);
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  background: var(--primary-color);
}

/* Основной анимированный фон - Синий + Золото (40% меньше) */
.hero-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    var(--primary-color) 0%,
    var(--primary-color) 15%,
    var(--primary-light) 30%,
    var(--accent-color) 35%,
    var(--accent-light) 40%,
    var(--primary-light) 50%,
    var(--primary-color) 100%
  );
  transform: translate(-50%, -50%);
  animation: rotateGradient 8s linear infinite;
  filter: blur(50px);
  opacity: 0.9;
  z-index: 1;
}

/* Вторичный слой для глубины - Серебро + Синий (золото минимально) */
.hero-section::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180%;
  height: 180%;
  background: conic-gradient(
    from 180deg,
    var(--primary-light) 0%,
    var(--primary-light) 20%,
    var(--secondary-light) 40%,
    var(--secondary-color) 50%,
    var(--secondary-light) 60%,
    var(--accent-light) 65%,
    var(--primary-light) 100%
  );
  transform: translate(-50%, -50%);
  animation: rotateGradientReverse 10s linear infinite;
  filter: blur(50px);
  opacity: 0.6;
  z-index: 0;
}

/* Контент должен быть выше фона */
.hero-content {
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Заголовок hero: серебряный металлик с бегущим бликом (как луч фонарика по краю надписи) */
.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
  /* Серебряный градиент + яркий блик, обрезанный по тексту */
  background: linear-gradient(
    95deg,
    #a8b0b8 0%,
    #c0c8d0 15%,
    #d8e0e8 28%,
    #fff 32%,
    #e8f0f8 36%,
    #c8d0d8 45%,
    #b0b8c0 55%,
    #c0c8d0 72%,
    #fff 76%,
    #e0e8f0 80%,
    #a8b0b8 100%
  );
  background-size: 280% 100%;
  background-position: 100% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  animation: hero-title-shine 4s ease-in-out infinite;
}

@keyframes hero-title-shine {
  0% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.95;
  font-weight: 400;
  line-height: 1.5;
  color: var(--secondary-dark);
}

/* ============================================
   АНИМАЦИИ ФОНА
   ============================================ */

@keyframes rotateGradient {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes rotateGradientReverse {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

/* ============================================
   ПОИСК И ФИЛЬТРЫ
   ============================================ */

.hero-search {
  margin-top: 40px;
}

.search-form {
  max-width: 700px;
  margin: 0 auto;
}

.search-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: stretch;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: #999;
  font-size: 18px;
  z-index: 2;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 16px 16px 16px 50px;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
  transform: translateY(-1px);
}

.search-input::placeholder {
  color: #999;
}

.search-btn {
  padding: 16px 24px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  min-width: 150px;
}

.search-btn:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.search-btn:active {
  transform: translateY(0);
}

.search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   БЫСТРЫЕ ФИЛЬТРЫ
   ============================================ */

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.filter-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-white, #ffffff);
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  margin-bottom: 1rem;
  font-weight: 500;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(
    135deg,
    var(--category-color, #2196f3) 0%,
    rgba(33, 150, 243, 0.1) 100%
  );
  border: 2px solid var(--category-color, #2196f3);
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  color: white;
}

.filter-tag:hover {
  background: var(--category-color, #2196f3);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.filter-tag i {
  font-size: 1rem;
}

/* ============================================
   СЕКЦИЯ ТОВАРОВ
   ============================================ */

.featured-items-section {
  margin: 50px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  color: #1a1a1a;
}

.view-all-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.view-all-link:hover {
  color: #764ba2;
  transform: translateX(4px);
}

/* ============================================
   СЕТКА ТОВАРОВ
   ============================================ */

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

/* ============================================
   КАРТОЧКА ТОВАРА
   ============================================ */

.item-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   ИЗОБРАЖЕНИЕ ТОВАРА
   ============================================ */

.item-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #f5f5f5;
}

.item-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.item-card:hover .item-thumbnail {
  transform: scale(1.05);
}

/* Статус товара */
.item-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
}

/* Кнопки в углу фото */
.image-overlay-buttons {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 10px;
  z-index: 10;
  align-items: center;
}

/* Кнопка «Поделиться» в overlay — палитра проекта и UX */
.image-overlay-buttons .share-btn {
  --share-btn-size: 40px;
  width: var(--share-btn-size);
  height: var(--share-btn-size);
  min-width: var(--share-btn-size);
  min-height: var(--share-btn-size);
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background-color var(--transition-normal),
    color var(--transition-normal),
    transform var(--transition-fast),
    box-shadow var(--transition-normal);
  box-shadow: var(--shadow-md);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.image-overlay-buttons .share-btn i {
  color: inherit;
}

.image-overlay-buttons .share-btn:hover {
  background: #fff;
  color: var(--primary-hover);
  transform: scale(1.08);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(var(--primary-rgb), 0.08);
}

.image-overlay-buttons .share-btn:active {
  transform: scale(0.96);
  box-shadow: var(--shadow-sm);
}

.image-overlay-buttons .share-btn:focus-visible {
  box-shadow: var(--shadow-lg), 0 0 0 3px rgba(var(--primary-rgb), 0.35);
}

.image-overlay-buttons .share-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.share-btn,
.favorite-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.image-overlay-buttons .favorite-btn {
  color: #333;
}

.share-btn:hover,
.favorite-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.share-btn:active,
.favorite-btn:active {
  transform: scale(0.95);
}

.favorite-btn.is-favorite {
  color: #ff6b6b;
}

.favorite-btn.is-favorite i {
  color: #e74c3c;
}

/* ============================================
   СОДЕРЖИМОЕ КАРТОЧКИ
   ============================================ */

.item-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.item-title {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}

.item-link {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.3s ease;
}

.item-link:hover {
  color: #667eea;
}

/* Рейтинг */
.item-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.stars {
  display: flex;
  gap: 2px;
}

.stars i {
  font-size: 14px;
}

.star-filled {
  color: #fbbf24;
}

.star-empty {
  color: #d1d5db;
}

.rating-text {
  font-weight: 600;
  color: #1a1a1a;
}

.review-count {
  color: #666;
  font-size: 13px;
}

/* Цена */
.item-price {
  margin-bottom: 16px;
}

/* Карточка: блок цены (прогрессивная или базовая + неделя/месяц) */
.item-price .item-price-block .item-price-amount,
.item-price .item-price-block .item-price-from {
  font-size: var(--text-2xl, 1.5rem);
  font-weight: 700;
}
.item-price .item-price-block .item-price-extra {
  font-size: 0.7rem;
  color: var(--text-muted, #757575);
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
}

.price-period {
  color: #666;
  font-size: 14px;
  margin-left: 4px;
}

/* Мета информация */
.item-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #666;
  flex: 1;
}

.item-owner,
.item-location {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-owner i,
.item-location i {
  width: 14px;
  color: #999;
}

/* ============================================
   ДЕЙСТВИЯ С ТОВАРОМ
   ============================================ */

.item-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: #f9f9f9;
  border-top: 1px solid #e0e0e0;
  margin-top: auto;
}

.item-actions-bottom {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.btn-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 14px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   СОСТОЯНИЯ ЗАГРУЗКИ И ОШИБОК
   ============================================ */

.loading-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-text {
  color: #666;
  font-size: 1.1rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.empty-state h5 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.empty-state p {
  color: #666;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.error-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}

.error-state-icon {
  font-size: 4rem;
  color: #ff6b6b;
  margin-bottom: 20px;
}

.error-state h5 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.error-state p {
  color: #666;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.item-card {
  animation: fadeIn 0.6s ease-out backwards;
}

.item-card:nth-child(1) {
  animation-delay: 0.1s;
}

.item-card:nth-child(2) {
  animation-delay: 0.2s;
}

.item-card:nth-child(3) {
  animation-delay: 0.3s;
}

.item-card:nth-child(4) {
  animation-delay: 0.4s;
}

.item-card:nth-child(5) {
  animation-delay: 0.5s;
}

.item-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* ============================================
   ДОСТУПНОСТЬ
   ============================================ */

*:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.btn-primary:focus,
.search-input:focus,
.search-btn:focus,
.share-btn:focus,
.favorite-btn:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* ============================================
   УТИЛИТЫ
   ============================================ */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: #666;
}

.d-none {
  display: none;
}

.d-block {
  display: block;
}

.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

.align-items-center {
  align-items: center;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 8px;
}

.gap-2 {
  gap: 16px;
}

.gap-3 {
  gap: 24px;
}

.gap-4 {
  gap: 32px;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.mb-4 {
  margin-bottom: 32px;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 32px;
}

.p-0 {
  padding: 0;
}

.p-1 {
  padding: 8px;
}

.p-2 {
  padding: 16px;
}

.p-3 {
  padding: 24px;
}

.p-4 {
  padding: 32px;
}

.fw-bold {
  font-weight: 700;
}

.fw-semibold {
  font-weight: 600;
}

.fw-medium {
  font-weight: 500;
}

.fw-normal {
  font-weight: 400;
}

/* ============================================
   СКРЫТИЕ ДЛЯ SCREEN READERS
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ СОСТОЯНИЯ
   ============================================ */

.favorite-animate {
  animation: favoriteClick 0.3s ease;
}

/* Состояние избранного */
.favorite-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #999;
}

.favorite-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.favorite-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.favorite-btn i {
  font-size: 18px;
  transition: color 0.3s ease;
}

.favorite-btn.loading {
  animation: spin 1s linear infinite;
}

/* ☝️ КЛЮЧЕВОЕ: Скрываем кнопку без data-item-id (неавторизованные) */
.favorite-btn:not([data-item-id]) {
  display: none;
}

.favorite-btn.favorite-animate {
  animation: heartBeat 0.6s ease-in-out;
}

/* Быстрые фильтры - категории */
.quick-filters {
  margin-top: 2rem;
  text-align: center;
}

.filter-tag:active {
  transform: translateY(0);
}

/* ===== ITEM OWNER AVATAR STYLES ===== */
a.item-owner {
  text-decoration: none;
  color: inherit;
}
.item-owner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

/* Аватар владельца товара */
.item-owner-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.item-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.item-owner-avatar.avatar-online,
.avatar-placeholder-small.avatar-online {
  box-shadow: 0 0 0 2px #4caf50;
  border-color: #4caf50;
}

.item-owner-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  pointer-events: none;
}

/* Плейсхолдер аватара */
.avatar-placeholder-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.avatar-placeholder-small::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  pointer-events: none;
}

/* Текст владельца */
.item-owner span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  transition: color 0.3s ease;
}

/* Hover эффект */
.item-owner:hover .item-owner-avatar,
.item-owner:hover .avatar-placeholder-small {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
  border-color: rgba(255, 255, 255, 1);
}

.item-owner:hover span {
  color: var(--primary-color);
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Планшеты (768px и выше) */
@media (min-width: 768px) {
  .item-owner {
    gap: 0.875rem;
    padding: 0.625rem 0;
  }

  .item-owner-avatar,
  .avatar-placeholder-small {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  }

  .item-owner span {
    font-size: 0.9rem;
    max-width: 140px;
  }

  .item-owner:hover .item-owner-avatar,
  .item-owner:hover .avatar-placeholder-small {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
  }
}

/* Большие экраны (1024px и выше) */
@media (min-width: 1024px) {
  .item-owner {
    gap: 1rem;
  }

  .item-owner-avatar,
  .avatar-placeholder-small {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  }

  .item-owner span {
    font-size: 0.95rem;
    max-width: 160px;
  }
}

/* Мобильные устройства (до 480px) */
@media (max-width: 480px) {
  .item-owner {
    gap: 0.625rem;
    padding: 0.375rem 0;
  }

  .item-owner-avatar,
  .avatar-placeholder-small {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    border-width: 1.5px;
  }

  .item-owner span {
    font-size: 0.8rem;
    max-width: 100px;
  }

  .item-owner:hover .item-owner-avatar,
  .item-owner:hover .avatar-placeholder-small {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
  }
}

/* Анимация загрузки аватара */
@keyframes avatarFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.item-owner-avatar img {
  animation: avatarFadeIn 0.4s ease-in-out;
}

/* ===== HERO STATS BLOCK ===== */
.hero-stats-block {
  background: transparent;
  border-top: none;
  border-bottom: none;
  margin-top: 3rem;
  padding: 2.5rem 1.5rem;
  position: relative;
  z-index: 2;
}

/* ===== STATS CONTAINER - ОДИН РЯД ===== */
.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  justify-content: space-between;
}

/* ===== STAT ITEM WRAPPER ===== */
.stat-item-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  perspective: 1000px;
}

/* ===== STAT ITEM ===== */
.stat-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  width: 100%;
  justify-content: center;
  transform-style: preserve-3d;
  will-change: box-shadow, filter, backdrop-filter;
  backdrop-filter: blur(12px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 40px rgba(102, 126, 234, 0.08);
}

/* Диффузный фон при hover */
.stat-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(102, 126, 234, 0.15),
    transparent 70%
  );
  transform: translate(-50%, -50%);
  transition:
    width 0.6s ease-out,
    height 0.6s ease-out;
  z-index: 0;
  border-radius: 50%;
  filter: blur(20px);
}

.stat-item:hover::before {
  width: 300px;
  height: 300px;
}

/* Световой блик, бегающий вокруг карточки */
.stat-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 15%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.4) 85%,
    transparent 100%
  );
  border-radius: 2rem;
  pointer-events: none;
  z-index: 10;
  animation: shineGlowBorder 6s linear infinite;
  opacity: 0.8;
  -webkit-mask-image: radial-gradient(
    circle at center,
    transparent 0%,
    transparent calc(100% - 3px),
    black calc(100% - 2px),
    black 100%
  );
  mask-image: radial-gradient(
    circle at center,
    transparent 0%,
    transparent calc(100% - 3px),
    black calc(100% - 2px),
    black 100%
  );
}

/* Анимация светового блика по контуру */
@keyframes shineGlowBorder {
  0% {
    transform: translateX(-100%) translateY(0);
    filter: blur(6px);
  }
  25% {
    transform: translateX(0) translateY(-100%);
    filter: blur(6px);
  }
  50% {
    transform: translateX(100%) translateY(0);
    filter: blur(6px);
  }
  75% {
    transform: translateX(0) translateY(100%);
    filter: blur(6px);
  }
  100% {
    transform: translateX(-100%) translateY(0);
    filter: blur(6px);
  }
}

.stat-item:hover::after {
  opacity: 1;
}

.stat-item:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.06)
  );
  border-color: rgba(102, 126, 234, 0.25);
  box-shadow:
    0 16px 48px rgba(102, 126, 234, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 60px rgba(102, 126, 234, 0.15);
  backdrop-filter: blur(16px);
}

/* ===== STAT ICON ===== */
.stat-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.stat-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 1.25rem;
  color: white;
  font-size: 2rem;
  box-shadow:
    0 8px 20px rgba(102, 126, 234, 0.35),
    0 0 30px rgba(102, 126, 234, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.stat-icon::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.3),
    rgba(118, 75, 162, 0.3)
  );
  border-radius: 1.25rem;
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: -1;
  filter: blur(8px);
}

.stat-icon-revenue {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow:
    0 8px 20px rgba(245, 87, 108, 0.35),
    0 0 30px rgba(245, 87, 108, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat-icon-revenue::after {
  background: linear-gradient(
    135deg,
    rgba(240, 147, 251, 0.3),
    rgba(245, 87, 108, 0.3)
  );
}

.stat-icon-users {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow:
    0 8px 20px rgba(79, 172, 254, 0.35),
    0 0 30px rgba(79, 172, 254, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stat-icon-users::after {
  background: linear-gradient(
    135deg,
    rgba(79, 172, 254, 0.3),
    rgba(0, 242, 254, 0.3)
  );
}

.stat-item:hover .stat-icon {
  transform: scale(1.2) rotateY(-15deg) rotateZ(-8deg);
  box-shadow:
    0 16px 40px rgba(102, 126, 234, 0.5),
    0 0 50px rgba(102, 126, 234, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.stat-item:hover .stat-icon::after {
  opacity: 1;
}

/* ===== STAT CONTENT ===== */
.stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 0;
  position: relative;
  z-index: 1;
  text-align: left;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.45s ease;
}

.stat-item:hover .stat-number {
  color: #ffffff;
  text-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.stat-label--accent {
  color: var(--accent-color);
}

.stat-description {
  font-size: 0.85rem;
  color: #d0d4e0;
  font-weight: 400;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: color 0.45s ease;
}

.stat-item:hover .stat-description {
  color: #e8ecf8;
}

/* ===== STAT DIVIDER ===== */
.stat-divider-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.stat-divider {
  width: 1px;
  height: 80px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.1);
  position: relative;
  animation: dividerShine 3s ease-in-out infinite;
}

/* Анимация луча света сверху вниз */
@keyframes dividerShine {
  0% {
    box-shadow:
      0 -20px 30px rgba(102, 126, 234, 0.4),
      0 0 10px rgba(102, 126, 234, 0.1);
  }
  50% {
    box-shadow:
      0 40px 30px rgba(102, 126, 234, 0.4),
      0 0 10px rgba(102, 126, 234, 0.1);
  }
  100% {
    box-shadow:
      0 -20px 30px rgba(102, 126, 234, 0.4),
      0 0 10px rgba(102, 126, 234, 0.1);
  }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
  .stats-container {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .stat-item-wrapper {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 280px;
  }

  .stat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow:
      0 16px 48px rgba(102, 126, 234, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-6px) rotateX(3deg);
  }

  .stat-divider-wrapper {
    display: none;
  }

  .stat-divider {
    display: none;
  }
}

@media (max-width: 768px) {
  .stats-container {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-item-wrapper {
    flex: 1 1 100%;
  }

  .stat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.25rem;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
  }

  .stat-item:hover {
    transform: translateY(-4px) rotateX(2deg);
  }

  .stat-content {
    text-align: center;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  .stat-description {
    font-size: 0.8rem;
  }

  .stat-icon {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 25px 12px;
    margin-bottom: 25px;
  }

  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .search-input-group {
    gap: 8px;
  }

  .search-input {
    padding: 12px 12px 12px 40px;
    font-size: 13px;
    border-radius: 8px;
  }

  .search-icon {
    left: 10px;
    font-size: 14px;
  }

  .search-btn {
    padding: 12px 16px;
    font-size: 13px;
    min-width: 120px;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .item-image {
    height: 140px;
  }

  .item-content {
    padding: 12px;
  }

  .item-title {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }

  .item-rating {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .stars i {
    font-size: 12px;
  }

  .item-price {
    margin-bottom: 10px;
  }

  .price-amount {
    font-size: 1.2rem;
  }

  .price-period {
    font-size: 12px;
  }

  .item-meta {
    font-size: 12px;
    gap: 6px;
    margin-bottom: 12px;
  }

  .item-actions {
    padding: 12px;
    gap: 6px;
  }

  .btn-primary {
    padding: 8px 12px;
    font-size: 12px;
  }

  .share-btn,
  .favorite-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 16px;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .section-header {
    margin-bottom: 16px;
    padding-bottom: 10px;
  }

  .quick-filters {
    gap: 6px;
  }

  .filter-tag {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  .filter-tag i {
    font-size: 0.85rem;
  }

  .hero-stats-block {
    padding: 1.25rem 0.75rem;
    margin-top: 1.25rem;
  }

  .stats-container {
    flex-direction: column;
    gap: 0.875rem;
  }

  .stat-item-wrapper {
    flex: 1 1 100%;
    min-width: unset;
  }

  .stat-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 0.875rem;
    gap: 0.75rem;
    flex-direction: row;
    text-align: left;
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.15);
    transform: translateY(-1px) rotateX(0.3deg);
    box-shadow:
      0 4px 12px rgba(102, 126, 234, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
      135deg,
      rgba(102, 126, 234, 0.2),
      rgba(240, 147, 251, 0.2)
    );
    transition: all 0.3s ease;
  }

  .stat-item:hover .stat-icon {
    transform: scale(1.1) rotateY(-8deg);
    background: linear-gradient(
      135deg,
      rgba(102, 126, 234, 0.3),
      rgba(240, 147, 251, 0.3)
    );
  }

  .stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
  }

  .stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
  }

  .stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
  }

  .stat-description {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    display: none;
  }

  .stat-divider-wrapper {
    display: none;
  }

  .loading-state {
    padding: 40px 15px;
  }

  .loading-spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
  }

  .loading-text {
    font-size: 1rem;
  }

  .empty-state {
    padding: 40px 15px;
  }

  .empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
  }

  .empty-state h5 {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .empty-state p {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .error-state {
    padding: 40px 15px;
  }

  .error-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
  }

  .error-state h5 {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .error-state p {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .view-all-link {
    font-size: 0.9rem;
  }

  .item-owner span {
    max-width: 80px;
    font-size: 0.75rem;
  }

  .item-owner-avatar,
  .avatar-placeholder-small {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
    border-width: 1px;
  }
}
@media (max-width: 360px) {
  .hero-section {
    padding: 20px 10px;
    margin-bottom: 20px;
  }

  .hero-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 18px;
  }

  .search-input-group {
    gap: 6px;
  }

  .search-input {
    padding: 10px 10px 10px 36px;
    font-size: 12px;
    border-radius: 6px;
  }

  .search-icon {
    left: 8px;
    font-size: 12px;
  }

  .search-btn {
    padding: 10px 12px;
    font-size: 12px;
    min-width: 100px;
  }

  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }

  .item-image {
    height: 120px;
  }

  .item-content {
    padding: 10px;
  }

  .item-title {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .item-rating {
    font-size: 11px;
    margin-bottom: 6px;
  }

  .stars i {
    font-size: 10px;
  }

  .item-price {
    margin-bottom: 8px;
  }

  .price-amount {
    font-size: 1.1rem;
  }

  .price-period {
    font-size: 10px;
  }

  .item-meta {
    font-size: 10px;
    gap: 4px;
    margin-bottom: 8px;
  }

  .item-actions {
    padding: 10px;
    gap: 4px;
  }

  .btn-primary {
    padding: 6px 10px;
    font-size: 11px;
  }

  .share-btn,
  .favorite-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 14px;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .section-header {
    margin-bottom: 14px;
    padding-bottom: 8px;
  }

  .quick-filters {
    gap: 4px;
  }

  .filter-tag {
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
  }

  .filter-tag i {
    font-size: 0.8rem;
  }

  .hero-stats-block {
    padding: 1rem 0.6rem;
    margin-top: 1rem;
  }

  .stats-container {
    gap: 0.75rem;
  }

  .stat-item {
    padding: 0.75rem;
    gap: 0.6rem;
    border-radius: 0.625rem;
    box-shadow:
      0 1px 4px rgba(0, 0, 0, 0.04),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .stat-item:hover {
    transform: translateY(-0.5px) rotateX(0.2deg);
    box-shadow:
      0 2px 6px rgba(102, 126, 234, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    border-radius: 0.625rem;
  }

  .stat-item:hover .stat-icon {
    transform: scale(1.08) rotateY(-6deg);
  }

  .stat-number {
    font-size: 1.35rem;
    font-weight: 800;
  }

  .stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.02em;
  }

  .stat-description {
    display: none;
  }

  .loading-state {
    padding: 30px 10px;
  }

  .loading-spinner {
    width: 28px;
    height: 28px;
    border-width: 2px;
    margin-bottom: 16px;
  }

  .loading-text {
    font-size: 0.95rem;
  }

  .empty-state {
    padding: 30px 10px;
  }

  .empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
  }

  .empty-state h5 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .empty-state p {
    font-size: 0.95rem;
    margin-bottom: 16px;
  }

  .error-state {
    padding: 30px 10px;
  }

  .error-state-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
  }

  .error-state h5 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .error-state p {
    font-size: 0.95rem;
    margin-bottom: 16px;
  }

  .view-all-link {
    font-size: 0.85rem;
  }

  .item-owner span {
    max-width: 70px;
    font-size: 0.7rem;
  }

  .item-owner-avatar,
  .avatar-placeholder-small {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
    border-width: 1px;
  }

  .item-owner:hover .item-owner-avatar,
  .item-owner:hover .avatar-placeholder-small {
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
  }
}

/* ============================================
   ПЕЧАТЬ (PRINT STYLES)
   ============================================ */

@media print {
  body {
    background: white;
  }

  .hero-section,
  .search-input-group,
  .quick-filters,
  .hero-stats-block,
  .share-btn,
  .favorite-btn,
  .btn-primary {
    display: none;
  }

  .items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .item-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .item-image {
    height: 200px;
  }

  .section-title {
    page-break-after: avoid;
  }
}

/* ============================================
   ВЫСОКИЙ КОНТРАСТ (HIGH CONTRAST MODE)
   ============================================ */

@media (prefers-contrast: more) {
  .item-card {
    border-width: 2px;
    border-color: #000;
  }

  .btn-primary {
    border: 2px solid #000;
    font-weight: 700;
  }

  .filter-tag {
    border-width: 2px;
  }

  .stat-item {
    border-width: 2px;
  }
}

/* ============================================
   ТЕМНЫЙ РЕЖИМ (DARK MODE)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Тёмная тема главной — переопределение только в контексте home (style.css приоритет) */
  :root {
    --home-dark-bg: #0f0f0f;
    --home-dark-bg-secondary: #1a1a1a;
    --home-dark-text: #ffffff;
    --home-dark-text-secondary: #b0b0b0;
    --home-dark-border: #333333;
  }

  .hero-section {
    background-color: var(--home-dark-bg);
  }

  body {
    background-color: var(--home-dark-bg);
    color: var(--home-dark-text);
  }

  .item-card {
    background: var(--home-dark-bg-secondary);
    border-color: var(--home-dark-border);
  }

  .item-title {
    color: var(--home-dark-text);
  }

  .item-link {
    color: var(--home-dark-text);
  }

  .item-link:hover {
    color: var(--primary-light, #667eea);
  }

  .item-meta,
  .review-count {
    color: var(--home-dark-text-secondary);
  }

  .item-content {
    background: var(--home-dark-bg-secondary);
  }

  .item-actions {
    background: rgba(255, 255, 255, 0.03);
    border-top-color: var(--home-dark-border);
  }

  .search-input {
    background: var(--home-dark-bg-secondary);
    color: var(--home-dark-text);
    border-color: var(--home-dark-border);
  }

  .search-input::placeholder {
    color: var(--home-dark-text-secondary);
  }

  .filter-tag {
    background: var(--home-dark-bg-secondary);
    color: var(--home-dark-text);
    border-color: var(--home-dark-border);
  }

  .filter-tag:hover {
    background: rgba(102, 126, 234, 0.15);
  }

  .stat-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
  }

  .empty-state h5,
  .error-state h5 {
    color: var(--home-dark-text);
  }

  .empty-state p,
  .error-state p {
    color: var(--home-dark-text-secondary);
  }

  .section-title {
    color: var(--home-dark-text);
  }

  .hero-title {
    color: var(--home-dark-text);
  }

  .hero-subtitle {
    color: var(--home-dark-text-secondary);
  }
}

/* ============================================
   РЕЖИМ ЭКОНОМИИ БАТАРЕИ (REDUCED MOTION)
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .item-card {
    animation: none;
  }

  .favorite-btn.favorite-animate {
    animation: none;
  }

  .loading-spinner {
    animation: none;
    border-top-color: #667eea;
  }
}

/* ===== КАРУСЕЛЬ ВИТРИН (3D) ===== */
.showcases-carousel-section {
  margin: 3rem 0;
  padding: 2rem 0;
}

.showcases-carousel-section .section-title i {
  color: var(--primary-color);
}

.showcases-carousel-3d {
  position: relative;
  padding: 0 3rem;
  perspective: 1200px;
}

.showcases-carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.showcases-carousel-track {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.showcases-carousel-track::-webkit-scrollbar {
  display: none;
}

.showcase-carousel-card {
  flex: 0 0 280px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transform-style: preserve-3d;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.showcase-carousel-card:hover {
  transform: translateZ(12px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.showcase-carousel-card .favorite-showcase-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.showcase-carousel-card .favorite-showcase-banner {
  max-height: 140px;
}

.showcases-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.showcases-carousel-btn:hover {
  background: var(--primary-color);
  color: var(--text-white);
  border-color: var(--primary-color);
}

.showcases-carousel-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.35);
}

.showcases-carousel-btn--prev {
  left: 0.5rem;
}

.showcases-carousel-btn--next {
  right: 0.5rem;
}

/* 3D появление карточек при прокрутке (через JS добавляется класс) */
.showcase-carousel-card.carousel-visible {
  animation: showcaseCardReveal 0.5s ease-out forwards;
}

@keyframes showcaseCardReveal {
  from {
    opacity: 0.6;
    transform: rotateY(-18deg) translateZ(-40px);
  }
  to {
    opacity: 1;
    transform: rotateY(0) translateZ(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcases-carousel-track {
    scroll-behavior: auto;
  }
  .showcase-carousel-card.carousel-visible {
    animation: none;
  }
  .showcase-carousel-card:hover {
    transform: none;
  }
}
