.catalog-section {
  --catalog-surface: #201b16;
  --catalog-card: #2a221a;
  --catalog-border: #e9c68f25;
  position: relative;
  padding-block: clamp(2.5rem, 4.3vw, 4rem);
  background: #1b1612;
  color: var(--site-text);
  border-block: 1px solid var(--site-line);
}

.catalog-anchor {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.catalog-inner {
  width: min(100%, var(--site-width));
  margin-inline: auto;
  padding-inline: var(--site-side);
}

.catalog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.55rem;
}

.catalog-heading h2 {
  margin-bottom: .45rem;
  font: 600 clamp(2rem, 3.5vw, 2.9rem)/1.1 var(--display-font);
  letter-spacing: -.035em;
}

.catalog-heading h2 span { color: var(--site-gold); }
.catalog-heading h2 + p { color: var(--site-muted); font-size: .92rem; line-height: 1.6; }
.catalog-estimate-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  color: var(--site-gold);
  font-weight: 800;
  font-size: .83rem;
  white-space: nowrap;
}

.catalog-estimate-link:hover { text-decoration: underline; text-underline-offset: .28rem; }

.catalog-shell {
  border: 1px solid var(--catalog-border);
  border-radius: 1.45rem;
  background: var(--catalog-surface);
}

.catalog-views {
  display: flex;
  gap: .35rem;
  padding: .55rem;
  border-bottom: 1px solid var(--catalog-border);
}

.catalog-views a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .45rem 1rem;
  border-radius: .88rem;
  color: var(--site-muted);
  font-weight: 800;
  font-size: .9rem;
  text-align: center;
  transition: color .16s ease, background .16s ease;
}

.catalog-views a svg { width: 19px; height: 19px; flex: none; }
.catalog-views a:hover { color: var(--site-text); background: #ffffff09; }
.catalog-views a[aria-current] { color: #23190d; background: var(--site-gold); }

.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  padding: 1rem clamp(.75rem, 2vw, 1.4rem) .25rem;
}

.catalog-search {
  display: flex;
  align-items: center;
  min-width: 0;
  width: min(100%, 17rem);
  border: 1px solid var(--catalog-border);
  border-radius: .75rem;
  background: #17130f;
  color: var(--site-muted);
}

.catalog-search:focus-within { border-color: var(--site-gold); }
.catalog-search svg { width: 19px; height: 19px; margin-left: .75rem; flex: none; }
.catalog-search input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .4rem .65rem;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--site-text);
  font-size: 1rem;
}

.catalog-search input::placeholder { color: var(--site-muted); font-size: .82em; }
.catalog-search input:focus-visible { outline: none; }
.catalog-search input::-webkit-search-cancel-button { display: none; }
.catalog-search button {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: .75rem;
  color: var(--site-gold);
  font-size: 1.45rem;
}

.catalog-filters { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 0; }
.catalog-filters button {
  min-height: 38px;
  padding: .3rem .7rem;
  border: 1px solid var(--catalog-border);
  border-radius: .62rem;
  color: var(--site-muted);
  font-size: .76rem;
  font-weight: 750;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.catalog-filters button:hover { color: var(--site-text); border-color: #e7bc7580; }
.catalog-filters button[aria-pressed="true"] { color: var(--site-gold); border-color: #e7bc7560; background: #e7bc7517; }

.catalog-panel { padding: .55rem clamp(.75rem, 2vw, 1.4rem) 1rem; }
.catalog-result-count { color: var(--site-muted); font-size: .75rem; margin: .18rem 0 .65rem; }
.catalog-service-grid, .catalog-design-grid { display: grid; gap: .7rem; }
.catalog-service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-design-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.catalog-service-card, .catalog-design-card {
  min-width: 0;
  border: 1px solid var(--catalog-border);
  border-radius: .95rem;
  background: var(--catalog-card);
  transition: border-color .16s ease, background-color .16s ease;
}

.catalog-service-card:hover, .catalog-design-card:hover { border-color: #e7bc7566; }
.catalog-service-card[data-selected="true"], .catalog-design-card[data-selected="true"] { border-color: #e7bc7588; background: #33281b; }

.catalog-service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .6rem;
  min-height: 130px;
  padding: .75rem;
}

.catalog-service-top, .catalog-service-bottom { display: flex; align-items: center; gap: .65rem; }
.catalog-service-top { align-items: flex-start; }
.catalog-service-bottom { justify-content: space-between; }
.catalog-service-info { min-width: 0; }
.catalog-service-icon {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 41px;
  height: 41px;
  flex: none;
  border: 1px solid #e7bc7530;
  border-radius: .7rem;
  color: var(--site-gold);
  background: #e7bc7510;
}

.catalog-service-icon svg { width: 23px; height: 23px; }
.catalog-service-icon img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; }
.catalog-card-category { color: var(--site-gold); font-size: .68rem; font-weight: 800; line-height: 1.28; overflow-wrap: anywhere; }
.catalog-service-card h3, .catalog-design-card h3 { color: var(--site-text); font-size: .96rem; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.catalog-name-button { display: block; width: 100%; padding: .15rem 0; text-align: left; }
.catalog-name-button:hover { text-decoration: underline; text-underline-offset: .2rem; }
.catalog-card-detail { color: var(--site-muted); font-size: .74rem; line-height: 1.5; overflow-wrap: anywhere; }
.catalog-service-card .catalog-card-detail { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.catalog-card-price { color: var(--site-gold); font-size: .9rem; line-height: 1.2; font-weight: 800; }

.catalog-action, .catalog-more, .catalog-empty button {
  min-height: 40px;
  padding: .4rem .68rem;
  border: 1px solid #e7bc755d;
  border-radius: .62rem;
  color: var(--site-gold);
  font-size: .75rem;
  font-weight: 800;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.catalog-action:hover, .catalog-more:hover, .catalog-empty button:hover { color: #21170d; background: var(--site-gold); }
.catalog-action[aria-pressed="true"], .catalog-action[aria-disabled="true"] { color: var(--site-gold); background: #e7bc751e; border-color: transparent; }
.catalog-action[aria-disabled="true"] { cursor: default; }

.catalog-design-card { display: flex; flex-direction: column; }
.catalog-design-preview {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1.4;
  border-radius: .88rem .88rem 0 0;
  background: #352a21;
  color: var(--site-gold);
  cursor: zoom-in;
}

.catalog-design-preview > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .24s ease;
}

.catalog-image-placeholder svg { width: 29px; height: 29px; }
.catalog-design-preview:hover img { transform: scale(1.045); }
.catalog-expand {
  position: absolute;
  display: grid;
  place-items: center;
  right: .45rem;
  bottom: .45rem;
  width: 33px;
  height: 33px;
  border-radius: .45rem;
  background: #1b1612dc;
  color: var(--site-text);
}

.catalog-expand svg { width: 17px; height: 17px; }
.catalog-design-info { display: flex; flex: 1; flex-direction: column; padding: .68rem; gap: .32rem; }
.catalog-design-info h3 { flex: 1; }
.catalog-design-info .catalog-action { width: 100%; margin-top: .22rem; }
.catalog-more { display: block; margin: .85rem auto 0; padding-inline: 1rem; }
.catalog-more span { margin-left: .25rem; }

.catalog-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: .65rem;
  justify-items: center;
  padding: 1.35rem .75rem;
  border: 1px dashed var(--catalog-border);
  border-radius: .9rem;
  color: var(--site-muted);
  text-align: center;
  font-size: .88rem;
}

.catalog-note, .catalog-specs { color: var(--site-muted); font-size: .74rem; line-height: 1.6; }
.catalog-note { margin: .85rem 0 0; }
.catalog-shell > noscript .catalog-note { padding: 0 1rem 1rem; }
.catalog-specs { margin-top: .6rem; }
.catalog-specs summary { width: fit-content; padding: .38rem 0; color: var(--site-gold); font-weight: 750; cursor: pointer; }
.catalog-specs p { padding-bottom: .25rem; }

.catalog-dialog {
  position: fixed;
  inset: 0;
  width: min(560px, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--catalog-border);
  border-radius: 1.15rem;
  background: var(--catalog-card);
  color: var(--site-text);
  box-shadow: 0 20px 70px #07050490;
}

body:has(.catalog-dialog[open]) { overflow: hidden; }
.catalog-dialog::backdrop { background: #090705c9; }
.catalog-detail-content { position: relative; min-width: 0; }
.catalog-detail-close, .catalog-detail-pages button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid #e7bc755d;
  border-radius: .7rem;
  background: #1b1612;
  color: var(--site-gold);
  font-size: 1.25rem;
  line-height: 1;
}
.catalog-detail-close:hover, .catalog-detail-pages button:hover { color: #21170d; background: var(--site-gold); }
.catalog-detail-close { position: absolute; z-index: 1; top: .55rem; right: .55rem; font-size: 1.6rem; }
.catalog-detail-preview {
  display: grid;
  place-items: center;
  height: clamp(145px, 43dvh, 420px);
  background: #17120e;
  color: var(--site-muted);
  font-size: .85rem;
}

.catalog-detail-preview img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; touch-action: pan-y pinch-zoom; }
.catalog-detail-info { display: grid; gap: .5rem; padding: 1rem; }
.catalog-detail-info h3 { max-width: 90%; font-size: 1.25rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.catalog-detail-info .catalog-card-detail { font-size: .88rem; }
.catalog-detail-info .catalog-card-detail:empty { display: none; }
.catalog-detail-info .catalog-action { justify-self: start; min-height: 44px; margin-top: .15rem; padding-inline: .85rem; }
.catalog-detail-preview[hidden] ~ .catalog-detail-info { padding-right: 3.5rem; }
.catalog-detail-pages { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem 1rem 0; font-size: .78rem; color: var(--site-muted); }

@media (max-width: 925px) {
  .catalog-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .catalog-design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .catalog-estimate-link { display: none; }
}

@media (max-width: 550px) {
  .catalog-heading { align-items: flex-start; flex-direction: column; gap: .15rem; margin-bottom: .9rem; }
  .catalog-heading h2 + p { font-size: .84rem; }
  .catalog-shell { border-radius: 1.12rem; }
  .catalog-views { display: grid; grid-template-columns: 1fr 1fr; }
  .catalog-views a { gap: .32rem; padding-inline: .2rem; font-size: .77rem; }
  .catalog-views a svg { width: 17px; height: 17px; }
  .catalog-search { width: 100%; }
  .catalog-tools { padding-top: .72rem; }
  .catalog-filters button { min-height: 36px; padding-inline: .55rem; }
  .catalog-service-grid { grid-template-columns: 1fr; gap: .5rem; }
  .catalog-service-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .38rem; min-height: 92px; padding: .55rem; }
  .catalog-service-top { gap: .48rem; }
  .catalog-service-bottom { flex-direction: column; align-items: flex-end; gap: .4rem; text-align: right; }
  .catalog-service-icon { width: 34px; height: 34px; }
  .catalog-service-icon svg { width: 19px; height: 19px; }
  .catalog-service-card h3, .catalog-design-card h3 { font-size: .83rem; }
  .catalog-card-category { font-size: .65rem; }
  .catalog-card-price { max-width: 6.5rem; font-size: .76rem; }
  .catalog-card-detail { font-size: .69rem; }
  .catalog-design-grid { gap: .5rem; }
  .catalog-design-info { padding: .48rem; }
  .catalog-design-preview { aspect-ratio: 1.2; }
  .catalog-action { padding-inline: .48rem; }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-section *, .catalog-section *::before, .catalog-section *::after { transition-duration: 0s !important; }
}
