/* ===== КАТАЛОГ: Разметка, карточки и фильтры ===== */

/* ===== Основной контейнер ===== */
.catalog-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 3rem;
  margin-top: 1rem;
}

/* Левая колонка — фильтры (десктоп) */
.react-filters {
  width: 260px;
  flex-shrink: 0;
  background: #faf5ef;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

/* Правая часть — карточки */
.catalog {
  flex: 1;
}

/* ===== Сетка карточек ===== */
.lot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

/* ===== Карточки ===== */
.lot-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 290px;
  height: 540px;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.lot-card:hover {
  transform: translateY(-5px);
}

/* Изображение карточки */
.lot-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

/* Метка категории */
.lot-image-wrapper {
  position: relative; /* контекст для метки категории */
  flex-shrink: 0;
}

.lot-category {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

/* Контент карточки */
.lot-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 12px 0;
}
.lot-card h3 {
  margin: 0.6rem 0 0.3rem;
  padding: 0 5px;
  font-size: 1rem;
  height: 55px;
  line-clamp: 3;
  -webkit-line-clamp: 3;
}
.price {
  font-weight: bold;
  color: #a07338;
  font-size: 19px;
  margin-top: 0.4rem;
}

/* Кнопка корзины */
.btn-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 85%;
  margin: 0 auto 10px;
  padding: 0.6rem 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #b6894b, #d2aa67);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}
.btn-cart:hover {
  background: linear-gradient(90deg, #d2aa67, #b6894b);
  transform: translateY(-2px);
}
.btn-cart:active {
  transform: scale(0.97);
}

/* ===== ФИЛЬТРЫ ===== */
.filter-block {
  margin-bottom: 1.8rem;
}
.filter-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: #4a3b24;
}
.search-wrapper {
  position: relative;
  width: 90%;
}
#searchInput {
  width: 100%;
  /* margin-left:20px; */
  /* padding: 0.5rem 2rem 0.5rem 0.8rem; */
  padding: 10px;
  /* margin:10px; */
  border: 1px solid #d3c7b5;
  border-radius: 8px;
  font-family: inherit;
  transition: all 0.2s ease;
}
#searchInput:focus {
  outline: none;
  border-color: #b6894b;
  box-shadow: 0 0 0 2px rgba(182, 137, 75, 0.2);
}
#clearSearch {
  position: absolute;
  right: -1rem;
  top: 45%;
  transform: translateY(-45%);
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: #b6894b;
  cursor: pointer;
  opacity: 0.7;
  transition: 0.2s;
}
#clearSearch:hover {
  opacity: 1;
  color: #d2aa67;
  font-weight: 700;
}

/* Радиокнопки, диапазон цен */
.radio-group label {
  display: block;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.2s;
}
.radio-group input {
  accent-color: #b6894b;
  margin-right: 0.4rem;
}
.radio-group label:hover {
  background: rgba(182, 137, 75, 0.1);
}

.price-range input[type="range"] {
  width: 100%;
  margin: 0.5rem 0;
  -webkit-appearance: none;
  height: 4px;
  background: #d9cdbb;
  border-radius: 5px;
  outline: none;
}
.price-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #b6894b;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}
.price-range input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.price-values {
  text-align: center;
  font-size: 0.9rem;
  color: #6d5b3f;
  margin-top: 0.3rem;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 900px) {
  .catalog {
    width: 100%;
  }
  .catalog-layout {
    flex-direction: column;
    padding: 1rem 1.2rem;
    gap: 1.2rem;
  }

  /* Фильтры сверху */
  .react-filters {
    position: static;
    width: 100%;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 10px;
  }

  .filter-block {
    background: #fff;
    padding: 0.8rem 1rem;
    border: 1px solid #e0d8c8;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .filter-block .filter-title {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
  }

  .filter-dropdown-btn {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    background: #eadfcd;
    border: 1px solid #c7b08f;
    border-radius: 6px;
    cursor: pointer;
    display: none; /* скрыта по умолчанию (ПК) */
    justify-content: space-between;
    align-items: center;
  }

  .filter-price-content {
    margin-top: 0.6rem;
  }

  /* карточки */
  .lot-grid {
    /* grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem; */
    justify-content: center; /* выравнивает весь ряд по центру */
    justify-items: center; /* выравнивает сами карточки в ячейках */
  }

  /* .lot-card {
    width: 100%;
    height: auto;
  }

  .lot-card img {
    height: 180px;
  } */
}

@media (max-width: 400px) {
  .lot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .lot-card {
    width: 100%;
    height: auto;
  }

  .lot-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .react-filters {
    gap: 0.8rem;
  }

  .filter-block {
    padding: 0.6rem 0.8rem;
  }
}
