.kp-cats {
  --kp-cats-title-size-mobile: 22px;
  --kp-cats-title-size-desktop: 32px;
  --kp-cats-title-size: var(--kp-cats-title-size-mobile);
  --kp-cats-title-color: #1a1a1a;
  --kp-cats-title-weight: 700;
  --kp-cats-selected-border: #e60012;
  --kp-cats-unselected-border: #d0d0d0;
  --kp-cats-chrome: 124px;
  --kp-cats-nav-width: 70px;
  --kp-cats-gap: 6px;
  --kp-cats-price: #e60012;
  --kp-cats-muted: #949494;
  --kp-cats-image-bg: #f3f1ed;
  --kp-cats-desktop-columns: 6;
  --kp-cats-more-size-mobile: 12px;
  --kp-cats-more-size-desktop: 14px;
  --kp-cats-more-height-mobile: 32px;
  --kp-cats-more-height-desktop: 40px;
  --kp-cats-more-size: var(--kp-cats-more-size-mobile);
  --kp-cats-more-height: var(--kp-cats-more-height-mobile);

  display: block;
  box-sizing: border-box;
  color: rgb(var(--color-text));
  background: rgb(var(--color-background));
}

.kp-cats[data-pc-show="false"] {
  display: none;
}

.kp-cats *,
.kp-cats *::before,
.kp-cats *::after {
  box-sizing: border-box;
}

.kp-cats__inner {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kp-cats__heading {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 10px;
}

.kp-cats[data-title-align="center"] .kp-cats__heading {
  justify-content: center;
}

.kp-cats__heading-icon {
  display: flex;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  overflow: hidden;
}

.kp-cats__heading-icon img,
.kp-cats__heading-icon svg,
.kp-cats__heading-icon .image-wrapper,
.kp-cats__heading-icon-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.kp-cats__title {
  margin: 0;
  color: var(--kp-cats-title-color);
  font-family: var(--sort-title-font, var(--font-heading-family, inherit));
  font-size: var(--kp-cats-title-size);
  font-style: var(--sort-title-font-style, var(--font-heading-style, normal));
  font-weight: var(--kp-cats-title-weight);
  letter-spacing: var(--sort-title-letter-spacing, var(--font-heading-letter-spacing, 0.02em));
  line-height: 1.25;
  text-align: left;
}

.kp-cats[data-title-align="center"] .kp-cats__title {
  text-align: center;
}

.kp-cats__layout {
  display: grid;
  grid-template-columns: var(--kp-cats-nav-width) minmax(0, 1fr);
  grid-template-areas:
    "nav banner"
    "nav products"
    "nav more";
  align-items: stretch;
  gap: var(--kp-cats-gap);
  min-height: 0;
}

.kp-cats__nav {
  display: flex;
  grid-area: nav;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  height: 100%;
}

.kp-cats__nav-item {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 0;
  padding: 3px 2px 2px;
  border: 1px solid var(--kp-cats-unselected-border);
  border-radius: 6px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font: inherit;
  line-height: 1.15;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.kp-cats__nav-item.is-active {
  border-color: var(--kp-cats-selected-border);
  border-width: 2px;
  padding: 2px 1px 1px;
  background: #fff8f6;
}

.kp-cats__nav-item:focus-visible {
  outline: 2px solid var(--kp-cats-selected-border);
  outline-offset: 2px;
}

.kp-cats__nav-icon {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.kp-cats__nav-icon img,
.kp-cats__nav-icon svg,
.kp-cats__nav-icon .image-wrapper,
.kp-cats__nav-icon .placeholder-svg,
.kp-cats__nav-icon-image,
.kp-cats__nav-icon-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.kp-cats__nav-label {
  display: block;
  flex-shrink: 0;
  max-width: 100%;
  color: #111;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: normal;
}

.kp-cats__panels {
  display: contents;
}

.kp-cats__panel {
  display: none;
}

.kp-cats__panel.is-active {
  display: contents;
}

.kp-cats__panel[hidden] {
  display: none !important;
}

.kp-cats__banner {
  position: relative;
  display: block;
  grid-area: banner;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: var(--kp-banner-ratio, auto);
  border-radius: 2px;
  background: var(--kp-cats-image-bg);
  transition: opacity 0.25s ease;
}

.kp-cats__banner:hover {
  opacity: 0.94;
}

.kp-cats__banner:focus-visible,
.kp-cats__media-link:focus-visible,
.kp-cats__card-link:focus-visible,
.kp-cats__quick-add-button:focus-visible {
  outline: 2px solid var(--kp-cats-selected-border);
  outline-offset: 2px;
}

.kp-cats__banner-image,
.kp-cats__banner img,
.kp-cats__banner .image-wrapper,
.kp-cats__banner .image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.kp-cats__banner--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 1;
  color: rgb(var(--color-text) / 45%);
  font-size: 12px;
}

.kp-cats__grid {
  display: grid;
  grid-area: products;
  flex: 0 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  align-content: start;
  gap: 8px 8px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kp-cats__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.kp-cats__card-link {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.kp-cats__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 4px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--kp-cats-image-bg);
}

.kp-cats__media-link {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.kp-cats__image,
.kp-cats__media img,
.kp-cats__media .image-wrapper,
.kp-cats__media .image-wrapper img,
.kp-cats__media svg {
  width: 100%;
  height: 100%;
  object-fit: var(--kp-cats-image-fit, contain);
  transition: transform 0.28s ease;
}

.kp-cats__sold-out {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 2px 6px;
  background: rgb(var(--color-text));
  color: rgb(var(--color-background));
  font-size: 10px;
  line-height: 1.2;
}

.kp-cats__quick-add {
  position: absolute;
  z-index: 2;
  top: auto;
  right: 6px;
  bottom: 6px;
  display: flex;
}

.kp-cats__card[data-quick-add-position="top-right"] .kp-cats__quick-add,
.kp-cats[data-quick-add-position="top-right"] .kp-cats__card:not([data-quick-add-position]) .kp-cats__quick-add {
  top: 6px;
  bottom: auto;
}

.kp-cats__card[data-quick-add-position="bottom-right"] .kp-cats__quick-add,
.kp-cats[data-quick-add-position="bottom-right"] .kp-cats__card:not([data-quick-add-position]) .kp-cats__quick-add {
  top: auto;
  bottom: 6px;
}

.kp-cats__quick-add details {
  margin: 0;
}

.kp-cats__quick-add-button {
  appearance: none;
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 90%);
  box-shadow: 0 2px 6px rgb(0 0 0 / 12%);
  color: rgb(var(--color-text));
  cursor: pointer;
  list-style: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.kp-cats__quick-add-button::-webkit-details-marker,
.kp-cats__quick-add-button::marker {
  display: none;
  content: none;
}

.kp-cats__quick-add-button:hover {
  background: rgb(255 255 255 / 100%);
}

.kp-cats__quick-add-button .icon-loading {
  display: none;
  margin: 8px;
  animation: animation-button-loading linear 1.5s infinite;
}

.kp-cats__quick-add-button.loading {
  pointer-events: none;
}

.kp-cats__quick-add-button.loading .icon-quick-add {
  display: none;
}

.kp-cats__quick-add-button.loading .icon-loading {
  display: block;
}

.kp-cats__quick-add svg {
  width: 16px;
  height: 16px;
}

.kp-cats__product-title {
  margin: 4px 0 0;
  overflow: hidden;
  color: #222;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kp-cats__price {
  margin-top: 1px;
  line-height: 1.2;
}

.kp-cats__price-sale {
  color: var(--kp-cats-price);
  font-size: 13px;
  font-weight: 700;
}

.kp-cats__empty {
  grid-area: products;
  margin: 0;
  padding: 16px 8px;
  color: rgb(var(--color-text) / 50%);
  font-size: 12px;
  text-align: center;
}

.kp-cats__more {
  display: flex;
  grid-area: more;
  justify-content: center;
  min-width: 0;
  margin: 4px 0 0;
}

.kp-cats__more .button,
.kp-cats__more-button {
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  min-width: 0;
  height: var(--kp-cats-more-height);
  min-height: var(--kp-cats-more-height);
  padding: 0 calc(var(--kp-cats-more-height) * 0.72);
  font-size: var(--kp-cats-more-size);
  line-height: 1;
  text-align: center;
}

@media (max-width: 694px) {
  .kp-cats[data-pc-show="false"] {
    display: block;
  }

  .kp-cats[data-mb-show="false"] {
    display: none;
  }

  .kp-cats__nav {
    height: auto;
    align-self: stretch;
  }

  .kp-cats__grid {
    flex: none;
    grid-template-rows: none;
  }

  .kp-cats__card {
    height: auto;
  }

  .kp-cats[data-fit-first-screen="true"] .kp-cats__heading {
    margin-bottom: 8px;
  }

  .kp-cats__card:nth-child(n + 7) {
    display: none;
  }
}

@media (min-width: 695px) {
  .kp-cats {
    --kp-cats-title-size: var(--kp-cats-title-size-desktop);
    --kp-cats-more-size: var(--kp-cats-more-size-desktop);
    --kp-cats-more-height: var(--kp-cats-more-height-desktop);
  }

  .kp-cats__heading {
    gap: 10px;
    margin: 0 0 24px;
  }

  .kp-cats__heading-icon {
    width: 32px;
    height: 32px;
  }

  .kp-cats__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "banner"
      "nav"
      "products"
      "more";
    justify-items: stretch;
    gap: 20px 0;
  }

  .kp-cats__banner,
  .kp-cats__banner--placeholder {
    width: min(100%, 900px);
    max-width: 900px;
    justify-self: center;
  }

  .kp-cats__nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    height: auto;
  }

  .kp-cats__nav-item {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 8px;
    min-height: 44px;
    padding: 6px 16px 6px 6px;
    border-radius: 999px;
  }

  .kp-cats__nav-item:hover:not(.is-active) {
    border-color: color-mix(in srgb, var(--kp-cats-selected-border) 40%, var(--kp-cats-unselected-border));
  }

  .kp-cats__nav-item.is-active {
    padding: 5px 15px 5px 5px;
  }

  .kp-cats__nav-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    min-height: 32px;
    border-radius: 50%;
    background: #f6f3ee;
  }

  .kp-cats__nav-item:not(.has-icon) {
    padding-left: 16px;
  }

  .kp-cats__nav-item.is-active:not(.has-icon) {
    padding-left: 15px;
  }

  .kp-cats__nav-item:not(.has-icon) .kp-cats__nav-icon {
    display: none;
  }

  .kp-cats__nav-label {
    max-width: none;
    font-size: 14px;
    letter-spacing: 0.04em;
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: normal;
  }

  .kp-cats__banner {
    border-radius: 4px;
  }

  .kp-cats__more {
    margin-top: 8px;
  }

  .kp-cats__grid {
    flex: none;
    grid-template-columns: repeat(var(--kp-cats-desktop-columns, 6), minmax(0, 1fr));
    grid-template-rows: none;
    gap: 16px 12px;
  }

  .kp-cats__card-link {
    height: auto;
  }

  .kp-cats__media {
    aspect-ratio: 1 / 1;
  }

  .kp-cats__product-title {
    margin-top: 8px;
    font-size: 13px;
  }

  .kp-cats__card:hover .kp-cats__image,
  .kp-cats__card:hover .kp-cats__media .image-wrapper,
  .kp-cats__card:hover .kp-cats__media img {
    transform: scale(1.03);
  }

  .kp-cats__card-link:hover .kp-cats__product-title {
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .kp-cats__quick-add {
    right: 8px;
    bottom: 8px;
  }

  .kp-cats__card[data-quick-add-position="top-right"] .kp-cats__quick-add {
    top: 8px;
    bottom: auto;
  }

  .kp-cats__quick-add-button {
    width: 34px;
    height: 34px;
    padding: 7px;
  }

  .kp-cats__quick-add svg {
    width: 18px;
    height: 18px;
  }

  .kp-cats__sold-out {
    top: 8px;
    left: 8px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kp-cats__nav-item,
  .kp-cats__banner,
  .kp-cats__image,
  .kp-cats__media .image-wrapper,
  .kp-cats__media img,
  .kp-cats__quick-add-button {
    transition: none;
  }

  .kp-cats__card:hover .kp-cats__image,
  .kp-cats__card:hover .kp-cats__media .image-wrapper,
  .kp-cats__card:hover .kp-cats__media img {
    transform: none;
  }
}
