.catalog-page {
  padding-block: clamp(28px, 5vw, 64px);
}

.catalog-page #catalogHeading {
  margin: 0;
  color: #0f1e34;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: -.035em;
}

.catalog-search-sort,
.catalog-side-filters {
  display: contents;
}

.catalog-desktop-facet, .catalog-search-icon {
  display: none;
}

@media (max-width: 1023px) {
  .catalog-search-sort > label:last-child { order: 1; }
}

@media (min-width: 1024px) {
  .catalog-listing { background: #fff; }
  .catalog-page { padding-top: 28px; }

  .catalog-listing .header-links a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 7px;
  }

  .catalog-page #catalogo {
    display: grid;
    grid-template-columns: clamp(165px, 16vw, 260px) minmax(0, 1fr);
    grid-template-areas: "filters search" "filters products";
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 20px 24px;
  }

  .catalog-page .reference-catalog-head {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .catalog-page .catalog-controls { display: contents; }

  .catalog-search-sort {
    display: grid;
    grid-area: search;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 24%);
    gap: 12px;
  }

  .catalog-search-sort label { position: relative; }

  .catalog-search-sort label > span,
  .catalog-page .catalog-toolbar > div {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .catalog-search-sort input { padding-inline-start: 42px; }

  .catalog-search-icon {
    display: block;
    position: absolute;
    top: 11px;
    left: 12px;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #0f1e34;
    stroke-width: 1.8;
    pointer-events: none;
  }

  .catalog-side-filters {
    display: grid;
    grid-area: filters;
    gap: 12px;
  }

  .catalog-page :is(.catalog-mobile-category, .catalog-mobile-location) { display: none; }

  .catalog-side-filters details {
    display: block;
    min-width: 0;
    padding-inline: 15px;
    border: 1px solid #c2d1df;
    border-radius: 10px;
    background: #fff;
    color: #0f1e34;
  }

  .catalog-side-filters summary {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    font-size: clamp(13px, 1.105vw, 16px);
    font-weight: 750;
    list-style: none;
    cursor: pointer;
  }

  .catalog-side-filters summary::-webkit-details-marker { display: none; }

  .catalog-side-filters summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin: 0 3px 4px 0;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  .catalog-side-filters details[open] > summary::after {
    margin-bottom: -4px;
    transform: rotate(225deg);
  }

  .catalog-search-sort :is(input, select) { font-size: 12px; }

  .catalog-side-filters .catalog-filter-options {
    display: grid;
    padding-bottom: 13px;
  }

  .catalog-side-filters .catalog-filter-options label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 32px;
    padding: 4px 2px;
    color: #17283b;
    font-size: clamp(12px, 0.935vw, 14px);
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
  }

  .catalog-side-filters .catalog-filter-options input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #004568;
  }

  #clearCatalogFilters {
    display: block;
    justify-self: start;
    min-height: 30px;
    border: 0;
    background: transparent;
    color: #004568;
    font: 600 12px Inter, sans-serif;
    cursor: pointer;
  }

  #clearCatalogFilters:hover { text-decoration: underline; }

  .catalog-page .catalog-toolbar { justify-content: flex-end; }
  .catalog-page .catalog-toolbar:has(#openCart[hidden]) { margin: 0; padding: 0; }

  .catalog-page .catalog-section { grid-area: products; min-width: 0; }

  .catalog-page .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .catalog-page .product-grid > .catalog-card {
    overflow: hidden;
    padding: 0;
    border-radius: 13px;
    background: #fff;
  }

  .catalog-page .catalog-card-media {
    padding: 0;
    border-bottom: 1px solid #eaf0f4;
    background: #f8fafb;
  }

  .catalog-page .catalog-card-image {
    height: auto;
    aspect-ratio: 4 / 3;
    padding: 22px 12px 10px;
  }

  .catalog-page .catalog-card-image img { max-width: 100%; max-height: 100%; }

  .catalog-page .catalog-card-category {
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #004568;
  }

  .catalog-page .catalog-card-body { padding: 12px; }
  .catalog-page .catalog-card-body h3 { font-size: clamp(13px, 1.19vw, 18px); }

  .catalog-page .catalog-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-block: 10px 8px;
  }

  .catalog-page .catalog-card-specs[hidden] { display: none; }

  .catalog-page .catalog-card-specs li {
    padding: 5px 7px;
    border-radius: 6px;
    background: #eef2f5;
    color: #18324c;
  }

  .catalog-page .catalog-card-specs svg { display: none; }
  .catalog-page .catalog-card-specs li span span { display: inline; margin-inline-start: .25em; }
  .catalog-page .catalog-card-footer { flex-wrap: wrap; gap: 8px; padding-top: 10px; }
  .catalog-page .catalog-card-price {
    color: #102641;
    font-size: clamp(14px, 1.36vw, 20px);
  }
  .catalog-page .catalog-card-add { min-height: 39px; background: #ffbd19; }
  .catalog-page .catalog-card-add:hover { background: #ffb900; }
}
