/* A rotating stack of printed flyers; without JS, the gallery still scrolls horizontally. */
.hp-flyer-carousel { --deal-x: -27%; max-width: 820px; margin: 0 auto; position: relative; padding: 18px 24px 0; }
.hp-flyer-stage { height: clamp(400px, 65vh, 640px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
.hp-flyer-track { display: flex; align-items: stretch; width: 100%; height: 100%; }
.hp-flyer-slide { flex: 0 0 100%; width: 100%; height: 100%; min-width: 0; scroll-snap-align: center; }
.hp-flyer-open { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-decoration: none; cursor: zoom-in; }
.hp-flyer-open img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0; filter: drop-shadow(0 12px 18px rgba(0,0,0,.22)); }
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-stage { position: relative; overflow: visible; scroll-snap-type: none; touch-action: pan-y; margin-bottom: 42px; }
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-track { position: relative; display: block; perspective: 1200px; isolation: isolate; }
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide {
  --stack-x: 0px; --stack-y: 0px; --stack-rotation: 0deg; --stack-scale: 1; --stack-layer: 6;
  position: absolute; inset: 0; z-index: var(--stack-layer); pointer-events: none;
  transform: translate(var(--stack-x), var(--stack-y)) rotate(var(--stack-rotation)) scale(var(--stack-scale));
  transform-origin: 50% 80%; transition: transform .55s cubic-bezier(.22,.7,.25,1);
}
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide[data-stack-depth="0"] { pointer-events: auto; }
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide[data-stack-depth="1"] { --stack-x: 7px; --stack-y: 10px; --stack-rotation: 2deg; --stack-scale: .985; --stack-layer: 5; }
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide[data-stack-depth="2"] { --stack-x: -8px; --stack-y: 20px; --stack-rotation: -3deg; --stack-scale: .96; --stack-layer: 4; }
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide[data-stack-depth="3"] { --stack-x: 10px; --stack-y: 30px; --stack-rotation: 4deg; --stack-scale: .935; --stack-layer: 3; }
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide[data-stack-depth="4"] { --stack-x: -10px; --stack-y: 38px; --stack-rotation: -4deg; --stack-scale: .91; --stack-layer: 2; }
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide[data-stack-depth="5"] { --stack-x: 12px; --stack-y: 44px; --stack-rotation: 5deg; --stack-scale: .89; --stack-layer: 1; }
.hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide.is-dealing { animation: hp-flyer-deal .6s ease-in-out both; pointer-events: none; }
@keyframes hp-flyer-deal {
  0% { z-index: 10; transform: translate(0, 0) rotate(0) scale(1); }
  44% { z-index: 10; transform: translate(var(--deal-x), -5%) rotate(-10deg) scale(.96); }
  46% { z-index: 0; transform: translate(var(--deal-x), -5%) rotate(-10deg) scale(.96); }
  100% { z-index: var(--stack-layer); transform: translate(var(--stack-x), var(--stack-y)) rotate(var(--stack-rotation)) scale(var(--stack-scale)); }
}
.hp-flyer-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem .2rem .2rem; }
.hp-flyer-controls[hidden] { display: none; }
.hp-flyer-arrows { display: flex; gap: .6rem; }
.hp-flyer-arrows button, .hp-flyer-play { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem; border: 1px solid #b9cebe; border-radius: 50%; background: #fff; color: #234e48; cursor: pointer; font: inherit; }
.hp-flyer-arrows button { width: 42px; height: 42px; }
.hp-flyer-arrows button:hover, .hp-flyer-play:hover { border-color: #234e48; background: #e5eee4; }
.hp-flyer-play { padding: .65rem 1rem; border-radius: 999px; font-weight: 700; font-size: .8rem; }
.hp-flyer-dots { display: flex; gap: .5rem; align-items: center; }
.hp-flyer-dots button { position: relative; display: grid; place-items: center; width: 28px; height: 32px; border: 0; padding: 0; background: transparent; cursor: pointer; }
.hp-flyer-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: #91ad9b; transition: width .25s, background .25s; }
.hp-flyer-dots button[aria-current="true"]::before { width: 25px; background: #c0522e; }
.hp-flyer-open:focus-visible, .hp-flyer-controls button:focus-visible { outline: 3px solid #dd744d; outline-offset: -3px; }
.hp-flyer-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.flyer-zoom-modal .flyer-zoom-close { width: 44px; height: 44px; background: #fff; color: #234e48; border: 2px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.flyer-zoom-modal .flyer-zoom-close:hover { color: #fff; background: #aa342b; }
.flyer-zoom-modal .flyer-zoom-close:focus-visible { outline: 3px solid #ffbb91; outline-offset: 4px; }
.flyer-zoom-modal .flyer-zoom-inner { max-width: 94vw; max-height: 88vh; }
.flyer-zoom-modal .flyer-zoom-fullimg { max-width: 94vw; max-height: 88vh; width: auto; height: auto; }
html[data-theme="dark"] .hp-flyer-arrows button, html[data-theme="dark"] .hp-flyer-play { background: #263e30; border-color: #56705b; color: #e0efdf; }
html[data-theme="dark"] .hp-flyer-arrows button:hover, html[data-theme="dark"] .hp-flyer-play:hover { background: #3b5944; }
html[data-theme="dark"] .hp-flyer-dots button[aria-current="true"]::before { background: #ffb18e; }
@media (max-width: 640px) {
  .hp-flyer-carousel { --deal-x: -10%; padding: 12px 12px 0; }
  .hp-flyer-stage { height: auto; aspect-ratio: 1054 / 1492; max-height: 78vh; min-height: 260px; }
  .hp-flyer-open { padding: 0; border-radius: 0; }
  .hp-flyer-controls { gap: .4rem; padding-top: .9rem; }
  .hp-flyer-arrows { gap: .4rem; }
  .hp-flyer-arrows button { width: 36px; height: 36px; font-size: .85rem; }
  .hp-flyer-dots { gap: 0; }
  .hp-flyer-dots button { width: 25px; }
  .hp-flyer-play { padding: .6rem .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide, .hp-flyer-dots button::before { transition: none; }
  .hp-flyer-carousel[data-carousel-ready] .hp-flyer-slide.is-dealing, .flyer-zoom-modal.is-open, .flyer-zoom-modal .flyer-zoom-fullimg { animation: none; }
}

@media (max-width: 380px) {
  .hp-flyer-dots button { width: 22px; }
  .hp-flyer-play span { display: none; }
  .hp-flyer-play { width: 36px; height: 36px; padding: 0; }
}
