.catalog-main {
  width: min(1440px, calc(100% - 28px));
}

.catalog-shell {
  display: grid;
  gap: 16px;
}

.catalog-header,
.catalog-viewer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.catalog-header h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.catalog-header p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
}

.catalog-actions,
.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.showroom-catalog-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, #f5fbf8, #ffffff);
}

.showroom-catalog-entry h2 {
  margin: 0;
  font-size: 18px;
}

.showroom-catalog-entry p {
  margin: 4px 0 0;
  color: var(--muted);
}

.catalog-viewer {
  overflow: hidden;
}

.catalog-toolbar {
  justify-content: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.catalog-page-meter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 800;
}

.catalog-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(76vh, 980px);
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(23, 107, 91, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 107, 91, 0.04) 1px, transparent 1px),
    #f4f3ee;
  background-size: 38px 38px;
}

.catalog-page {
  width: min(100%, 780px);
  margin: 0;
  transform-origin: center;
  transition: transform 180ms ease, opacity 160ms ease;
}

.catalog-page.is-turning {
  opacity: 0.35;
  transform: translateX(8px) rotateY(-8deg);
}

.catalog-page.is-zoomed {
  width: min(100%, 1040px);
}

.catalog-page img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}

.catalog-side-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(19vw, 180px);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.catalog-side-prev {
  left: 0;
}

.catalog-side-next {
  right: 0;
}

.catalog-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.catalog-thumb {
  display: grid;
  gap: 6px;
  min-width: 76px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.catalog-thumb img {
  width: 64px;
  aspect-ratio: 1 / 1.42;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface-muted);
}

.catalog-thumb[data-active="true"] {
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(23, 107, 91, 0.16);
}

@media (max-width: 820px) {
  .catalog-main {
    width: min(100%, calc(100% - 16px));
  }

  .catalog-header {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .showroom-catalog-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .catalog-toolbar [data-catalog-zoom],
  .catalog-toolbar [data-catalog-fullscreen] {
    grid-column: span 3;
  }

  .catalog-stage {
    min-height: 60vh;
    padding: 8px;
  }

  .catalog-side-nav {
    width: 22vw;
  }
}
