/* Product pages reuse the layout, colors and type from styles.css. */
.catalog-page {
  display: flex;
  flex-direction: column;
  min-block-size: 100dvh;
}

.catalog-page .site-footer { margin-block-start: auto; overflow-wrap: anywhere; }
.catalog-page .site-footer__inner { padding-block: 10px; }
.catalog-page .site-footer__logo img { width: 42px; height: 42px; }
.catalog-page .site-footer__branch-title { font-size: 14px; }
.catalog-page .site-footer__branch { font-size: 13px; }
.catalog-page .site-footer__branch-links { margin-block-start: 4px; }
.catalog-page .site-header { position: relative; inset: auto; }
.catalog-page main { padding-block: 48px 84px; }
.catalog-page [hidden] { display: none; }
.catalog-page .promo-strip__slide[hidden] { display: block; }

.catalog-title {
  position: relative;
  margin-block: 12px 16px;
  padding-inline-start: 13px;
  font-size: clamp(38px, 5vw, 67px);
  line-height: 1.05;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.catalog-title::before {
  content: "";
  position: absolute;
  inset-block-start: .16em;
  inset-inline-start: 0;
  inline-size: 3px;
  block-size: .8em;
  background: currentColor;
}
.catalog-title--list { font-size: clamp(30px, 3.6vw, 48px); }
.catalog-intro, .catalog-product__description { max-width: 620px; color: var(--secondary); }
.catalog-filter {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: var(--action-corner-radius);
  background: var(--paper);
}
.product-order label { font-weight: var(--medium); }
.product-order select {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.catalog-filter input {
  width: 320px;
  min-width: 0;
  padding: 8px 12px;
  border: 0;
  border-start-start-radius: var(--action-corner-radius);
  border-end-start-radius: var(--action-corner-radius);
  background: transparent;
  color: var(--ink);
}
.catalog-filter input:focus-visible { outline-offset: -2px; }
.catalog-filter .site-search__button { flex-basis: 44px; min-height: 42px; }
.catalog-results:not(:empty), .catalog-empty { margin-top: 16px; }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.catalog-card { min-width: 0; }
.catalog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  transition: background-color var(--transition), border-color var(--transition);
}
.catalog-card__link:hover, .catalog-card__link:focus-visible { background: var(--orbit); border-color: var(--secondary); }
.catalog-card__media, .product-gallery__figure, .product-gallery__thumbnail {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  background: var(--orbit);
}
.catalog-card__media { --media-padding: 20px; position: relative; aspect-ratio: 4 / 3; padding: var(--media-padding); }
.catalog-card__media img { position: absolute; inset: 0; padding: var(--media-padding); }
.catalog-card__media img, .product-gallery__figure img, .product-gallery__thumbnail img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.catalog-placeholder { color: var(--secondary); font-size: 14px; text-align: center; }
.catalog-card__body { display: grid; align-content: start; justify-items: start; gap: 8px; padding: 18px; flex: 1; }
.catalog-card__body h2, .catalog-card__body h3 { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.catalog-card .button { margin: 0 18px 18px; align-self: flex-start; min-height: 44px; font-size: 15px; }
.catalog-note { color: var(--secondary); }

.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 14px; }
.breadcrumb li { min-width: 0; overflow-wrap: anywhere; }
.breadcrumb li + li::before { content: "›"; margin-inline-end: 10px; color: var(--secondary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--secondary); }
.catalog-product {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  margin-block: 32px 64px;
}
.product-gallery__figure {
  height: clamp(300px, 43vw, 510px);
  padding: clamp(18px, 4vw, 54px);
  border: 1px solid var(--line);
}
.product-gallery__thumbnails { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.product-gallery__thumbnail {
  width: 72px;
  height: 72px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--action-corner-radius, var(--radius));
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
}
.product-gallery__thumbnail[aria-current="true"], .product-gallery__thumbnail:hover { border-color: var(--ink); }
.product-order { display: grid; gap: 14px; margin-top: 24px; }
.product-order__fields { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.product-order__fields label { display: grid; gap: 4px; max-width: 100%; }
.product-option { display: grid; gap: 4px; min-inline-size: 0; max-inline-size: 100%; }
.product-option__label { font-weight: var(--medium); }
.product-option__menu { position: relative; min-inline-size: 0; }
.product-option__menu[open] { z-index: 2; }
.product-option__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-block-size: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-weight: var(--medium);
  line-height: 1.3;
  list-style: none;
}
.product-option__trigger::-webkit-details-marker { display: none; }
.product-option__value { min-inline-size: 0; overflow-wrap: anywhere; }
.product-option__chevron { flex: none; }
.product-option__menu[open] > .product-option__trigger { background: var(--orbit); border-color: var(--orbit); }
.product-option__menu[open] .product-option__chevron { transform: rotate(180deg); }
.product-option__panel {
  inline-size: 100%;
  min-width: 0;
  max-block-size: min(18rem, 45dvh);
  padding: 4px;
  border-radius: var(--action-corner-radius);
  overflow: auto;
  overscroll-behavior: contain;
}
.product-option__choice {
  display: block;
  inline-size: 100%;
  min-block-size: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--action-corner-radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: start;
  overflow-wrap: anywhere;
}
.product-option__choice[aria-pressed="true"] { background: var(--orbit); font-weight: var(--semibold); }
.product-option__choice:focus-visible { outline-offset: -2px; }
.product-option__choice:disabled { color: var(--secondary); cursor: default; }
@media (hover: hover) {
  .product-option__trigger:hover, .product-option__choice:not(:disabled):hover { background: var(--orbit); }
}
@media (prefers-reduced-motion: no-preference) {
  .product-option__trigger, .product-option__choice { transition: background-color var(--transition), border-color var(--transition); }
  .product-option__chevron { transition: transform var(--transition); }
  .product-option__menu[open] > .product-option__panel { animation: product-option-open var(--transition); }
}
@keyframes product-option-open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.product-order .button { justify-self: start; }
.product-order__request { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.product-order__summary { color: var(--secondary); font-size: 14px; overflow-wrap: anywhere; }
.product-order__copy { padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; text-decoration: underline; cursor: pointer; }
.product-order__status:empty { display: none; }
.catalog-section { margin-top: 60px; }
.catalog-section h2, .catalog-cta h2 { font-size: clamp(26px, 4vw, 42px); line-height: 1.12; }
.catalog-section > .catalog-note { margin-top: 12px; }
.product-information h2 { margin-bottom: 20px; }
.product-information details { border-block-start: 1px solid var(--line); }
.product-information details:last-child { border-block-end: 1px solid var(--line); }
.product-information summary { padding-block: 16px; font-weight: var(--semibold); cursor: pointer; }
.product-information details > :not(summary) { margin-bottom: 16px; }
.product-information p, .product-information dd { white-space: pre-line; overflow-wrap: anywhere; }
.product-information dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; padding-block: 6px; }
.product-information dt { font-weight: var(--medium); }
.catalog-cta { margin-top: 64px; padding: clamp(24px, 5vw, 72px); }
.catalog-cta p { margin-block: 14px 24px; color: var(--dark-copy); }
.catalog-error .button { margin-top: 24px; }

@media (width >= 768px) {
  html:has(> .catalog-page) { scroll-padding-block-end: var(--site-footer-height, 0px); }

  /* Sticky positioning reserves the footer's space at the end of the page. */
  .catalog-page .site-footer {
    position: sticky;
    inset-block-end: 0;
    z-index: 1;
    max-block-size: 50dvh;
    overflow: auto;
  }
}

@media (768px <= width < 1200px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (width < 768px) {
  .catalog-page main { padding-block: 28px 52px; }
  .catalog-grid, .catalog-product { grid-template-columns: minmax(0, 1fr); }
  .catalog-product { margin-bottom: 44px; }
  .catalog-section, .catalog-cta { margin-top: 44px; }
}
