/* --- Breadcrumbs --- */
.woocommerce-breadcrumb {
	color: var(--wp--preset--color--text-muted);
	font-size: 0.8rem;
}

.woocommerce-breadcrumb a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
	color: var(--wp--preset--color--primary);
}

/* --- Footer --- */

/* Remove WordPress blockGap between all top-level site blocks */
.wp-site-blocks > *,
.wp-site-blocks > * > * {
	margin-block-start: 0 !important;
}

.muus-footer .is-style-no-bullets {
	list-style: none;
	padding-left: 0;
}

.muus-footer .is-style-no-bullets a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	transition: color 0.15s ease;
}

.muus-footer .is-style-no-bullets a:hover {
	color: var(--wp--preset--color--primary);
}

/* Footer search/email form */
.muus-footer .wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--border);
	background-color: transparent;
}

.muus-footer .wp-block-search__input {
	background-color: transparent;
	color: var(--wp--preset--color--text);
	border: none;
	font-size: 0.875rem;
}

.muus-footer .wp-block-search__input::placeholder {
	color: var(--wp--preset--color--text-muted);
}

.muus-footer .wp-block-search__button {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	border: none;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.muus-footer .wp-block-search__button:hover {
	background-color: var(--wp--preset--color--text);
}

/* --- Outline Buttons Hover (Все товары, Узнать больше) --- */
.wp-block-button.is-style-outline .wp-block-button__link {
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--background) !important;
	border-color: var(--wp--preset--color--primary) !important;
}

/* --- Catalog Toolbar (sort + count + filter) --- */
.muus-catalog-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 2rem;
	gap: 1rem;
}

.muus-catalog-toolbar__sort,
.muus-catalog-toolbar__filter {
	position: relative;
}

/* Shared button style for sort & filter */
.muus-sort-btn,
.muus-filter-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: transparent;
	color: var(--wp--preset--color--text);
	border: 1px solid var(--wp--preset--color--border);
	padding: 0.5rem 1rem;
	font-size: 0.85rem;
	font-family: var(--wp--preset--font-family--body);
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s;
	white-space: nowrap;
}

.muus-sort-btn:hover,
.muus-filter-btn:hover {
	border-color: var(--wp--preset--color--primary);
}

.muus-sort-btn[aria-expanded="true"],
.muus-filter-btn[aria-expanded="true"] {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.muus-sort-btn__chevron {
	transition: transform 0.2s;
}

.muus-sort-btn[aria-expanded="true"] .muus-sort-btn__chevron {
	transform: rotate(180deg);
}

/* Shared dropdown panel style */
.muus-sort-panel,
.muus-filter-panel {
	position: absolute;
	top: calc(100% + 0.5rem);
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	min-width: 220px;
	z-index: 50;
	padding: 0.5rem 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.muus-sort-panel {
	left: 0;
}

.muus-filter-panel {
	right: 0;
}

.muus-sort-panel.is-open,
.muus-filter-panel.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Shared link style for sort & filter options */
.muus-sort-link,
.muus-filter-link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.6rem 1rem;
	color: var(--wp--preset--color--text);
	text-decoration: none;
	font-size: 0.85rem;
	transition: background 0.15s, color 0.15s;
}

.muus-sort-link:hover,
.muus-filter-link:hover {
	background: rgba(255, 255, 255, 0.05);
	color: var(--wp--preset--color--primary);
}

.muus-sort-link.is-active,
.muus-filter-link.is-active {
	color: var(--wp--preset--color--primary);
	font-weight: 500;
}

.muus-catalog-toolbar__count {
	color: var(--wp--preset--color--text-muted);
	font-size: 0.85rem;
	white-space: nowrap;
}

.muus-filter-count {
	color: var(--wp--preset--color--text-muted);
	font-size: 0.8rem;
	font-weight: 400;
}

/* Category intro (product_cat term description) rendered below the grid on
   category archives. Kept to a comfortable reading measure so it reads as
   supporting SEO copy rather than pushing the grid down. */
.muus-term-desc {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.7;
}

.muus-term-desc p {
	margin: 0 0 1rem;
}

.muus-term-desc p:last-child {
	margin-bottom: 0;
}

.muus-term-desc a {
	color: var(--wp--preset--color--primary);
}

@media (max-width: 781px) {
	.muus-catalog-toolbar {
		flex-wrap: wrap;
	}

	.muus-catalog-toolbar__count {
		order: -1;
		width: 100%;
		text-align: center;
		padding-bottom: 0.5rem;
	}

	.muus-catalog-toolbar__sort,
	.muus-catalog-toolbar__filter {
		flex: 1;
	}

	.muus-catalog-toolbar__filter {
		display: flex;
		justify-content: flex-end;
	}

	.muus-filter-panel {
		right: 0;
		left: auto;
	}
}

/* --- Mobile Catalog: tighter spacing --- */
@media (max-width: 781px) {
	.muus-catalog-header {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}

	.muus-archive-title {
		margin-bottom: 0.25rem !important;
	}

	.muus-catalog {
		padding-top: 0.5rem !important;
	}

	.muus-catalog-toolbar {
		padding-bottom: 0.75rem;
	}

	.muus-catalog-toolbar__count {
		padding-bottom: 0.25rem;
	}
}

/* --- Mobile Catalog: 2-column grid --- */
@media (max-width: 781px) {
	/* 2 columns — override WooCommerce flex layout */
	.wc-block-product-template {
		display: grid !important;
		grid-template-columns: 1fr 1fr !important;
		gap: 12px !important;
	}

	/* Keep 2/3 aspect ratio, use cover */
	.muus-product-card .wc-block-components-product-image img {
		aspect-ratio: 2/3;
		object-fit: cover;
	}

	/* Hide description text */
	.muus-product-card .wp-block-post-excerpt {
		display: none;
	}

	/* Hide add-to-cart overlay button */
	.muus-product-card .muus-add-to-cart {
		display: none;
	}

	/* Show image carousel prev/next arrows on mobile */
	.muus-product-card .muus-gallery-arrow {
		display: flex;
		opacity: 1;
		width: 28px;
		height: 28px;
	}

	/* Truncate product title to 2 lines */
	.muus-product-card .wp-block-post-title {
		font-size: 0.75rem !important;
		-webkit-line-clamp: 2;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	/* Smaller price */
	.muus-product-card .wp-block-woocommerce-product-price {
		font-size: 0.8rem !important;
	}

	/* Tighter card padding */
	.muus-product-card {
		padding-bottom: 0.75rem !important;
	}
	.muus-product-card > .wp-block-group {
		padding-top: 0.5rem !important;
		padding-left: 0.15rem !important;
		padding-right: 0.15rem !important;
	}
}

/* Category label on product cards */
.muus-card-category {
	display: none;
}
@media (max-width: 781px) {
	.muus-card-category {
		display: none;
	}
}

/* --- Features Strip --- */
.muus-features .wp-block-column {
	text-align: center;
	position: relative;
	transition: transform 0.3s ease;
}

.muus-features .wp-block-column:hover {
	transform: translateY(-4px);
}

.muus-features .wp-block-column h3 {
	transition: color 0.3s ease;
}

.muus-features .wp-block-column h3::before {
	content: "";
	display: block;
	width: 36px;
	height: 36px;
	margin: 0 auto 0.75rem;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	opacity: 0.85;
	transition: opacity 0.3s ease;
}

.muus-features .wp-block-column:hover h3::before {
	opacity: 1;
}

/* Ручная ковка — hammer (Lucide) */
.muus-features .wp-block-column:nth-child(1) h3::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%23c8a97e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9'/%3E%3Cpath d='m18 15 4-4'/%3E%3Cpath d='m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5'/%3E%3C/svg%3E");
}

/* Из Якутии — map pin */
.muus-features .wp-block-column:nth-child(2) h3::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%23c8a97e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

/* Доставка по России — truck */
.muus-features .wp-block-column:nth-child(3) h3::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%23c8a97e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 3h15v13H1z'/%3E%3Cpath d='M16 8h4l3 3v5h-7V8z'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E");
}

/* Гарантия качества — shield check */
.muus-features .wp-block-column:nth-child(4) h3::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%23c8a97e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

.muus-features .wp-block-column:hover h3 {
	color: var(--wp--preset--color--primary) !important;
}

.muus-features .wp-block-column p {
	transition: color 0.3s ease;
}

.muus-features .wp-block-column:hover p {
	color: var(--wp--preset--color--text) !important;
}

.muus-features .wp-block-column + .wp-block-column::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	height: 40px;
	width: 1px;
	background-color: var(--wp--preset--color--border);
}

/* --- Pagination (hidden — infinite scroll) --- */
.muus-pagination-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.muus-scroll-loader {
	display: flex;
	justify-content: center;
	padding: 2rem 0;
}
.muus-scroll-loader__spinner {
	width: 32px;
	height: 32px;
	border: 2px solid var(--wp--preset--color--border);
	border-top-color: var(--wp--preset--color--primary);
	border-radius: 50%;
	animation: muus-spin 0.7s linear infinite;
}
@keyframes muus-spin {
	to { transform: rotate(360deg); }
}

/* --- Pagination (fallback) --- */
.wp-block-query-pagination {
	gap: 0 !important;
}

.wp-block-query-pagination-numbers {
	display: flex;
	gap: 0;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 0.75rem;
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	font-size: 0.95rem;
	border: 1px solid var(--wp--preset--color--border);
	margin-left: -1px;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.wp-block-query-pagination-numbers .page-numbers:first-child {
	margin-left: 0;
}

.wp-block-query-pagination-numbers .page-numbers:hover {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	z-index: 1;
}

.wp-block-query-pagination-numbers .page-numbers.current {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	border-color: var(--wp--preset--color--primary);
	font-weight: 600;
	z-index: 2;
}

.wp-block-query-pagination-numbers .page-numbers.dots {
	pointer-events: none;
	color: var(--wp--preset--color--text-muted);
}

.wp-block-query-pagination .wp-block-query-pagination-previous,
.wp-block-query-pagination .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 0.75rem;
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	font-size: 1.25rem;
	font-weight: 300;
	border: 1px solid var(--wp--preset--color--border);
	margin-left: -1px;
	transition: background 0.2s, color 0.2s;
}

.wp-block-query-pagination .wp-block-query-pagination-previous:hover,
.wp-block-query-pagination .wp-block-query-pagination-next:hover {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
}

/* --- Notices --- */
.woocommerce-message,
.woocommerce-info {
	background-color: var(--wp--preset--color--surface);
	border-left-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--text);
}

.woocommerce-error {
	background-color: var(--wp--preset--color--surface);
	border-left-color: #e74c3c;
	color: var(--wp--preset--color--text);
}

/* --- Responsive --- */
@media (max-width: 781px) {
	.muus-features .wp-block-column + .wp-block-column::before {
		display: none;
	}

	.muus-features .wp-block-columns {
		flex-direction: column;
	}

	.muus-footer .wp-block-columns {
		gap: 2rem;
	}

	.single-product .wp-block-columns {
		flex-direction: column;
	}

	.single-product .wp-block-column[style*="flex-basis"] {
		flex-basis: 100% !important;
	}

	.muus-product-about,
	.muus-product-specs {
		margin-top: 2rem !important;
	}

	.muus-product-about > .wp-block-columns > .wp-block-column:last-child,
	.muus-product-specs > .wp-block-columns > .wp-block-column:last-child {
		padding-left: 0;
	}

	.muus-product-about > .wp-block-columns > .wp-block-column:last-child {
		margin-top: 2.5rem !important;
	}

	.muus-product-specs .muus-product-about-image {
		margin-bottom: 1.5rem;
	}

	.muus-single-product .woocommerce-product-gallery {
		width: 100%;
	}

	.muus-single-product .flex-control-thumbs li {
		flex: 0 0 72px;
		width: 72px;
		height: 72px;
	}
}

