/* Dresscode catalog listings only; leave the product detail and home widgets alone. */
#catalog > .catalog-section-list-pictures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 154px), 1fr));
  gap: 12px;
  margin: 0 0 24px;
  border: 0;
}

#catalog > .catalog-section-list-pictures::before,
#catalog > .catalog-section-list-pictures::after {
  content: none;
}

#catalog .catalog-section-list-pictures > .catalog-section-list-item {
  display: block;
  box-sizing: border-box;
  float: none;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  background: var(--dh-card);
}

#catalog .catalog-section-list-pictures > .catalog-section-list-item::before {
  content: none;
}

#catalog .catalog-section-list-pictures .catalog-section-list-item-wp {
  display: grid;
  grid-template-rows: 104px 1fr;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 10px;
  box-sizing: border-box;
}

#catalog .catalog-section-list-pictures .catalog-section-list-picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 104px;
  margin: 0;
  border-radius: 5px;
  line-height: normal;
  background: #fff;
}

#catalog .catalog-section-list-pictures .catalog-section-list-picture img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

#catalog .catalog-section-list-pictures .catalog-section-list-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  height: auto;
  padding: 8px 0 0;
  margin: 0;
  font: 650 14px/1.4 Manrope, 'Segoe UI', sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
}

#catalog .catalog-section-list-pictures .catalog-section-list-link,
#catalog .catalog-section-list-pictures .catalog-section-list-link span {
  color: var(--dh-text) !important;
}

#catalog .catalog-section-list-pictures > .catalog-section-list-item:hover,
#catalog .catalog-section-list-pictures > .catalog-section-list-item:focus-within {
  border-color: #cf710a;
}

#main:has(#catalogSection) > h1,
#catalogSection .product .tabloid .name,
#catalogSection .product .tabloid .price {
  color: var(--dh-text) !important;
}

#catalogSection .product .tabloid {
  border-radius: 8px;
  background: var(--dh-card) !important;
  color: var(--dh-text);
}

#catalogSection .product .productColImage > .picture {
  border-radius: 6px;
  background: #fff;
}

#catalogSection .product .tabloid .name {
  font-family: Manrope, 'Segoe UI', sans-serif;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#catalogSection .product .productColText > .btn-simple {
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  height: auto;
  min-height: 44px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--dh-catalog-control-border, #777d77);
  border-radius: 6px;
  background: var(--dh-page);
  color: var(--dh-text) !important;
  font: 650 14px/1.4 Manrope, 'Segoe UI', sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

#catalogSection .product .productColText > .btn-simple:hover {
  border-color: #cf710a;
  background: var(--dh-catalog-control-hover, #fff4e5);
}

html[data-theme="dark"] {
  --dh-catalog-control-border: #8c938a;
  --dh-catalog-control-hover: #3e3327;
}

#catalog .catalog-section-list-pictures a:focus-visible,
#catalogSection .product a:focus-visible {
  outline: 2px solid #cf710a;
  outline-offset: 2px;
}

@media (max-width: 44em) {
  #catalog > .catalog-section-list-pictures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-inline: 12px;
  }

  #catalogSection > .productList {
    display: grid;
    gap: 10px;
    width: auto;
    margin-inline: 12px;
    border: 0;
  }

  #catalogSection > .productList > .product {
    float: none;
    width: 100%;
    height: auto !important;
    min-width: 0;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
    border: 0 !important;
  }

  #catalogSection > .productList > .product::before {
    content: none;
  }

  #catalogSection > .productList > .product .tabloid {
    box-sizing: border-box;
    width: 100% !important;
    height: auto !important;
    padding: 10px;
    border: 1px solid var(--dh-border);
  }

  #catalogSection .product .productTable {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
    gap: 10px;
  }

  #catalogSection .product .productColImage,
  #catalogSection .product .productColText {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
  }

  #catalogSection .product .productColImage > .picture {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    line-height: normal;
  }

  #catalogSection .product .productColImage > .picture img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
  }

  #catalogSection .product .tabloid .name {
    height: auto;
    max-height: none;
    overflow: visible;
    font-size: 14px;
    white-space: normal;
  }

  #catalogSection .product .tabloid .price {
    margin: 6px 0 10px;
    white-space: normal;
  }

  #catalogSection .product .productColText > .btn-simple {
    display: inline-block;
  }
}
