/*
Theme Name: Mandyju
Theme URI: https://example.com/mandyju
Author: Mandyju
Author URI: https://example.com
Description: Block-based (FSE) theme scaffold for Mandyju.
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 8.1
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mandyju
Tags: full-site-editing, block-theme, woocommerce
*/

/* ==========================================================================
   Global Rounded Corner Override
   ========================================================================== */

/* Override all rounded corners on the homepage */
* {
	border-radius: 0 !important;
}

/* ==========================================================================
   Accessibility Styles
   ========================================================================== */

/* Skip Link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999999;
	padding: 8px 16px; /* 4pt grid */
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	text-decoration: none;
	font-size: 16px; /* snap to grid */
	font-weight: 600;
	border-radius: 0;
	transition: all 0.2s ease;
}

.skip-link:focus {
	left: 8px;
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Screen Reader Text */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--wp--preset--color--contrast);
	border-radius: 0;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: var(--wp--preset--color--base);
	display: block;
	font-size: 16px; /* snap to grid */
	font-weight: 600;
	height: auto;
	left: 4px;
	line-height: normal;
	padding: 16px 24px 16px;
	text-decoration: none;
	top: 4px;
	width: auto;
	z-index: 100000;
}

/* Focus Management */
*:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
	outline: none;
}

/* Enhanced focus for keyboard users */
*:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Button Focus States */
.wp-block-button__link:focus,
button:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px rgba(var(--wp--preset--color--primary), 0.2);
}

/* Link Focus States */
a:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	text-decoration: underline;
}

/* Navigation Focus States */
.wp-block-navigation a:focus {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border-radius: 0;
}

/* Form Control Focus States */
input:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-color: var(--wp--preset--color--primary);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.skip-link {
		background-color: #000;
		color: #fff;
	}
	
	*:focus {
		outline: 3px solid #fff;
		outline-offset: 3px;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	
	.skip-link {
		transition: none;
	}
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

/* Cart Toggle Button */
.cart-toggle {
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	border-radius: 0;
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--wp--preset--color--text-base);
	transition: all 0.2s ease;
	position: relative;
	text-decoration: none;
}

.cart-toggle:hover,
.cart-toggle:focus {
	color: var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--highlight-soft);
	outline: none;
}

.cart-toggle:hover {
	background-color: var(--wp--preset--color--highlight-soft);
	color: var(--wp--preset--color--primary);
}

.cart-toggle:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.cart-count {
	background-color: var(--wp--preset--color--primary);
	color: white;
	border-radius: 0;
	width: 16px; /* snap to 4pt */
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 600;
	position: absolute;
	top: 0;
	right: 0;
	transform: translate(25%, -25%);
}

.cart-count:empty {
	display: none;
}

/* Language Switcher */
.header-language-switcher {
	display: flex;
	align-items: center;
}

.language-switcher {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1;
}

.lang-link,
.lang-current {
	color: var(--wp--preset--color--text-base);
	text-decoration: none;
	padding: 0.15rem 0.35rem;
	transition: all 0.2s ease;
	border-radius: 0;
	font-size: inherit;
	font-weight: inherit;
	display: inline-flex;
	align-items: center;
	min-width: 1.6rem;
	justify-content: center;
	height: 1.6rem;
	box-sizing: border-box;
}

.lang-link:hover,
.lang-link:focus {
	color: var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--highlight-soft);
	outline: none;
}

.lang-link:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.lang-current {
	color: var(--wp--preset--color--white) !important;
	background-color: var(--wp--preset--color--primary) !important;
	font-weight: 700 !important;
	border: 1px solid var(--wp--preset--color--primary) !important;
}

.lang-separator {
	color: var(--wp--preset--color--text-muted);
	font-weight: 400;
	user-select: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.language-switcher {
		font-size: var(--wp--preset--font-size--xs);
	}
	
	.lang-link,
	.lang-current {
		padding: 0.1rem 0.25rem;
		min-width: 1.4rem;
		height: 1.4rem;
	}
}

/* ==========================================================================
   Navigation Menu Styles
   ========================================================================== */

.main-navigation {
	display: flex;
	align-items: center;
}

.mandyju-primary-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: var(--wp--preset--spacing--40);
	align-items: center;
}

.mandyju-primary-menu li {
	margin: 0;
	padding: 0;
}

.mandyju-primary-menu a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-weight: 500;
	padding: var(--wp--preset--spacing--20) 0;
	transition: color 0.2s ease;
	position: relative;
}

.mandyju-primary-menu a:hover,
.mandyju-primary-menu a:focus {
	color: var(--wp--preset--color--primary);
	outline: none;
}

.mandyju-primary-menu .current-menu-item > a,
.mandyju-primary-menu .current_page_item > a {
	color: var(--wp--preset--color--primary);
}

/* Block Navigation Enhancements */
.wp-block-navigation {
	font-weight: 500;
}

.wp-block-navigation .wp-block-navigation-item__content {
	position: relative;
	/* Use new 4pt spacing tokens */
	padding: var(--wp--preset--spacing--space-2) var(--wp--preset--spacing--space-3);
	transition: all 0.3s ease;
	text-decoration: none !important;
	color: var(--wp--preset--color--contrast);
	background-color: transparent;
	border-radius: 0;
	box-shadow: none;
}

.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item__content:focus {
	background-color: transparent;
	color: var(--wp--preset--color--contrast);
	transform: none;
	box-shadow: none;
}

.wp-block-navigation .wp-block-navigation-item__content:active {
	transform: none;
	box-shadow: none;
}

/* Underline effect for navigation items */
.wp-block-navigation .wp-block-navigation-item__content::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 2px;
	background-color: var(--wp--preset--color--primary);
	transition: all 0.3s ease;
	transform: translateX(-50%);
}

.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation .wp-block-navigation-item__content:focus::after {
	width: 80%;
}

/* Current/Active menu item styles */
.wp-block-navigation .current-menu-item .wp-block-navigation-item__content,
.wp-block-navigation .current_page_item .wp-block-navigation-item__content {
	background-color: transparent;
	color: var(--wp--preset--color--primary);
	box-shadow: none;
}

.wp-block-navigation .current-menu-item .wp-block-navigation-item__content::after,
.wp-block-navigation .current_page_item .wp-block-navigation-item__content::after {
	width: 100%;
	background-color: var(--wp--preset--color--primary);
}

.wp-block-navigation .current-menu-item .wp-block-navigation-item__content:hover,
.wp-block-navigation .current_page_item .wp-block-navigation-item__content:hover {
	background-color: transparent;
	color: var(--wp--preset--color--primary);
	transform: none;
}

/* Focus styles for accessibility */
.wp-block-navigation .wp-block-navigation-item__content:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Custom responsive breakpoint for navigation */
.wp-block-navigation:not(.is-responsive) .wp-block-navigation__responsive-container-open {
	display: none;
}

.wp-block-navigation.is-responsive .wp-block-navigation__responsive-container-open {
	display: none;
}

.wp-block-navigation.is-responsive .wp-block-navigation__container {
	display: flex;
}

@media (max-width: 830px) {
	.wp-block-navigation.is-responsive .wp-block-navigation__responsive-container-open {
		display: flex !important;
	}
	
	.wp-block-navigation.is-responsive .wp-block-navigation__container {
		display: none !important;
	}
}

/* Responsive menu button enhancements */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	background-color: transparent;
	border: 2px solid var(--wp--preset--color--border-subtle);
	border-radius: 0;
	padding: var(--wp--preset--spacing--space-2);
	transition: all 0.3s ease;
	cursor: pointer;
	position: relative;
	width: 40px;
	height: 40px;
}

/* Hide the default 2-line SVG icon */
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	display: none;
}

/* Create custom 3-line hamburger icon */
.wp-block-navigation__responsive-container-open::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
	height: 2px;
	background-color: currentColor;
	box-shadow: 
		0 -6px 0 currentColor,
		0 6px 0 currentColor;
	transition: all 0.3s ease;
}

.wp-block-navigation__responsive-container-open:hover,
.wp-block-navigation__responsive-container-close:hover {
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	transform: scale(1.05);
}

.wp-block-navigation__responsive-container-open:focus,
.wp-block-navigation__responsive-container-close:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Mobile responsive menu */
@media (max-width: 830px) {
	.main-navigation {
		position: relative;
	}
	
	.mandyju-primary-menu {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background-color: var(--wp--preset--color--white);
		flex-direction: column;
		gap: 0;
		box-shadow: var(--wp--preset--shadow--natural);
		border-radius: 0;
		padding: var(--wp--preset--spacing--space-3);
		z-index: 1000;
		display: none;
	}
	
	.mandyju-primary-menu.show {
		display: flex;
	}
	
	.mandyju-primary-menu li {
		width: 100%;
		text-align: center;
	}
	
	.mandyju-primary-menu a {
		display: block;
		padding: var(--wp--preset--spacing--space-3);
		border-bottom: 1px solid var(--wp--preset--color--border-subtle);
	}
	
	.mandyju-primary-menu li:last-child a {
		border-bottom: none;
	}
	
	/* Mobile navigation block styles */
	.wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
		padding: var(--wp--preset--spacing--space-3);
		margin: var(--wp--preset--spacing--space-2) 0;
		border-radius: 0;
		background-color: var(--wp--preset--color--base);
	}
	
	.wp-block-navigation__responsive-container-content .wp-block-navigation-item__content:hover {
		background-color: var(--wp--preset--color--primary);
		color: var(--wp--preset--color--white);
		transform: scale(1.02);
	}
}

/* ==========================================================================
   Components: Cards
   ========================================================================== */

.mandyju-card {
	position: relative;
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-radius: 0;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
	height: 100%;
	padding: var(--wp--preset--spacing--60); /* 2.25rem breathing room */
}

.mandyju-card:hover {
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06); /* subtle elevation */
	transform: translateY(-2px);
}

.mandyju-card:focus-within {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--primary) 25%, transparent);
}

.mandyju-card h3 {
	margin-top: 0;
}

.mandyju-card p {
	margin-bottom: 0;
	color: var(--wp--preset--color--text-base); /* ensure contrast */
}

/* Card icon slot */
.mandyju-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	color: var(--wp--preset--color--primary);
	margin: 0 auto var(--wp--preset--spacing--40) auto; /* center, add space below */
	line-height: 0; /* remove extra inline spacing */
}

.mandyju-icon {
	width: 84px; /* 3x size */
	height: 84px;
}

@media (prefers-reduced-motion: reduce) {
	.mandyju-card,
	.mandyju-card:hover {
		transition: none;
		transform: none;
	}
}

/* ==========================================================================
   Hero Section (Front Page) Background
   ========================================================================== */
/* Dynamic viewport and header sizing */
:root {
	/* Fallbacks: JS will update these at runtime */
	--mj-header-h: 0px;
	--mj-vh: 100svh; /* small viewport height unit for mobile safe area */
}

/* Make hero fill the viewport minus the header height */
.mandyju-hero-section {
	/* Fallback for older browsers before JS sets --mj-vh */
	min-height: calc(100vh - var(--mj-header-h, 0px));
	min-height: calc(var(--mj-vh, 100svh) - var(--mj-header-h, 0px));
	display: flex;
	align-items: center;
}

/* Apply cotton field image as background for the hero section */
.mandyju-hero-section .wp-block-cover {
	background-image: linear-gradient(rgba(24,25,26,0.55), rgba(24,25,26,0.35)), url('assets/images/cotton_field_background.jpg');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: scroll; /* change to fixed for parallax-like effect */
	color: var(--wp--preset--color--white);
	/* Full-bleed: allow image to span entire viewport width */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	border-radius: 0;
	/* Ensure the cover block also centers content vertically */
	display: flex;
	align-items: center;
	min-height: inherit;
}

/* Remove default solid base background overlay span so image shows through */
.mandyju-hero-section .wp-block-cover__background {
	background: transparent !important;
}

/* Ensure headings/buttons remain readable over image */
.mandyju-hero-section h1,
.mandyju-hero-section .hero-subheading,
.mandyju-hero-section .wp-block-button__link {
	text-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

/* Constrain inner content back to site width */
.mandyju-hero-section .wp-block-cover__inner-container {
	max-width: var(--wp--style--global--content-size);
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	padding-left: var(--wp--preset--spacing--50);
	padding-right: var(--wp--preset--spacing--50);
}

/* Ensure the vertical group inside the hero is properly centered */
.mandyju-hero-section .wp-block-group.is-vertical {
	justify-content: center;
	min-height: 100%;
}

/* Optional: tweak padding on smaller viewports for better vertical centering */
@media (max-width: 781px) {
	.mandyju-hero-section .wp-block-cover {
		padding-top: var(--wp--preset--spacing--60);
		padding-bottom: var(--wp--preset--spacing--60);
	}
}

/* ==========================================================================
   Hero Section Adjustments (Full-Bleed Light Version)
   ========================================================================== */
/* Move background image to the OUTER hero wrapper only (alignfull),
   so it doesn't repeat on inner content containers */
.mandyju-hero-section.alignfull {
	position: relative;
	background: linear-gradient(rgba(246,245,237,0.55), rgba(246,245,237,0.45)), url('assets/images/cotton_field_background.jpg') center/cover no-repeat;
	overflow: hidden;
}

/* Guard: if a hero section is nested inside another, keep it transparent */
.mandyju-hero-section .mandyju-hero-section {
	background: transparent !important;
	background-image: none !important;
}

/* Neutralize prior full-viewport hacks applied to inner cover */
.mandyju-hero-section .wp-block-cover {
	background: transparent !important;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding-left: 0;
	padding-right: 0;
	color: var(--wp--preset--color--text-base);
	text-shadow: none;
	/* Inherit computed min-height from the outer hero wrapper */
	min-height: inherit;
}

/* Light, subtle overlay instead of dark dimming */
.mandyju-hero-section .wp-block-cover__background {
	background: rgba(246,245,237,0.35) !important;
	opacity: 1 !important;
	mix-blend-mode: normal;
}

/* Ensure text/buttons inherit base color system */
.mandyju-hero-section h1,
.mandyju-hero-section .hero-subheading {
	color: var(--wp--preset--color--text-base) !important;
	text-shadow: none;
}

.mandyju-hero-section .wp-block-button__link {
	color: var(--wp--preset--color--white) !important;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Prevent unintended horizontal scroll from earlier 100vw usage */
html, body { overflow-x: hidden; }

/* Remove any leftover duplicated CTA group (centered Spanish heading/buttons) that may remain
   inside the hero due to cached template customizations in the database. */
.mandyju-hero-section > .wp-block-group.alignwide.is-layout-constrained {
	display: none !important;
}

/* ==========================================================================
   Cover Overrides: Transparent specific instance (no image/overlay)
   Targeting the provided block class to avoid global side effects.
   ========================================================================== */
.wp-block-cover.wp-duotone-unset-2 {
	background: transparent !important;
	background-image: none !important;
}

.wp-block-cover.wp-duotone-unset-2 .wp-block-cover__background,
.wp-block-cover.wp-duotone-unset-2 .has-background-base-background-color {
	background: transparent !important;
	opacity: 0 !important;
}

/* Center only the title and subtitle text inside this cover */
.wp-block-cover.wp-duotone-unset-2 h1,
.wp-block-cover.wp-duotone-unset-2 .hero-subheading {
	text-align: center;
}

/* Ensure no background image element is shown for this Cover block */
.wp-block-cover.wp-duotone-unset-2 .wp-block-cover__image-background {
	display: none !important;
}

/* NOTE: Do not neutralize the hero wrapper background here.
   The hero uses a wrapper background image (cotton field) defined above under
   "Hero Section Adjustments (Full-Bleed Light Version)" to ensure the image
   spans the full width while the inner cover stays transparent. */


/* ==========================================================================
   Utility: Inline SVG icon sizing and color control
   ========================================================================== */
.icon-svg {
	display: inline-block;
	width: 1.25em;
	height: 1.25em;
	vertical-align: -0.15em;
	color: currentColor;
}

.feature-icon .icon-svg {
	width: 1.75em;
	height: 1.75em;
	color: var(--wp--preset--color--primary-alt);
}


/* ==========================================================================
   Featured Products Section
   ========================================================================== */
.mandyju-featured-products-section .products.columns-3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
}

.mandyju-featured-products-section ul.products li.product {
	background: var(--wp--preset--color--white);
	border-radius: 0;
	padding: clamp(20px, 1.25rem + 0.75vw, 36px);
	box-shadow: 0 0 0 1px var(--wp--preset--color--border-subtle) inset, 0 8px 24px rgba(0,0,0,0.04);
}

@media (max-width: 781px) {
	.mandyju-featured-products-section .products.columns-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.mandyju-featured-products-section .products.columns-3 {
		grid-template-columns: 1fr;
	}
}

/* Override when 4 columns are rendered */
.mandyju-featured-products-section .products.columns-4 { 
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50);
}

@media (max-width: 1024px) {
	.mandyju-featured-products-section .products.columns-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.mandyju-featured-products-section .products.columns-4 {
		grid-template-columns: 1fr;
	}
}

/* WooCommerce card internals */
.mandyju-featured-products-section ul.products { list-style: none; margin: 0; padding: 0; }
.mandyju-featured-products-section ul.products li.product { position: relative; }
.mandyju-featured-products-section ul.products li.product { text-align: center; }

.mandyju-featured-products-section ul.products li.product a img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 0;
	display: block;
}

.mandyju-featured-products-section ul.products li.product .onsale {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	padding: 6px 10px;
	border-radius: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.mandyju-featured-products-section ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	margin-top: var(--wp--preset--spacing--30);
}

.mandyju-featured-products-section ul.products li.product .price,
.mandyju-featured-products-section ul.products li.product .star-rating {
	margin-top: var(--wp--preset--spacing--20);
}

.mandyju-featured-products-section ul.products li.product .price del {
	color: var(--wp--preset--color--text-muted);
}

.mandyju-featured-products-section ul.products li.product a.button {
	display: inline-block;
	border-radius: 0;
	background: var(--wp--preset--color--primary-alt);
	color: #fff;
	padding: 12px 20px;
	margin-top: var(--wp--preset--spacing--30);
}

.mandyju-featured-products-section ul.products li.product a.button:hover {
	background: var(--wp--preset--color--primary-alt-hover);
}

/* Heading italic accent within the section title */
.mandyju-featured-products-section h2 em {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	color: var(--wp--preset--color--primary);
}

/* ===== Featured Grid: prevent squeezed narrow cards ===== */
/* Use auto-fit with a reasonable minimum card width so columns wrap gracefully */
.mandyju-featured-products-section ul.products {
	display: grid !important;
	gap: var(--wp--preset--spacing--60) !important;
	row-gap: var(--wp--preset--spacing--60) !important;
	column-gap: var(--wp--preset--spacing--60) !important;
	align-items: stretch;
	justify-items: stretch;
}

/* Remove WooCommerce clearfix pseudo-elements that become grid items */
.mandyju-featured-products-section ul.products::before,
.mandyju-featured-products-section ul.products::after {
	content: none !important;
	display: none !important;
}

.mandyju-featured-products-section ul.products.columns-4,
.mandyju-featured-products-section ul.products.columns-3,
.mandyju-featured-products-section ul.products.wc-mj-grid {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

/* Ensure each product card has room to breathe */
.mandyju-featured-products-section ul.products li.product {
	min-width: 280px;
	float: none !important; /* neutralize WooCommerce floats */
	width: auto !important; /* let grid control width */
	margin: 0 !important;   /* spacing comes from grid gap */
	clear: none !important; /* avoid first/last legacy rules creating gaps */
}

/* Remove stray <br> rendered by shortcode/filters in links */
.mandyju-featured-products-section .woocommerce-LoopProduct-link br,
.mandyju-featured-products-section .wc-mj-single-product br { display: none; }

/* Style custom sale badge used by the markup (wc-mj-badge) */
.mandyju-featured-products-section .wc-mj-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	padding: 6px 10px;
	border-radius: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	z-index: 2;
}

