:root {
  --navy: #071d2c;
  --navy-2: #0b2b40;
  --cyan: #2bc4d5;
  --ocean: #0a6b86;
  --paper: #f7f6f2;
  --ink: #102531;
  --muted: #63717a;
  --line: rgba(16, 37, 49, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font-family: Manrope, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }

.catalog-header { min-height: 88px; padding: 0 5vw; display: flex; align-items: center; gap: 40px; background: var(--navy); color: #fff; border-bottom: 1px solid rgba(255,255,255,.13); }
.catalog-brand { display: flex; width: 230px; height: 72px; overflow: hidden; }
.catalog-brand span { display: block; width: 230px; height: 72px; overflow: hidden; position: relative; }
.catalog-brand img { display: block; width: 510px; height: auto; position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
.catalog-header nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.catalog-header nav a { color: rgba(255,255,255,.76); text-decoration: none; font-size: 12px; font-weight: 700; }
.catalog-header nav a:hover { color: #fff; }
.catalog-header .back-link { padding: 13px 17px; background: var(--cyan); color: var(--navy); }
.back-link b { margin-left: 14px; }

main { min-height: calc(100vh - 170px); }
.catalog-intro { padding: 72px 8vw 58px; display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 8vw; background: linear-gradient(120deg, #eef0ec, #f7f6f2 64%); }
.eyebrow { margin: 0; display: flex; align-items: center; gap: 12px; color: var(--ocean); text-transform: uppercase; letter-spacing: .22em; font-size: 10px; font-weight: 800; }
.eyebrow span { width: 35px; height: 1px; background: var(--cyan); }
h1 { margin: 24px 0 0; font-size: clamp(44px, 5.4vw, 78px); line-height: 1; letter-spacing: -.05em; }
h1 em { color: var(--ocean); font-family: "Playfair Display", Georgia, serif; font-weight: 600; }
.intro-copy { max-width: 430px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.catalog-shell { margin: 0; position: relative; background: #e8e7e1; border-top: 1px solid var(--line); }
.catalog-toolbar { min-height: 66px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; border-bottom: 1px solid var(--line); }
.catalog-toolbar > div { display: flex; gap: 6px; }
.catalog-toolbar button { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 10px 14px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.catalog-toolbar button:hover { border-color: var(--ocean); }
.catalog-toolbar button span { margin-right: 7px; color: var(--ocean); font-size: 15px; }
.catalog-toolbar p { margin: 0; color: var(--muted); font-size: 10px; }

.catalog-stage { min-height: min(760px, calc(100vh - 150px)); padding: 54px 8vw; display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px; align-items: center; gap: 28px; background: radial-gradient(circle at 50% 25%, #344a56 0, #152e3a 53%, #071d2c 100%); overflow: hidden; }
.page-spread { display: flex; align-items: center; justify-content: center; min-width: 0; filter: drop-shadow(0 24px 28px rgba(0,0,0,.36)); perspective: 1600px; }
.catalog-page { width: min(40vw, 610px); max-height: calc(100vh - 235px); aspect-ratio: 1 / 1; position: relative; border: 0; padding: 0; background: #fff; overflow: hidden; transition: transform .24s ease, filter .24s ease; }
.catalog-page.single { width: min(52vw, 670px); }
.catalog-page:first-child:not(.single) { transform-origin: right center; box-shadow: inset -18px 0 22px -22px rgba(0,0,0,.7); }
.catalog-page:last-child:not(.single) { transform-origin: left center; box-shadow: inset 18px 0 22px -22px rgba(0,0,0,.5); }
.catalog-page:hover { z-index: 2; filter: brightness(1.02); }
.catalog-page img { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; }
.catalog-page span { position: absolute; right: 9px; top: 9px; min-width: 28px; height: 28px; padding: 0 7px; display: grid; place-items: center; background: rgba(7,29,44,.74); color: #fff; font-size: 9px; font-weight: 800; opacity: 0; transition: .2s; }
.catalog-page:hover span, .catalog-page:focus-visible span { opacity: 1; }
.stage-arrow { width: 52px; height: 52px; border: 1px solid rgba(255,255,255,.25); background: rgba(7,29,44,.4); color: #fff; font-size: 18px; transition: .2s; }
.stage-arrow:hover { background: var(--cyan); color: var(--navy); border-color: var(--cyan); }
.stage-arrow:disabled { opacity: .22; cursor: default; }

.catalog-controls { min-height: 86px; padding: 0 5vw; display: grid; grid-template-columns: 140px minmax(230px, 540px) 140px; align-items: center; justify-content: center; gap: 30px; background: #fff; border-top: 1px solid var(--line); }
.catalog-controls button { border: 0; background: transparent; color: var(--ink); padding: 12px; font-size: 11px; font-weight: 800; }
.catalog-controls button:disabled { opacity: .3; cursor: default; }
.catalog-controls button:last-child { text-align: right; }
.page-progress { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 20px; }
.page-progress strong { min-width: 96px; font-size: 11px; text-align: right; }
.page-progress input { width: 100%; accent-color: var(--ocean); cursor: pointer; }

.thumbnail-panel { position: fixed; z-index: 30; inset: 0 0 0 auto; width: min(560px, 92vw); padding: 28px; background: #f7f6f2; box-shadow: -25px 0 50px rgba(0,0,0,.25); transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); overflow: auto; }
.thumbnail-panel.open { transform: none; }
.thumbnail-head { position: sticky; z-index: 2; top: -28px; margin: -28px -28px 20px; padding: 24px 28px 18px; display: flex; justify-content: space-between; align-items: center; background: rgba(247,246,242,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.thumbnail-head strong { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.thumbnail-head button { border: 0; background: none; font-size: 28px; }
.thumbnail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.thumbnail { border: 1px solid var(--line); padding: 7px; background: #fff; color: var(--ink); }
.thumbnail:hover, .thumbnail.active { border-color: var(--ocean); box-shadow: 0 0 0 1px var(--ocean); }
.thumbnail img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.thumbnail span { display: block; padding: 7px 2px 1px; text-align: center; font-size: 9px; font-weight: 800; }

.catalog-lightbox { position: fixed; z-index: 100; inset: 0; display: none; grid-template-rows: 58px minmax(0, 1fr); background: rgba(2,14,22,.97); color: #fff; }
.catalog-lightbox.open { display: grid; }
.lightbox-tools { padding: 0 18px; display: flex; justify-content: flex-end; align-items: center; gap: 7px; border-bottom: 1px solid rgba(255,255,255,.13); }
.lightbox-tools span { margin-right: auto; font-size: 11px; font-weight: 800; }
.lightbox-tools button { min-width: 40px; height: 36px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff; }
.lightbox-tools #zoomReset { min-width: 62px; font-size: 10px; }
.lightbox-tools #lightboxClose { margin-left: 12px; border: 0; font-size: 27px; }
.lightbox-canvas { overflow: auto; display: grid; place-items: start center; padding: 34px; }
.lightbox-canvas img { width: min(82vh, 92vw); max-width: none; transform: scale(var(--zoom, 1)); transform-origin: top center; transition: transform .15s; box-shadow: 0 18px 50px rgba(0,0,0,.46); }

footer { min-height: 82px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; background: #041722; color: rgba(255,255,255,.55); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }

@media (max-width: 900px) {
  .catalog-header nav a:not(.back-link) { display: none; }
  .catalog-intro { padding: 55px 6vw 46px; grid-template-columns: 1fr; gap: 24px; }
  .catalog-stage { min-height: 640px; padding: 36px 3vw; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 10px; }
  .catalog-page, .catalog-page.single { width: min(72vw, 580px); max-height: 76vh; }
  .catalog-controls { grid-template-columns: 80px 1fr 80px; gap: 10px; }
  .catalog-controls button span { display: none; }
}

@media (max-width: 600px) {
  .catalog-header { min-height: 70px; padding: 0 14px; gap: 8px; position: relative; }
  .catalog-brand, .catalog-brand span { width: 165px; height: 58px; }
  .catalog-brand img { width: 400px; }
  .catalog-header nav { display: flex; flex: 0 0 auto; gap: 0; margin: 0; position: absolute; right: 14px; }
  .catalog-header .back-link { display: block !important; padding: 10px 11px; font-size: 9px; }
  .back-link b { display: none; }
  .catalog-intro { padding: 46px 22px 38px; }
  h1 { font-size: 40px; }
  .intro-copy { font-size: 13px; }
  .catalog-toolbar { min-height: 60px; padding: 0 16px; }
  .catalog-toolbar p { display: none; }
  .catalog-stage { min-height: 470px; padding: 24px 44px; display: flex; align-items: center; justify-content: center; position: relative; }
  .stage-arrow { width: 34px; height: 44px; position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); }
  .stage-arrow.previous { left: 6px; }
  .stage-arrow.next { right: 6px; }
  .page-spread { width: 100%; min-width: 0; max-width: calc(100vw - 88px); }
  .catalog-page, .catalog-page.single { width: 100%; max-width: 430px; min-width: 0; }
  .catalog-page img { min-width: 0; max-width: 100%; }
  .catalog-controls { min-height: 76px; padding: 0 8px; grid-template-columns: 48px 1fr 48px; }
  .page-progress { grid-template-columns: 1fr; gap: 6px; }
  .page-progress strong { text-align: center; min-width: 0; }
  .thumbnail-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox-canvas { padding: 18px; }
  footer { padding: 0 20px; }
  footer span:last-child { display: none; }
}
