/* === MODAL BACKDROP === */
body.modal-open {
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

.flyer-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.flyer-modal[aria-hidden="false"] {
  display: flex;
}

.flyer-loading {
  color: #fff;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1rem;
  display: none;
}
.flyer-loading.active {
  display: block;
}

.noscript-warning {
  background: #fff3cd;
  color: #856404;
  padding: 1rem;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  margin: 1rem 0;
  font-size: 1rem;
}

/* === MODAL CONTENT === */
.flyer-modal-content {
  position: relative;
  display: inline-block;
  max-width: 90vw;
  max-height: 90vh;
  outline: none;
}

/* === CLOSE BUTTON === */
.flyer-close {
  position: absolute;
  top: -1rem;
  right: -1rem;
  background: #fff;
  border: none;
  font-size: 2rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* === FLYER FLIP CONTAINER === */
.flyer-flip {
  perspective: 1000px;
  cursor: pointer;
  max-height: 80vh;
  max-width: 100%;
  display: inline-block;
  position: relative;
  outline: none;
}

.flyer-flip:focus {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.flyer-flip.no-back {
  cursor: default;
}

/* === FLYER INNER (FLIPPING CARD) === */
.flyer-inner {
  position: relative;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
  display: grid;
}

.flyer-flip.flipped .flyer-inner {
  transform: rotateY(180deg);
}

/* === FRONT & BACK SIDES === */
.flyer-front,
.flyer-back {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.flyer-back {
  transform: rotateY(180deg);
}

.flyer-flip.no-back .flyer-back {
  display: none;
}

/* === IMAGES === */
.flyer-front img,
.flyer-back img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* === BODY SCROLL LOCK WHEN MODAL IS OPEN === */
body.modal-open {
  overflow: hidden;
}

/* === VISUALLY HIDDEN (for screen readers) === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
