/* ——— Woo Account (logged-out) ——— */
.woocommerce-account:not(.logged-in) header.wp-block-template-part,
.woocommerce-account:not(.logged-in) footer.wp-block-template-part { display:block; }

.woocommerce-account:not(.logged-in) .header .wp-block-group.alignfull.modal-wrap { display:none; }

.woocommerce-account:not(.logged-in)
.dgwt-wcas-search-wrapp.dgwt-wcas-has-submit.woocommerce.dgwt-wcas-style-pirx { padding:0; }

/* ——— Device visibility helpers ——— */
@media (max-width: 767.98px){ .hide-on-mobile{ display:none !important; } }
@media (min-width: 1024px){ .hide-on-desktop{ display:none !important; } }
@media (min-width: 768px) and (max-width: 1023.98px){ .hide-on-tablet{ display:none !important; } }

/* ——— KILL filter overlays explicitly (id/class) ——— */
#filters-overlay,
[id*="filters-overlay"],
[class*="filters-overlay"]{
  display:none !important;
  opacity:0 !important;
  pointer-events:none !important;
}

/* ——— MOBILE ONLY: bookix-scroll wrappers (Group/Columns/Query/Post Template) ——— */
@media (max-width: 781px){
  /* Base wrapper */
  :is(.bookix-scroll, .is-style-bookix-scroll){
    display:flex !important;
    gap:var(--wp--style--block-gap,1rem);
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    padding-bottom:.25rem;
    margin-bottom:14px; /* space for hint bar if used */
  }
  :is(.bookix-scroll, .is-style-bookix-scroll) > *{
    flex:0 0 auto !important;
    scroll-snap-align:start;
    width:72vw; max-width:360px;
  }

  /* Columns variant */
  :is(.bookix-scroll, .is-style-bookix-scroll).wp-block-columns{ flex-wrap:nowrap !important; }
  :is(.bookix-scroll, .is-style-bookix-scroll).wp-block-columns > .wp-block-column{
    flex:0 0 auto !important; width:auto !important;
  }

  /* Post Template as scroller */
  :is(.bookix-scroll, .is-style-bookix-scroll).wp-block-post-template{
    display:flex !important; flex-wrap:nowrap !important;
    gap:var(--wp--style--block-gap,1rem);
    overflow-x:auto !important; -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity; list-style:none; padding:0; margin:0;
  }
  :is(.bookix-scroll, .is-style-bookix-scroll).wp-block-post-template > li{
    flex:0 0 auto !important; scroll-snap-align:start; width:72vw; max-width:360px;
  }

  /* Query wrapper: make inner Post Template the scroller */
  :is(.bookix-scroll, .is-style-bookix-scroll).wp-block-query .wp-block-post-template{
    display:flex !important; flex-wrap:nowrap !important;
    gap:var(--wp--style--block-gap,1rem);
    overflow-x:auto !important; -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity; list-style:none; padding:0; margin:0;
  }
  :is(.bookix-scroll, .is-style-bookix-scroll).wp-block-query .wp-block-post-template > li{
    flex:0 0 auto !important; scroll-snap-align:start; width:72vw; max-width:360px;
  }

  /* Optional: visible hint bar block */
  .pp-scrollbar{
    height:6px; background:rgba(0,0,0,.10); border-radius:999px;
    overflow:hidden; position:relative;
  }
  .pp-scrollbar::before{
    content:""; position:absolute; inset:0 auto 0 0; width:28%;
    background:rgba(0,0,0,.35); border-radius:inherit;
    animation:pp-hint 2.2s ease-in-out infinite alternate;
  }
  @keyframes pp-hint{ from{transform:translateX(0)} to{transform:translateX(calc(100% - 28%))} }
  @media (prefers-reduced-motion: reduce){ .pp-scrollbar::before{ animation:none; } }

  /* Native scrollbar styling when visible */
  :is(.bookix-scroll, .is-style-bookix-scroll){ scrollbar-width:thin; scrollbar-color:rgba(0,0,0,.35) rgba(0,0,0,.08); }
  :is(.bookix-scroll, .is-style-bookix-scroll)::-webkit-scrollbar{ height:6px; }
  :is(.bookix-scroll, .is-style-bookix-scroll)::-webkit-scrollbar-track{ background:rgba(0,0,0,.08); border-radius:999px; margin-inline:12px; }
  :is(.bookix-scroll, .is-style-bookix-scroll)::-webkit-scrollbar-thumb{ background:rgba(0,0,0,.35); border-radius:999px; }
}

/* ——— Keep floating Filter button above all on phones (if used) ——— */
@media (max-width: 781px){ #filter-toggle{ z-index:10010 !important; } }

/* ——— Nuke footer pseudo-overlays on mobile ——— */
@media (max-width: 781px){
  footer::before, footer::after, .site-footer::before, .site-footer::after{
    content:none !important; display:none !important;
  }
}

/* Hide the filter button on non-product archives (optional) */
body:not(.post-type-archive-product):not(.tax-product_cat) #filter-toggle{
  display:none !important;
}

/* MOBILE: turn the full-width bottom bar into a small floating pill */
@media (max-width:781px){
  /* neutralize Bootstrap's fixed-bottom + w-100 just for this button */
  #filter-toggle.fixed-bottom{
    position: fixed !important;
    left: auto !important;
    right: 14px !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px) !important;
    transform: none !important;
    margin: 0 !important;
  }
  #filter-toggle.w-100{ width: auto !important; }

  /* pill styling (tweak to taste) */
  #filter-toggle{
    width: auto !important;
    max-width: 65vw;
    border-radius: 9999px;
    padding: 10px 14px;
    z-index: 10010;           /* stays above page, below any drawers */
  }
}

/* HEADER safety (cart link/button clicks) */
header.wp-block-template-part .stretched-link{ pointer-events: none !important; }

/* Woo drawer overlay logic (kept harmless, in case you switch back to Mini Cart) */
.wc-block-components-drawer__screen-overlay{
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 10035 !important;
  transition: opacity .2s ease;
}
.wc-block-components-drawer__screen-overlay.is-open,
.wc-block-components-drawer__screen-overlay[aria-hidden="false"]{
  opacity: 1 !important;
  pointer-events: auto !important;
}
.wc-block-mini-cart__drawer,
.wc-block-components-drawer{ z-index: 10040 !important; }

/* Cookie badge (prevent persistent overlay/focus issues) */
.cky-btn-revisit-wrapper,
.cky-btn-revisit{ display: none !important; }

/* MOBILE: neutralize any bottom-fixed bars (keep your Filter pill) */
@media (max-width: 781px){
  /* WooCommerce Store Notice or demo store bar */
  .woocommerce-store-notice,
  p.demo_store{
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    z-index: auto !important;
  }

  /* Generic bottom bars some themes/plugins inject */
  .mobile-bottom-bar,
  .sticky-mobile-bar,
  .bottom-bar,
  .mobile-toolbar{
    display: none !important;
  }

  /* Anything explicitly fixed to bottom (except your Filter button) */
  .fixed-bottom:not(#filter-toggle),
  [class*="fixed-bottom"]:not(#filter-toggle){
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    z-index: auto !important;
  }

  /* Preserve the Filter pill */
  #filter-toggle.fixed-bottom{
    position: fixed !important;
    left: auto !important;
    right: 14px !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px) !important;
    width: auto !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 10010 !important;
  }
  #filter-toggle.w-100{ width: auto !important; }
}

/* MOBILE: show CookieYes "revisit consent" pill again (and place it cleanly) */
@media (max-width: 781px){
  /* Un-hide if it was disabled earlier */
  .cky-btn-revisit-wrapper,
  .cky-btn-revisit{
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Ensure it's fixed and above page chrome, but below your Filter pill */
  .cky-btn-revisit-wrapper{
    position: fixed !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px) !important;
    left: 14px !important;     /* default to bottom-left */
    right: auto !important;
    z-index: 10005 !important; /* Filter pill is 10010 */
  }

  /* If your CookieYes config uses bottom-right, respect that */
  .cky-btn-revisit-wrapper.cky-revisit-bottom-right{
    right: 14px !important;
    left: auto !important;
  }
}