/* MichoShop presentation primitives. Business logic intentionally stays out. */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	overflow-x: hidden;
}

img {
	height: auto;
	max-width: 100%;
}

a,
button,
input,
select,
textarea {
	transition-duration: 160ms;
	transition-property: background-color, border-color, color, opacity, transform;
	transition-timing-function: ease;
}

a:hover,
a:focus-visible {
	color: var(--wp--preset--color--micho-pink);
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--micho-pink);
	outline-offset: 3px;
}

.wp-element-button:hover,
.wp-element-button:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--micho-pink);
	border-color: var(--wp--preset--color--micho-pink);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Header */
.micho-site-header {
	position: relative;
	z-index: 50;
}

.micho-header-inner {
	min-height: 52px;
}

.micho-header-logo img,
.micho-checkout-header .wp-block-site-logo img {
	display: block;
	max-height: 48px;
	object-fit: contain;
	width: auto;
}

.micho-primary-nav {
	flex: 1 1 auto;
	justify-content: center;
}

.micho-primary-nav .wp-block-navigation__container {
	column-gap: clamp(0.9rem, 1.8vw, 1.75rem);
}

.micho-primary-nav a {
	white-space: nowrap;
}

.micho-primary-nav .micho-mobile-nav-account {
	display: none;
}

.micho-header-actions {
	gap: 0.75rem;
}

/* WooCommerce may hook its own customer-account block next to the header
 * contents. MichoShop already provides an explicitly sized account action,
 * so hide only the injected duplicate inside this theme header. */
.micho-header-inner > .wp-block-woocommerce-customer-account {
	display: none !important;
}

.micho-account-link {
	align-items: center;
	color: var(--wp--preset--color--ink);
	display: inline-flex;
	flex: 0 0 44px;
	height: 44px;
	justify-content: center;
	margin: 0;
	width: 44px;
}

.micho-account-link svg {
	fill: none;
	height: 22px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.6;
	width: 22px;
}

.micho-account-link:hover,
.micho-account-link:focus-visible {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--micho-pink);
}

.micho-header-search {
	margin: 0;
}

.micho-header-search .wp-block-search__button {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--wp--preset--color--ink);
	display: inline-flex;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 0.65rem;
}

.micho-header-search .wp-block-search__button:hover,
.micho-header-search .wp-block-search__button:focus-visible {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--micho-pink);
}

.micho-header-search .wp-block-search__inside-wrapper {
	min-width: 44px;
}

.micho-header-actions .wc-block-mini-cart__button {
	align-items: center;
	box-sizing: border-box;
	display: inline-flex;
	height: 44px;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 0 !important;
	width: 44px;
}

/* Hero */
.micho-home-hero {
	border-radius: var(--wp--custom--radius--large);
	overflow: hidden;
}

.micho-home-hero h1 {
	font-size: clamp(2.5rem, 4vw, 3.5rem);
	max-width: none;
}

.micho-hero-columns {
	min-height: 260px;
}

.micho-hero-subtitle {
	font-size: 1.125rem;
	line-height: 1.55;
}

.micho-media-placeholder {
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(229, 231, 235, 0.75)),
		repeating-linear-gradient(45deg, transparent 0 18px, rgba(17, 17, 17, 0.035) 18px 19px);
	border: 1px dashed #c9cdd3;
	border-radius: var(--wp--custom--radius--medium);
	color: var(--wp--preset--color--muted);
}

/* Internal replacement instructions belong in the editor, not on storefronts. */
.micho-media-placeholder > p {
	visibility: hidden;
}

.editor-styles-wrapper .micho-media-placeholder > p {
	visibility: visible;
}

.micho-hero-placeholder {
	min-height: 270px;
	padding: var(--wp--preset--spacing--40);
}

.micho-hero-product-image {
	background: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--radius--medium);
	height: 270px;
	margin: 0;
	overflow: hidden;
}

.micho-hero-product-image img,
.micho-category-image img {
	display: block;
	height: 100%;
	object-fit: contain;
	width: 100%;
}

.micho-hero-actions {
	margin-top: var(--wp--preset--spacing--40);
}

/* Category cards */
.micho-category-grid {
	gap: var(--wp--preset--spacing--30);
}

.micho-category-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	height: 100%;
	overflow: hidden;
	padding: var(--wp--preset--spacing--20);
	position: relative;
}

.micho-category-card:hover,
.micho-category-card:focus-within {
	border-color: #c9cdd3;
	box-shadow: var(--wp--preset--shadow--card);
	transform: translateY(-2px);
}

.micho-category-placeholder {
	min-height: 210px;
	padding: var(--wp--preset--spacing--30);
}

.micho-category-image {
	background: var(--wp--preset--color--white);
	border-radius: calc(var(--wp--custom--radius--medium) - 2px);
	height: 210px;
	margin: 0;
	overflow: hidden;
}

.micho-category-image img {
	transition: transform 180ms ease;
}

.micho-category-card:hover .micho-category-image img,
.micho-category-card:focus-within .micho-category-image img {
	transform: scale(1.025);
}

.micho-category-card h3 {
	font-size: clamp(1.05rem, 1.5vw, 1.25rem) !important;
	line-height: 1.2;
	margin: var(--wp--preset--spacing--20) 0 var(--wp--preset--spacing--10);
}

.micho-card-link {
	inset: 0;
	position: absolute;
	z-index: 2;
}

/* Section heading and trust bar */
.micho-section-heading {
	margin-bottom: var(--wp--preset--spacing--30);
}

.micho-section-heading > * {
	margin-bottom: 0;
	margin-top: 0;
}

.micho-section-heading a {
	color: var(--wp--preset--color--micho-pink);
	font-weight: 650;
}

.micho-trust-items {
	margin-bottom: 0;
}

.micho-trust-item {
	gap: var(--wp--preset--spacing--20);
}

.micho-trust-item p {
	margin: 0;
}

.micho-trust-icon {
	fill: none;
	flex: 0 0 28px;
	height: 28px;
	stroke: var(--wp--preset--color--ink);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.5;
	width: 28px;
}

/* Footer */
.micho-site-footer h3 {
	letter-spacing: 0.04em;
	margin-bottom: var(--wp--preset--spacing--20);
}

.micho-site-footer a {
	color: var(--wp--preset--color--border);
	display: inline-block;
	margin-bottom: 0.35rem;
}

.micho-site-footer a:hover,
.micho-site-footer a:focus-visible {
	color: var(--wp--preset--color--white);
}

.micho-footer-base {
	gap: var(--wp--preset--spacing--20);
}

.micho-footer-base p {
	margin: 0;
}

/* General content */
.micho-content-main,
.micho-store-main,
.micho-product-main,
.micho-transaction-main {
	min-height: 48vh;
}

.micho-not-found .wp-block-search {
	margin-left: auto;
	margin-right: auto;
	max-width: 560px;
}

@media (max-width: 1080px) {
	.micho-primary-nav .wp-block-navigation__container {
		column-gap: 0.9rem;
	}
}

@media (max-width: 900px) {
	.micho-primary-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
		height: 0;
		margin: 0;
		padding: 0;
		width: 0;
	}

	.micho-primary-nav .wp-block-navigation__responsive-container-open {
		align-items: center;
		box-sizing: border-box;
		display: flex;
		height: 44px;
		justify-content: center;
		min-height: 44px;
		min-width: 44px;
		padding: 0 !important;
		width: 44px;
	}

	.micho-primary-nav .wp-block-navigation__responsive-container-close {
		align-items: center;
		box-sizing: border-box;
		display: flex;
		height: 44px;
		justify-content: center;
		min-height: 44px;
		min-width: 44px;
		padding: 0 !important;
		width: 44px;
	}

	.micho-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		align-items: center;
		display: flex;
		min-height: 44px;
	}

	.micho-primary-nav {
		flex: 0 0 auto;
		order: 3;
	}

	.micho-header-actions {
		margin-left: auto;
	}

	.micho-primary-nav .micho-mobile-nav-account {
		display: flex;
	}
}

@media (max-width: 781px) {
	.micho-home-hero {
		padding: var(--wp--preset--spacing--40) !important;
	}

	.micho-hero-columns {
		min-height: 0;
	}

	.micho-hero-placeholder {
		min-height: 220px;
	}

	.micho-hero-product-image {
		height: 220px;
	}

	.micho-footer-columns,
	.micho-trust-items {
		gap: var(--wp--preset--spacing--30);
	}

	.micho-category-grid {
		display: grid !important;
		gap: var(--wp--preset--spacing--20);
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.micho-category-grid > .wp-block-column {
		margin: 0;
		min-width: 0;
	}

	.micho-category-grid > .wp-block-column:nth-child(3) {
		grid-column: 1 / -1;
	}

	.micho-category-placeholder {
		min-height: 122px;
		padding: var(--wp--preset--spacing--20);
	}

	.micho-category-image {
		height: 122px;
	}

	.micho-category-grid > .wp-block-column:nth-child(3) .micho-category-placeholder {
		min-height: 100px;
	}

	.micho-category-grid > .wp-block-column:nth-child(3) .micho-category-image {
		height: 100px;
	}

	.micho-category-card {
		padding: var(--wp--preset--spacing--10);
	}

	.micho-category-card h3 {
		font-size: clamp(0.82rem, 3.2vw, 1rem) !important;
		margin: var(--wp--preset--spacing--10) 0 0;
	}

	.micho-footer-columns > .wp-block-column:first-child {
		flex-basis: 100% !important;
	}
}

@media (max-width: 600px) {
	.micho-site-header {
		padding-bottom: var(--wp--preset--spacing--10) !important;
		padding-top: var(--wp--preset--spacing--10) !important;
	}

	.micho-header-inner {
		gap: 0.4rem;
		min-height: 48px;
	}

	.micho-header-logo img {
		max-height: 40px;
		max-width: 124px;
	}

	.micho-header-logo .custom-logo-link {
		align-items: center;
		display: inline-flex;
		height: 44px;
		min-height: 44px;
		min-width: 44px;
	}

	.micho-header-actions {
		gap: 0.2rem;
	}

	.micho-account-link {
		box-sizing: border-box;
		flex-basis: 44px;
		height: 44px;
		min-height: 44px;
		min-width: 44px;
		padding: 0 !important;
		width: 44px;
	}

	.micho-header-actions .wc-block-mini-cart__amount {
		display: none;
	}

	.micho-home-hero {
		padding: var(--wp--preset--spacing--30) !important;
	}

	.micho-home-hero h1 {
		font-size: clamp(2rem, 10vw, 2.65rem) !important;
	}

	.micho-hero-actions .wp-block-button {
		flex: 1 1 100%;
	}

	.micho-hero-actions .wp-block-button__link {
		width: 100%;
	}

	.micho-section-heading {
		align-items: flex-end;
	}

	.micho-trust-item {
		justify-content: flex-start !important;
	}

	.micho-footer-base,
	.micho-footer-legal {
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
