/**
 * CyberPulse WooGallery compat — cart drawer + gallery frame (product pages).
 */

#wpgs-gallery .wcgs-carousel {
	position: relative;
}

#wpgs-gallery .wcgs-lightbox.cpl-wcgs-lightbox {
	pointer-events: auto;
}

#wpgs-gallery .wcgs-lightbox.cpl-wcgs-lightbox .sp_wgs-lightbox {
	cursor: pointer;
}

/* ------------------------------------------------------------------
   Gallery: clip the carousel viewport (not each slide) — avoids swiper glitches.
 ------------------------------------------------------------------- */
#wpgs-gallery .wcgs-carousel.cpl-wcgs-crop-frame {
	overflow: hidden !important;
	-webkit-clip-path: polygon(
		30px 0,
		100% 0,
		100% calc(100% - 30px),
		calc(100% - 30px) 100%,
		0 100%,
		0 30px
	) !important;
	clip-path: polygon(
		30px 0,
		100% 0,
		100% calc(100% - 30px),
		calc(100% - 30px) 100%,
		0 100%,
		0 30px
	) !important;
}

#wpgs-gallery .wcgs-carousel.cpl-wcgs-crop-frame .wcgs-slider-image,
#wpgs-gallery .wcgs-carousel.cpl-wcgs-crop-frame .wcgs-slider-image img,
#wpgs-gallery .wcgs-carousel.cpl-wcgs-crop-frame .wcgs-photo {
	-webkit-clip-path: none !important;
	clip-path: none !important;
}

#wpgs-gallery .gallery-navigation-carousel .wcgs-thumb img {
	-webkit-clip-path: none !important;
	clip-path: none !important;
}

/* ------------------------------------------------------------------
   Cart: restore fade + match shop-page layout on product pages.
   Grid pins the footer band to the bottom without a gap above subtotal.
 ------------------------------------------------------------------- */
body.wcgs-gallery-slider .fancybox-container.cpl-fancybox-cart .fancybox-bg {
	background: var(--cpl-popup--overlay__background-color) !important;
	background-color: var(--cpl-popup--overlay__background-color) !important;
}

body.wcgs-gallery-slider .fancybox-container.cpl-fancybox-cart .cpl-fancybox-wrap {
	height: 100% !important;
	max-height: 100% !important;
	box-sizing: border-box !important;
}

body.admin-bar.wcgs-gallery-slider .fancybox-container.cpl-fancybox-cart .cpl-fancybox-wrap {
	max-height: calc(100vh - 32px) !important;
}

body.wcgs-gallery-slider .fancybox-container.cpl-fancybox-cart .cpl-cart-body {
	display: flex !important;
	flex-direction: column !important;
	min-height: 0 !important;
	flex: 1 1 auto !important;
	overflow: visible !important;
}

body.wcgs-gallery-slider .fancybox-container.cpl-fancybox-cart .widget_shopping_cart_content {
	display: grid !important;
	grid-template-rows: minmax(0, 1fr) auto !important;
	flex: 1 1 auto !important;
	min-height: 0 !important;
	height: 100% !important;
	width: 100% !important;
}

body.wcgs-gallery-slider .fancybox-container.cpl-fancybox-cart ul.woocommerce-mini-cart.cart_list {
	align-self: start !important;
	height: auto !important;
	max-height: 100% !important;
	margin-bottom: 0 !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
}

body.wcgs-gallery-slider .fancybox-container.cpl-fancybox-cart .woocommerce-mini-cart__wrap {
	margin-top: 0 !important;
}
