/**
 * layout1-modules-bem.css — layout1 bold module slot chrome (shared platform rules in platform-modules-responsive.css).
 * Scope: body.storefront-bold.theme-layout1 only.
 */
body.storefront-bold.theme-layout1 .layout-page__module-row,
body.storefront-bold.theme-layout1 .storefront-bold__module-row {
  width: 100% !important;
  max-width: var(--l1-mod-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--l1-mod-pad-x) !important;
  padding-right: var(--l1-mod-pad-x) !important;
  float: none !important;
  box-sizing: border-box !important;
}

/* Module chrome — consistent gutters */
body.storefront-bold.theme-layout1 .content-module.storefront-bold__module {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

body.storefront-bold.theme-layout1 .storefront-bold__module-section,
body.storefront-bold.theme-layout1 .saf_about_wrapper.storefront-bold__module-section {
  width: 100% !important;
  max-width: var(--l1-mod-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--l1-mod-pad-x) !important;
  padding-right: var(--l1-mod-pad-x) !important;
  float: none !important;
  box-sizing: border-box !important;
}

body.storefront-bold.theme-layout1 .storefront-bold__module-section .container,
body.storefront-bold.theme-layout1 .saf_about_wrapper .container.storefront-bold__module-container {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

/* l1-cms + sf-cms: stack sidebar under main on tablet */
@media (max-width: 991.98px) {
  body.storefront-bold.theme-layout1 .l1-cms__grid.l1-cms__grid--3,
  body.storefront-bold.theme-layout1 .sf-cms__grid.sf-cms__grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 575.98px) {
  body.storefront-bold.theme-layout1 .l1-cms__grid,
  body.storefront-bold.theme-layout1 .sf-cms__grid.sf-cms__grid--2,
  body.storefront-bold.theme-layout1 .sf-cms__grid.sf-cms__grid--3 {
    grid-template-columns: 1fr !important;
  }
}

/* Module overlays / popups — stay in viewport */
body.storefront-bold.theme-layout1 .storefront-bold__module-overlays,
body.storefront-bold.theme-layout1 .storefront__module-overlays {
  max-width: 100%;
  overflow-x: auto;
}

body.storefront-bold.theme-layout1 .storefront-bold__module-overlays img,
body.storefront-bold.theme-layout1 .storefront-bold__module-overlays iframe {
  max-width: 100% !important;
  height: auto !important;
}

/* Product / commerce inside modules */
body.storefront-bold.theme-layout1 .layout-page__main .mega-commerce .row,
body.storefront-bold.theme-layout1 .layout-page__main .mega-commerce--products .row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--l1-mod-gap);
  margin: 0;
}

body.storefront-bold.theme-layout1 .layout-page__main .mega-commerce [class*="col-"] {
  flex: 1 1 calc(50% - var(--l1-mod-gap));
  max-width: calc(50% - var(--l1-mod-gap) / 2);
  min-width: 0;
  padding: 0;
  float: none;
}

@media (max-width: 575.98px) {
  body.storefront-bold.theme-layout1 .layout-page__main .mega-commerce [class*="col-"] {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* Events / booking lists in modules */
body.storefront-bold.theme-layout1 .layout-page__main .bolxdatabooking .table,
body.storefront-bold.theme-layout1 .layout-page__main .saf_blog_wrapper .table {
  width: 100%;
}

/* Prose: prevent overflow from pasted HTML */
body.storefront-bold.theme-layout1 .storefront-bold__prose,
body.storefront-bold.theme-layout1 #contentpagehere {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

body.storefront-bold.theme-layout1 .storefront-bold__prose pre,
body.storefront-bold.theme-layout1 #contentpagehere pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* layout2/3 body class on same engine — bold off but shared main */
body.storefront-bold.theme-layout2 .layout-page__main,
body.storefront-bold.theme-layout3 .layout-page__main {
  overflow-x: clip;
}

/* Image gallery BEM — layout1 bold */
body.storefront-bold.theme-layout1 .l1-mod-gallery__grid {
  gap: var(--l1-mod-gap);
}

body.storefront-bold.theme-layout1 .l1-mod-gallery__head {
  margin-bottom: var(--l1-mod-gap);
  box-sizing: border-box;
}

/* Module title stack — layout-level (platform-modules owns gap values) */
body.storefront-bold.theme-layout1 .l1-mod-content__stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

body.storefront-bold.theme-layout1 .l1-mod-content__stack > .l1-mod-content__head,
body.storefront-bold.theme-layout1 .l1-mod-content__stack > .l1-mod-services__head,
body.storefront-bold.theme-layout1 .l1-mod-content__stack > .l1-mod-price-list__head {
  margin: 0;
}

/* Legacy module titles without __stack */
body.storefront-bold.theme-layout1 .l1-mod-content__head {
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

@media (min-width: 992px) {
  body.storefront-bold.theme-layout1 .l1-mod-content__head {
    margin-bottom: clamp(1.35rem, 1vw + 0.85rem, 2.25rem);
  }

  body.storefront-bold.theme-layout1 .l1-mod-content__stack > .l1-mod-content__head,
  body.storefront-bold.theme-layout1 .l1-mod-content__stack > .l1-mod-services__head,
  body.storefront-bold.theme-layout1 .l1-mod-content__stack > .l1-mod-price-list__head {
    margin: 0;
  }
}

body.storefront-bold.theme-layout1 .l1-mod-gallery__slider-wrap .blogSlider {
  width: 100%;
}
