@layer overrides {

/* ---- Sourdough flyer: badge trigger (in Our Story) + image lightbox ---- */
.flyer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding: 0.7rem 1.3rem 0.7rem 0.9rem;
  border: 2px dashed var(--brand-primary);
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--brand-primary);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s cubic-bezier(.2, .7, .3, 1), box-shadow 0.25s ease;
}

@media (hover: hover) {
  .flyer-badge:hover {
    transform: rotate(-2deg) scale(1.03);
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.35);
  }
}

.flyer-badge__star {
  font-size: 1.7rem;
  line-height: 1;
  color: var(--brand-secondary);
}

.flyer-badge__body {
  display: flex;
  flex-direction: column;
}

.flyer-badge__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
}

.flyer-badge__sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-secondary);
}

/* The flyer is a self-contained image lightbox: it scrolls inside itself at
   every breakpoint (unlike the nutrition sheet, which shares the page's
   scroll on mobile) so the sticky header bar below stays pinned everywhere. */
.flyer-modal {
  background: var(--color-bg);
  overflow: hidden auto;
  overscroll-behavior: contain;
}

/* Descendant selector (higher specificity) so this padding-top: 0 beats the
   shared `.nutrition-modal__inner { padding: 1.5rem }` rule that appears later
   in this file. Without it, the leftover top padding scrolls away before the
   sticky bar reaches top: 0 — making the bar drift up, then lock. */
.flyer-modal .flyer-modal__inner {
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

/* Sticky header: keeps the close button pinned to the top of the modal as the
   pages scroll, and its solid background hides the pages passing beneath it —
   so the X never overlaps the artwork. */
.flyer-modal__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* Break out of the inner's 1.5rem side padding so the bar's background
     spans the modal's full width (edge to edge), then re-inset its contents
     with matching horizontal padding. */
  margin: 0 -1.5rem;
  padding: 0.9rem 1.5rem 0.7rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.flyer-modal__bar-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--brand-primary);
}

/* In the bar the close button flows with flexbox instead of being pinned to
   the modal corner (the shared rule sets position: absolute). */
.flyer-modal__bar .nutrition-modal__close {
  position: static;
}

.flyer-modal__pages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.flyer-modal__pages img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  /* border: 1.5px solid var(--brand-primary); */
  border: 1.5px solid #855c43;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.3);
}

.flyer-modal__download {
  display: block;
  width: fit-content;
  margin: 1.25rem auto 0.25rem;
}

/* Portrait pages read better a touch narrower than the wide nutrition modal;
   desktop-only so the mobile bottom sheet stays full-width. */
@media (min-width: 701px) {
  .flyer-modal {
    max-width: min(560px, 92vw);
  }
}

}
