.products-body {
  overflow-x: clip;
}

.products-body .page {
  overflow: visible;
}

.products-page {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - 90px);
  background:
    linear-gradient(90deg, rgba(250, 246, 239, 0.98), rgba(255, 253, 248, 0.82)),
    var(--page-bg);
}

.filters-panel {
  position: sticky;
  top: 90px;
  height: calc(100vh - 90px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 24px 20px 28px 28px;
  background: rgba(251, 247, 240, 0.96);
  scrollbar-color: #c5aa8d transparent;
  scrollbar-width: thin;
}

.filters-panel::-webkit-scrollbar {
  width: 7px;
}

.filters-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c5aa8d;
}

.filters-panel h1 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.catalog-intro {
  margin: -2px 0 16px;
  color: #78665c;
  font-size: 13px;
  line-height: 1.65;
}

.filter-search {
  display: grid;
  grid-template-columns: 1fr 20px;
  align-items: center;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px 0 13px;
  background: rgba(255, 253, 248, 0.9);
  color: #4f3b35;
}

.filter-search .icon {
  width: 19px;
  height: 19px;
}

.filter-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.filter-search input::placeholder {
  color: #8a7668;
}

.filter-section {
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 0 13px;
}

.filter-section--collapsed {
  padding: 14px 0;
}

.filter-heading {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border: 0;
  padding: 0;
  background: transparent;
  color: #3b2823;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.filter-heading span {
  color: var(--wine);
  font-size: 17px;
  line-height: 1;
}

.filter-list {
  display: grid;
  gap: 1px;
  margin-top: 9px;
}

.filter-row {
  position: relative;
  display: flex;
  height: 29px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 5px;
  padding: 0 8px 0 12px;
  background: transparent;
  color: #5d473f;
  font-size: 14px;
}

.filter-row.is-active {
  background: #e9dfd2;
  color: #321f1c;
}

.filter-row.is-active::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--wine);
  transform: translateY(-50%);
}

.filter-row small {
  font-size: 12px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.filter-chips button {
  min-width: 70px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  background: rgba(255, 253, 248, 0.84);
  color: #4b3731;
  font-size: 13px;
}

.filter-chips--prices button {
  width: calc(50% - 4px);
  min-width: 0;
  padding: 0 5px;
  font-size: 12px;
}

.filter-chips button.is-active {
  border-color: var(--wine);
  background: linear-gradient(180deg, #8e0816, #6e030d);
  color: #fff;
}

.filter-actions {
  position: sticky;
  bottom: -28px;
  display: grid;
  padding: 15px 0 4px;
  background: linear-gradient(180deg, rgba(251, 247, 240, 0), #fbf7f0 28%);
}

.filter-actions .btn {
  width: 100%;
  height: 38px;
  border-radius: 7px;
  font-size: 14px;
}

.filter-clear {
  background: rgba(255, 253, 248, 0.94);
  color: #6b302e;
}

.filter-clear .icon {
  width: 18px;
  height: 18px;
}

.products-content {
  min-width: 0;
  padding: 26px 30px 42px;
}

.listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.listing-title {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 16px;
}

.listing-title h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.result-count {
  color: #67514a;
  font-size: 13px;
  white-space: nowrap;
}

.sort-select {
  display: inline-flex;
  min-width: 190px;
  height: 36px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px 0 14px;
  background: rgba(255, 253, 248, 0.88);
  color: #4a332e;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 22px 20px;
}

.listing-card {
  position: relative;
  display: grid;
  grid-template-columns: 46% 54%;
  grid-template-rows: 258px 46px;
  height: 304px;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.listing-card:hover {
  border-color: #c49f75;
  box-shadow: 0 14px 30px rgba(92, 52, 22, 0.12);
  transform: translateY(-2px);
}

.listing-card__link {
  position: absolute;
  z-index: 1;
  inset: 0;
}

.listing-card[hidden] {
  display: none;
}

.listing-card__media {
  min-height: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.listing-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.listing-card__body {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 22px 12px 10px 14px;
}

.listing-card__body h2 {
  margin: 0 0 9px;
  font-size: 16px;
  line-height: 1.38;
  font-weight: 800;
}

.listing-card__body p {
  margin: 0;
  color: #4f3b35;
  font-size: 13px;
  line-height: 1.58;
}

.listing-price {
  margin-top: auto;
  color: var(--wine);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.listing-price span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.listing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.listing-tags span {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 7px;
  background: rgba(255, 253, 248, 0.76);
  color: #8a5d2c;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.listing-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 7px;
  align-items: center;
  border-top: 1px solid rgba(235, 222, 206, 0.82);
  padding: 6px 9px 8px;
}

.card-detail-action {
  min-width: 0;
  height: 32px;
  border-color: var(--wine);
  padding: 0 16px;
  background: rgba(255, 253, 248, 0.88);
  color: #5f191d;
  font-size: 13px;
}

.card-detail-action .icon {
  width: 18px;
  height: 18px;
}

.favorite-action {
  display: inline-flex;
  width: 34px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.88);
  color: var(--gold-deep);
}

.favorite-action .icon {
  width: 17px;
  height: 17px;
}

.listing-empty {
  display: grid;
  min-height: 280px;
  place-content: center;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: #6f5b52;
  text-align: center;
}

.listing-empty[hidden] {
  display: none;
}

.listing-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  margin-top: 26px;
  color: #261815;
  font-size: 15px;
}

.pagination[hidden] {
  display: none;
}

.pagination a,
.pagination button {
  display: inline-flex;
  width: 33px;
  height: 33px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font-weight: 800;
}

.pagination a.is-active {
  background: linear-gradient(180deg, #870714, #69030d);
  color: #fff;
}

.pagination button .icon {
  width: 20px;
  height: 20px;
}

@media (max-width: 1399px) {
  .products-page {
    grid-template-columns: 276px minmax(0, 1fr);
  }

  .filters-panel {
    padding-right: 17px;
    padding-left: 22px;
  }

  .products-content {
    padding-right: 26px;
    padding-left: 26px;
  }

  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1700px) {
  .listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
