body:has(.catalog-layout, .category-overview, .product-heading) {
  background: var(--white);
}

.collection-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.collection-heading h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

.collection-icon {
  display: grid;
  flex: none;
  width: 30px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--blue);
}

.collection-icon .icon {
  width: 22px;
  height: 22px;
}

.category-directory {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 20px;
  border-block: 1px solid var(--border);
}

.category-directory a {
  display: flex;
  min-width: 0;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 8px;
  border-bottom: 2px solid transparent;
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.category-directory .icon {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--muted);
}

.category-directory a:hover,
.category-directory a[aria-current="page"] {
  border-color: var(--blue);
  color: var(--blue);
}

.category-directory a[aria-current="page"] .icon,
.category-directory a:hover .icon {
  color: currentColor;
}

.category-overview .category-grid a {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding-block: 10px 16px;
}

.category-overview .category-visual {
  border-radius: 0;
  background: var(--white);
}

.catalog-layout {
  display: grid;
  grid-template-columns: clamp(190px, 18vw, 223px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(14px, 2vw, 24px);
}

.catalog-sidebar {
  min-width: 0;
}

.facet-panel {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.83rem;
}

.facet-panel summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 9px;
  border-top: 2px solid var(--blue);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  list-style: none;
}

.facet-panel summary::-webkit-details-marker {
  display: none;
}

.facet-panel summary::after {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.facet-panel[open] summary::after {
  transform: rotate(225deg);
}

.facet-panel summary .icon {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.facet-panel form {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 13px 9px 14px;
  border-top: 1px solid var(--border);
}

.facet-panel label,
.facet-panel legend {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.facet-panel fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.price-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 6px;
}

.facet-panel input:not([type="checkbox"]),
.facet-panel select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
}

.facet-panel .stock-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.stock-filter input {
  width: 16px;
  height: 16px;
  min-height: auto;
  margin: 0;
  accent-color: var(--blue);
}

.facet-panel form > .text-link {
  justify-self: center;
  color: var(--blue);
  font-size: 0.8rem;
}

.result-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 5px;
  padding: 5px 8px;
  border: 0;
  border-block: 1px solid var(--border);
  border-radius: 0;
  background: var(--paper);
  font-size: 0.84rem;
}

.result-toolbar > span:first-child {
  margin-right: auto;
}

.result-toolbar label {
  color: var(--muted);
}

.result-toolbar select {
  width: auto;
  max-width: 100%;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.82rem;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.active-filters a {
  display: inline-flex;
  max-width: 100%;
  min-height: 31px;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--paper);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.active-filters a:hover {
  text-decoration: underline;
}

.active-filters .icon {
  flex: none;
  width: 14px;
  height: 14px;
}

.catalog-results {
  display: grid;
}

.catalog-item {
  position: relative;
  display: grid;
  grid-template-columns: clamp(118px, 13vw, 168px) minmax(0, 1fr) minmax(
      152px,
      184px
    );
  align-items: center;
  gap: clamp(9px, 1.55vw, 18px);
  min-width: 0;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.catalog-image {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 136px;
  align-self: stretch;
  place-items: center;
  padding: 6px 10px;
  background: var(--white);
}

.catalog-image img {
  display: block;
  width: 100%;
  height: 124px;
  object-fit: contain;
}

.catalog-item > .discount,
.product-photo .discount {
  position: absolute;
  z-index: 1;
  top: 9px;
  left: 9px;
  pointer-events: none;
}

.catalog-item > .discount {
  top: 12px;
  left: 0;
}

.catalog-description {
  min-width: 0;
}

.catalog-description h2 {
  margin: 4px 0 0;
  font-size: clamp(0.98rem, 1.55vw, 1.13rem);
  line-height: 1.25;
  letter-spacing: normal;
}

.catalog-description .card-name {
  font-size: inherit;
}

.catalog-description ul {
  display: grid;
  gap: 2px;
  padding-left: 14px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.4;
}

.catalog-buy {
  display: grid;
  align-content: center;
  align-self: stretch;
  gap: 6px;
  min-width: 0;
  padding-left: 9px;
}

.catalog-price strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.05vw, 1.65rem);
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.15;
  white-space: nowrap;
}

.catalog-price .old-price:not(:empty) + strong,
.detail-price .old-price + strong {
  color: var(--price, #ba221b);
}

.catalog-price .old-price:empty {
  display: none;
}

.catalog-buy .stock {
  margin: 0;
}

.catalog-actions,
.detail-buttons {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.catalog-actions .btn {
  min-height: 38px;
  flex: 1;
  gap: 5px;
  padding-inline: 7px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.catalog-actions .btn,
.catalog-actions .favorite,
.facet-panel .btn {
  border-radius: 3px;
}

.catalog-actions .icon {
  width: 16px;
  height: 16px;
}

.catalog-actions .favorite,
.detail-buttons .favorite {
  margin-left: 0;
}

.product-heading {
  margin-bottom: 14px;
}

.product-heading h1 {
  margin: 4px 0 0;
  font-size: clamp(1.48rem, 3.4vw, 2rem);
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(285px, 1fr);
  align-items: stretch;
  gap: clamp(12px, 1.7vw, 22px);
  padding: 0;
  border: 0;
  background: transparent;
}

.product-photo {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: clamp(14px, 2vw, 30px);
  background: var(--white);
}

.product-photo img {
  display: block;
  width: 100%;
  height: clamp(209px, 25vw, 332px);
  object-fit: contain;
}

.product-photo-trigger {
  width: 100%;
  border: 0;
  border-radius: 2px;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.photo-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--white);
  color: var(--blue);
}

.photo-zoom .icon {
  width: 17px;
  height: 17px;
}
.product-photo-trigger:hover .photo-zoom {
  border-color: var(--blue);
}

#product-image-dialog {
  width: min(92vw, 740px);
  max-height: 90vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 14px;
}

#product-image-dialog::backdrop {
  background: #0009;
}
#product-image-dialog form {
  display: flex;
  justify-content: end;
}
#product-image-dialog img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.product-photo .discount {
  top: 14px;
  left: 14px;
}

.product-content {
  align-self: stretch;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--white);
}

.product-purchase {
  padding: clamp(13px, 1.8vw, 20px);
  background: var(--paper);
}

.product-purchase .stock {
  margin: 0;
  font-size: 0.82rem;
}

.detail-price {
  margin-block: 8px 12px;
}

.detail-price strong {
  display: block;
  color: var(--ink);
  font-size: clamp(2rem, 4.2vw, 2.82rem);
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.15;
}

.detail-buttons .btn {
  flex: 1;
  min-height: 45px;
  border-radius: 3px;
}

.detail-buttons .favorite {
  width: 45px;
  height: 45px;
  border-radius: 3px;
}

.product-service {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 7px clamp(13px, 1.8vw, 20px) 13px;
  border: 0;
  border-top: 1px solid var(--border);
}

.product-service h2 {
  margin: 8px 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.fulfillment-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-block: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
  line-height: 1.35;
}

.fulfillment-row b {
  margin-left: auto;
  white-space: nowrap;
}

.product-service .icon,
#product-delivery .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.product-service-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 15px;
  margin-top: 9px;
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--blue);
}

.product-service-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: inherit;
}

.product-service-links .icon {
  width: 14px;
  height: 14px;
}

.product-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px clamp(14px, 3vw, 27px);
  margin: 13px 0 10px;
  padding: 0 12px;
  border-block: 1px solid var(--border);
  background: var(--paper);
  color: var(--blue);
  font-size: 0.81rem;
  font-weight: 800;
}

.product-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border-bottom: 2px solid transparent;
}

.product-nav a:hover {
  border-color: currentColor;
  text-decoration: none;
}

.product-info {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

.product-info section,
#related-products {
  scroll-margin-top: var(--header-offset, 105px);
}

.product-info section {
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 11px 12px 17px;
}

.product-info .form-panel h2 {
  margin-bottom: 9px;
  font-size: 1.18rem;
}

.spec-list {
  margin: 0;
  font-size: 0.86rem;
}

.spec-list div {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(0, 1.8fr);
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.spec-list dt {
  color: var(--muted);
}

.spec-list dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

#specifications ul {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.87rem;
}

#product-delivery p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 0.84rem;
}

@media (max-width: 1020px) {
  .category-directory {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-directory a {
    min-height: 43px;
    justify-content: flex-start;
    text-align: start;
  }
}

@media (max-width: 940px) {
  .catalog-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .catalog-item {
    grid-template-columns: 112px minmax(0, 1fr) minmax(125px, 146px);
    padding: 9px;
  }

  .catalog-item > .discount {
    top: 8px;
    left: 4px;
  }

  .catalog-image {
    min-height: 126px;
  }

  .catalog-image img {
    height: 112px;
  }

  .catalog-buy {
    padding-left: 9px;
  }

  .catalog-actions .btn .icon {
    display: none;
  }
}

@media (max-width: 740px) {
  .product-detail,
  .product-info {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .facet-panel form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 10px 14px;
  }

  .facet-panel form > .text-link {
    justify-self: start;
  }
}

@media (max-width: 505px) {
  .collection-heading {
    gap: 9px;
    margin-bottom: 13px;
  }

  .collection-icon {
    width: 25px;
  }

  .collection-icon .icon {
    width: 21px;
    height: 21px;
  }

  .category-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 13px;
  }

  .category-directory a {
    min-height: 42px;
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .result-toolbar {
    gap: 5px 8px;
    padding-inline: 8px;
  }

  .result-toolbar label {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
  }

  .catalog-item {
    grid-template-columns: clamp(82px, 25vw, 115px) minmax(0, 1fr);
    gap: 9px;
  }

  .catalog-image {
    grid-row: 1 / span 2;
    min-height: 92px;
  }

  .catalog-image img {
    height: 89px;
  }

  .catalog-description ul {
    font-size: 0.73rem;
  }

  .catalog-buy {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 6px;
    margin-top: 2px;
    padding: 7px 0 0;
    border: 0;
    border-top: 1px solid var(--border);
  }

  .catalog-buy .stock {
    grid-row: 2;
    font-size: 0.7rem;
  }

  .catalog-price strong {
    font-size: 1.2rem;
  }

  .catalog-actions {
    grid-area: 1 / 2 / span 2;
    gap: 4px;
  }

  .catalog-actions .btn {
    width: 36px;
    min-height: 36px;
    padding: 0;
  }

  .catalog-actions .btn span {
    display: none;
  }

  .catalog-actions .btn .icon {
    display: block;
  }

  .catalog-actions .favorite {
    width: 36px;
    height: 36px;
  }

  .product-heading {
    margin-bottom: 12px;
  }

  .product-nav {
    gap: 0 11px;
    padding-inline: 9px;
    font-size: 0.73rem;
  }
}
