/* Catalog on the storefront. The rest of the site keeps its workbench theme. */
#catalog {
  --catalog-ink: #202823;
  --catalog-muted: #545f56;
  --catalog-line: #d6dbd1;
  --catalog-green: #234b39;
  --catalog-yellow: #ffdb52;
  background: #f6f7f2;
  color: var(--catalog-ink);
  padding: clamp(36px, 4.5vw, 72px) var(--gutter) clamp(44px, 5.5vw, 88px);
  scroll-margin-top: 72px;
}
#catalog .catalog-top {
  display: flex;
  flex-direction: row;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: clamp(22px, 2.5vw, 36px);
}
#catalog .catalog-heading { min-width: 0; }
#catalog h2 {
  margin: 0;
  color: var(--catalog-ink);
  font: 700 clamp(2rem, 4vw, 3.75rem)/1.05 Rubik, Arial, sans-serif;
  letter-spacing: -.05em;
  overflow-wrap: break-word;
}
#catalog .result-count {
  margin: .55rem 0 0;
  font-size: .96rem;
  color: var(--catalog-muted);
}
#catalog .search {
  width: clamp(240px, 27vw, 360px);
  height: 50px;
  padding-inline: 16px;
  background: white;
  border: 1px solid var(--catalog-line);
  border-radius: 12px;
}
#catalog .search input { color: var(--catalog-ink); font-size: 1rem; }
#catalog .search input::placeholder, #catalog .search .icon { color: var(--catalog-muted); }
#catalog .search:focus-within { outline: 2px solid var(--catalog-green); outline-offset: 2px; box-shadow: none; }
#catalog :is(a, button, select, input, summary):focus-visible { outline: 3px solid var(--catalog-green); outline-offset: 3px; }
#catalog .search input:focus-visible { outline: none; }
#catalog #back-to-categories {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 .45rem;
  font-size: .95rem;
  color: var(--catalog-green);
  text-underline-offset: .22em;
}

#catalog .category-grid, #catalog .type-section nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 22px);
  align-items: stretch;
}
#catalog .department-card, #catalog .type-section nav a {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  isolation: isolate;
  padding: 0;
  border: 1px solid var(--catalog-line);
  border-radius: 16px;
  background: white;
  color: var(--catalog-ink);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
#catalog .department-art, #catalog .type-thumbnail {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.68;
  height: auto;
  padding: 12px 14px;
  background: #e8ede4;
  border-radius: 0;
}
#catalog .department-art { height: 180px; aspect-ratio: auto; }
#catalog .type-thumbnail { max-height: 180px; }
#catalog .department-card:nth-child(8n + 1) .department-art { background: #ffe589; }
#catalog .department-card:nth-child(8n + 2) .department-art { background: #e5ebed; }
#catalog .department-card:nth-child(8n + 3) .department-art { background: #e1eade; }
#catalog .department-card:nth-child(8n + 4) .department-art { background: #f1e4db; }
#catalog .department-card:nth-child(8n + 5) .department-art { background: #e4e9e6; }
#catalog .department-card:nth-child(8n + 6) .department-art { background: #f2e8ce; }
#catalog .department-card:nth-child(8n + 7) .department-art { background: #dfe9e9; }
#catalog .department-card:nth-child(8n) .department-art { background: #e4ebdc; }
#catalog .department-art img, #catalog .type-thumbnail img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: inherit;
  min-height: 0;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .22s ease;
}
#catalog .department-count {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.94);
  color: #354136;
  font-size: .81rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
#catalog .department-caption, #catalog .type-caption {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding: 18px;
  border: 0;
  background: white;
}
#catalog .department-caption h3, #catalog .type-caption strong {
  margin: 0;
  color: var(--catalog-ink);
  font: 700 1.125rem/1.3 Rubik, Arial, sans-serif;
  letter-spacing: -.02em;
  overflow-wrap: break-word;
  hyphens: auto;
}
#catalog .department-caption p {
  margin: 0;
  color: var(--catalog-muted);
  font-size: .875rem;
  line-height: 1.4;
}
#catalog .type-section { grid-column: 1 / -1; border: 0; padding: 0; }
#catalog .type-caption small { margin-top: auto; color: var(--catalog-green); font-size: .96rem; font-weight: 700; }

#catalog .category-grid.models { grid-template-columns: repeat(2, minmax(0,1fr)); }
#catalog .model-photo { grid-row: span 2; align-self: start; display: block; background: white; border-radius: 8px; overflow: hidden; }
#catalog .model-photo img { display: block; width: 100%; height: 112px; object-fit: contain; }
#catalog .model-entry .model-description { min-width: 0; }
#catalog .model-entry .model-offer { grid-column: 2; max-width: none; justify-items: start; text-align: start; gap: 4px; }
#catalog .model-offer button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--catalog-line); border-radius: 8px; background: white; color: var(--catalog-green); font: inherit; cursor: pointer; }
#catalog .model-offer button[aria-pressed="true"] { background: var(--catalog-green); color: white; }
#catalog .model-entry {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: clamp(16px, 1.6vw, 26px);
  border: 1px solid var(--catalog-line);
  border-radius: 14px;
  background: white;
}
#catalog .model-entry h3, #catalog .inventory-name .card-link {
  margin: 0;
  color: var(--catalog-ink);
  font: 700 1.12rem/1.25 Rubik, Arial, sans-serif;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
#catalog .model-entry p, #catalog .inventory-name p {
  margin: .4rem 0 0;
  color: var(--catalog-muted);
  font-size: .94rem;
  line-height: 1.45;
}
#catalog .model-offer { display: grid; justify-items: end; text-align: end; }
#catalog .model-offer strong, #catalog .inventory-rate strong { font-size: 1.06rem; font-variant-numeric: tabular-nums; }
#catalog .model-offer a, #catalog .inventory-name a {
  display: inline-block;
  padding-block: .45rem;
  color: var(--catalog-green);
  font-size: .92rem;
  text-decoration: underline;
  text-underline-offset: .22em;
}
#catalog .model-offer .model-select { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border-radius: 10px; background: var(--ui-accent, #ffda36); color: #17251c; text-decoration: none; font-weight: 700; }
#catalog .catalog-tools { align-items: end; gap: 12px; margin: 0 0 20px; }
#catalog .catalog-tools label { min-width: 0; color: var(--catalog-muted); font-size: .9rem; }
#catalog .catalog-tools :is(input, select) {
  min-height: 44px;
  border: 1px solid var(--catalog-line);
  border-radius: 8px;
  background-color: white;
  color: var(--catalog-ink);
  font-size: 1rem;
}
#catalog .catalog-tools { display: grid; grid-template-columns: minmax(160px,1.3fr) minmax(150px,1.2fr) minmax(110px,.8fr) minmax(100px,.7fr) auto auto; }
#catalog .catalog-tools :is(input,select) { width: 100%; }
@media (max-width: 1200px) { #catalog .catalog-tools { grid-template-columns: repeat(3,minmax(0,1fr)); } }
#catalog .catalog-tools.catalog-tools-compact { display: flex; justify-content: flex-end; flex-wrap: wrap; }
#catalog .catalog-tools.catalog-tools-compact label { display: none; }
#catalog .catalog-tools button, #catalog .inventory-actions :is(button, summary), #catalog #show-more, #catalog #empty-action {
  min-height: 44px;
  border-radius: 8px;
  background: #edf0e8;
  color: var(--catalog-green);
  font: 600 .94rem/1.2 Rubik, Arial, sans-serif;
}
#catalog .inventory { display: grid; gap: 12px; margin: 0; border: 0; }
#catalog .inventory-row {
  grid-template-columns: 94px minmax(0, 1fr) minmax(115px, auto) minmax(220px, 310px);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--catalog-line);
  border-radius: 14px;
}
#catalog .inventory-row > img { width: 100%; height: 82px; object-fit: contain; }
#catalog .inventory-name .card-link { background: transparent; padding: 0; }
#catalog .inventory-rate { color: var(--catalog-muted); }
#catalog .inventory-rate strong { color: var(--catalog-ink); }
#catalog .inventory-actions { max-width: none; gap: 6px; }
#catalog .inventory-actions .book-date { background: var(--catalog-yellow); color: var(--catalog-ink); }
#catalog .inventory-actions [aria-pressed="true"] { background: var(--catalog-green); color: white; }
#catalog .inventory-actions .report-link {
  grid-column: 1 / -1;
  justify-self: start;
  width: auto;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--catalog-muted);
  font-size: .82rem;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .2em;
}
/* A model's single verified photo sits beside its offer, not below the page. */
#catalog .inventory-row.inventory-model-row {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  grid-template-areas: "copy price" "copy actions";
  align-items: start; gap: 16px 28px; padding: 24px;
}
#catalog .inventory-model-row > .inventory-name { grid-area: copy; min-width: 0; }
#catalog .inventory-model-row > .inventory-rate { grid-area: price; min-width: 0; font-size: 1rem; }
#catalog .inventory-model-row > .inventory-actions { grid-area: actions; align-self: start; align-items: center; gap: 8px; }
#catalog .inventory-model-row:has(> .photo-gallery) {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  grid-template-areas: "photo copy" "photo price" "photo actions";
  grid-template-rows: auto auto 1fr;
}
#catalog .inventory-model-row > .photo-gallery {
  grid-area: photo; align-self: start; padding: 0; border: 0; border-radius: 0;
}
#catalog .inventory-model-row .photo-gallery-stage img,
#catalog .inventory-model-row > .photo-gallery-pending > img { height: clamp(260px, 25vw, 340px); }
#catalog .inventory-model-row .inventory-name h3 { font: 700 1.375rem/1.3 Rubik, Arial, sans-serif; }
#catalog .inventory-model-row .inventory-name .card-link { font: inherit !important; }
#catalog .inventory-model-row .inventory-rate strong { font-size: 1.75rem; line-height: 1.2; }
#catalog .inventory-model-row .inventory-actions .book-date {
  flex: 0 0 100%; min-height: 52px; padding: 12px 20px; font-size: 1rem;
}
#catalog .inventory-model-row .inventory-actions > :not(.book-date) {
  background: transparent; padding: 4px 8px; font-weight: 400 !important;
}
#catalog .inventory-model-row .inventory-actions > :not(.book-date):hover { text-decoration: underline; text-underline-offset: .2em; }
#catalog .inventory-model-row .inventory-actions [aria-pressed="true"] { background: var(--catalog-green); color: white; }
#catalog .inventory-model-row .inventory-actions .report-link { flex-basis: 100%; justify-content: start; padding-inline: 8px; }
#catalog .empty-state { padding: clamp(26px, 4vw, 54px) 16px; border: 1px dashed #a9b5a7; border-radius: 14px; background: white; }
#catalog #show-more { margin: 22px auto 0; }
@media (hover: hover) {
  #catalog :is(.department-card, .type-section nav a):hover {
    border-color: #7b8e79;
    box-shadow: 0 5px 16px #27372512;
  }
  #catalog :is(.department-card, .type-section nav a):hover img { transform: scale(1.035); }
}
@media (max-width: 1100px) {
  #catalog .category-grid, #catalog .type-section nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #catalog .inventory-row { grid-template-columns: 78px minmax(0,1fr) auto; }
  #catalog .inventory-actions { grid-column: 2 / -1; }
}
@media (max-width: 790px) {
  #catalog .category-grid, #catalog .type-section nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  #catalog .category-grid.models { grid-template-columns: minmax(0,1fr); }
  #catalog .catalog-top { flex-direction: column; align-items: stretch; gap: 16px; }
  #catalog .search { width: 100%; }
  #catalog .catalog-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
  #catalog .catalog-tools :is(input,select,button) { width: 100%; }
  #catalog .inventory-row.inventory-model-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "price" "actions";
    grid-template-rows: auto; padding: 20px;
  }
  #catalog .inventory-model-row:has(> .photo-gallery) { grid-template-areas: "photo" "copy" "price" "actions"; }
  #catalog .inventory-model-row .inventory-name h3 { font-size: 1.25rem; }
}
@media (max-width: 560px) {
  #catalog { padding-inline: 16px; }
  #catalog .category-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  #catalog .department-card { display: grid; grid-template-columns: clamp(72px, calc(32vw - 28px), 112px) minmax(0, 1fr); border-radius: 12px; }
  #catalog .department-art { height: 100%; min-height: 108px; aspect-ratio: auto; padding: 10px 7px 21px; }
  #catalog .department-art img { padding: 8px 7px 24px; }
  #catalog .department-count { top: auto; left: 6px; bottom: 5px; padding: 2px 5px; }
  #catalog .department-caption { align-self: center; min-width: 0; gap: 5px; padding: 11px clamp(8px, 2.5vw, 13px); }
  #catalog .type-section nav { gap: 9px; }
  #catalog .type-caption { padding: 11px; }
  #catalog .type-caption strong { font-size: 1rem; }
  #catalog .model-entry { padding: 14px; gap: 12px; }
  #catalog .model-offer { max-width: 119px; }
  #catalog .inventory-row { grid-template-columns: 62px minmax(0,1fr); gap: 10px; padding: 12px; }
  #catalog .inventory-row > img { height: 64px; }
  #catalog .inventory-rate { grid-column: 2; }
  #catalog .inventory-actions { grid-column: 1 / -1; }
  #catalog .inventory-row.inventory-model-row { padding: 16px; }
  #catalog .inventory-model-row .photo-gallery-stage img,
  #catalog .inventory-model-row > .photo-gallery-pending > img { height: 240px; }
}
@media (max-width: 390px) {
  #catalog .type-section nav { grid-template-columns: minmax(0, 1fr); }
  #catalog .type-section nav a { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; min-height: 112px; }
  #catalog .type-section .type-thumbnail { height: 100%; max-height: none; aspect-ratio: auto; }
  #catalog .type-caption strong { overflow-wrap: break-word; }
}
@media (prefers-reduced-motion: reduce) {
  #catalog :is(.department-card, .type-section nav a, .department-art img, .type-thumbnail img) { transition: none; }
  #catalog :is(.department-card, .type-section nav a):hover img { transform: none; }
}

