/* Ten plik dotyczy wyłącznie ekranu listy produktów.
   Nie zmienia wcześniejszej strony index.html. */

.catalog-page {
  --catalog-gap: 15px;
}

.catalog-main {
  padding-bottom: 54px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: -2px;
  color: #242424;
  font-size: 10px;
}

.breadcrumbs a {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs > a:first-child {
  width: 14px;
  height: 14px;
}

.breadcrumbs svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.breadcrumb-separator {
  width: 9px !important;
  height: 9px !important;
  color: #777777;
}

.catalog-title {
  margin: 11px 0 16px;
  text-align: center;
  font-size: 25px;
  line-height: 1.1;
}

.catalog-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 14px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-group > strong {
  margin-right: 13px;
  font-size: 14px;
}

.catalog-select {
  position: relative;
  display: block;
}

.catalog-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 6px;
  height: 6px;
  border-right: 1px solid #555f66;
  border-bottom: 1px solid #555f66;
  pointer-events: none;
  transform: translateY(-72%) rotate(45deg);
}

.catalog-select select {
  min-width: 94px;
  height: 30px;
  padding: 0 30px 0 13px;
  border: 1px solid #9e9e9e;
  border-radius: 2px;
  outline: 0;
  background: #ffffff;
  color: #383838;
  font-size: 10px;
  appearance: none;
  cursor: pointer;
}

.catalog-select select:focus {
  border-color: #1d96ff;
  box-shadow: 0 0 0 1px #1d96ff;
}

.sorting-select select {
  min-width: 109px;
}

.clear-filters {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: var(--surface);
  color: #333333;
  font-size: 10px;
}

.catalog-status {
  min-height: 14px;
  margin: -10px 0 8px;
  color: var(--muted-text);
  text-align: right;
  font-size: 10px;
}

.catalog-products {
  min-height: 500px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--catalog-gap);
}

.catalog-product-card {
  border-radius: 7px;
}

.catalog-product-card .product-image {
  aspect-ratio: 1.28 / 1;
}

.catalog-product-card .product-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.catalog-product-card .favorite-button {
  z-index: 2;
}

.catalog-product-card .product-info {
  min-height: 102px;
  padding: 14px 14px 12px;
}

.catalog-product-card .product-info h2 {
  margin-bottom: 6px;
}

.catalog-product-card .product-bottom strong {
  font-size: 17px;
}

.catalog-product-card .product-link,
.catalog-product-card .product-name-link {
  outline: 0;
}

.catalog-product-card .product-link:focus-visible,
.catalog-product-card .product-name-link:focus-visible {
  box-shadow: inset 0 0 0 2px #1d96ff;
}

.catalog-product-card.is-favorite .favorite-button {
  color: #111111;
}

.catalog-product-card.is-favorite .favorite-button svg {
  fill: currentColor;
}

.catalog-product-card.is-added .bag-button {
  color: #111111;
  transform: scale(1.15);
}

.catalog-promo {
  min-height: 244px;
  display: flex;
  align-items: center;
  margin: 15px 0;
  padding: 50px 190px;
  border-radius: var(--radius);
  background: var(--surface);
}

.catalog-promo h2 {
  margin: 0 0 22px;
  font-size: 31px;
}

.catalog-promo .button {
  min-width: 172px;
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state h2 {
  margin: 0 0 10px;
}

.empty-state p {
  margin: 0 0 22px;
  color: var(--muted-text);
}

.empty-state button {
  min-width: 150px;
  height: 36px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-medium);
}

.pagination {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 25px;
}

.pagination button {
  min-width: 13px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: #7b7b7b;
  font-size: 10px;
}

.pagination button:hover,
.pagination button:focus-visible {
  color: #111111;
  text-decoration: underline;
}

.pagination button[aria-current="page"] {
  color: #111111;
  font-weight: 700;
}

.pagination .pagination-ellipsis {
  color: #929292;
  font-size: 10px;
}

.header-actions .icon-button {
  position: relative;
}

.header-counter {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  padding: 0 3px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 8px;
  line-height: 1;
}

.catalog-page .site-footer {
  margin-top: 0;
}

@media (max-width: 900px) {
  .catalog-title {
    margin-top: 18px;
  }

  .catalog-toolbar {
    align-items: flex-start;
  }

  .filter-group {
    flex-wrap: wrap;
  }

  .catalog-promo {
    padding-inline: 90px;
  }
}

@media (max-width: 800px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-toolbar {
    flex-direction: column;
  }

  .sorting-select {
    align-self: flex-end;
  }

  .catalog-promo {
    min-height: 210px;
    padding: 45px;
  }
}

@media (max-width: 520px) {
  .catalog-main {
    padding-top: 8px;
  }

  .catalog-title {
    font-size: 23px;
  }

  .filter-group {
    width: 100%;
    gap: 8px;
  }

  .filter-group > strong {
    width: 100%;
    margin: 0 0 3px;
  }

  .catalog-select {
    flex: 1 1 calc(50% - 8px);
  }

  .catalog-select select {
    width: 100%;
    min-width: 0;
  }

  .sorting-select {
    width: 100%;
  }

  .sorting-select select {
    width: 100%;
  }

  .clear-filters {
    flex: 1 1 100%;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-promo {
    min-height: 190px;
    padding: 35px 25px;
  }

  .catalog-promo h2 {
    font-size: 27px;
  }
}
