.catalog-layout-photos figure[hidden],
.catalog-layout-options[hidden],
.catalog-layout-fallback[hidden] {
  display: none;
}

.catalog-layout-photos figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.catalog-layout-options,
.catalog-layout-fallback {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .6rem .75rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.catalog-layout-options > button[data-layout-index],
.catalog-layout-fallback > a {
  display: inline-flex;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  padding: .25rem .4rem;
  border: 1px solid #c7d3e3;
  border-radius: .375rem;
  background: #f5f7fa;
  color: #18263a;
  font-size: .875rem;
  font-weight: 650;
}

.catalog-layout-options > button[aria-pressed="true"],
.catalog-layout-options > button:hover,
.catalog-layout-fallback > a:hover {
  border-color: #1455be;
  background: #eef5ff;
  color: #1455be;
}

.catalog-layout-options > button:focus-visible,
.catalog-layout-fallback > a:focus-visible {
  outline: 2px solid #1455be;
  outline-offset: 2px;
}

.catalog-layout-thumb {
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: .25rem;
  background: white var(--layout-photo) center / contain no-repeat;
}

.catalog-layout-fallback span {
  margin-inline-end: .15rem;
  color: #4a5568;
  font-size: .875rem;
}

@media (min-width: 640px) {
  #ccd .catalog-product-grid > :nth-child(1 of .catalog-product-card:not([hidden]):not(:has(.catalog-product-photos))) {
    grid-column-start: 1;
  }

  #custom .catalog-product-grid {
    align-items: stretch;
  }

  #custom .catalog-product-card:not([hidden]),
  #custom .catalog-product-description {
    display: flex;
    flex-direction: column;
  }

  #custom .catalog-product-description {
    flex: 1;
  }

  #custom .catalog-model-quote {
    align-self: flex-start;
    margin-top: auto;
  }
}
