:root {
  --fbc-ink: #1C1C1C;
  --fbc-muted: #5a5a5a;
  --fbc-line: #d9e2ea;
  --fbc-blue: #0075c9;
  --fbc-blue-dark: #0062a9;
  --fbc-sage: #0075c9;
  --fbc-paper: #ffffff;
  --fbc-panel: #f3f7fb;
  --fbc-shadow: 0 14px 34px rgba(0, 117, 201, .10);
}

.fbc-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 64px;
  color: var(--fbc-ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@keyframes fbcFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fbcSoftPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

.fbc-animate .fbc-hero {
  animation: fbcFadeUp .55s ease both;
}

.fbc-animate .fbc-title {
  animation: fbcFadeUp .6s ease .05s both;
}

.fbc-animate .fbc-lead {
  animation: fbcFadeUp .65s ease .12s both;
}

.fbc-hero {
  margin-bottom: 28px;
  text-align: center;
}

.fbc-title {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.25;
  color: var(--fbc-ink);
}

.fbc-lead {
  margin: 0 auto;
  max-width: 54ch;
  color: var(--fbc-muted);
  line-height: 1.6;
}

.fbc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.fbc-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--fbc-line);
  border-radius: 16px;
  background: var(--fbc-paper);
  box-shadow: var(--fbc-shadow);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  animation: fbcFadeUp .55s ease both;
  animation-delay: var(--fbc-delay, 0s);
}

.fbc-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 117, 201, .35);
  box-shadow: 0 20px 40px rgba(0, 117, 201, .14);
}

.fbc-card-media {
  overflow: hidden;
  border-radius: 12px;
  background: var(--fbc-panel);
  aspect-ratio: 1;
}

.fbc-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.fbc-card:hover .fbc-card-media img {
  transform: scale(1.05);
}

.fbc-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  word-break: break-word;
}

.fbc-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.fbc-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--fbc-blue);
  background: #fff;
  color: var(--fbc-blue);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.fbc-btn-primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--fbc-blue), var(--fbc-blue-dark));
}

.fbc-btn-secondary:hover {
  background: rgba(0, 117, 201, .06);
}

.fbc-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.fbc-btn:active {
  transform: translateY(0);
}

.fbc-btn-primary:hover {
  box-shadow: 0 10px 20px rgba(0, 117, 201, .28);
}

.fbc-btn-block {
  width: 100%;
}

.fbc-modal[hidden] {
  display: none !important;
}

.fbc-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 18px;
}

.fbc-modal.is-open .fbc-modal-backdrop {
  animation: fbcFadeUp .25s ease both;
}

.fbc-modal.is-open .fbc-modal-dialog {
  animation: fbcFadeUp .32s ease both;
}

.fbc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 34, 32, .48);
}

.fbc-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--fbc-shadow);
}

.fbc-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--fbc-muted);
  cursor: pointer;
}

.fbc-modal-dialog h3 {
  margin: 0 0 8px;
  color: var(--fbc-ink);
}

.fbc-modal-desc {
  margin: 0 0 16px;
  color: var(--fbc-muted);
  font-size: 14px;
  line-height: 1.5;
}

.fbc-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fbc-ink);
}

.fbc-field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--fbc-line);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--fbc-ink);
}

.fbc-field input:focus {
  outline: 3px solid rgba(0, 117, 201, .16);
  border-color: var(--fbc-blue);
}

.fbc-form-error {
  margin: 0 0 10px;
  color: #a15c4a;
  font-size: 13px;
}

.fbc-modal-loading {
  text-align: center;
  padding: 28px 8px 18px;
}

.fbc-modal-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border: 3px solid rgba(0, 117, 201, .15);
  border-top-color: var(--fbc-blue);
  border-radius: 50%;
  animation: fbcSpin .75s linear infinite;
}

.fbc-loading-title {
  margin: 0 0 8px !important;
  font-size: 18px;
  color: var(--fbc-ink) !important;
}

.fbc-loading-desc {
  margin: 0;
  color: var(--fbc-muted);
  font-size: 14px;
}

@keyframes fbcSpin {
  to {
    transform: rotate(360deg);
  }
}

.fbc-modal-success {
  text-align: center;
  padding: 8px 4px 2px;
}

.fbc-success-icon {
  display: grid;
  place-items: center;
  margin: 4px auto 14px;
  width: 72px;
  height: 72px;
}

.fbc-success-svg {
  display: block;
  overflow: visible;
}

.fbc-success-ring {
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  transform-origin: 32px 32px;
  transform: rotate(-90deg);
}

.fbc-success-check {
  stroke-dasharray: 52;
  stroke-dashoffset: 52;
}

.fbc-modal-success.is-animating .fbc-success-icon {
  animation: fbcSuccessPop .5s cubic-bezier(.2, .9, .3, 1.2) both;
}

.fbc-modal-success.is-animating .fbc-success-ring {
  animation: fbcRingDraw .55s ease forwards;
}

.fbc-modal-success.is-animating .fbc-success-check {
  animation: fbcCheckDraw .42s cubic-bezier(.2, .7, .3, 1) .48s forwards;
}

.fbc-modal-success.is-animating .fbc-success-title {
  animation: fbcFadeUp .35s ease .7s both;
}

.fbc-modal-success.is-animating .fbc-success-desc,
.fbc-modal-success.is-animating .fbc-success-tip,
.fbc-modal-success.is-animating #fbcSuccessDownload,
.fbc-modal-success.is-animating #fbcSuccessClose {
  animation: fbcFadeUp .35s ease .82s both;
}

.fbc-success-title {
  margin: 0 0 8px !important;
  color: #1f9d57 !important;
  font-size: 22px;
  font-weight: 800;
}

.fbc-success-desc {
  margin: 0 0 10px;
  color: var(--fbc-muted);
  font-size: 14px;
  line-height: 1.5;
}

.fbc-success-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f8fc;
  color: #35506a;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}

.fbc-modal-success #fbcSuccessDownload {
  margin-bottom: 10px;
  text-decoration: none;
  box-sizing: border-box;
}

.fbc-modal-success .fbc-success-close {
  margin-bottom: 0;
}

@keyframes fbcRingDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fbcCheckDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fbcSuccessPop {
  0% {
    transform: scale(.72);
    opacity: .4;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.fbc-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ===== Brochure pages: no store header / footer / cart ===== */
body.fbc-brochure-page,
body.fbc-blank-shell {
  background: #f7f9fc;
  margin: 0;
  min-height: 100vh;
}

.fbc-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: #fff;
  border-bottom: 1px solid #e8eef4;
  box-shadow: 0 1px 0 rgba(0, 117, 201, .04);
}

.fbc-site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.fbc-site-logo img {
  display: block;
  width: 184px;
  height: auto;
  max-width: min(184px, 56vw);
}

.fbc-blank-main {
  min-height: calc(100vh - 64px);
}

/* Preview fullscreen: hide logo header (preview has its own top bar) */
body.fbc-fs-active .fbc-site-header {
  display: none !important;
}

/* Hide any leftover theme/plugin chrome if blank template is bypassed */
body.fbc-brochure-page header:not(.fbc-site-header):not(#fbcFsBar),
body.fbc-brochure-page footer,
body.fbc-brochure-page .site-header,
body.fbc-brochure-page .site-footer,
body.fbc-brochure-page .elementor-location-header,
body.fbc-brochure-page .elementor-location-footer,
body.fbc-brochure-page .elementor-location-popup,
body.fbc-brochure-page nav.main-navigation,
body.fbc-brochure-page .main-header,
body.fbc-brochure-page .main-footer,
body.fbc-brochure-page .woocommerce-store-notice,
body.fbc-brochure-page .storefront-handheld-footer-bar,
/* Floating / side cart widgets (common plugins + theme buttons) */
body.fbc-brochure-page .widget_shopping_cart,
body.fbc-brochure-page .site-header-cart,
body.fbc-brochure-page .xoo-wsc-basket,
body.fbc-brochure-page .xoo-wsc-cart-trigger,
body.fbc-brochure-page .xoo-wsc-modal,
body.fbc-brochure-page .fkcart-modal,
body.fbc-brochure-page .fkcart-floating-button,
body.fbc-brochure-page .fkcart-mini,
body.fbc-brochure-page .wpc-fly-cart,
body.fbc-brochure-page .woofc-floating-cart,
body.fbc-brochure-page .open-cart,
body.fbc-brochure-page .cart-contents,
body.fbc-brochure-page .mini-cart,
body.fbc-brochure-page .side-cart,
body.fbc-brochure-page .floating-cart,
body.fbc-brochure-page .fly-cart,
body.fbc-brochure-page .fn_cs_cart,
body.fbc-brochure-page .shopping-cart-btn,
body.fbc-brochure-page .header-cart,
body.fbc-brochure-page [class*="floating-cart"],
body.fbc-brochure-page [class*="float-cart"],
body.fbc-brochure-page [class*="side-cart"],
body.fbc-brochure-page [class*="fly-cart"],
body.fbc-brochure-page [id*="floating-cart"],
body.fbc-brochure-page [id*="side-cart"],
body.fbc-brochure-page a[href*="cart"].fixed,
body.fbc-brochure-page .fixed-cart,
body.fbc-brochure-page .cart-fixed,
body.fbc-brochure-page .th-cart,
body.fbc-brochure-page .icon-cart-fixed {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Catch common right-side circular cart FAB */
body.fbc-brochure-page .elementor-widget-woocommerce-menu-cart,
body.fbc-brochure-page .e-menu-cart,
body.fbc-brochure-page .menu-cart {
  display: none !important;
}

/* ===== Fullscreen PDF preview (no boxed page layout) ===== */
body.fbc-fs-active {
  overflow: hidden !important;
}

body.fbc-fs-active #wpadminbar {
  display: none !important;
}

body.fbc-fs-active header,
body.fbc-fs-active footer,
body.fbc-fs-active .site-header,
body.fbc-fs-active .site-footer,
body.fbc-fs-active .elementor-location-header,
body.fbc-fs-active .elementor-location-footer,
body.fbc-fs-active nav.main-navigation,
body.fbc-fs-active .woocommerce-store-notice {
  display: none !important;
}

#fbcFullscreenPreview {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  background: #1e2220;
  color: #fff;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

#fbcFsBar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 10px 14px;
  background: rgba(20, 24, 22, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

#fbcFsBack,
#fbcFsOpen {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

#fbcFsActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

#fbcFsZoom {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

#fbcFsZoom button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

#fbcFsZoom button:active {
  background: rgba(255, 255, 255, .14);
}

#fbcFsZoomLabel {
  min-width: 44px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #d7ddd8;
}

#fbcFsOpen {
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0075c9, #0062a9);
}

#fbcFsTitle {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 14px;
}

#fbcFsStatus {
  flex: 0 0 auto;
  padding: 8px 14px;
  background: #2a2f2c;
  color: #c5cbc6;
  font-size: 12px;
}

#fbcFsScroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 24px 28px;
  background: #2f3432;
  touch-action: pan-x pan-y;
}

#fbcPreviewViewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 100%;
  padding: 0;
}

#fbcFullscreenPreview.fbc-zoomed #fbcPreviewViewer {
  align-items: flex-start;
  width: max-content;
  min-width: 100%;
}

#fbcPreviewViewer canvas,
.fbc-page-canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .32);
  /* Avoid browser soft-scaling blur */
  image-rendering: -webkit-optimize-contrast;
}

#fbcFullscreenPreview.fbc-zoomed #fbcPreviewViewer canvas,
#fbcFullscreenPreview.fbc-zoomed .fbc-page-canvas {
  max-width: none;
}

.fbc-page-slot {
  width: 100%;
  display: flex;
  justify-content: center;
}

#fbcFullscreenPreview.fbc-zoomed .fbc-page-slot {
  width: auto;
  justify-content: flex-start;
}

.fbc-page-skeleton,
.fbc-page-error {
  width: min(100%, 920px);
  min-height: 180px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, .06);
  color: #b8c0ba;
  font-size: 13px;
}

.fbc-page-error {
  color: #f0b4a8;
}

#fbcFsEmpty {
  margin: 48px auto;
  text-align: center;
  color: #f0b4a8;
}

/* ===== Loading progress ring ===== */
#fbcFsLoader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 24, 22, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}

#fbcFsLoader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fbc-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 148px;
  padding: 22px 26px 18px;
  border-radius: 16px;
  background: rgba(32, 38, 35, .94);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

.fbc-loader-ring {
  position: relative;
  width: 72px;
  height: 72px;
}

.fbc-loader-ring svg {
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
  display: block;
}

.fbc-loader-track,
.fbc-loader-arc {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.fbc-loader-track {
  stroke: rgba(255, 255, 255, .12);
}

.fbc-loader-arc {
  stroke: #2ea3e6;
  stroke-dasharray: 188.4;
  stroke-dashoffset: 188.4;
  transition: stroke-dashoffset .2s ease;
}

#fbcLoaderPct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
}

#fbcLoaderText {
  margin: 0;
  max-width: 180px;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  color: #c5cbc6;
}

#fbcFsLoader.is-indeterminate .fbc-loader-arc {
  stroke-dasharray: 56 132;
  stroke-dashoffset: 0;
  transition: none;
}

#fbcFsLoader.is-indeterminate .fbc-loader-ring svg {
  animation: fbc-loader-spin 0.9s linear infinite;
}

@keyframes fbc-loader-spin {
  from {
    transform: rotate(-90deg);
  }
  to {
    transform: rotate(270deg);
  }
}

@media (max-width: 640px) {
  .fbc-card-actions {
    grid-template-columns: 1fr;
  }

  #fbcFsBar {
    padding: 8px 8px;
    gap: 6px;
  }

  #fbcFsTitle {
    font-size: 12px;
  }

  #fbcFsOpen {
    padding: 7px 9px;
    font-size: 12px;
  }

  #fbcFsStatus {
    padding: 6px 10px;
  }

  /* Edge-to-edge pages on phone — no side margins */
  #fbcFsScroll {
    padding: 0 0 20px;
  }

  #fbcPreviewViewer {
    gap: 8px;
  }

  #fbcPreviewViewer canvas,
  .fbc-page-canvas {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  #fbcFullscreenPreview:not(.fbc-zoomed) #fbcPreviewViewer canvas,
  #fbcFullscreenPreview:not(.fbc-zoomed) .fbc-page-canvas {
    width: 100% !important;
  }

  #fbcFullscreenPreview.fbc-zoomed #fbcPreviewViewer canvas,
  #fbcFullscreenPreview.fbc-zoomed .fbc-page-canvas {
    max-width: none;
  }

  .fbc-page-skeleton,
  .fbc-page-error {
    width: 100%;
    border-radius: 0;
  }
}
