/* --- Cookie Consent Banner --- */
.muus-cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 10001;
	background-color: var(--wp--preset--color--surface);
	border-top: 1px solid var(--wp--preset--color--border);
	transform: translateY(100%);
	opacity: 0;
	transition: transform 0.4s ease, opacity 0.4s ease;
}

.muus-cookie-banner.is-visible {
	transform: translateY(0);
	opacity: 1;
}

.muus-cookie-banner__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 2rem;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.muus-cookie-banner__icon {
	flex-shrink: 0;
	color: var(--wp--preset--color--primary);
}

.muus-cookie-banner__text {
	flex: 1;
	font-size: 0.85rem;
	color: var(--wp--preset--color--text-muted);
	margin: 0;
	line-height: 1.4;
}

.muus-cookie-banner__text a {
	color: var(--wp--preset--color--text);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.15s ease;
}

.muus-cookie-banner__text a:hover {
	color: var(--wp--preset--color--primary);
}

.muus-cookie-banner__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

.muus-cookie-banner__accept {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	border: none;
	padding: 0.6rem 1.5rem;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.muus-cookie-banner__accept:hover {
	background-color: var(--wp--preset--color--text);
}

.muus-cookie-banner__close {
	background: none;
	border: none;
	color: var(--wp--preset--color--text-muted);
	cursor: pointer;
	padding: 4px;
	transition: color 0.15s ease;
}

.muus-cookie-banner__close:hover {
	color: var(--wp--preset--color--text);
}

@media (max-width: 781px) {
	/* Compact single-row banner: when it wrapped to 3 rows it was ~117px tall and
	   covered the add-to-cart button on first load and fully hid the messenger FAB.
	   Keeping it to one short row (~54px) clears both. */
	.muus-cookie-banner__inner {
		padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
		flex-wrap: nowrap;
		gap: 0.6rem;
	}

	.muus-cookie-banner__icon {
		display: none;
	}

	.muus-cookie-banner__text {
		flex-basis: auto;
		min-width: 0; /* allow wrapping inside the flex item at narrow widths (320px, RU text) */
		font-size: 0.75rem;
		line-height: 1.3;
	}

	.muus-cookie-banner__actions {
		gap: 0.5rem;
	}

	.muus-cookie-banner__accept {
		padding: 0.45rem 0.9rem;
		font-size: 0.7rem;
	}
}

/* --- Contacts Page --- */

/* Hide page title and separator on contacts page */
body.page-id-98 .wp-block-post-title,
body.page-id-98 .wp-block-group > .wp-block-separator {
	display: none !important;
}

/* --- About Page --- */

/* Remove thin border lines between sections on content pages */
.entry-content > .wp-block-group.alignfull {
	border-bottom: none !important;
	border-top: none !important;
}

.muus-about-hero .wp-block-cover {
	min-height: 70vh !important;
}

.muus-about-hero .wp-block-cover__image-background {
	filter: brightness(0.3);
}

.muus-about-hero .wp-block-cover::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 120px;
	background: linear-gradient(to top, var(--wp--preset--color--background), transparent);
	pointer-events: none;
}

.muus-accent-line {
	width: 60px !important;
	max-width: 60px !important;
	margin-left: 0 !important;
	margin-right: auto !important;
	border-bottom: 2px solid var(--wp--preset--color--primary) !important;
	opacity: 1 !important;
}

.muus-accent-line-center {
	width: 60px !important;
	max-width: 60px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	border-bottom: 2px solid var(--wp--preset--color--primary) !important;
	opacity: 1 !important;
}

.muus-about-image img {
	border-radius: 4px;
	transition: transform 0.5s ease;
}

.muus-about-image:hover img {
	transform: scale(1.02);
}

.muus-about-tradition .wp-block-cover {
	min-height: 50vh !important;
}

.muus-about-tradition .wp-block-cover__image-background {
	filter: brightness(0.25);
}

/* --- Mobile Header: hide announcement bar, fix sticky offset --- */
@media (max-width: 781px) {
	.muus-announcement-bar {
		display: none;
	}

	header.wp-block-template-part {
		top: 0;
	}

	.muus-header {
		border-bottom: 1px solid var(--wp--preset--color--border);
	}

	/* Header: hamburger left, logo center, actions right */
	.muus-header > .wp-block-group {
		padding-inline: 16px;
	}

	.muus-menu-toggle {
		order: 1;
		flex: 1;
	}

	.muus-header > .wp-block-group > .wp-block-group:first-child {
		order: 2;
		flex: 1;
		justify-content: center;
	}

	.muus-header .wp-block-site-logo {
		flex-shrink: 0;
		width: 36px;
	}

	.muus-header > .wp-block-group > .muus-header-actions {
		order: 3;
		flex: 1;
	}

	/* Global mobile content padding — keeps text/images from screen edges */
	.wp-site-blocks > .wp-block-group.alignfull,
	.wp-site-blocks > .wp-block-post-content > .wp-block-group.alignfull {
		padding-inline: 16px;
	}

	/* Full-bleed sections — no side padding */
	.muus-hero,
	.muus-features {
		padding-inline: 0 !important;
	}

	/* Fluid typography: tighter line-height on mobile */
	.wp-block-heading:where(h1),
	.wp-block-heading:where(h2) {
		line-height: 1.15;
		letter-spacing: -0.01em;
	}

	/* Tighter spacing + horizontal padding on product page */
	.muus-single-product {
		padding-top: 16px !important;
		padding-bottom: 16px !important;
		padding-inline: 16px;
	}

	.muus-product-about {
		padding-top: 2rem !important;
		padding-bottom: 16px !important;
	}

	.muus-about-label__title {
		font-size: 1.5rem;
	}

	.muus-product-specs {
		padding-top: 16px !important;
		padding-bottom: 16px !important;
	}
}

#catalog {
	scroll-margin-top: 100px;
}
@media (max-width: 781px) {
	#catalog {
		scroll-margin-top: 80px;
	}
}

/* --- Admin Bar Fix --- */
body.admin-bar .muus-header {
	top: 32px;
}

@media (max-width: 781px) {
	body.admin-bar .muus-header {
		top: 46px;
	}
}

/* --- Tables (dark theme) --- */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	border: none;
}

.wp-block-table table td {
	padding: 0.875rem 1.25rem;
	border: none;
	border-bottom: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--text);
	font-size: 0.9rem;
	vertical-align: top;
}

.wp-block-table table tr:last-child td {
	border-bottom: none;
}

.wp-block-table table td:first-child {
	color: var(--wp--preset--color--text-muted);
	white-space: nowrap;
	width: 180px;
}

.wp-block-table.is-style-stripes table tbody tr:nth-child(odd) {
	background: transparent;
}

.wp-block-table.is-style-stripes table tbody tr:nth-child(even) {
	background: rgba(255, 255, 255, 0.03);
}

.wp-block-table figcaption {
	color: var(--wp--preset--color--text-muted);
}

/* --- Mobile Gallery: dots instead of thumbnails --- */
.muus-pdp-gallery-dots,
.muus-pdp-gallery-counter {
	display: none;
}

@media (max-width: 781px) {
	/* Hide thumbnail strip */
	.muus-single-product .flex-control-thumbs {
		display: none !important;
	}

	/* Hide fullscreen trigger */
	.muus-single-product .woocommerce-product-gallery__trigger {
		display: none !important;
	}

	/* Custom dot indicators */
	.muus-pdp-gallery-dots {
		display: flex;
		justify-content: center;
		gap: 6px;
		padding: 4px 0 8px;
	}

	/* Hide breadcrumbs on mobile */
	.wc-block-breadcrumbs,
	.woocommerce-breadcrumb {
		display: none !important;
	}
	.muus-pdp-gallery-dots__dot {
		width: 8px;
		height: 8px;
		border-radius: 50%;
		background: var(--wp--preset--color--border);
		border: none;
		padding: 0;
		cursor: pointer;
		transition: background 0.2s;
	}
	.muus-pdp-gallery-dots__dot.is-active {
		background: var(--wp--preset--color--primary);
	}

	/* Counter for >5 images */
	.muus-pdp-gallery-counter {
		display: block;
		text-align: center;
		padding: 8px 0;
		font-size: 0.8rem;
		color: var(--wp--preset--color--text-muted);
	}

	/* Gallery viewport full width, no padding */
	.muus-single-product .woocommerce-product-gallery .flex-viewport {
		aspect-ratio: auto;
	}

	.muus-single-product .woocommerce-product-gallery {
		margin-left: -16px !important;
		margin-right: -16px !important;
		width: calc(100% + 32px) !important;
		max-width: none !important;
	}

	.muus-single-product .woocommerce-product-gallery__image {
		aspect-ratio: 4 / 5;
		overflow: hidden;
		background: #111;
	}

	.muus-single-product .woocommerce-product-gallery__image img {
		object-fit: contain !important;
		width: 100% !important;
		height: 100% !important;
		background: #111;
	}

	/* Product columns stack */
	.muus-product-columns {
		flex-direction: column !important;
	}
	.muus-product-columns > .wp-block-column {
		flex-basis: 100% !important;
	}
	.muus-product-columns > .wp-block-column:last-child {
		padding-left: 0;
		padding-right: 0;
	}

	/* Hide stock status, separator, and excerpt on mobile (full description shown in about section) */
	.muus-product-info .muus-stock-status,
	.muus-product-info > .wp-block-separator,
	.muus-product-info .wp-block-post-excerpt {
		display: none !important;
	}

}

/* --- Sticky Add-to-Cart (mobile only) --- */
.muus-sticky-cta {
	display: none;
}

@media (max-width: 781px) {
	.muus-sticky-cta {
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: fixed;
		/* Sits above the cookie banner while it is visible (var set by banner JS) */
		bottom: var(--muus-cookie-h, 0px);
		left: 0;
		right: 0;
		z-index: 998;
		background: var(--wp--preset--color--background);
		border-top: 1px solid var(--wp--preset--color--border);
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		transform: translateY(100%);
		transition: transform 0.25s ease, bottom 0.3s ease;
	}
	.muus-sticky-cta.is-visible {
		transform: translateY(0);
	}
	.muus-sticky-cta__price {
		font-size: 1.1rem;
		font-weight: 700;
		color: var(--wp--preset--color--primary);
	}
	.muus-sticky-cta__button {
		background: var(--wp--preset--color--primary);
		color: var(--wp--preset--color--background);
		border: none;
		padding: 12px 24px;
		border-radius: 6px;
		font-size: 0.875rem;
		font-weight: 600;
		cursor: pointer;
		font-family: var(--wp--preset--font-family--body);
		text-transform: uppercase;
		letter-spacing: 0.05em;
	}

	/* Hide when cart drawer is open */
	body.muus-drawer-open .muus-sticky-cta {
		display: none;
	}

	/* Add bottom padding to prevent content overlap */
	.muus-single-product {
		padding-bottom: 72px !important;
	}

	/* Footer: extra bottom padding so sticky bar doesn't cover it */
	.single-product .muus-footer-bottom {
		padding-bottom: 70px;
	}
}

/* --- Trust Signal: shipping --- */
.muus-trust-shipping {
	font-size: 0.85rem;
	color: var(--wp--preset--color--text-muted);
	margin-top: 0.5rem;
}
.muus-trust-shipping svg {
	color: var(--wp--preset--color--primary);
}

/* --- Trust cluster: reassurance points near the add-to-cart CTA --- */
.muus-trust-cluster {
	list-style: none;
	margin: 0.9rem 0 0;
	padding: 0.9rem 0 0;
	border-top: 1px solid var(--wp--preset--color--border);
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}
.muus-trust-cluster li {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.85rem;
	line-height: 1.3;
	color: var(--wp--preset--color--text-muted);
}
.muus-trust-cluster li svg {
	flex: 0 0 auto;
	color: var(--wp--preset--color--primary);
}

/* --- Checkout reassurance block (under the place-order button, H4) --- */
.muus-checkout-reassure {
	list-style: none;
	margin: 1rem 0 0;
	padding: 1rem 0 0;
	border-top: 1px solid var(--wp--preset--color--border);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.muus-checkout-reassure li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.82rem;
	color: var(--wp--preset--color--text-muted);
}
.muus-checkout-reassure li svg {
	flex: 0 0 auto;
	color: var(--wp--preset--color--primary);
}
.muus-checkout-customs {
	margin: 0.6rem 0 0;
	font-size: 0.72rem;
	line-height: 1.4;
	color: var(--wp--preset--color--text-muted);
	opacity: 0.85;
}

/* --- Footer Accordion (mobile) --- */
.muus-footer__toggle {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-muted);
	font-family: var(--wp--preset--font-family--body);
	background: none;
	border: none;
	width: 100%;
	text-align: left;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0;
}

.muus-footer__toggle-icon {
	display: none;
	font-size: 1rem;
	color: var(--wp--preset--color--text-muted);
}

@media (max-width: 781px) {
	.muus-footer__toggle-icon {
		display: inline;
		transition: transform 0.3s;
	}

	[data-footer-accordion].is-open .muus-footer__toggle-icon {
		transform: rotate(45deg);
	}

	.muus-footer-col__content {
		overflow: hidden;
		transition: max-height 0.3s ease;
	}

	[data-footer-accordion] .muus-footer__toggle {
		min-height: 44px;
		padding-top: 12px !important;
		padding-bottom: 12px !important;
	}

	/* Footer mobile padding */
	.muus-footer {
		padding-inline: 16px;
	}

	/* Footer bottom: center everything */
	.muus-footer-bottom {
		flex-direction: column !important;
		align-items: center !important;
		text-align: center;
	}

	/* Footer columns: stack with dividers */
	.muus-footer-columns {
		flex-direction: column;
		gap: 0 !important;
	}
	.muus-footer-columns > .muus-footer-col {
		border-bottom: 1px solid var(--wp--preset--color--border);
		padding: 12px 0;
	}
	.muus-footer-columns > .muus-footer-col:last-child {
		border-bottom: none;
	}
}

/* Hide PayPal express smart button + Pay Later banner on the product page.
   The rounded PayPal button clashed with the square brand 'ADD TO CART';
   PayPal stays available at checkout. RU has no PayPal, so this no-ops there. */
.single-product .ppc-button-wrapper,
.single-product #ppc-button-ppcp-gateway,
.single-product .ppcp-messages {
	display: none !important;
}

/* --- Print Styles --- */
@media print {
	body { background: #fff !important; color: #000 !important; }
	header.wp-block-template-part,
	footer.wp-block-template-part,
	.muus-announcement-bar,
	.muus-sticky-cta,
	.muus-cookie-banner,
	.muus-cart-drawer { display: none !important; }
	.wc-block-checkout__sidebar { background: #fff !important; border-color: #ccc !important; }
	.wc-block-checkout__sidebar * { color: #000 !important; }
	a { text-decoration: underline; }
}

