/* ==========================================================================
   Minicart: Empty Cart — Figma overrides (Task: 86ew4y0qr)
   Targets the markup produced by
   blaze_blocksy_render_empty_cart_category_recommendations() in
   includes/customization/mini-cart.php.
   ========================================================================== */


/* --- Panel scroll: allow content to scroll when cards exceed viewport height [86exczu7y] --- */
/* Uses !important to override Blocksy mini-cart.css which sets overflow-y: hidden on same selector */
#woo-cart-panel .ct-panel-content,
#woo-cart-panel .ct-panel-content-inner {
	overflow-y: auto !important;
}
/* --- Panel header (sticky) --- */
#woo-cart-panel .ct-panel-actions {
	position: sticky;
	top: 0;
	z-index: 10;
	background: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px 0 12px !important;
	align-items: stretch;
	justify-content: flex-end;
	border-bottom: none;
	min-height: 80px;
}

/* Row: icon + label on left, close button on right */
#woo-cart-panel .ct-panel-actions::after {
	content: '';
	display: block;
	width: 100%;
	height: 1px;
	background: #e4e5e7;
}

#woo-cart-panel .ct-panel-heading {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 8px;
	font-family: 'Barlow', var(--theme-font-family), sans-serif;
	font-weight: 700;
	font-size: 16px;
	line-height: 28px;
	color: #4a4a4a;
	text-transform: capitalize;
	text-align: left !important;
	margin: 0;
	flex: 1 0 0;
	min-width: 0;
}

#woo-cart-panel .ct-panel-heading .blaze-minicart-heading-icon {
	flex-shrink: 0;
	color: #4a4a4a;
	width: 24px;
	height: 24px;
}

#woo-cart-panel .ct-panel-heading .blaze-minicart-heading-label {
	white-space: nowrap;
}

#woo-cart-panel .ct-panel-actions > :not(.ct-panel-heading):not(.ct-toggle-close) {
	/* In case Blocksy wraps children in a flex row, re-order */
}

/* Make the ct-panel-actions flex its direct children correctly.
   Override the column layout above so heading + close are on one row,
   then the divider is stamped via ::after below them. */
#woo-cart-panel .ct-panel-actions {
	flex-direction: row !important;
	flex-wrap: wrap !important;
	justify-content: flex-start !important;
	align-items: center !important;
}

#woo-cart-panel .ct-panel-actions .ct-panel-heading {
	order: 1;
}

#woo-cart-panel .ct-panel-actions .ct-toggle-close {
	order: 2;
	margin-left: auto;
	flex-shrink: 0;
}

#woo-cart-panel .ct-panel-actions::after {
	order: 3;
	flex-basis: 100%;
}

/* Close button (heroicons-mini x-mark) — 24x24, dark grey */
#woo-cart-panel .ct-panel-actions .ct-toggle-close,
#woo-cart-panel .ct-toggle-close {
	width: 24px !important;
	height: 24px !important;
	min-width: 24px;
	min-height: 24px;
	padding: 0;
	color: #4a4a4a !important;
	--theme-icon-color: #4a4a4a !important;
	--theme-icon-hover-color: #000000 !important;
	--theme-icon-size: 24px !important;
	background: transparent;
	border: 0;
}

#woo-cart-panel .ct-panel-actions .ct-toggle-close svg,
#woo-cart-panel .ct-toggle-close svg.blaze-minicart-close-icon {
	width: 24px !important;
	height: 24px !important;
	min-width: 24px !important;
	min-height: 24px !important;
	flex: 0 0 24px !important;
	flex-shrink: 0 !important;
	display: block;
	fill: #333333 !important;
	color: #333333 !important;
	stroke: none !important;
}

#woo-cart-panel .ct-panel-actions .ct-toggle-close svg.blaze-minicart-close-icon path {
	fill: #333333 !important;
}

#woo-cart-panel .ct-panel-actions .ct-toggle-close:hover svg.blaze-minicart-close-icon,
#woo-cart-panel .ct-panel-actions .ct-toggle-close:hover svg.blaze-minicart-close-icon path {
	fill: #000000 !important;
}

/* --- Panel drawer background — Figma specifies pure white --- */
#woo-cart-panel .ct-panel-inner {
	background: #ffffff !important;
	background-color: #ffffff !important;
}

/* Heading icon color — match label */
#woo-cart-panel .ct-panel-heading svg.blaze-minicart-heading-icon {
	width: 24px !important;
	height: 24px !important;
	stroke: #4a4a4a !important;
	color: #4a4a4a !important;
	fill: none !important;
}

#woo-cart-panel .ct-panel-heading svg.blaze-minicart-heading-icon path {
	stroke: #4a4a4a !important;
}


/* --- Empty cart body spacing --- */
#woo-cart-panel .woocommerce-mini-cart__empty-message {
	padding: 0 !important;
}

#woo-cart-panel .woocommerce-mini-cart__empty-message .empty-cart-content {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-top: 0 !important;
}

/* --- Empty state message typography --- */
#woo-cart-panel .woocommerce-mini-cart__empty-message .empty-cart-message {
	margin-bottom: 0 !important;
}

#woo-cart-panel .woocommerce-mini-cart__empty-message .empty-cart-message p {
	font-family: 'Barlow', var(--theme-font-family), sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 26px;
	color: #4a4a4a;
	text-align: center;
	margin: 0;
}

/* --- Continue Shopping button — green CTA per Figma --- */
#woo-cart-panel .woocommerce-mini-cart__empty-message .continue-shopping-wrapper {
	margin: 0;
}

#woo-cart-panel .woocommerce-mini-cart__empty-message .continue-shopping-btn {
	background: #2b9947;
	color: #ffffff;
	height: 48px;
	width: 100%;
	border-radius: 6px;
	font-family: 'Barlow', var(--theme-font-family), sans-serif;
	font-weight: 700;
	font-size: 16px;
	line-height: 28px;
	text-transform: uppercase;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: none;
	border: none;
	transition: background-color 0.3s ease;
}

#woo-cart-panel .woocommerce-mini-cart__empty-message .continue-shopping-btn:hover {
	background: #237a39;
	color: #ffffff;
	text-decoration: none;
}

/* Hide arrow — Figma has none */
#woo-cart-panel .woocommerce-mini-cart__empty-message .continue-shopping-btn .arrow {
	display: none;
}

/* --- "You May Also Like" category section heading --- */
#woo-cart-panel .empty-cart-recommendations-section {
	margin: 0;
	padding: 0;
}

#woo-cart-panel .empty-cart-recommendations-section .recommendations-header {
	padding-bottom: 12px;
	border-bottom: 1px solid #e4e5e7;
	margin-bottom: 24px;
}

#woo-cart-panel .empty-cart-recommendations-section .recommendations-header h4 {
	margin: 0;
	padding-bottom: 0 !important;
	border-bottom: 0 !important;
	font-family: 'Barlow', var(--theme-font-family), sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 24px;
	color: #4a4a4a;
	text-align: left;
	width: auto;
}

/* --- 2x3 grid of category cards --- */
#woo-cart-panel .empty-cart-recommendations-section .recommended-products-stacked,
#woo-cart-panel .empty-cart-recommendations-section .recommended-products-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	padding: 0;
	margin: 0;
	list-style: none;
}

/* --- Category card (Metta markup: a.recommendation-category-item) --- */
#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 160px;
	min-width: 0;
	border-radius: 0 !important;
	overflow: hidden;
	text-decoration: none;
	padding: 0;
	margin: 0;
	background: #594028;
}

#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item .recommendation-category-image,
#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item .recommendation-category-image img {
	border-radius: 0 !important;
}

#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item .recommendation-category-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item .recommendation-category-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0;
}

/* Dark brown overlay on top of the image */
#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item .recommendation-category-image::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(89, 64, 46, 0.4);
	pointer-events: none;
}

/* Category label centered on the card */
#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item .recommendation-category-title {
	position: relative;
	z-index: 1;
	margin: 0;
	padding: 8px 12px;
	font-family: 'Barlow', var(--theme-font-family), sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.3;
	color: #ffffff;
	text-align: center;
}

#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item:hover .recommendation-category-image::after {
	background: rgba(89, 64, 46, 0.55);
}

#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item:hover {
	text-decoration: none;
	color: #ffffff;
}

/* --- Responsive: narrower panels keep 2 columns but smaller --- */
@media (max-width: 540px) {
	#woo-cart-panel .empty-cart-recommendations-section .recommended-products-stacked,
	#woo-cart-panel .empty-cart-recommendations-section .recommended-products-grid {
		gap: 12px;
	}

	#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item {
		height: 130px;
	}

	#woo-cart-panel .empty-cart-recommendations-section .recommendation-category-item .recommendation-category-title {
		font-size: 15px;
	}
}
