/* ============================================================
   BROCHURE FLIP BOOK
   Standalone stylesheet - loaded only on the brochure page
   ============================================================ */

.brochure-hero {
  padding-bottom: 3rem;
}
.brochure-hero h1 em {
  color: var(--gold);
  font-style: italic;
}
.brochure-hero .page-hero-sub {
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-top: 1rem;
}

.brochure-section {
  background: var(--cream, #F3F0EA);
  padding: 4rem 2rem 6rem;
}

.brochure-stage {
  max-width: 1280px;
  margin: 0 auto;
}

/* Toolbar */
.brochure-toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  background: #fff;
  border: 1px solid var(--divider, #D5D0C8);
  margin-bottom: 2rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.bb-toolbar-spacer { flex: 1; }

.bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wine-deep, #1A1411);
  background: transparent;
  border: 1px solid transparent;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}
.bb-btn:hover {
  background: var(--wine-deep, #1A1411);
  color: #fff;
}
.bb-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent !important;
  color: var(--wine-deep, #1A1411) !important;
}
.bb-btn--icon { padding: 0.6rem 0.7rem; }
.bb-btn svg { display: block; }

.bb-indicator {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--wine-deep, #1A1411);
  min-width: 80px;
  text-align: center;
  letter-spacing: 0.02em;
}
.bb-divider {
  color: var(--gold, #C4A265);
  margin: 0 0.4rem;
  font-style: italic;
}
#bbCurrent {
  font-weight: 500;
  color: var(--gold, #C4A265);
}

/* Flipbook wrap */
.brochure-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 600px;
}
.flipbook {
  margin: 0 auto;
}

/* Hide the raw HTML pages before StPageFlip initialises */
.flipbook:not(.flipbook-ready) {
  visibility: hidden;
  height: 0;
  overflow: hidden;
}
.flipbook-page {
  background: #fff;
  width: 100%;
  height: 100%;
}
.flipbook-page img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Loading state */
.brochure-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--muted, #5A5F56);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}
.brochure-loading-mark {
  font-size: 2rem;
  color: var(--gold, #C4A265);
  animation: bbSpin 3s linear infinite;
}
.brochure-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
@keyframes bbSpin {
  to { transform: rotate(360deg); }
}

.brochure-hint {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted, #5A5F56);
  margin-top: 2.5rem;
}

/* StPageFlip internal overrides */
.stf__parent {
  margin: 0 auto;
}
.stf__block {
  background: transparent;
}
.stf__item {
  background: #fff;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Fullscreen mode */
.brochure-section.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 1rem;
  background: var(--wine-deep, #1A1411);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brochure-section.is-fullscreen .brochure-stage {
  max-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.brochure-section.is-fullscreen .brochure-toolbar {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  max-width: 920px;
  flex-shrink: 0;
}
.brochure-section.is-fullscreen .bb-btn {
  color: rgba(255, 255, 255, 0.85);
}
.brochure-section.is-fullscreen .bb-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.brochure-section.is-fullscreen .bb-indicator {
  color: rgba(255, 255, 255, 0.85);
}
.brochure-section.is-fullscreen #bbCurrent {
  color: var(--gold, #C4A265);
}
.brochure-section.is-fullscreen .brochure-wrap {
  flex: 1;
  min-height: 0;
}
.brochure-section.is-fullscreen .brochure-hint {
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}
.brochure-section.is-fullscreen .brochure-loading {
  color: rgba(255, 255, 255, 0.7);
}

body.brochure-fullscreen {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .brochure-section {
    padding: 2rem 0.75rem 4rem;
  }
  .brochure-toolbar {
    padding: 0.65rem 0.75rem;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .bb-btn-label {
    display: none;
  }
  .bb-btn {
    padding: 0.55rem 0.7rem;
  }
  .bb-btn--text {
    padding: 0.55rem 0.7rem;
  }
  .bb-indicator {
    font-size: 0.95rem;
    min-width: 60px;
  }
  .brochure-hint {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    padding: 0 1rem;
    margin-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .brochure-toolbar {
    max-width: 100%;
  }
  .bb-toolbar-spacer { display: none; }
}
