/**
 * v113-additions.css
 *
 * 1. Kill WooCommerce sidebar / gray panel on shop page
 * 2. Performance: content-visibility, lazy decode, will-change cleanup
 * 3. Off-canvas: force hidden until explicitly opened
 */

/* ═══════════════════════════════════════════════════════════
   1. NUKE THE WOOCOMMERCE SIDEBAR — gray panel fix
   WC renders <aside class="woocommerce-MyAccount-navigation">,
   <div class="woocommerce-sidebar">, and a plain <aside> from
   woocommerce_get_sidebar(). All of them: gone.
   ═══════════════════════════════════════════════════════════ */

/* WooCommerce native sidebar aside */
.woocommerce-page aside.woocommerce-MyAccount-navigation,
.woocommerce aside,
.woocommerce-page aside,
aside.woocommerce-MyAccount-navigation,
#secondary.widget-area,
.widget-area,
.sidebar,
.woocommerce-sidebar,
.wc-sidebar,
/* WC blocks sidebar */
.wc-block-components-sidebar,
/* Any stray aside rendered inside the shop main */
.cb-shop-page aside,
.cb-shop-silent aside {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Make the shop main always full-width — no float/flex shrink from sidebar */
.cb-shop-page,
.cb-shop-silent,
.woocommerce-page .woocommerce,
.woocommerce-page .site-main,
.woocommerce-page #primary {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

/* ═══════════════════════════════════════════════════════════
   2. OFF-CANVAS: always start hidden, never bleed through
   ═══════════════════════════════════════════════════════════ */

.cb-offcanvas:not(.open) {
  transform: translateX(-100%) !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.cb-offcanvas.right:not(.open) {
  transform: translateX(100%) !important;
}

/* ═══════════════════════════════════════════════════════════
   3. PERFORMANCE
   ═══════════════════════════════════════════════════════════ */

/* content-visibility: auto defers off-screen section paint/layout */
.cb-home-products,
.cb-shop-page .cb-home-products,
.cb-cat-grid,
footer.cb-footer {
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

/* Product images: async decode so main thread never blocks */
.cb-hprod-img,
.cb-cat-img,
.woocommerce-product-gallery__image img {
  image-rendering: auto;
  loading: lazy;
}

/* Remove layout-triggering will-change from static elements */
.cb-hprod-card,
.cb-cat-card {
  will-change: auto;
}

/* Smooth font loading — swap prevents FOIT */
@font-face {
  font-display: swap;
}
