.category-page {
  max-width: 1467px;
  margin: 0 auto;
  padding: 20px 0;
}

.category-header {
  text-align: center;
  margin: 0 0 20px 250px;
}

.category-main {
  display: flex;
  gap: 30px;
}

.category-title {
  font-size: 2em;
  font-family: Gilroy, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 10px 0;
}

.category-count {
  font-size: 16px;
  color: #666;
  font-weight: 400;
  text-align: center;
}

.content-area {
  flex: 1;
  min-width: 0;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.toolbar__sort {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.toolbar__sort label {
  font-size: 14px;
  color: #666;
}

.custom-select {
  position: relative;
  display: inline-block;
  min-width: 200px;
}

.custom-select__trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  gap: 10px;
}

.custom-select__trigger span:first-child {
  flex: 1;
}

.custom-select__trigger .arrow {
  transition: transform 0.2s;
}

.custom-select.open .custom-select__trigger .arrow {
  transform: rotate(180deg);
}

.custom-select__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 5px;
  z-index: 100;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.custom-select.open .custom-select__dropdown {
  display: block;
}

.custom-select__option {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.custom-select__option:hover {
  background: #f5f5f5;
}

.custom-select__option.selected {
  background: #1fcfcb;
}

.products-area {
  position: relative;
  min-height: 300px;
}

.products-area.is-loading .products-grid {
  opacity: 0.35;
  pointer-events: none;
}

.catalog-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.45);
}

.products-area.is-loading .catalog-loader {
  display: flex;
}

.catalog-loader__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #ddd;
  border-top-color: #1fcfcb;
  border-radius: 50%;
  animation: catalogSpin 0.8s linear infinite;
}

@keyframes catalogSpin {
  to {
    transform: rotate(360deg);
  }
}

.products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
}

.product-card {
  width: calc(33.333% - 17px);
  min-width: 280px;
  background: #fff;
  border-radius: 11.63px;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.product-card__media {
  padding: 30px 39px 25px 39px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: opacity 0.3s ease;
}

.product-card__main-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.product-card__hover-img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
  width: auto;
  max-width: 100%;
  max-height: 100%;
}

.product-card.no-hover:hover .product-card__main-img {
  opacity: 1;
}

.product-card:hover .product-card__main-img {
  opacity: 0;
}

.product-card:hover .product-card__hover-img {
  opacity: 1;
}

.product-card__meta {
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.product-card__reviews {
  display: flex;
  align-items: center;
  min-height: 20px;
}

.cs-rev {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.cs-rev__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.cs-rev__star {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.cs-rev__star--full {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23339999'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21L12 17.77L5.82 21L7 14.14L2 9.27L8.91 8.26L12 2Z' stroke='none'/%3E%3C/svg%3E");
}

.cs-rev__star--empty {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c7c7c7'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21L12 17.77L5.82 21L7 14.14L2 9.27L8.91 8.26L12 2Z' stroke='none'/%3E%3C/svg%3E");
}

.cs-rev__star--half {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21L12 17.77L5.82 21L7 14.14L2 9.27L8.91 8.26L12 2Z' fill='%23c7c7c7'/%3E%3Cpath d='M12 2L12 17.77L5.82 21L7 14.14L2 9.27L8.91 8.26L12 2Z' fill='%23339999'/%3E%3C/svg%3E");
}

.cs-rev__rating {
  font-weight: 700;
  color: #000;
}

.cs-rev__count {
  color: #c7c7c7;
  font-weight: 600;
}

.product-card__title {
  text-align: left;
  font-weight: 700;
  font-size: 20px;
  line-height: 110%;
  color: #000;
  margin: 0 0 10px 0;
  min-height: 44px;
}

.product-card__price {
  margin-top: auto;
  font-weight: 700;
  font-size: 20px;
  text-align: left;
  color: #000;
}

.no-products {
  max-width: 400px;
  text-align: center;
  padding: 50px;
  width: 100%;
}

.no-products_title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #000000;
}

.no-products_hint {
  font-size: 14px;
  color: #999;
}

.breadcrumbs_wrapper {
  padding: 0px 20px;
}

.breadcrumbs_wrapper .container {
  max-width: 1467px;
  margin: 0 auto;
  padding: 0 15px;
}

.breadcrumbs_wrapper a {
  color: #666;
  text-decoration: none;
}

.breadcrumbs_wrapper a:hover {
  text-decoration: underline;
}

.breadcrumbs_wrapper .fa {
  margin: 0 8px;
  color: #999;
  font-size: 12px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: all 0.2s;
}

.pagination__item:hover {
  background: #f5f5f5;
  border-color: #999;
}

.pagination__item.active {
  background: #1fcfcb;
  border-color: #1fcfcb;
  color: white;
}

.pagination__item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.pagination__arrow {
  font-size: 18px;
  font-weight: bold;
}

/* Фильтры */

.filters-sidebar {
  flex: 0 0 250px;
  background: #f4f6f8;
  padding: 20px;
  border-radius: 8px;
  height: fit-content;
}

.filters-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.price-filter {
  margin-top: 15px;
}

.price-filter__label {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 14px;
}

.price-filter__inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.price-filter__field {
  flex: 1;
  position: relative;
}

.price-filter__currency {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #999;
  pointer-events: none;
}

.price-filter__input {
  width: 100%;
  padding: 8px 8px 8px 25px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  -webkit-appearance: textfield;
  appearance: textfield;
}

.price-filter__input::-webkit-inner-spin-button,
.price-filter__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-filter__input:focus {
  outline: none;
  border-color: #1fcfcb;
}

.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #999;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.clear-btn:hover {
  background: #e0e0e0;
  color: #333;
}

.price-filter__input:placeholder-shown + .clear-btn {
  display: none;
}

.price-filter__reset {
  width: 100%;
  padding: 8px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.price-filter__reset:hover {
  background: #e0e0e0;
}

/* Фильтры характеристик */
.spec-filter {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.spec-filter__label {
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 14px;
  color: #333;
  display: block;
}

.spec-filter__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.spec-filter__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  padding: 4px 10px 4px 0px;
  transition: color 0.2s;
}

.spec-filter__option:hover {
  color: #1fcfcb;
}

.spec-filter__option input {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.spec-filter__option span:first-of-type {
  flex: 1;
}

.spec-filter__count {
  font-size: 11px;
  color: #999;
  margin-left: 8px;
}

.price-filter__reset {
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  margin-top: 10px;
}

.price-filter__reset:hover {
  background: #1fcfcb;
  border-color: #1fcfcb;
  color: white;
}

.loading {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 769px) {
  .category-page {
    padding: 20px;
  }

  .category-header {
    text-align: center;
    margin: 0 0 20px 0px;
  }
  .breadcrumbs_wrapper {
    margin-top: 60px;
    position: relative;
    z-index: 1;
    background: white;
  }

  .category-main {
    flex-direction: column;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .products-grid {
    gap: 15px;
    justify-content: center;
  }

  .product-card {
    width: calc(50% - 15px);
    min-width: 200px;
  }

  .product-card__media {
    padding: 15px 20px;
  }

  .product-card__title {
    font-size: 16px;
    min-height: 36px;
  }

  .product-card__price {
    font-size: 18px;
  }

  .category-title {
    font-size: 20px;
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  .product-card {
    width: 100%;
    max-width: 300px;
  }
}
