/* Part5 (23 October) shared photo grid.
   One gap token. Gallery photos are inset by the same gap, so every photo block on a
   page shares one left/right line. Stacked photo blocks meet through two half gaps; a
   photo block next to any other section adds the missing half on that side. Hero,
   video and split panels stay full-bleed. Zero mosaics stay seamless at every width.
   Selectors repeat .bg-page to outrank the generated per-element PDF rules. */
.bg-page{--bati-gallery-gap:12px;--bati-gallery-seam:calc(var(--bati-gallery-gap) / 2)}
@media(max-width:1024px){.bg-page{--bati-gallery-gap:8px}}

.bg-page.bg-page.bg-page :is(.bg-inner-gallery:not(.lu-ind-flush):not(.lu-grid-zero),.lu-grid-photo,.bg-gallery-flow,.bg-triptych,.bg-product-strip){
  gap:var(--bati-gallery-gap)!important;row-gap:var(--bati-gallery-gap)!important;column-gap:var(--bati-gallery-gap)!important;
  padding:var(--bati-gallery-seam) var(--bati-gallery-gap)!important;margin:0!important;
}
/* Edges facing a non-photo section. */
.bg-page.bg-page.bg-page>:not(.bg-inner-gallery:not(.lu-ind-flush):not(.lu-grid-zero),.lu-grid-photo,.bg-gallery-flow,.bg-triptych,.bg-product-strip)+:is(.bg-inner-gallery:not(.lu-ind-flush):not(.lu-grid-zero),.lu-grid-photo,.bg-gallery-flow,.bg-triptych,.bg-product-strip){
  padding-top:var(--bati-gallery-gap)!important;
}
.bg-page.bg-page.bg-page>:is(.bg-inner-gallery:not(.lu-ind-flush):not(.lu-grid-zero),.lu-grid-photo,.bg-gallery-flow,.bg-triptych,.bg-product-strip):not(:has(+:is(.bg-inner-gallery:not(.lu-ind-flush):not(.lu-grid-zero),.lu-grid-photo,.bg-gallery-flow,.bg-triptych,.bg-product-strip))){
  padding-bottom:var(--bati-gallery-gap)!important;
}
/* Desktop runs of grids are wrapped in a display:contents flow; its own children carry
   the seams there. On tablet/mobile the flow is the grid and these paddings are inert. */
.bg-page.bg-page.bg-page .bg-gallery-flow>.elementor-element{padding-top:var(--bati-gallery-seam)!important;padding-bottom:var(--bati-gallery-seam)!important}
.bg-page.bg-page.bg-page>:not(.bg-inner-gallery:not(.lu-ind-flush):not(.lu-grid-zero),.lu-grid-photo,.bg-triptych,.bg-product-strip)+.bg-gallery-flow>.elementor-element:first-child{padding-top:var(--bati-gallery-gap)!important}
.bg-page.bg-page.bg-page>.bg-gallery-flow:not(:has(+:is(.bg-inner-gallery:not(.lu-ind-flush):not(.lu-grid-zero),.lu-grid-photo,.bg-triptych,.bg-product-strip)))>.elementor-element:last-child{padding-bottom:var(--bati-gallery-gap)!important}
.bg-page.bg-page.bg-page .lu-grid-photo>.bg-inner-image,
.bg-page.bg-page.bg-page .lu-grid-photo>.bg-inner-image img{display:block;width:100%;max-width:none;margin:0}
.bg-page.bg-page.bg-page :is(.bg-triptych,.bg-product-strip)>*{margin:0!important}
.bg-page.bg-page .bg-poster{margin-top:0!important}
/* Edge-to-edge exceptions (user notes, 23 October): the Home row after THE ART AND
   SCIENCE OF LEATHER keeps its inner gaps but touches both page edges; listed single
   photos are full-bleed bands. */
.bg-page.bg-page.bg-page>.bg-triptych.bg-triptych.elementor-element{padding-left:0!important;padding-right:0!important}
.bg-page.bg-page.bg-page>.lu-grid-band.elementor-element{padding:0!important;margin:0!important}
.bg-page.bg-page.bg-page>.lu-grid-band>.bg-inner-image,
.bg-page.bg-page.bg-page>.lu-grid-band>.bg-inner-image img{display:block;width:100%;max-width:none;margin:0}
@media(max-width:1024px){
  /* A mobile flow row can pair an introductory photo with a garment card; one tile ratio
     keeps every seam at the gap instead of leaving the shorter photo's remainder. */
  .bg-page.bg-inner-page .bg-gallery-flow .bg-catalog-item>.bg-inner-image img{aspect-ratio:485/680!important;object-fit:cover}
}

/* Seamless mosaics: Material swatches, Innovation Center, monochrome Leather Lab,
   Knitting and Textile pairs requested as touching images. */
.bg-page.bg-page.bg-page :is(.lu-ind-flush,.lu-grid-zero).elementor-element{
  gap:0!important;row-gap:0!important;column-gap:0!important;padding:0!important;margin:0!important;
}
.bg-page.bg-page.bg-page :is(.lu-ind-flush,.lu-grid-zero)>.bg-catalog-item{margin:0!important;padding:0!important}
