/* Gutenberg flow margins must not become extra rows inside our CSS grids. */
.hero > *, .vision > *, .about > *, .project-row > *,
.project-pair > *, .expertise-grid > *, .collection-grid > *,
.category-index-row > *, .image-set > *, .slideshow > *,
.frames > *, .contact-copy > *, .masthead > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  min-width: 0;
}
.expertise-grid { align-items: start; }
.selected-work .project-stack {
  display: block;
  margin-block: 0 !important;
}
.expertise-item > :first-child { margin-top: 0 !important; }
.expertise-item h3 { min-height: 2.2em; }

/* Match the preview's page gutters in both WordPress and the editor. */
.wp-block-post-content.site-main { width: 100%; max-width: 1800px; }
.editor-styles-wrapper > .project-row,
.editor-styles-wrapper .is-root-container > .project-row {
  margin-left: 4.8vw !important;
  margin-right: 4.8vw !important;
}
.project-info, .vision-copy, .about-copy { overflow-wrap: anywhere; }

/* Native galleries and MetaSlider must fit the shared video-height frame. */
.uniform-project-media > .alignnormal,
.uniform-project-media .metaslider,
.uniform-project-media .metaslider > div[id^="metaslider_container"],
.uniform-project-media .metaslider .flexslider,
.uniform-project-media .metaslider .flex-viewport,
.uniform-project-media .metaslider .slides,
.uniform-project-media .metaslider .slides > li {
  height: var(--project-media-height) !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.uniform-project-media .metaslider { width: 100% !important; max-width: 100% !important; }
.uniform-project-media .metaslider .slides > li img {
  width: 100% !important;
  height: var(--project-media-height) !important;
  max-height: 100% !important;
  object-fit: contain !important;
}
.project-visual.uniform-project-media .wp-block-gallery.has-nested-images {
  display: flex; flex-wrap: nowrap; gap: 12px;
  height: 100% !important; margin: 0 !important;
}
.project-visual.uniform-project-media .wp-block-gallery.has-nested-images figure.wp-block-image {
  flex: 1 1 0; min-width: 0; height: 100% !important;
  margin: 0 !important; overflow: hidden;
}
.project-visual.uniform-project-media .wp-block-gallery.has-nested-images figure.wp-block-image img {
  width: 100% !important; height: 100% !important;
  max-height: 100% !important; object-fit: contain !important;
}
.project-visual.uniform-project-media > .wp-block-video > video {
  width: 100%; height: 100% !important; object-fit: contain;
}

/* Single project images remain entirely visible, even when taller than wide. */
.site-main.collection-equal-height .project-visual > figure > img {
  width: 100% !important; max-width: 100% !important;
  height: 100% !important; object-fit: contain !important;
}
.site-main.collection-equal-height .project-visual > figure { overflow: visible; }
.slideshow .frames > figure { margin: 0 !important; }
.slideshow .frames { overflow: hidden; }

@media (max-width: 1000px) {
  .project-info, .reverse > .project-info { padding: 20px 0 !important; }
  .project-row > .project-visual { width: 100%; }
}
@media (max-width: 720px) {
  .expertise-item h3 { min-height: 0; }
}

/* 3D Fashion: match the shared separator spacing despite inline block padding. */
body.page-id-2787 .page-content > .project-row {
  padding-top: 48px !important;
}
@media (max-width: 640px) {
  body.page-id-2787 .page-content > .project-row {
    padding-top: 32px !important;
  }
}
/* 3D Lanvin: fit the video frame to its actual width, without vertical inset. */
body.page-id-2787 .page-content > .project-row > .project-visual:has(> .wp-block-video) {
  height: auto;
}
body.page-id-2787 .project-visual > .wp-block-video {
  height: auto !important;
  max-height: none;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body.page-id-2787 .project-visual > .wp-block-video > video {
  height: auto !important;
  max-height: none;
}
/* Scenography / Palais Galliera: stable 1000 x 550 frame, like 3D slides. */
body.page-id-2785 .page-content > .project-row > .project-visual:has(.metaslider) {
  container-type: inline-size;
}
body.page-id-2785 .project-visual .metaslider .flexslider,
body.page-id-2785 .project-visual .metaslider .flex-viewport,
body.page-id-2785 .project-visual .metaslider .slides,
body.page-id-2785 .project-visual .metaslider .slides > li {
  height: 55cqw !important;
  min-height: 0;
}
body.page-id-2785 .project-visual .metaslider .slides > li img {
  width: 100% !important;
  height: 55cqw !important;
  max-height: 55cqw !important;
  object-fit: contain !important;
}
/* Scenography: slightly reduce project 02 / JCDC Gallierock only. */
body.page-id-2785 .page-content > .project-row:nth-child(2 of .project-row) > .project-visual > figure.wp-block-image {
  width: 92%;
  margin-inline: auto !important;
}
/* Experience / Spring Studios: press images share the main image column. */
@media (min-width: 1001px) {
  body.page-id-2786 .page-content > .project-row:has(+ .spring-press),
  body.page-id-2786 .page-content > .spring-press {
    grid-template-columns: minmax(0,73fr) minmax(0,27fr);
  }
  body.page-id-2786 .page-content > .project-row:has(+ .spring-press) > .project-visual {
    grid-column: 1;
    grid-row: 1;
  }
  body.page-id-2786 .page-content > .project-row:has(+ .spring-press) > .project-info {
    grid-column: 2;
    grid-row: 1;
    padding: 25px 0 25px 36px;
  }
  body.page-id-2786 .page-content > .spring-press > .support-media {
    grid-column: 1;
  }
}
body.page-id-2786 .spring-press .wp-block-gallery {
  width: 100%;
  margin-inline: 0 !important;
}
/* Collection / Couture: slightly larger images, caption retained on the right. */
@media (min-width: 1001px) {
  .site-main.collection-equal-height > .couture-project {
    grid-template-columns: minmax(0,83fr) minmax(0,17fr);
  }
}
/* Brand Identity: remove the two selected Sensa visuals from the page layout. */
body.page-id-2783 .collection-grid > figure:has(img[src*="/brand-selection/selection-02"]),
body.page-id-2783 .collection-grid > figure:has(img[src*="/brand-selection/sansa-03"]) {
  display: none !important;
}
/* Brand merchandise: center the three images within their horizontal row. */
body.page-id-2783 .brand-merch-grid > figure:nth-last-child(-n+3) img {
  object-fit: contain !important;
  object-position: center center;
}
/* Brand Identity: separator and label before the three merchandise visuals. */
body.page-id-2783 .brand-merch-grid::before {
  content: "";
  grid-column: 1 / -1;
  order: 1;
  border-top: 1px solid #ccc7be;
  margin-top: 24px;
}
body.page-id-2783 .brand-merch-grid::after {
  content: "Merchandising · Product Design";
  grid-column: 1 / -1;
  order: 1;
  justify-self: start;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}
body.page-id-2783 .brand-merch-grid > figure:nth-last-child(-n+3) {
  order: 2;
}
/* Brand: proportional product widths give equal visible gaps without cropping. */
body.page-id-2783 .collection-grid.brand-merch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  align-items: flex-start;
}
body.page-id-2783 .brand-merch-grid > figure {
  flex: 0 0 calc((100% - 25px) / 2);
}
body.page-id-2783 .brand-merch-grid::before,
body.page-id-2783 .brand-merch-grid::after {
  flex: 0 0 100%;
}
body.page-id-2783 .brand-merch-grid > figure:nth-last-child(3) {
  flex: 1.01669449 1 0;
}
body.page-id-2783 .brand-merch-grid > figure:nth-last-child(2) {
  flex: 0.81751825 1 0;
}
body.page-id-2783 .brand-merch-grid > figure:last-child {
  flex: 0.69663866 1 0;
}
body.page-id-2783 .brand-merch-grid > figure:nth-last-child(-n+3) img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}
@media (max-width: 640px) {
  body.page-id-2783 .collection-grid.brand-merch-grid { gap: 12px; }
  body.page-id-2783 .brand-merch-grid > figure:not(:nth-last-child(-n+3)) {
    flex-basis: 100%;
  }
}
/* Suppress the parent theme's click outline; keep keyboard focus visible. */
.wp-site-blocks :focus:not(:focus-visible) {
  outline: none !important;
}