/* =============== КАТАЛОГ ТОВАРОВ =============== */

/* Общие настройки */
* {
  box-sizing: border-box;
}

/* Контент */
.catalog-content {
  width: 92%;
  max-width: 1250px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Строка поиска */
.search-section {
  margin-bottom: 2rem;
}

.search-form {
  display: flex;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px 0 0 10px;
  border: 1px solid #242424;
  border-right: none;
  background: #0d0d0d;
  color: #fff;
  outline: none;
  font-size: 15px;
  transition: .2s;
}

.search-input:focus {
  border-color: #00c3ff;
}

.search-btn {
  padding: 12px 20px;
  background: #00c3ff;
  border: none;
  border-radius: 0 10px 10px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #000;
  transition: .2s;
}

.search-btn:hover {
  filter: brightness(0.92);
}

/* Заголовки секций */
.section-title {
  font-size: 22px;
  color: #00c3ff;
  margin: 0 0 1.5rem 0;
  font-weight: 700;
}

/* Рекомендации */
.recommendations {
  margin-bottom: 3rem;
}

.recommendations-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-behavior: smooth;
}

.recommendations-scroll::-webkit-scrollbar {
  height: 8px;
}

.recommendations-scroll::-webkit-scrollbar-track {
  background: #1d1d1d;
  border-radius: 10px;
}

.recommendations-scroll::-webkit-scrollbar-thumb {
  background: #00c3ff;
  border-radius: 10px;
}

/* Карточка товара */
.product-card {
  background: #131313;
  border: 1px solid #1d1d1d;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: #00c3ff;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 195, 255, 0.15);
}

/* Отступ для кнопки снизу карточки */
.product-card .product-btn {
  margin-top: auto;
}

/* Рекомендованная карточка */
.product-card-recommended {
  min-width: 240px;
  max-width: 240px;
}

/* Иконка товара */
.product-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 2px solid #242424;
  transition: .3s;
}

.product-card:hover .product-icon {
  border-color: #00c3ff;
  transform: scale(1.05);
}

/* Заголовок товара */
.product-title {
  font-size: 16px;
  font-weight: 700;
  color: #00c3ff;
  margin-bottom: 0.5rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Описание */
.product-desc {
  font-size: 13px;
  color: #a9a9a9;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  min-height: 36px;
}

/* Метаданные */
.product-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 0.5rem;
}

/* Цена */
.product-price {
  font-size: 20px;
  font-weight: 700;
  color: #00c3ff;
  margin: 1rem 0;
}

/* Кнопка */
.product-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: #00c3ff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #000;
  text-decoration: none;
  transition: .2s;
  text-align: center;
  box-sizing: border-box;
}

.product-btn:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 195, 255, 0.3);
}

/* Сетка товаров */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* Пустое состояние */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 1rem;
}

.empty-state-text {
  font-size: 18px;
  color: #c8c8c8;
  margin-bottom: 0.5rem;
}

.empty-state-subtext {
  font-size: 14px;
  color: #888;
}

/* Бейдж "Рекомендуем" */
.badge-recommended {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #00c3ff;
  color: #000;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Адаптивность */
@media (max-width: 768px) {
  .catalog-content {
    width: 95%;
    padding: 1rem 0;
  }

  .section-title {
    font-size: 18px;
    margin-bottom: 1rem;
  }

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

  .product-card {
    padding: 1rem;
    border-radius: 12px;
  }

  .product-icon {
    width: 65px;
    height: 65px;
  }

  .product-title {
    font-size: 14px;
    min-height: 32px;
  }

  .product-desc {
    font-size: 12px;
    min-height: 32px;
  }

  .product-meta {
    font-size: 12px;
  }

  .product-price {
    font-size: 17px;
    margin: 0.75rem 0;
  }

  .product-btn {
    padding: 9px 14px;
    font-size: 13px;
  }

  .search-input {
    padding: 11px 12px;
    font-size: 14px;
  }
  
  .search-btn {
    padding: 11px 16px;
    font-size: 14px;
  }

  .recommendations-scroll {
    gap: 0.75rem;
  }

  .product-card-recommended {
    min-width: 180px;
    max-width: 180px;
    padding: 1rem;
  }

  .badge-recommended {
    padding: 3px 6px;
    font-size: 10px;
  }

  /* Скрываем скроллбар на мобильных */
  .recommendations-scroll {
    scrollbar-width: none;
  }

  .recommendations-scroll::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  .catalog-content {
    width: 100%;
    padding: 1rem;
  }

  .search-section {
    margin-bottom: 1.5rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .search-form {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-input {
    border-radius: 10px;
    border: 1px solid #242424;
    width: 100%;
  }

  .search-btn {
    border-radius: 10px;
    width: 100%;
    padding: 12px;
  }

  .product-card-recommended {
    min-width: 150px;
    max-width: 150px;
  }

  .product-card {
    padding: 1rem;
    /* Touch-friendly */
    -webkit-tap-highlight-color: transparent;
  }

  .product-card:active {
    transform: scale(0.98);
  }

  .product-icon {
    width: 70px;
    height: 70px;
  }

  .product-title {
    font-size: 15px;
    min-height: auto;
  }

  .product-desc {
    font-size: 13px;
    min-height: auto;
  }

  .product-price {
    font-size: 18px;
  }

  .product-btn {
    padding: 13px 16px;
    font-size: 14px;
    /* Увеличенная область нажатия для пальца */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .product-btn:active {
    transform: scale(0.96);
  }

  .section-title {
    font-size: 18px;
  }

  .empty-state {
    padding: 2rem 1rem;
  }

  .empty-state-icon {
    font-size: 36px;
  }

  .empty-state-text {
    font-size: 16px;
  }

  /* Адаптация навигации для мобильных */
  .nav-inner {
    flex-direction: column;
    gap: 12px;
  }

  .nav-right {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    font-size: 14px;
  }

  .nav-btn {
    padding: 7px 12px;
    font-size: 13px;
    min-height: 36px;
  }
  
  /* Плавная прокрутка */
  .recommendations-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  
  .product-card-recommended {
    scroll-snap-align: start;
  }
}

