/* --- Product Cards (Product Collection block) --- */

/* Card container — no border, clean look */
.wc-block-product-template > li > .wp-block-group {
	height: 100%;
	background: transparent !important;
	border: none !important;
	overflow: hidden;
	transition: none;
}

/* Lang switcher cloned into nav by mobile-menu.js — show only in mobile overlay */
.muus-menu-lang {
	display: none;
}
.muus-primary-nav.is-open .muus-menu-lang {
	display: block;
}

/* Card: gold title color (needs extra specificity to beat WooCommerce inherit !important) */
.wp-site-blocks .wc-block-product-template .wp-block-post-title a,
.wp-site-blocks .muus-product-card .wp-block-post-title a {
	color: var(--wp--preset--color--primary) !important;
}

/* Card: remove WP default blockGap between image and text */
.muus-product-card.wp-block-group > :where(:not(.is-style-sticky):not(:first-child)) {
	margin-block-start: 0;
}

/* Card: clamp title to 2 lines on all viewports (keeps grid rows even) */
.muus-product-card .wp-block-post-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Image wrapper — rounded, overflow hidden for zoom */
.wc-block-product-template .wc-block-components-product-image {
	border-radius: 16px;
	overflow: hidden;
	position: relative;
}

.wc-block-product-template .wc-block-components-product-image img {
	aspect-ratio: 2 / 3;
	object-fit: cover;
	width: 100%;
	transition: transform 0.5s ease;
}

.wc-block-product-template > li:hover .wc-block-components-product-image img {
	transform: scale(1.05);
}

/* Product title — uppercase, bold, left-aligned */
.wc-block-product-template .wp-block-post-title,
.wc-block-product-template .wc-block-components-product-name {
	font-size: 0.85rem !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--text) !important;
	text-decoration: none !important;
	text-align: left !important;
	margin-top: 0.75rem !important;
	margin-bottom: 0 !important;
}

.wc-block-product-template .wp-block-post-title a,
.wc-block-product-template .wc-block-components-product-name a {
	text-decoration: none !important;
	color: inherit !important;
	transition: color 0.3s ease;
}

.wc-block-product-template > li:hover .wp-block-post-title a,
.wc-block-product-template > li:hover .wc-block-components-product-name a {
	color: var(--wp--preset--color--primary) !important;
}

/* Product excerpt — thin, muted subtitle */
.wc-block-product-template .wp-block-post-excerpt {
	text-align: left !important;
	margin-top: 0.2rem !important;
	margin-bottom: 0 !important;
}

.wc-block-product-template .wp-block-post-excerpt__excerpt {
	font-size: 0.8rem !important;
	font-weight: 400;
	color: var(--wp--preset--color--text-muted) !important;
	margin-bottom: 0;
	line-height: 1.4;
	transition: color 0.3s ease;
}

.wc-block-product-template > li:hover .wp-block-post-excerpt__excerpt {
	color: var(--wp--preset--color--text) !important;
}

.wc-block-product-template .wp-block-post-excerpt__more-link {
	display: none;
}

/* Product price — bold, left-aligned, same spacing as other lines */
.wc-block-product-template .wp-block-woocommerce-product-price {
	margin-top: 0.2rem !important;
}

.wc-block-product-template .wc-block-components-product-price {
	color: var(--wp--preset--color--text) !important;
	font-size: 0.85rem !important;
	font-weight: 600 !important;
	text-align: left !important;
	margin-top: 0 !important;
}

/* --- Product Card Gallery Carousel --- */
.muus-card-gallery {
	position: relative;
}

.muus-card-gallery a {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 16px;
}

.muus-gallery-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.muus-gallery-img.active {
	position: relative;
	opacity: 1;
	pointer-events: auto;
}

/* Arrows */
.muus-gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s ease, background 0.2s ease;
	padding: 0;
	backdrop-filter: blur(4px);
}

.muus-card-gallery:hover .muus-gallery-arrow {
	opacity: 1;
}

.muus-gallery-arrow:hover {
	background: rgba(0, 0, 0, 0.75);
}

.muus-gallery-prev {
	left: 10px;
}

.muus-gallery-next {
	right: 10px;
}

/* Dots */
.muus-gallery-dots {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	display: flex;
	gap: 6px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.muus-card-gallery:hover .muus-gallery-dots {
	opacity: 1;
}

.muus-gallery-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
	transition: background 0.2s ease;
}

.muus-gallery-dot.active {
	background: #fff;
}

/* Add to cart button */
.muus-add-to-cart {
	position: absolute;
	bottom: 12px;
	right: 12px;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 4px;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 50px;
	padding: 8px 14px;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}

.muus-card-gallery:hover .muus-add-to-cart {
	opacity: 1;
	transform: translateY(0);
}

.muus-add-to-cart:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	border-color: var(--wp--preset--color--primary);
}

.muus-add-to-cart.added {
	background: rgba(40, 167, 69, 0.8) !important;
	border-color: rgba(40, 167, 69, 0.8) !important;
	color: #fff !important;
}

.muus-cart-error-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 10005;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	border: 1px solid #c0392b;
	border-radius: 8px;
	color: var(--wp--preset--color--text);
	background: var(--wp--preset--color--surface);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	transform: translateX(-50%);
}

.muus-add-to-cart svg {
	flex-shrink: 0;
}

/* --- WooCommerce Product Grid (classic blocks) --- */
.wc-block-grid__product {
	background-color: transparent;
	border: none;
	transition: none;
}

.wc-block-grid__product:hover {
	transform: none;
}

.wc-block-grid__product-image {
	border-radius: 16px;
	overflow: hidden;
}

.wc-block-grid__product-image img {
	aspect-ratio: 2 / 3;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.wc-block-grid__product:hover .wc-block-grid__product-image img {
	transform: scale(1.05);
}

.wc-block-grid__product-title {
	color: var(--wp--preset--color--text-muted);
	font-size: 0.9rem;
	font-weight: 400;
	transition: color 0.3s ease;
}

.wc-block-grid__product:hover .wc-block-grid__product-title {
	color: var(--wp--preset--color--text);
}

.wc-block-grid__product-price {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

/* --- WooCommerce Buttons --- */
.wc-block-grid__product .wp-block-button__link,
.wc-block-grid__product .add_to_cart_button,
.single-product .single_add_to_cart_button,
.woocommerce .button {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	border: none;
	border-radius: 0;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 600;
	font-size: 0.85rem;
	padding: 0.75rem 2rem;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.wc-block-grid__product .wp-block-button__link:hover,
.wc-block-grid__product .add_to_cart_button:hover,
.single-product .single_add_to_cart_button:hover,
.woocommerce .button:hover {
	background-color: var(--wp--preset--color--text);
	color: var(--wp--preset--color--background);
}

