
/* WC Flipbook Catalog V8.8 PDF Layout Engine */
@media print{
  html,body{
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }

  body *{visibility:hidden!important}

  .wcfb-wrap,.wcfb-wrap *,
  .wcfb6-wrap,.wcfb6-wrap *,
  .wcfb-catalog,.wcfb-catalog *,
  .wcfb-book,.wcfb-book *{
    visibility:visible!important;
  }

  .wcfb-toolbar,.wcfb-sidebar,.wcfb-mobile-nav,.wcfb-bottom-nav,
  .wcfb-actions,.wcfb-nav,.wcfb-print-hide,
  .wcfb-product .button,.wcfb-product-card .button,
  .wcfb-product a.button,.wcfb-product-card a.button{
    display:none!important;
  }

  .wcfb-wrap,.wcfb6-wrap,.wcfb-catalog,.wcfb-book{
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:100%!important;
    max-width:none!important;
    overflow:visible!important;
    background:transparent!important;
  }

  .wcfb-page,.wcfb-spread,.wcfb-cover,.wcfb-page-inner,.wcfb-print-page{
    width:297mm!important;
    height:210mm!important;
    min-height:210mm!important;
    max-height:210mm!important;
    page-break-after:always!important;
    break-after:page!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    border-radius:0!important;
    box-shadow:none!important;
    margin:0!important;
  }

  .wcfb-cover{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    align-items:center!important;
    gap:22mm!important;
    padding:22mm 26mm!important;
  }

  .wcfb-cover-content,.wcfb-cover-text{
    grid-column:1!important;
    max-width:100%!important;
  }

  .wcfb-cover-image,.wcfb-cover-logo,.wcfb-cover-media,.wcfb-cover img{
    grid-column:2!important;
    justify-self:center!important;
    align-self:start!important;
    max-width:72mm!important;
    max-height:72mm!important;
    object-fit:contain!important;
  }

  .wcfb-products,.wcfb-product-grid,.wcfb-spread-products{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10mm!important;
    align-items:start!important;
    align-content:start!important;
  }

  .wcfb-product,.wcfb-product-card{
    height:auto!important;
    min-height:58mm!important;
    max-height:82mm!important;
    display:grid!important;
    grid-template-columns:45% 55%!important;
    gap:8mm!important;
    align-items:start!important;
    overflow:hidden!important;
    padding:8mm!important;
    border-radius:8mm!important;
    box-sizing:border-box!important;
    page-break-inside:avoid!important;
    break-inside:avoid!important;
  }

  .wcfb-product img,.wcfb-product-card img{
    max-width:100%!important;
    width:100%!important;
    max-height:62mm!important;
    height:auto!important;
    object-fit:contain!important;
    object-position:center!important;
  }

  .wcfb-product-title,.wcfb-product h3,.wcfb-product-card h3{
    font-size:13pt!important;
    line-height:1.15!important;
    margin:0 0 4mm!important;
  }

  .wcfb-product-price,.wcfb-price{
    font-size:11pt!important;
    margin:0 0 3mm!important;
  }

  .wcfb-product-desc,.wcfb-product-description,.wcfb-product p{
    font-size:9pt!important;
    line-height:1.35!important;
    max-height:28mm!important;
    overflow:hidden!important;
  }

  @page{size:A4 landscape;margin:0}
}


/* V8.8.1 Cover PDF Layout Fix */
@media print{
  .wcfb-cover,
  .wcfb-page.wcfb-cover,
  .wcfb-cover-page,
  .wcfb-page-cover{
    display:grid !important;
    grid-template-columns:56% 44% !important;
    grid-template-rows:1fr !important;
    align-items:center !important;
    gap:0 !important;
    padding:22mm 24mm !important;
    position:relative !important;
  }

  .wcfb-cover-content,
  .wcfb-cover-text,
  .wcfb-cover-copy,
  .wcfb-cover-left{
    grid-column:1 !important;
    grid-row:1 !important;
    align-self:center !important;
    justify-self:start !important;
    max-width:100% !important;
    width:100% !important;
    padding:0 !important;
    margin:0 !important;
  }

  .wcfb-cover-image,
  .wcfb-cover-logo,
  .wcfb-cover-media,
  .wcfb-cover-right{
    grid-column:2 !important;
    grid-row:1 !important;
    align-self:center !important;
    justify-self:center !important;
    width:100% !important;
    height:100% !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
    margin:0 !important;
  }

  .wcfb-cover-image img,
  .wcfb-cover-logo img,
  .wcfb-cover-media img,
  .wcfb-cover-right img,
  .wcfb-cover > img{
    display:block !important;
    max-width:76mm !important;
    max-height:76mm !important;
    width:auto !important;
    height:auto !important;
    object-fit:contain !important;
    object-position:center !important;
    margin:0 auto !important;
    transform:none !important;
    position:static !important;
  }

  .wcfb-cover h1,
  .wcfb-cover-title{
    font-size:34pt !important;
    line-height:1.05 !important;
  }

  .wcfb-cover h2,
  .wcfb-cover-subtitle{
    font-size:18pt !important;
    line-height:1.15 !important;
  }

  .wcfb-cover p,
  .wcfb-cover-description{
    font-size:10pt !important;
    line-height:1.45 !important;
    max-width:125mm !important;
  }
}


/* ==========================================================
   V8.8.2 Print All Pages Fix
   Fixes browser preview showing only 1 page
   ========================================================== */

@media print{

  /* Do not globally hide everything; many flipbook engines keep pages outside the active viewport */
  body *{
    visibility:visible !important;
  }

  /* Hide UI only */
  .wcfb-toolbar,
  .wcfb-sidebar,
  .wcfb-mobile-nav,
  .wcfb-bottom-nav,
  .wcfb-actions,
  .wcfb-nav,
  .wcfb-controls,
  .wcfb-print-hide,
  .wcfb-page-controls,
  .wcfb-pagination,
  .wcfb-flip-controls,
  .wcfb-fullscreen,
  .wcfb-index-button,
  .wcfb-home-button,
  .wcfb-prev,
  .wcfb-next,
  .wcfb-print,
  .wcfb-pdf,
  .wcfb-export-pdf,
  button,
  .button{
    display:none !important;
    visibility:hidden !important;
  }

  /* Main container must remain normal flow so all pages can print */
  .wcfb-wrap,
  .wcfb6-wrap,
  .wcfb-catalog,
  .wcfb-book,
  .wcfb-book-inner,
  .wcfb-pages,
  .wcfb-flipbook,
  .wcfb-stage,
  .wcfb-page-stack{
    position:static !important;
    left:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    transform:none !important;
    width:100% !important;
    height:auto !important;
    max-width:none !important;
    max-height:none !important;
    overflow:visible !important;
    display:block !important;
    background:transparent !important;
    perspective:none !important;
  }

  /* Force every page/spread visible and printable */
  .wcfb-page,
  .wcfb-spread,
  .wcfb-cover,
  .wcfb-page-inner,
  .wcfb-print-page,
  .page,
  .turn-page,
  .hard,
  .own-size{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    position:relative !important;
    left:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    transform:none !important;
    clip:auto !important;
    clip-path:none !important;
    overflow:hidden !important;
    float:none !important;
    clear:both !important;
    z-index:auto !important;
    width:297mm !important;
    height:210mm !important;
    min-height:210mm !important;
    max-height:210mm !important;
    margin:0 auto !important;
    box-sizing:border-box !important;
    page-break-after:always !important;
    break-after:page !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }

  /* Hide duplicated shadows/clones from flip libraries */
  .shadow,
  .wcfb-shadow,
  .turn-page-wrapper > .shadow,
  .wcfb-page-clone,
  .wcfb-clone{
    display:none !important;
    visibility:hidden !important;
  }

  /* Cover: keep text left and logo on the right middle, not top */
  .wcfb-cover,
  .wcfb-page.wcfb-cover,
  .wcfb-cover-page,
  .wcfb-page-cover{
    display:grid !important;
    grid-template-columns:55% 45% !important;
    grid-template-rows:1fr !important;
    align-items:center !important;
    padding:22mm 24mm !important;
  }

  .wcfb-cover-content,
  .wcfb-cover-text,
  .wcfb-cover-copy,
  .wcfb-cover-left{
    grid-column:1 !important;
    grid-row:1 !important;
    align-self:center !important;
    justify-self:start !important;
    width:100% !important;
    max-width:132mm !important;
  }

  .wcfb-cover-image,
  .wcfb-cover-logo,
  .wcfb-cover-media,
  .wcfb-cover-right{
    grid-column:2 !important;
    grid-row:1 !important;
    align-self:center !important;
    justify-self:center !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    height:100% !important;
    padding:0 !important;
    margin:0 !important;
  }

  .wcfb-cover-image img,
  .wcfb-cover-logo img,
  .wcfb-cover-media img,
  .wcfb-cover-right img,
  .wcfb-cover > img{
    position:static !important;
    display:block !important;
    max-width:78mm !important;
    max-height:78mm !important;
    width:auto !important;
    height:auto !important;
    object-fit:contain !important;
    margin:0 auto !important;
    transform:none !important;
  }

  /* Product cards remain compact */
  .wcfb-products,
  .wcfb-product-grid,
  .wcfb-spread-products{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10mm !important;
    align-content:start !important;
    align-items:start !important;
  }

  .wcfb-product,
  .wcfb-product-card{
    height:auto !important;
    min-height:58mm !important;
    max-height:82mm !important;
    display:grid !important;
    grid-template-columns:45% 55% !important;
    gap:8mm !important;
    overflow:hidden !important;
  }

  @page{
    size:A4 landscape;
    margin:0;
  }
}


/* ==========================================================
   V8.8.3 Cover Restore + Print Dialog Fix
   Keep all-pages print fix, but stop forcing the cover into a bad grid.
   ========================================================== */

@media print{

  /* Keep all pages printable but do not redesign the cover aggressively */
  .wcfb-cover,
  .wcfb-page.wcfb-cover,
  .wcfb-cover-page,
  .wcfb-page-cover{
    display:block !important;
    position:relative !important;
    width:297mm !important;
    height:210mm !important;
    min-height:210mm !important;
    max-height:210mm !important;
    padding:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  /* Restore screen-like positioning for cover text */
  .wcfb-cover-content,
  .wcfb-cover-text,
  .wcfb-cover-copy,
  .wcfb-cover-left{
    position:absolute !important;
    left:22mm !important;
    top:92mm !important;
    width:135mm !important;
    max-width:135mm !important;
    padding:0 !important;
    margin:0 !important;
    transform:none !important;
    display:block !important;
  }

  /* Restore logo/image near top-right like the web cover */
  .wcfb-cover-image,
  .wcfb-cover-logo,
  .wcfb-cover-media,
  .wcfb-cover-right{
    position:absolute !important;
    right:32mm !important;
    top:22mm !important;
    width:70mm !important;
    height:70mm !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
    margin:0 !important;
    transform:none !important;
  }

  .wcfb-cover-image img,
  .wcfb-cover-logo img,
  .wcfb-cover-media img,
  .wcfb-cover-right img,
  .wcfb-cover > img{
    max-width:70mm !important;
    max-height:70mm !important;
    width:auto !important;
    height:auto !important;
    object-fit:contain !important;
    object-position:center !important;
    position:static !important;
    transform:none !important;
    margin:0 auto !important;
  }

  .wcfb-cover h1,
  .wcfb-cover-title{
    font-size:32pt !important;
    line-height:1.05 !important;
    margin:0 0 8mm !important;
  }

  .wcfb-cover h2,
  .wcfb-cover-subtitle{
    font-size:17pt !important;
    line-height:1.15 !important;
    margin:0 0 8mm !important;
  }

  .wcfb-cover p,
  .wcfb-cover-description{
    font-size:10pt !important;
    line-height:1.45 !important;
    max-width:132mm !important;
  }

  /* Hide browser/flipbook controls that were appearing at bottom of print preview */
  .wcfb-controls,
  .wcfb-page-controls,
  .wcfb-pagination,
  .wcfb-flip-controls,
  .wcfb-bottom-controls,
  .wcfb-print-controls,
  .wcfb-print-navigation,
  .wcfb-book-controls{
    display:none !important;
    visibility:hidden !important;
  }
}
