:root {
  --pf-catalog-ink: #151515;
  --pf-catalog-muted: #777777;
  --pf-catalog-line: rgba(62, 60, 60, 0.14);
  --pf-catalog-cream: #f2e6c9;
  --pf-catalog-red: #bc2722;
  --pf-catalog-white: #ffffff;
}

.pf-category-page *,
.pf-category-page *::before,
.pf-category-page *::after {
  box-sizing: border-box;
}

.pf-category-page {
  min-height: 100vh;
  background: var(--pf-catalog-white);
  color: var(--pf-catalog-ink);
}

.pf-category-sticky {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--pf-catalog-line);
  background: rgba(255, 255, 255, 0.98);
}

.pf-category-title-row {
  display: flex;
  align-items: center;
  min-height: 58px;
  gap: 12px;
}

.pf-category-title-row h1 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--pf-catalog-ink);
  font-size: 25px;
  font-weight: 900;
  line-height: 30px;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-category-back {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--pf-catalog-line);
  border-radius: 12px;
  background: var(--pf-catalog-cream);
  color: var(--pf-catalog-red);
  text-decoration: none;
}

.pf-subcategory-chips {
  display: flex;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0 0 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pf-subcategory-chips::-webkit-scrollbar {
  display: none;
}

.pf-subcategory-chip {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: #f1f2f4;
  color: var(--pf-catalog-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.pf-subcategory-chip:hover,
.pf-subcategory-chip:focus,
.pf-subcategory-chip.is-active {
  background: var(--pf-catalog-red);
  color: var(--pf-catalog-white);
  text-decoration: none;
}

.pf-category-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 28px;
}

.pf-category-content {
  min-width: 0;
}

.pf-product-sections,
.pf-product-section {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.pf-product-section {
  scroll-margin-top: 154px;
}

.pf-category-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
}

.pf-category-sort,
.pf-category-filter {
  position: static;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--pf-catalog-line);
  border-radius: 12px;
  background: var(--pf-catalog-white);
  color: var(--pf-catalog-ink);
}

.pf-category-sort {
  gap: 7px;
}

.pf-category-sort select {
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 0 24px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--pf-catalog-ink);
  font-size: 12px;
  font-weight: 800;
}

.pf-category-filter {
  width: auto;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.pf-product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--pf-catalog-line);
  border-left: 1px solid var(--pf-catalog-line);
  float: none !important;
  clear: both;
}

.pf-subcategory-heading {
  margin: 0;
  padding: 22px 12px 11px;
  border-bottom: 1px solid var(--pf-catalog-line);
  background: var(--pf-catalog-white);
  color: var(--pf-catalog-ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 27px;
  letter-spacing: -0.025em;
}

.pf-catalog-product {
  position: relative;
  display: flex !important;
  min-width: 0;
  width: auto !important;
  max-width: none !important;
  flex-direction: column;
  margin: 0 !important;
  padding: 0 !important;
  border-right: 1px solid var(--pf-catalog-line);
  border-bottom: 1px solid var(--pf-catalog-line);
  background: var(--pf-catalog-white);
  float: none !important;
  clear: none !important;
}

.pf-catalog-product__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(#ffffff, #f7f7f7);
}

.pf-catalog-product__image {
  display: block;
  width: 100%;
  height: 100%;
}

.pf-catalog-product__image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.pf-catalog-product__favorite {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--pf-catalog-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--pf-catalog-red);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pf-catalog-product__discount,
.pf-catalog-product__stock {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--pf-catalog-white);
  font-weight: 900;
  white-space: nowrap;
}

.pf-catalog-product__discount {
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  background: #ff2448;
  font-size: 9px;
  line-height: 13px;
}

.pf-catalog-product__stock {
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  overflow: hidden;
  background: rgba(62, 60, 60, 0.86);
  font-size: 8px;
  line-height: 11px;
  text-overflow: ellipsis;
}

.pf-catalog-product__body {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  padding: 10px 10px 12px;
}

.pf-catalog-product__name {
  display: -webkit-box;
  min-height: 30px;
  overflow: hidden;
  color: var(--pf-catalog-ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 15px;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pf-catalog-product__name:hover,
.pf-catalog-product__name:focus {
  color: var(--pf-catalog-red);
  text-decoration: none;
}

.pf-catalog-product__meta {
  min-height: 15px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--pf-catalog-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-catalog-product__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 9px;
}

.pf-catalog-product__price {
  display: flex;
  min-width: 0;
  flex-direction: column;
  color: var(--pf-catalog-ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 19px;
}

.pf-catalog-product__old-price {
  color: #888888;
  font-size: 10px;
  font-weight: 600;
  line-height: 12px;
  text-decoration: line-through;
}

.pf-catalog-product__new-price {
  color: var(--pf-catalog-red);
}

.pf-catalog-product__cart {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(62, 60, 60, 0.2);
  border-radius: 50%;
  background: var(--pf-catalog-cream);
  color: var(--pf-catalog-red);
}

.pf-catalog-product__cart.is-added {
  border-color: var(--pf-catalog-red);
  background: var(--pf-catalog-red);
  color: var(--pf-catalog-white);
}

.pf-catalog-product--unavailable .pf-catalog-product__image img {
  opacity: 0.5;
  filter: grayscale(0.25);
}

.pf-catalog-product__cart.is-disabled {
  border-color: rgba(62, 60, 60, 0.1);
  background: #eeeeee;
  color: #9a9a9a;
  cursor: not-allowed;
}

.pf-category-pagination,
.pf-category-empty {
  text-align: center;
}

.pf-category-pagination {
  margin: 20px 0 0;
}

.pf-category-pagination #load-more {
  display: none;
}

.pf-category-empty {
  padding: 48px 16px;
}

.pf-category-empty p {
  margin: 0 0 14px;
  color: var(--pf-catalog-muted);
  font-size: 14px;
}

@media (max-width: 1199.98px) {
  .pf-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .pf-category-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

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

@media (max-width: 767.98px) {
  body.product-category {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  body.product-category .nav-bar__item:first-child .nav-bar__link {
    border-color: var(--pf-shell-line) !important;
  }

  body.product-category .nav-bar__item:nth-child(2) .nav-bar__link {
    border-color: var(--pf-catalog-red) !important;
  }

  body.product-category .nav-bar__item:nth-child(2) .nav-bar__icon svg path {
    stroke: var(--pf-catalog-red) !important;
  }

  .pf-category-page {
    padding-top: 0;
  }

  .pf-category-sticky {
    position: fixed;
    top: 60px;
    right: 0;
    left: 0;
    z-index: 70;
  }

  .pf-category-sticky > .container,
  .pf-category-layout,
  .pf-category-page .category_featured {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-right: 16px;
    padding-left: 16px;
  }

  .pf-category-title-row {
    min-height: 48px;
    gap: 9px;
  }

  .pf-category-title-row h1 {
    font-size: 20px;
    line-height: 24px;
  }

  .pf-category-back {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .pf-subcategory-chips {
    gap: 8px;
    margin-right: -16px;
    width: calc(100% + 16px);
    padding-right: 16px;
    padding-bottom: 9px;
  }

  .pf-subcategory-chip {
    padding: 9px 14px;
    font-size: 12px;
    line-height: 16px;
  }

  .pf-category-layout {
    display: block;
    padding-top: 102px;
    padding-bottom: 14px;
  }

  .pf-category-layout > #column-left {
    width: 100% !important;
    margin: 0;
    padding: 0;
  }

  .pf-category-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  .pf-category-tools {
    justify-content: space-between;
    margin-bottom: 8px;
  }

  .pf-category-sort,
  .pf-category-filter {
    height: 38px;
    border-radius: 11px;
  }

  .pf-category-sort {
    flex: 1 1 auto;
    max-width: calc(100% - 102px);
  }

  .pf-category-sort select {
    width: 100%;
    height: 36px;
    font-size: 11px;
  }

  .pf-category-filter {
    flex: 0 0 auto;
    padding: 0 11px;
    font-size: 11px;
  }

  .pf-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100% !important;
    margin: 0;
    border: 0;
    overflow: visible !important;
  }

  .pf-product-section {
    scroll-margin-top: 151px;
  }

  .pf-subcategory-heading {
    padding: 18px 10px 9px;
    border-top: 1px solid var(--pf-catalog-line);
    font-size: 18px;
    line-height: 23px;
  }

  .pf-catalog-product {
    border: 0;
    border-bottom: 1px solid var(--pf-catalog-line);
  }

  .pf-product-grid > .pf-catalog-product:nth-child(odd) {
    border-right: 1px solid var(--pf-catalog-line);
  }

  .pf-catalog-product__media {
    aspect-ratio: 4 / 3;
  }

  .pf-catalog-product__favorite {
    top: 7px;
    right: 7px;
    width: 30px;
    height: 30px;
  }

  .pf-catalog-product__discount {
    top: 7px;
    left: 7px;
  }

  .pf-catalog-product__stock {
    right: 7px;
    bottom: 7px;
  }

  .pf-catalog-product__body {
    min-height: 112px;
    padding: 9px 9px 11px;
  }

  .pf-catalog-product__name {
    min-height: 28px;
    font-size: 12px;
    line-height: 14px;
  }

  .pf-catalog-product__price {
    font-size: 16px;
    line-height: 18px;
  }

  .pf-catalog-product__cart {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }

  .pf-category-page .breadcrumb_bg,
  .pf-category-page .heading_category,
  .pf-category-page .block__popular-categories,
  .pf-category-page .sort-cont,
  .pf-category-page .catalog-slider {
    display: none !important;
  }
}

@media (max-width: 359.98px) {
  .pf-category-sticky > .container,
  .pf-category-layout,
  .pf-category-page .category_featured {
    padding-right: 12px;
    padding-left: 12px;
  }

  .pf-subcategory-chips {
    width: calc(100% + 12px);
    margin-right: -12px;
    padding-right: 12px;
  }

  .pf-category-filter span {
    display: none;
  }

  .pf-category-filter {
    width: 38px;
    justify-content: center;
    padding: 0;
  }

  .pf-category-sort {
    max-width: calc(100% - 46px);
  }

  .pf-catalog-product__body {
    min-height: 108px;
    padding-right: 8px;
    padding-left: 8px;
  }
}
