/**
 * Mini-cart fixes — excluded from WP Rocket RUCSS.
 *
 * RUCSS drops .jas-mini-cart rules (drawer content is AJAX / empty at crawl).
 * Without them: .remove positions against the fixed panel (covers X + grey bar),
 * and product images stay full-width instead of a thumbnail row.
 */

/* Stacking when elevated to body — do NOT force open here (right:0 only when .cart-opened) */
body > .jas-mini-cart {
	z-index: 100050 !important;
	top: 0 !important;
	left: auto !important;
	width: min(320px, 100vw) !important;
	max-width: 100vw !important;
	box-sizing: border-box !important;
	overflow-x: hidden !important;
}

body.cart-opened .jas-mini-cart {
	right: 0 !important;
	visibility: visible !important;
	transform: none !important;
}

body.cart-opened .mask-overlay,
.mask-overlay {
	z-index: 100040 !important;
}

body.cart-opened {
	overflow: hidden !important;
}

/* Header MENU sits in the same screen corner as the X — disable it while open */
body.cart-opened #jas-header {
	pointer-events: none !important;
}

body.cart-opened .jas-mini-cart,
body.cart-opened .mask-overlay {
	pointer-events: auto !important;
}

.jas-mini-cart h3 {
	position: relative !important;
	z-index: 5 !important;
	cursor: pointer !important;
}

.jas-mini-cart .close-cart {
	position: absolute !important;
	left: 0 !important;
	top: 0 !important;
	width: 52px !important;
	height: 50px !important;
	line-height: 50px !important;
	text-align: center !important;
	z-index: 6 !important;
	pointer-events: auto !important;
	cursor: pointer !important;
	display: block !important;
}

.jas-mini-cart .widget_shopping_cart_content {
	overflow-x: hidden !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

/* Item row: thumbnail + title/qty on one line (Claue dashboard layout) */
.jas-mini-cart .mini_cart_item {
	list-style: none !important;
	position: relative !important;
	overflow: hidden !important;
	margin-bottom: 15px !important;
	clear: both !important;
}

.jas-mini-cart .mini_cart_item > a:not(.remove) {
	display: block !important;
	overflow: hidden !important;
	line-height: 20px !important;
	color: #222 !important;
}

.jas-mini-cart .mini_cart_item img {
	float: left !important;
	display: block !important;
	width: 60px !important;
	max-width: 60px !important;
	height: auto !important;
	margin: 0 15px 0 0 !important;
}

.jas-mini-cart .mini_cart_item .quantity,
.jas-mini-cart .mini_cart_item .variation {
	float: left !important;
	width: calc(100% - 75px) !important;
	display: block !important;
	margin: 0 !important;
	font-size: 12px !important;
	color: #999 !important;
}

/* Contain remove to the thumbnail — never the full drawer / close X */
.jas-mini-cart .mini_cart_item .remove {
	position: absolute !important;
	left: 0 !important;
	top: 0 !important;
	right: auto !important;
	width: 60px !important;
	height: 60px !important;
	max-height: 60px !important;
	z-index: 1 !important;
	box-sizing: border-box !important;
}

.jas-mini-cart .total {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 4px 8px !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	clear: both !important;
	overflow: hidden !important;
}

.jas-mini-cart .buttons {
	max-width: 100% !important;
	box-sizing: border-box !important;
}

.jas-mini-cart .button {
	max-width: 100% !important;
	box-sizing: border-box !important;
}

@media only screen and (max-width: 768px) {
	html,
	body {
		overflow-x: hidden !important;
		max-width: 100% !important;
	}

	/* Product gallery zoom layers must not widen the page */
	.single-product .zoomImg {
		max-width: 100% !important;
	}

	.single-product .slick-list {
		overflow: hidden !important;
	}
}
