.kitchen-gallery { padding-top: 0; }
.kitchen-gallery-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
#kitchen-filters { display: flex; flex-wrap: wrap; gap: 8px 24px; }
#kitchen-filters button { min-height: 48px; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink); font: inherit; font-size: 12px; transition: border-color .2s; }
#kitchen-filters button[aria-pressed="true"] { border-bottom-color: currentColor; }
#kitchen-count { font-size: 11px; letter-spacing: .06em; }
.kitchen-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 36px 20px; }
.kitchen-gallery-card { display: block; min-width: 0; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; animation: kitchen-fade .25s ease both; }
.kitchen-gallery-media { display: block; overflow: hidden; }
.kitchen-gallery-card img { display: block; width: 100%; height: auto; object-fit: contain; transition: transform .4s ease; }
.kitchen-gallery-caption { font-family: var(--font-heading); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; font-size: 11px; letter-spacing: .08em; }
.kitchen-gallery-caption span:last-child:not(:first-child) { font-size: 20px; }
@media (hover: hover) { .kitchen-gallery-card:hover img { transform: scale(1.025); } }
.kitchen-lightbox { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 24px 4%; border: 0; background: var(--paper); color: var(--ink); overflow: auto; }
.kitchen-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 20px; animation: kitchen-fade .2s ease both; }
.kitchen-lightbox::backdrop { background: var(--ink); }
.kitchen-lightbox-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kitchen-lightbox-top h2 { margin: 0; font: inherit; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.kitchen-lightbox button { min-height: 44px; min-width: 44px; border: 1px solid var(--line); background: transparent; color: inherit; padding: 10px 14px; font: inherit; font-size: 12px; }
.kitchen-lightbox button:disabled { opacity: .5; cursor: not-allowed; }
.kitchen-lightbox-stage { position: relative; min-height: 0; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
#kitchen-full-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; opacity: 1; transition: opacity .18s ease; }
#kitchen-full-image.is-loading { opacity: 0; }
#kitchen-image-status { position: absolute; text-align: center; font-size: 13px; }
.kitchen-lightbox-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.kitchen-lightbox-copy:has([hidden]):not(:has(:not([hidden]))) { display: none; }
.kitchen-lightbox-copy { max-width: 440px; }
.balcony-page .kitchen-lightbox-copy { max-height: 25dvh; overflow-y: auto; }
.balcony-page #kitchen-description { white-space: pre-line; }
.kitchen-lightbox-copy h3 { margin: 0 0 8px; font-size: 18px; font-weight: 400; }
.kitchen-lightbox-copy p { margin: 0; font-size: 13px; line-height: 1.6; }
.kitchen-lightbox-controls { display: flex; align-items: center; gap: 18px; }
#kitchen-counter { font-size: 12px; font-variant-numeric: tabular-nums; }
.kitchen-enquiry p { font-size: 11px; margin: 8px 0 0; }
@keyframes kitchen-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 900px) { .kitchen-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .kitchen-gallery-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .kitchen-lightbox { padding: 16px 5%; }
  .kitchen-lightbox[open] { gap: 12px; }
  .kitchen-lightbox-bottom { gap: 14px; }
  .kitchen-enquiry { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .kitchen-gallery *, .kitchen-lightbox, .kitchen-lightbox * { animation: none !important; transition: none !important; }
  .kitchen-gallery-card:hover img { transform: none; }
}

/* Kitchen-only image system: uniform previews, uncropped originals in the viewer. */
.kitchen-page { --kitchen-media-ratio: 2 / 1; --kitchen-caption-space: 18px; }
.kitchen-page .collection-card .card-image,
.kitchen-page .kitchen-gallery-media { aspect-ratio: var(--kitchen-media-ratio); }
.kitchen-page .collection-card img,
.kitchen-page .kitchen-gallery-card img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .6s; }
.kitchen-page .collection-caption,
.kitchen-page .kitchen-gallery-caption { min-height: 44px; padding-top: var(--kitchen-caption-space); gap: 16px; align-items: center; }
.kitchen-page .collection-caption h3,
.kitchen-page .kitchen-gallery-caption { font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.kitchen-page .collection-caption span:not(:first-child),
.kitchen-page .kitchen-gallery-caption span:last-child:not(:first-child) { flex-shrink: 0; font-size: 22px; }
.kitchen-page .kitchen-gallery-grid { gap: 36px 20px; }
.kitchen-page .journal-grid article img,
.kitchen-page .journal-secondary img { height: clamp(260px, 32vw, 460px) !important; object-fit: cover; object-position: center; }
.kitchen-page .hero-background { background-position: center; }
@media (hover: hover) {
  .kitchen-page .collection-card:hover img,
  .kitchen-page .kitchen-gallery-card:hover img { transform: scale(1.045); }
}
@media (max-width: 600px) {
  .kitchen-page .kitchen-gallery-grid { gap: 28px; }
  .kitchen-page .journal-grid article img { height: auto !important; aspect-ratio: var(--kitchen-media-ratio); }
}
@media (prefers-reduced-motion: reduce) {
  .kitchen-page .collection-card img { transition: none; }
  .kitchen-page .collection-card:hover img,
  .kitchen-page .kitchen-gallery-card:hover img { transform: none; }
}

/* Each row follows its tallest photograph; shorter compositions stay whole. */
.collection-page #mainContent #kitchen-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px) clamp(14px, 2vw, 30px);
  align-items: stretch;
}
.collection-page #kitchen-grid .kitchen-gallery-card {
  display: flex; flex-direction: column; cursor: pointer;
}
#mainContent #kitchen-grid .kitchen-gallery-card .kitchen-gallery-media {
  width: 100%; flex: 1; display: grid; align-items: center;
  aspect-ratio: auto; overflow: hidden;
}
#mainContent #kitchen-grid .kitchen-gallery-card img {
  width: 100%; height: auto; object-fit: contain; transform: none;
}
#kitchen-grid .kitchen-gallery-caption {
  width: 100%; align-items: baseline; font-size: clamp(14px, 1vw, 17px);
  letter-spacing: .02em; line-height: 1.4;
}
#kitchen-grid button:focus-visible, #kitchen-lightbox button:focus-visible {
  outline: 2px solid currentColor; outline-offset: 3px;
}
#kitchen-grid button:active .kitchen-gallery-caption { text-decoration: underline; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #kitchen-grid .kitchen-gallery-caption span:last-child:not(:first-child) { transition: transform .2s ease; }
  #kitchen-grid button:hover .kitchen-gallery-caption span:last-child:not(:first-child) { transform: translate(2px,-2px); }
}
@media (max-width: 900px) {
  .collection-page #mainContent #kitchen-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 389px) {
  .collection-page #mainContent #kitchen-grid { grid-template-columns: minmax(0,1fr); }
}
#kitchen-lightbox .kitchen-lightbox-stage { grid-template: minmax(0,1fr) / minmax(0,1fr); }
#kitchen-lightbox #kitchen-full-image { min-width: 0; }

/* Complete collection catalogues: one photograph per design. */
body.collection-page #mainContent #kitchen-gallery {
  --catalogue-gutter: clamp(20px, 6vw, 100px);
  padding-inline: 0;
  padding-top: clamp(24px, 3vw, 42px) !important;
  color: #f5f4f0;
  background: #252525;
}
#kitchen-gallery :is(.section-header,.kitchen-gallery-toolbar) {
  margin-inline: var(--catalogue-gutter);
}
.collection-page #kitchen-gallery :is(h2,.eyebrow,.collection-section-note,#kitchen-filters button) { color: inherit; }
.collection-page #kitchen-gallery .section-header {
  border-top: 0;
  padding-top: 0 !important;
  margin-bottom: clamp(12px, 1.6vw, 20px) !important;
}
.collection-page #kitchen-gallery .kitchen-gallery-toolbar {
  border-color: #606060;
  margin-bottom: clamp(18px, 2.2vw, 28px);
}
.collection-page #kitchen-gallery #kitchen-filters button {
  min-height: 38px;
  padding-block: 8px;
}
.collection-page #mainContent #kitchen-gallery #kitchen-grid {
  grid-template-columns: minmax(0,1fr);
  gap: clamp(32px, 5vw, 72px);
}
.collection-page #kitchen-gallery #kitchen-grid .editorial-design {
  position: relative;
  isolation: isolate;
  color: inherit;
  border: 0;
  padding: 0;
}
.collection-page #kitchen-gallery #kitchen-grid .design-summary {
  display: grid;
  gap: 8px;
  justify-items: start;
  text-align: left;
}
.collection-page #kitchen-gallery #kitchen-grid .kitchen-gallery-caption { display: none; }
.collection-page #kitchen-gallery #kitchen-grid .kitchen-gallery-media {
  display: block;
  flex: none;
  width: 100%;
  aspect-ratio: auto;
  background: transparent;
}
.collection-page #kitchen-gallery #kitchen-grid img { display: block; width: 100%; height: auto; }
.collection-page #kitchen-gallery .design-action { text-decoration: underline; text-underline-offset: .28em; }
@media (min-width: 769px) {
  .collection-page #mainContent #kitchen-gallery #kitchen-grid { gap: clamp(8px, 0.8vw, 12px); }
  .collection-page #kitchen-gallery #kitchen-grid .editorial-design { display: grid; }
  .collection-page #kitchen-gallery #kitchen-grid :is(.design-summary,.kitchen-gallery-media) { grid-area: 1 / 1; }
  .collection-page #kitchen-gallery #kitchen-grid .editorial-design::before {
    content: '';
    grid-area: 1 / 1;
    z-index: 1;
    background: linear-gradient(90deg, rgb(0 0 0 / .83), rgb(0 0 0 / .64) 34%, transparent 75%);
    pointer-events: none;
  }
  .collection-page #kitchen-gallery #kitchen-grid .design-summary {
    z-index: 2;
    align-self: center;
    margin: 24px var(--catalogue-gutter);
    max-width: 35ch;
  }
  .collection-page #kitchen-gallery #kitchen-grid .design-name { font-size: var(--type-card-title); }
  .collection-page #kitchen-gallery #kitchen-grid button:focus-visible { outline-offset: -4px; }
}
@media (max-width: 768px) {
  .collection-page #mainContent #kitchen-gallery #kitchen-grid { padding-inline: var(--catalogue-gutter); }
}
/* Narrow photographs keep the product whole; wide room views retain their banner. */
.collection-page #kitchen-gallery #kitchen-grid .catalogue-inset img {
  max-height: min(64svh, 620px);
  object-fit: contain;
  object-position: center;
}
@media (min-width: 769px) {
  .wardrobe-page #kitchen-gallery #kitchen-grid .catalogue-inset {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
    gap: clamp(24px, 4vw, 72px);
    padding: clamp(24px, 3vw, 48px) var(--catalogue-gutter);
  }
  .wardrobe-page #kitchen-gallery #kitchen-grid .catalogue-inset::before { content: none; }
  .wardrobe-page #kitchen-gallery #kitchen-grid .catalogue-inset .design-summary {
    grid-area: 1 / 1;
    margin: 0;
  }
  .wardrobe-page #kitchen-gallery #kitchen-grid .catalogue-inset .kitchen-gallery-media { grid-area: 1 / 2; }
}

@media (min-width: 769px) {
  .vanity-page #kitchen-gallery #kitchen-grid .catalogue-inset .kitchen-gallery-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }
  .vanity-page #kitchen-gallery #kitchen-grid .catalogue-inset img {
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center 55%;
  }
}

/* Reserve room for the fixed header above the Balcony collection. */
.balcony-page #mainContent { padding-top: clamp(72px, 8vw, 112px); background: #252525; }
