/* Flip-book — Figma: Catalog — Store › "Catalog — 04b Item · Flip-book open" and "04c … slides" (web/js/flipbook.js,
   templates/_partials/flipbook.twig). The book floats over the page on a dark overlay (#0B0D0F at 85%); round
   controls: previous / next beside the book, close top right; page count below. */
html.fb-open {
  overflow: hidden;
}
.fb {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}
.fb::backdrop {
  background: rgba(11, 13, 15, 0.85);
}
.fb[open] {
  display: block;
}
.fb__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.fb__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}
.fb__frame > * {
  pointer-events: auto;
}
.fb__count {
  min-height: 20px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #aeb6bd;
}
.fb__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #d6d6d6;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    opacity 0.15s ease;
} /* Figma: outlined arrows */
.fb__btn svg {
  display: block;
  width: 22px;
  height: 22px;
}
.fb__btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.fb__btn:focus-visible {
  outline: 2px solid #00abc7;
  outline-offset: 3px;
}
.fb__btn:disabled {
  opacity: 0.3;
  cursor: default;
  background: transparent;
}
.fb__close {
  position: absolute;
  top: 40px;
  right: 40px;
  z-index: 2;
  border: 0;
  background: #fff;
  color: var(--orange-600, #ff8c00);
} /* Figma: white disc, orange × */
.fb__close:hover {
  background: #f1f0ec;
}
.fb__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
}
.fb__nav--prev {
  left: 96px;
}
.fb__nav--next {
  right: 96px;
}
.fb__phone-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.fb__phone-nav .fb__btn {
  display: none;
}
.fb__loading {
  display: none;
  margin: 0;
  font-size: 14px;
  color: #aeb6bd;
}
.fb.is-loading .fb__loading {
  display: block;
}
.fb.is-loading .fb__count {
  display: none;
}

/* the book */
.fb-book {
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.65));
}
.fb-page {
  position: relative;
  background: #fff;
}
.fb-page canvas {
  display: block;
  width: 100%;
  height: 100%;
}
/* gutter shading: each page darkens toward the spine so the spread looks bound and curved */
.fb-page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.fb-page--left::after {
  background:
    linear-gradient(
      to left,
      rgba(0, 0, 0, 0.28) 0,
      rgba(0, 0, 0, 0.12) 2.5%,
      rgba(0, 0, 0, 0.04) 7%,
      rgba(0, 0, 0, 0) 14%
    ),
    linear-gradient(to right, rgba(0, 0, 0, 0.06) 0, rgba(0, 0, 0, 0) 3%);
}
.fb-page--right::after {
  background:
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.28) 0,
      rgba(0, 0, 0, 0.12) 2.5%,
      rgba(0, 0, 0, 0.04) 7%,
      rgba(0, 0, 0, 0) 14%
    ),
    linear-gradient(to left, rgba(0, 0, 0, 0.06) 0, rgba(0, 0, 0, 0) 3%);
}
.fb-book--single .fb-page::after {
  display: none;
}

/* Slides (Style=Slides): printer spreads, one at a time, sliding sideways — no page turn, no gutter */
.fb-slides {
  position: relative;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
  touch-action: pan-y pinch-zoom;
}
.fb-slides__track {
  display: flex;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.fb-slide {
  flex: none;
  background: #fff;
}
.fb-slide canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.fb__hint {
  display: none;
  margin: 0;
  font-size: 13px;
  color: #aeb6bd;
  text-align: center;
}

/* narrower screens: arrows closer in; phones: one page, arrows under the book beside the count */
@media (max-width: 1100px) {
  .fb__nav--prev {
    left: 24px;
  }
  .fb__nav--next {
    right: 24px;
  }
  .fb__close {
    top: 24px;
    right: 24px;
  }
}
@media (max-width: 719px) {
  .fb__nav {
    display: none;
  }
  .fb__close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
  .fb__phone-nav .fb__btn {
    display: inline-flex;
    width: 44px;
    height: 44px;
  }
}
/* a spread is small on an upright phone: suggest turning it or zooming */
@media (max-width: 719px) and (orientation: portrait) {
  .fb.is-slides .fb__hint {
    display: block;
  }
}

/* The opener on the item page: a frosted "Flip through" button over the lower-right of the image.
   Figma: Catalog — Design system › Flip-book / Watermark button (Theme=Light) */
.item__stage {
  position: relative;
}
.item__flip {
  position: absolute;
  right: 16px;
  bottom: 41px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 67px;
  min-height: 76px;
  padding: 10px 5px;
  border: 1px solid #f58220; /* Figma stroke */
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  color: var(--charcoal-800);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.item__flip svg {
  flex: none;
}
[data-flip-stage] {
  cursor: pointer;
} /* the whole image opens the flip-book */
/* Hover (Figma: Theme=Hover): solid orange, black text and icon */
[data-flip-stage]:hover .item__flip,
.item__flip:hover {
  border-color: rgba(0, 0, 0, 0.06);
  background: #ff8c00;
  color: #000;
}
.item__flip:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}
@media (max-width: 720px) {
  .item__flip {
    right: 12px;
    bottom: 37px;
  }
}
