.bagged-layout-options { min-inline-size: 0; margin: 0; padding: 0; border: 0; }

.bagged-layout-card {
  display: grid;
  grid-template-columns: 16px 55px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-block: 7px;
  padding: 8px;
  border: 1px solid #bfc3d2;
  border-radius: 5px;
  color: #192448;
  background: #fff9ed;
  cursor: pointer;
}

.bagged-layout-card:has(input:checked) {
  border-color: #263dad;
  background: #eef0ff;
  box-shadow: inset 3px 0 #263dad;
}

.bagged-layout-card:has(input:focus-visible) {
  outline: 2px solid #263dad;
  outline-offset: 2px;
}

.bagged-layout-card input[type="radio"] { margin: 0; }
.bagged-layout-caption { display: grid; gap: 2px; }
.bagged-layout-caption small { color: #48516a; font-size: 11px; line-height: 1.3; }

.bagged-layout-thumb {
  display: grid;
  min-block-size: 35px;
  grid-template-columns: .92fr 1.08fr;
  gap: 2px;
  padding: 3px;
  border: 1px solid #918d7c;
  border-radius: 3px;
  background: #f6efe2;
}

.bagged-layout-thumb span:first-child {
  background:
    linear-gradient(#fff7e5, #fff7e5) center 38% / 58% 2px no-repeat,
    linear-gradient(#fff7e5, #fff7e5) center 58% / 42% 1px no-repeat,
    #a83224;
}

.bagged-layout-thumb span:last-child {
  background: linear-gradient(140deg, #b57348, #e7b875 54%, #8a5035);
}

.bagged-layout-card--editorial .bagged-layout-thumb {
  grid-template-columns: 1fr;
  grid-template-rows: .82fr 1.18fr;
}

.bagged-layout-card--editorial .bagged-layout-thumb span:first-child {
  background:
    linear-gradient(#762f26, #762f26) center 44% / 34% 2px no-repeat,
    linear-gradient(#762f26, #762f26) center 71% / 22% 1px no-repeat,
    #fff7e5;
}

.bagged-layout-card--market .bagged-layout-thumb { align-items: center; padding: 4px; }
.bagged-layout-card--market .bagged-layout-thumb span:first-child {
  z-index: 1;
  min-block-size: 20px;
  margin-inline-end: -5px;
  border-top: 2px solid #a83224;
  background:
    linear-gradient(#762f26, #762f26) center 39% / 54% 2px no-repeat,
    linear-gradient(#762f26, #762f26) center 62% / 38% 1px no-repeat,
    #fff9ed;
  box-shadow: 1px 1px 0 #c0a080;
}

.bagged-layout-card--market .bagged-layout-thumb span:last-child {
  min-block-size: 22px;
  border: 2px solid #fff9ed;
  rotate: 6deg;
}

.bagged-layout-card--fullscreen .bagged-layout-thumb {
  grid-template-columns: 1fr;
  grid-template-rows: .27fr 1fr;
  gap: 0;
  padding: 0;
  border-color: #6a544b;
  background: linear-gradient(125deg, #28181a, #684136 53%, #d2a16e);
}

.bagged-layout-card--fullscreen .bagged-layout-thumb span:first-child {
  border-bottom: 1px solid #fff9ed55;
  background:
    linear-gradient(#fff9ed, #fff9ed) 13% center / 22% 2px no-repeat,
    repeating-linear-gradient(90deg, #fff9ed 0 4px, transparent 4px 6px) 86% center / 30% 1px no-repeat;
}

.bagged-layout-card--fullscreen .bagged-layout-thumb span:last-child {
  background:
    linear-gradient(#fff9ed, #fff9ed) 20% 47% / 39% 3px no-repeat,
    linear-gradient(#f1d1b1, #f1d1b1) 17% 69% / 27% 1px no-repeat,
    linear-gradient(#fff9ed, #fff9ed) 15% 88% / 19% 3px no-repeat;
}

.bagged-palette-olive {
  --paper: #f5f2e4;
  --ink: #202f24;
  --muted: #4f5845;
  --tomato: #365742;
  --tomato-dark: #293f2f;
  --rust: #e6dfc2;
  --rule: #c6bea1;
  --light: #fffaf0;
  --footer-copy: #e5e5c8;
}

.bagged-palette-ink {
  --paper: #f7eecd;
  --ink: #20294d;
  --muted: #48516a;
  --tomato: #2d43a7;
  --tomato-dark: #223581;
  --rust: #dde1f3;
  --rule: #aeb6d0;
  --light: #fff9e8;
  --footer-copy: #e2e6f7;
}

.site-footer p { color: var(--footer-copy, #e8cdb5); }

.bagged-type-modern {
  --serif: "DM Sans", system-ui, sans-serif;
  --sans: system-ui, sans-serif;
}

.bagged-type-modern :is(h1, h2, h3),
.bagged-type-modern .elementor .bagged-heading .elementor-heading-title {
  font-weight: 790;
  letter-spacing: -.06em;
}

.bagged-type-classic { --serif: Georgia, "Times New Roman", serif; }
.bagged-type-classic :is(h1, h2, h3),
.bagged-type-classic .elementor .bagged-heading .elementor-heading-title {
  font-weight: 600;
  letter-spacing: -.037em;
  line-height: 1.07;
}

.bagged-header-centered .header-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  padding-block: .72rem .3rem;
  text-align: center;
}

.bagged-header-centered .header-row nav { max-width: 100%; }
.bagged-header-centered .header-row .site-nav { justify-content: center; }

.site-header .site-nav li { min-width: 0; max-width: 100%; }
.site-header .site-label { min-width: 0; max-width: 100%; }

.site-nav-disclosure {
  position: relative;
  margin-inline-start: auto;
  z-index: 8;
}

.site-nav-disclosure > summary {
  display: flex;
  width: max-content;
  min-height: 44px;
  align-items: center;
  gap: .62rem;
  padding: .45rem .85rem;
  border: 1px solid var(--tomato);
  border-radius: 999px;
  color: var(--tomato-dark);
  background: var(--light);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.site-nav-disclosure > summary::-webkit-details-marker { display: none; }
.site-nav-disclosure > summary::after {
  width: .48rem;
  height: .48rem;
  margin-block-start: -.18rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 190ms var(--ease);
  content: "";
}
.site-nav-disclosure[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }

.site-nav-disclosure nav {
  position: absolute;
  top: calc(100% + .48rem);
  inset-inline-end: 0;
  width: min(19rem, calc(100vw - 2 * var(--gutter)));
  max-height: min(60svh, 27rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .52rem;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--tomato);
  border-radius: .55rem;
  background: var(--light);
  box-shadow: 0 10px 25px #241a1530;
}

.site-nav-disclosure .site-nav {
  display: grid;
  gap: 0;
  align-items: stretch;
}

.site-nav-disclosure .site-nav a, .site-nav-disclosure .site-nav .bagged-reference-menu-label {
  display: flex;
  padding: .25rem .62rem;
  border-radius: .3rem;
}

.site-nav-disclosure .site-nav a:is(:hover, :focus-visible, [aria-current]) {
  color: var(--tomato-dark);
  background: var(--rust);
}

.site-nav-disclosure .site-nav a:focus-visible { outline-offset: -3px; }

.site-nav-disclosure .sub-menu {
  margin: 0;
  padding-inline-start: .82rem;
  border-inline-start: 1px solid var(--rule);
}

.site-nav-disclosure-responsive { min-inline-size: 0; }
.site-nav-disclosure-responsive[data-reference-menu-inline] > summary { display: none; }
.site-nav-disclosure-responsive[data-reference-menu-inline] nav {
  position: static;
  width: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.site-nav-disclosure-responsive[data-reference-menu-inline] .site-nav { display: flex; gap: .15rem .55rem; }

.site-nav-reference :is(li:has(> .bagged-reference-submenu), .bagged-reference-submenu) { min-inline-size: 0; }
.site-nav-reference li:has(> a + .bagged-reference-submenu) { display: flex; flex-wrap: wrap; align-items: center; }
.site-nav-disclosure:not([data-reference-menu-inline]) .site-nav-reference li:has(> a + .bagged-reference-submenu[open]) > .bagged-reference-submenu,
.site-nav-reference .sub-menu li:has(> a + .bagged-reference-submenu[open]) > .bagged-reference-submenu { flex: 1 0 100%; }
.bagged-reference-submenu > summary {
  display: flex;
  align-items: center;
  min-block-size: 44px;
  gap: .5rem;
  padding: .25rem .62rem;
  border-radius: .3rem;
  color: inherit;
  font-size: .91rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  cursor: pointer;
  list-style: none;
}
.bagged-reference-submenu > summary::-webkit-details-marker { display: none; }
.bagged-reference-submenu > summary::after {
  flex: none;
  inline-size: .42rem;
  block-size: .42rem;
  margin-inline-start: auto;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  content: '';
}
.bagged-reference-submenu[open] > summary::after { transform: translateY(1px) rotate(225deg); }
.bagged-reference-submenu > summary:is(:hover, :focus-visible) { color: var(--tomato-dark); background: var(--rust); }
.bagged-reference-submenu > .bagged-reference-submenu-toggle { inline-size: 44px; justify-content: center; }
.bagged-reference-submenu > .bagged-reference-submenu-toggle::after { margin-inline-start: 0; }

[data-reference-menu-inline] .site-nav-reference > li { position: relative; }
[data-reference-menu-inline] .site-nav-reference > li > .bagged-reference-submenu { flex: 0 0 auto; }
[data-reference-menu-inline] .site-nav-reference > li > .bagged-reference-submenu > .sub-menu {
  position: absolute;
  z-index: 1;
  inset-block-start: calc(100% + .35rem);
  inset-inline-start: 0;
  inline-size: max-content;
  min-inline-size: 12rem;
  max-inline-size: min(18rem, calc(100vw - 2 * var(--gutter)));
  max-block-size: min(60svh, 26rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: .45rem;
  border: 1px solid var(--rule);
  border-block-start: 3px solid var(--tomato);
  border-radius: .55rem;
  background: var(--light);
  box-shadow: 0 10px 25px #241a1530;
  transform: translateX(var(--reference-submenu-shift, 0px));
}

/* A blank site shows the selected composition while it waits for a published homepage. */
.empty-site { --empty-accent: var(--tomato); }

.bagged-layout-editorial .empty-site {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 1.5rem;
  text-align: center;
}

.bagged-layout-editorial .empty-site-copy :is(h1, p) { margin-inline: auto; }
.bagged-layout-editorial .empty-site-art {
  width: min(100%, 43rem);
  min-height: clamp(7rem, 16vw, 12rem);
}

.bagged-layout-editorial .empty-site-sheet {
  width: min(44%, 11rem);
  aspect-ratio: 1.85;
  transform: none;
}

.bagged-layout-market .empty-site {
  gap: 0;
  border-top: 1px solid var(--rule);
  background: radial-gradient(var(--rule) .65px, transparent .75px) 0 0 / 9px 9px, var(--paper);
}

.bagged-layout-market .empty-site-copy {
  z-index: 1;
  margin-inline-end: -1rem;
  padding: clamp(1rem, 3vw, 2.7rem);
  border: 1px solid var(--rule);
  border-top: .3rem solid var(--empty-accent);
  background: var(--light);
  box-shadow: .4rem .48rem 0 var(--rust);
}

.bagged-layout-market .empty-site-art {
  border: .4rem solid var(--light);
  outline: 1px solid var(--rule);
  rotate: 2deg;
}

@media (max-width: 600px) {
  .bagged-layout-market .empty-site-copy { grid-row: 2; margin: -.45rem .4rem 0; }
  .bagged-layout-market .empty-site-art { grid-row: 1; rotate: none; }
}

/* Home block patterns share the storefront layout without changing their native content. */
.block-home-page { padding-block: .6rem 0; }

.bagged-block-home .bagged-hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  min-block-size: clamp(25rem, calc(100svh - 7.25rem), 35rem);
  align-items: stretch;
  gap: 0;
  background: var(--tomato);
  overflow: clip;
}

.bagged-block-home :is(.bagged-hero, .bagged-photo) > .wp-block-group__inner-container { display: contents; }

.bagged-block-home .bagged-hero-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: start;
  gap: clamp(.65rem, 1.6vw, 1.12rem);
  padding: clamp(1.4rem, 3.6vw, 3.65rem);
  color: var(--light);
}

.bagged-block-home .bagged-hero-copy :is(h1, p, .wp-block-buttons) { margin: 0; }
.bagged-block-home .bagged-hero-copy h1 {
  color: inherit;
  font-size: clamp(2.9rem, 5vw, 5.2rem);
  text-wrap: balance;
}

.bagged-block-home .bagged-photo {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  margin: 0;
  background: var(--rust);
  overflow: clip;
}

.bagged-block-home .bagged-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center 62%;
}

.bagged-block-home .bagged-photo .wp-block-image { height: 100%; margin: 0; }
.bagged-block-home .bagged-photo:not(:has(img[src]:not([src=""]))) {
  background: repeating-linear-gradient(135deg, #ffffff35 0 1px, transparent 1px 12px), var(--rust);
}

.bagged-block-home .bagged-photo-hint {
  place-self: center;
  max-width: min(90%, 30ch);
  margin: 0;
  padding: .7rem 1.1rem;
  border: 1px dashed var(--tomato-dark);
  border-radius: .4rem;
  color: var(--ink);
  background: var(--light);
  font-weight: 700;
  text-align: center;
}

.bagged-block-home .bagged-photo:has(img[src]:not([src=""])) .bagged-photo-hint,
.bagged-block-home .bagged-photo .wp-block-image:not(:has(img[src]:not([src=""]))) { display: none; }

.bagged-block-home .bagged-hero .wp-block-button__link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: .65rem 1.35rem;
  border: 1px solid var(--tomato);
  border-radius: 999px;
  color: var(--light);
  background: var(--tomato);
  font-weight: 730;
  text-decoration: none;
}

.bagged-layout-counter .bagged-block-home .bagged-hero .wp-block-button__link {
  border-color: var(--light);
  color: var(--tomato-dark);
  background: var(--light);
}

.bagged-block-home .bagged-hero .wp-block-button__link:hover { box-shadow: inset 0 0 0 2px currentColor; }
.bagged-block-home .bagged-favourites { margin-top: clamp(2.4rem, 5vw, 4.6rem); }

/* Editorial leads with a centered masthead and gives the feature image its own wide row. */
.bagged-layout-editorial :is(.elementor .bagged-hero.e-con, .bagged-block-home .bagged-hero) {
  grid-template-columns: minmax(0, 1fr);
  min-block-size: 0;
  background: var(--light);
  border-block: 1px solid var(--rule);
}

.bagged-layout-editorial :is(.elementor .bagged-hero-copy.e-con, .bagged-block-home .bagged-hero-copy) {
  align-items: center;
  justify-items: center;
  padding: clamp(1.32rem, 3vw, 2.65rem);
  color: var(--ink);
  text-align: center;
}

.bagged-layout-editorial .bagged-hero-copy::before {
  width: 2.45rem;
  height: 3px;
  background: var(--tomato);
  content: "";
}

.bagged-layout-editorial :is(.elementor .bagged-hero-copy, .bagged-block-home .bagged-hero-copy) h1 {
  max-width: 22ch;
  margin-inline: auto;
  color: var(--ink);
  font-size: clamp(2.5rem, 5.5vw, 5.6rem);
}

.bagged-layout-editorial .bagged-hero-copy :is(.bagged-eyebrow .elementor-heading-title, .eyebrow) { color: var(--tomato-dark); }
.bagged-layout-editorial .bagged-hero-copy :is(.bagged-lead, .bagged-lead p) { color: var(--muted); }

.bagged-layout-editorial :is(.elementor .bagged-hero > .bagged-photo, .bagged-block-home .bagged-hero .bagged-photo) {
  aspect-ratio: auto;
  height: clamp(12rem, 38svh, 27rem);
}

/* Market combines a short framed menu card with an inset photograph. */
.bagged-layout-market :is(.elementor .bagged-hero.e-con, .bagged-block-home .bagged-hero) {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  min-block-size: 0;
  align-items: center;
  padding: clamp(1.12rem, 4vw, 3.5rem);
  border: 1px solid var(--rule);
  background: radial-gradient(var(--rule) .65px, transparent .75px) 0 0 / 9px 9px, var(--paper);
}

.bagged-layout-market :is(.elementor .bagged-hero-copy.e-con, .bagged-block-home .bagged-hero-copy) {
  position: relative;
  z-index: 1;
  margin-inline-end: -1.05rem;
  padding: clamp(1.26rem, 3.8vw, 3.5rem);
  border: 1px solid var(--rule);
  border-top: 5px solid var(--tomato);
  color: var(--ink);
  background: var(--light);
  box-shadow: .4rem .48rem 0 var(--rust);
}

.bagged-layout-market :is(.elementor .bagged-hero-copy, .bagged-block-home .bagged-hero-copy) h1 { color: var(--ink); }
.bagged-layout-market .bagged-hero-copy :is(.bagged-eyebrow .elementor-heading-title, .eyebrow) { color: var(--tomato-dark); }
.bagged-layout-market .bagged-hero-copy :is(.bagged-lead, .bagged-lead p) { color: var(--muted); }

.bagged-layout-market :is(.elementor .bagged-hero > .bagged-photo, .bagged-block-home .bagged-hero .bagged-photo) {
  aspect-ratio: 6/5;
  border: clamp(5px, .9vw, 12px) solid var(--light);
  outline: 1px solid var(--rule);
  outline-offset: -1px;
  background: var(--rust);
  transform: rotate(2deg);
}

.bagged-layout-market :is(.elementor .bagged-favourite.e-con, .bagged-block-home .bagged-favourites .wp-block-column) {
  padding: clamp(.68rem, 1.55vw, 1.25rem);
  border: 1px solid var(--rule);
  background: var(--light);
  box-shadow: 0 3px 0 var(--rust);
}

:is(.bagged-layout-editorial, .bagged-layout-market) .elementor .bagged-hero-copy .bagged-action .elementor-button {
  color: var(--light);
  border-color: var(--tomato);
  background: var(--tomato);
}

:is(.bagged-layout-editorial, .bagged-layout-market) .elementor .bagged-hero-copy .bagged-action .elementor-button:hover {
  border-color: var(--tomato-dark);
  background: var(--tomato-dark);
}

:is(.bagged-layout-editorial, .bagged-layout-market) .elementor .bagged-hero-copy .bagged-action.secondary .elementor-button {
  color: var(--tomato-dark);
  background: transparent;
}

:is(.bagged-layout-editorial, .bagged-layout-market) .elementor .bagged-hero-copy .bagged-action.secondary .elementor-button:hover {
  background: var(--rust);
}

.bagged-page-pattern { padding-block: clamp(.25rem, 1vw, .85rem) 0; }
.bagged-page-pattern > :is(h2, h3) { color: var(--ink); }
.bagged-page-pattern > p { color: var(--muted); }
.bagged-pattern-card {
  margin-block: clamp(1rem, 2.7vw, 2.25rem);
  padding: clamp(.9rem, 2.5vw, 1.8rem);
  border: 1px solid var(--rule);
  border-inline-start: 4px solid var(--tomato);
  border-radius: .38rem;
  background: var(--light);
}
.bagged-pattern-card > :first-child { margin-block-start: 0; }
.bagged-pattern-card > :last-child { margin-block-end: 0; }

.bagged-reference-catalog { gap: clamp(.65rem, 2vw, 1.25rem); }
.bagged-reference-catalog.is-layout-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
:is(.bagged-reference-catalog, .bagged-reference-card-grid) > .bagged-pattern-card {
  min-inline-size: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
:is(.bagged-reference-product-card, .bagged-reference-catalog > .bagged-pattern-card) {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: clamp(.65rem, 1.6vw, 1rem);
  border-inline-start-width: 1px;
  overflow-wrap: anywhere;
}
:is(.bagged-reference-product-card, .bagged-reference-catalog > .bagged-pattern-card) > .wp-block-group__inner-container {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: inherit;
  min-inline-size: 0;
}
:is(.bagged-reference-product-card, .bagged-reference-catalog > .bagged-pattern-card) :where(h3, p, ul, figure) {
  margin: 0;
}
:is(.bagged-reference-product-card, .bagged-reference-catalog > .bagged-pattern-card) h3 {
  font-size: clamp(1.05rem, 1rem + .45vw, 1.3rem);
  letter-spacing: -.025em;
  line-height: 1.25;
  text-wrap: pretty;
}
.bagged-reference-product-card h3 a {
  color: inherit;
  text-decoration-color: var(--tomato);
  text-underline-offset: .18em;
}
.bagged-reference-product-card h3 a:hover { color: var(--tomato-dark); }
:is(.bagged-reference-product-card, .bagged-reference-catalog > .bagged-pattern-card) .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3 !important; /* Keep the frame when legacy placeholders set inline source dimensions. */
  object-fit: contain;
  border-radius: .25rem;
  background: var(--paper);
}
:is(.bagged-reference-product-card, .bagged-reference-catalog > .bagged-pattern-card) > .wp-block-image .wp-element-caption {
  margin: .35rem 0 0;
  color: var(--muted);
  text-align: start;
}
.bagged-reference-product-price { font-weight: 700; font-variant-numeric: tabular-nums; }
:is(.bagged-reference-product-card, .bagged-reference-product-summary) .bagged-reference-product-options {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: .3rem;
  padding: 0;
  list-style-position: inside;
}
.bagged-reference-product-options li {
  max-width: 100%;
  padding: .14rem .5rem;
  border: 1px solid var(--rule);
  border-radius: .4rem;
  background: var(--paper);
  color: var(--ink);
  font-size: .84rem;
  line-height: 1.4;
}
.bagged-reference-product-options li::marker { content: ''; }
.bagged-reference-catalog > .bagged-pattern-card .wp-block-buttons { margin-block-start: auto; }
.bagged-reference-gallery.wp-block-gallery.has-nested-images { align-items: start; }
.bagged-reference-gallery.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  position: static;
  inset: auto;
  padding: .4em 0 0;
  color: var(--muted);
  text-align: start;
  background: none;
}
.bagged-reference-catalog .wp-block-button__link { max-inline-size: 100%; white-space: normal; }
@media (max-width: 820px) {
  .bagged-reference-card-grid.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .bagged-reference-card-grid.is-layout-grid { grid-template-columns: minmax(0, 1fr); }
  .bagged-reference-gallery.wp-block-gallery.has-nested-images {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .bagged-reference-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
    width: 100%;
  }
}

.prose:has(.bagged-reference-product-hero) { max-width: 64rem; }

:is(.bagged-reference-product-hero, .bagged-reference-product-hero > .wp-block-group__inner-container):has(> .bagged-reference-product-summary) {
  display: grid;
  align-items: start;
  gap: clamp(1.1rem, 4vw, 3rem);
}

.bagged-reference-product-summary { min-inline-size: 0; }
.bagged-reference-product-summary :is(h1, p, ul) { margin: 0; }
.bagged-reference-product-summary :is(h1, p, ul) + :is(p, ul) { margin-block-start: .85rem; }
.bagged-reference-product-summary h1 {
  font-size: clamp(1.85rem, 1.25rem + 2.3vw, 3rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.bagged-reference-product-summary .bagged-reference-product-price { font-size: clamp(1.05rem, 1rem + .75vw, 1.45rem); }
.bagged-reference-product-summary p:not(.bagged-reference-product-price) { max-inline-size: 38ch; }

.bagged-reference-product-hero .wp-block-image { min-inline-size: 0; margin: 0; }
.bagged-reference-product-hero .wp-block-image img,
.bagged-reference-product-gallery .wp-block-image img {
  display: block;
  max-inline-size: 100%;
  height: auto;
  object-fit: contain;
  background: var(--light);
  border: 1px solid var(--rule);
  border-radius: .45rem;
}
.bagged-reference-product-hero .wp-block-image img {
  width: auto;
  max-block-size: clamp(16rem, 52vh, 29rem);
}
.bagged-reference-product-gallery { margin-block: clamp(1rem, 3vw, 2rem); }
.bagged-reference-product-gallery .bagged-reference-gallery.wp-block-gallery.has-nested-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(0, min(100%, clamp(7.25rem, 19vw, 13rem))));
  justify-content: start;
  gap: .65rem;
  margin: 0;
}
.bagged-reference-product-gallery .bagged-reference-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
  width: 100%;
}
.bagged-reference-product-gallery .wp-block-image img { width: 100%; aspect-ratio: 1; }
.bagged-reference-photo-replacements {
  margin-block: 1.25rem;
  padding: .7rem 1rem;
  border: 1px solid var(--rule);
  border-radius: .45rem;
}
.bagged-reference-photo-replacements summary { cursor: pointer; font-weight: 700; }
.bagged-reference-photo-replacements .wp-block-image { max-inline-size: 12rem; }

@media (min-width: 700px) {
  :is(.bagged-reference-product-hero, .bagged-reference-product-hero > .wp-block-group__inner-container):has(> .bagged-reference-product-summary + .wp-block-image) {
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-areas: "photo summary";
  }
  .bagged-reference-product-hero .bagged-reference-product-summary { grid-area: summary; padding-block: clamp(.25rem, 2vw, 1.3rem); }
  .bagged-reference-product-hero .wp-block-image { grid-area: photo; }
  .bagged-reference-product-hero .wp-block-image img { max-inline-size: min(44vw, 28rem); }
  .bagged-reference-product-hero:not(.has-product-photo) .bagged-reference-product-summary { grid-area: auto; padding-block: 0; }
}
/* The cover uses the editable hero photo and begins at the top of the storefront. */
.bagged-layout-fullscreen.home:not(.elementor-editor-active):has(#content .bagged-hero .bagged-photo img[src]:not([src=""], [src$="/assets/images/placeholder.png"])) {
  --cover-header-height: 6rem;
  --cover-ink: #201818;
  --cover-text: #fff9ef;
  position: relative;

  & > .site-header {
    position: absolute;
    z-index: 10;
    inset: 0 0 auto;
    border: 0;
    color: var(--cover-text);
  }

  & .header-row {
    align-items: center;
    min-block-size: 5rem;
    padding-block: .7rem;
    border-block-end: 1px solid #fff9ef4d;
  }

  & .site-header :is(.site-label, .site-mark) { color: var(--cover-text); }
  & .site-header .custom-logo-link { padding-inline: .55rem; border-radius: .35rem; background: var(--cover-text); }
  & .site-header .site-nav-disclosure > summary {
    border-color: #fff9ef99;
    color: var(--cover-text);
    background: var(--cover-ink);
  }

  & .site-header :is(.header-row > nav, [data-reference-menu-inline] > nav) > .site-nav > li > :is(a, .bagged-reference-submenu > summary):is(:hover, :focus-visible, [aria-current]) {
    color: var(--cover-text);
    background: transparent;
    text-decoration: underline;
  }

  & .site-header :is(.site-nav-disclosure:not([data-reference-menu-inline]) > nav, .site-nav .sub-menu) { color: var(--ink); }

  & .block-home-page {
    inline-size: 100%;
    max-inline-size: none;
    padding-block-start: 0;
  }

  & :is(.block-home-page > :not(.bagged-block-home), .bagged-block-home > :not(.bagged-hero, .wp-block-group__inner-container), .bagged-block-home > .wp-block-group__inner-container > :not(.bagged-hero)) {
    inline-size: min(100% - 2 * var(--gutter), var(--width));
    margin-inline: auto;
  }

  & #content .bagged-hero:has(.bagged-photo img[src]:not([src=""], [src$="/assets/images/placeholder.png"])) {
    position: relative;
    isolation: isolate;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    inline-size: 100%;
    min-block-size: 100svh;
    margin-block-start: 0;
    padding-block: calc(var(--cover-header-height) + clamp(1.5rem, 6vh, 4rem)) clamp(2.25rem, 11svh, 7rem);
    color: var(--cover-text);
    background: var(--cover-ink);
  }

  & .bagged-hero:has(.bagged-photo img[src]:not([src=""], [src$="/assets/images/placeholder.png"])) > .bagged-hero-copy,
  & .bagged-hero > .wp-block-group__inner-container:has(.bagged-photo img[src]:not([src=""])) > .bagged-hero-copy {
    inline-size: min(100% - 2 * var(--gutter), var(--width));
    max-inline-size: none;
    margin-inline: auto;
    padding: 0;
    color: var(--cover-text);
  }

  & .bagged-hero-copy h1 {
    max-inline-size: 12ch;
    color: var(--cover-text);
    font-size: clamp(2.85rem, 7.7vw, 7.4rem);
    text-wrap: balance;
  }

  & .bagged-hero-copy :is(.bagged-lead, p) { max-inline-size: 43ch; color: var(--cover-text); }
  & .bagged-hero-copy :is(.bagged-eyebrow .elementor-heading-title, .eyebrow) { color: #f1d1b1; }
  & .bagged-hero-copy .wp-block-button__link { border-color: var(--cover-text); color: var(--tomato-dark); background: var(--cover-text); }

  & .bagged-hero .bagged-photo:has(img[src]:not([src=""], [src$="/assets/images/placeholder.png"])) {
    position: absolute;
    z-index: -1;
    inset: 0;
    block-size: 100%;
    aspect-ratio: auto;
    background: var(--cover-ink);
  }

  & .bagged-hero .bagged-photo img { object-position: center; }

  & .bagged-hero .bagged-photo::after {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, #201818c2 0, #201818a8 var(--cover-header-height), transparent calc(var(--cover-header-height) + 4rem)),
      linear-gradient(90deg, #201818ed 0%, #201818c2 38%, #20181865 73%, #20181823),
      linear-gradient(0deg, #201818c2, transparent 58%);
    content: "";
    pointer-events: none;
  }

  & .bagged-hero .bagged-photo:not(:has(img[src]:not([src=""], [src$="/assets/images/placeholder.png"])))::after { content: none; }
  & .bagged-hero .bakery-photo-fallback { z-index: 1; }

  @media (max-width: 860px) {
    & .header-row { column-gap: .65rem; }
    & .site-brand { flex: 1 1 10rem; }
    &.bagged-header-centered .site-brand { flex: none; }
    &.bagged-header-centered .site-nav-disclosure { margin-inline: auto; }
    &.bagged-header-centered .site-nav-disclosure > nav { inset-inline-end: 50%; translate: 50%; }

    & .bagged-hero .bagged-photo::after {
      background: linear-gradient(180deg, #201818e6 0%, #201818a8 28%, #201818b8 49%, #201818ef 100%);
    }
  }
}

/* Keep each layout's movement on whole surfaces so text and actions keep their spacing. */
.bagged-layout-counter #content .bagged-block-home .bagged-hero-copy {
  animation: bakery-type-arrival 650ms var(--ease) backwards;
}

.bagged-layout-editorial:not(.elementor-editor-active) #content .bagged-hero-copy {
  animation: editorial-masthead-arrive 620ms var(--ease) backwards;
}

.bagged-layout-editorial:not(.elementor-editor-active) #content .bagged-hero-copy::before {
  transform-origin: center;
  animation: editorial-rule-arrive 560ms 115ms var(--ease) backwards;
}

body.bagged-layout-editorial:not(.elementor-editor-active) #content .bagged-hero > .bagged-photo:not([data-bakery-photo="pending"]) img {
  animation: editorial-image-arrive 800ms 65ms var(--ease) backwards;
}

.bagged-layout-market:not(.elementor-editor-active) #content .bagged-hero-copy {
  animation: market-card-arrive 620ms 75ms var(--ease) backwards;
}

body.bagged-layout-market:not(.elementor-editor-active) #content .bagged-hero > .bagged-photo:not([data-bakery-photo="pending"]) img {
  animation: market-image-arrive 680ms var(--ease) backwards;
}

@keyframes editorial-masthead-arrive {
  from { opacity: .86; translate: 0 -8px; }
}

@keyframes editorial-rule-arrive {
  from { transform: scaleX(.24); }
}

@keyframes editorial-image-arrive {
  from { opacity: .86; scale: 1.045; }
}

@keyframes market-card-arrive {
  from { opacity: .9; translate: -8px 7px; rotate: -1.25deg; }
}

@keyframes market-image-arrive {
  from { opacity: .82; scale: 1.085; translate: 2% 1%; }
}

@media (max-width: 780px) {
  .bagged-block-home .bagged-hero {
    grid-template-columns: minmax(0, 1fr);
    min-block-size: 0;
  }
  .bagged-block-home .bagged-hero .bagged-photo { aspect-ratio: 16/10; }
  .bagged-block-home .bagged-hero-copy h1 { font-size: clamp(2.75rem, 9.6vw, 5rem); }
  .bagged-layout-editorial :is(.elementor .bagged-hero > .bagged-photo, .bagged-block-home .bagged-hero .bagged-photo) {
    height: clamp(11.5rem, 49vw, 22rem);
    aspect-ratio: auto;
  }
  .bagged-layout-market :is(.elementor .bagged-hero.e-con, .bagged-block-home .bagged-hero) {
    grid-template-columns: minmax(0, 1fr);
  }
  .bagged-layout-market :is(.elementor .bagged-hero-copy.e-con, .bagged-block-home .bagged-hero-copy) {
    grid-row: 2;
    margin: -.75rem .4rem 0;
  }
  .bagged-layout-market :is(.elementor .bagged-hero > .bagged-photo, .bagged-block-home .bagged-hero .bagged-photo) {
    grid-row: 1;
    aspect-ratio: 12/5;
    transform: none;
  }
}

@media (max-width: 510px) {
  .bagged-block-home .bagged-hero-copy { padding: clamp(1rem, 4.5vw, 1.4rem); }
  .bagged-block-home .bagged-hero-copy h1,
  .bagged-layout-editorial :is(.elementor .bagged-hero-copy, .bagged-block-home .bagged-hero-copy) h1 {
    font-size: clamp(2.15rem, 9.4vw, 2.9rem);
  }
  .bagged-layout-market :is(.elementor .bagged-hero.e-con, .bagged-block-home .bagged-hero) { padding: .65rem; }
  .bagged-layout-market :is(.elementor .bagged-hero-copy.e-con, .bagged-block-home .bagged-hero-copy) { padding: 1rem; }
}
