/* ==========================================================================
   MIRZAX CO: shared components used by every inner page
   (page hero, breadcrumbs, sections, prose, chips, cards, pagination, forms)
   ========================================================================== */

:root {
	--mx-section-y: clamp(56px, 8vw, 112px);
	--mx-surface: #fcfcf9;
	--mx-shadow-sm: 0 1px 2px rgba(16, 32, 25, 0.06), 0 8px 24px -16px rgba(16, 32, 25, 0.25);
	--mx-shadow-md: 0 2px 4px rgba(16, 32, 25, 0.05), 0 24px 48px -24px rgba(16, 32, 25, 0.35);
}

/* ---------- Reveal on scroll (sections.js adds .is-revealed) ---------- */
.mx-js [data-reveal] {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.7s var(--mx-ease-out), transform 0.9s var(--mx-ease-out);
	transition-delay: var(--reveal-delay, 0ms);
}
.mx-js [data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---------- Sections ---------- */
.mx-section { padding-block: var(--mx-section-y); }
.mx-section + .mx-section { padding-top: 0; }
.mx-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: clamp(28px, 4vw, 48px);
}
.mx-section__head-text { max-width: 640px; }
.mx-section__title {
	margin: 0;
	color: var(--mx-ink);
	font-size: clamp(28px, 3.6vw, 44px);
	font-weight: 750;
	font-stretch: 88%;
	line-height: 1.06;
	letter-spacing: -0.015em;
	text-wrap: balance;
}
.mx-section__lead {
	margin: 14px 0 0;
	color: var(--mx-text-muted);
	font-size: clamp(16px, 1.4vw, 18px);
	line-height: 1.6;
	text-wrap: pretty;
}
.mx-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	color: var(--mx-ink);
	font-weight: 600;
	text-decoration: underline dashed var(--mx-gold-deep);
	text-underline-offset: 6px;
	white-space: nowrap;
}
.mx-link-arrow .mx-icon { transition: transform 0.3s var(--mx-ease-out); }
.mx-link-arrow:hover .mx-icon { transform: translateX(4px); }

.mx-btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Page hero ---------- */
.mx-hero {
	position: relative;
	background: var(--mx-cotton);
	overflow: hidden;
}
.mx-hero::before {
	content: "";
	position: absolute;
	right: -120px;
	top: -160px;
	width: 520px;
	height: 520px;
	border: 1.5px dashed rgba(201, 154, 69, 0.45);
	border-radius: 50%;
	pointer-events: none;
}
.mx-hero__inner {
	position: relative;
	padding-block: clamp(28px, 4vw, 44px) clamp(36px, 5vw, 64px);
}
.mx-hero__title {
	max-width: 22ch;
	margin: 18px 0 0;
	color: var(--mx-ink);
	font-size: clamp(34px, 5vw, 64px);
	font-weight: 750;
	font-stretch: 86%;
	line-height: 1.02;
	letter-spacing: -0.02em;
	text-wrap: balance;
	animation: mx-rise 0.7s var(--mx-ease-out) backwards;
}
.mx-hero__intro {
	max-width: 62ch;
	margin-top: 16px;
	color: var(--mx-text-muted);
	font-size: clamp(16px, 1.5vw, 18.5px);
	line-height: 1.6;
	animation: mx-rise 0.7s var(--mx-ease-out) 0.08s backwards;
}
.mx-hero__intro p { margin: 0 0 8px; }
.mx-hero__seam {
	height: 2px;
	color: rgba(201, 154, 69, 0.6);
	background: repeating-linear-gradient(90deg, currentColor 0 10px, transparent 10px 17px);
}
.mx-hero--center .mx-hero__inner { text-align: center; }
.mx-hero--center .mx-hero__title,
.mx-hero--center .mx-hero__intro { margin-inline: auto; }
.mx-hero--center .mx-breadcrumbs ol { justify-content: center; }
.mx-hero__search { max-width: 560px; margin-top: 22px; }

/* ---------- Breadcrumbs ---------- */
.mx-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13.5px;
	color: var(--mx-text-muted);
}
.mx-breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; }
.mx-breadcrumbs li + li::before {
	content: "";
	width: 14px;
	height: 1px;
	margin: 0 10px;
	background: repeating-linear-gradient(90deg, var(--mx-gold-deep) 0 3px, transparent 3px 5px);
}
.mx-breadcrumbs a { color: var(--mx-text-muted); text-decoration: none; }
.mx-breadcrumbs a:hover { color: var(--mx-ink); text-decoration: underline; text-underline-offset: 3px; }
.mx-breadcrumbs [aria-current] {
	overflow: hidden;
	max-width: 32ch;
	color: var(--mx-ink);
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- Chips and filters ---------- */
.mx-chip {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	background: rgba(16, 32, 25, 0.07);
	color: var(--mx-ink);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s var(--mx-ease);
}
a.mx-chip:hover { background: rgba(16, 32, 25, 0.13); }
.mx-chip--gold { background: var(--mx-gold); }
a.mx-chip--gold:hover { background: var(--mx-gold-soft); }

.mx-filters { margin-top: 24px; }
.mx-filters ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mx-filters a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 16px;
	border: 1px dashed rgba(16, 32, 25, 0.3);
	border-radius: 999px;
	background: var(--mx-surface);
	color: var(--mx-ink);
	font-size: 14.5px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.2s var(--mx-ease), background-color 0.2s var(--mx-ease), color 0.2s var(--mx-ease);
}
.mx-filters a:hover { border-style: solid; border-color: var(--mx-ink); }
.mx-filters a[aria-current] { border: 1px solid var(--mx-ink); background: var(--mx-ink); color: var(--mx-gold); }
@media (max-width: 719px) {
	.mx-filters--scroll { margin-inline: calc(-1 * clamp(16px, 3.4vw, 40px)); }
	.mx-filters--scroll ul {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-inline: clamp(16px, 3.4vw, 40px);
		scrollbar-width: none;
		scroll-snap-type: x proximity;
	}
	.mx-filters--scroll ul::-webkit-scrollbar { display: none; }
	.mx-filters--scroll li { scroll-snap-align: start; }
}

/* ---------- Grids ---------- */
.mx-grid { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.mx-grid--posts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* ---------- Post card ---------- */
.mx-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--mx-line-light);
	border-radius: 18px;
	background: var(--mx-surface);
	transition: box-shadow 0.35s var(--mx-ease), transform 0.35s var(--mx-ease-out), border-color 0.35s var(--mx-ease);
}
.mx-card:hover { box-shadow: var(--mx-shadow-md); transform: translateY(-4px); border-color: rgba(16, 32, 25, 0.18); }
.mx-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--mx-cotton);
}
.mx-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s var(--mx-ease-out);
}
.mx-card:hover .mx-card__media img { transform: scale(1.04); }
.mx-card__placeholder { display: grid; place-items: center; height: 100%; color: var(--mx-gold-deep); }
.mx-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 20px 22px 22px;
}
.mx-card__title {
	margin: 2px 0 0;
	font-size: 20px;
	font-weight: 700;
	font-stretch: 92%;
	line-height: 1.25;
	text-wrap: balance;
}
.mx-card__title a { color: var(--mx-ink); text-decoration: none; }
.mx-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.mx-card__title a:focus-visible { outline: none; }
.mx-card:has(.mx-card__title a:focus-visible) { outline: 2px solid var(--mx-ink); outline-offset: 3px; }
.mx-card__body .mx-chip { position: relative; z-index: 1; }
.mx-card__excerpt { color: var(--mx-text-muted); font-size: 15px; line-height: 1.55; }
.mx-card__excerpt p { margin: 0; }
.mx-card .mx-post-meta { margin-top: auto; padding-top: 6px; }

.mx-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--mx-text-muted);
	font-size: 13.5px;
}

/* ---------- Pagination (WordPress and WooCommerce) ---------- */
.mx-pagination,
.woocommerce-pagination { margin-top: clamp(36px, 5vw, 56px); }
.mx-pagination .nav-links,
.woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mx-pagination .page-numbers,
.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--mx-line-light);
	border-radius: 12px;
	background: var(--mx-surface);
	color: var(--mx-ink);
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.2s var(--mx-ease), background-color 0.2s var(--mx-ease);
}
.mx-pagination a.page-numbers:hover,
.woocommerce-pagination a:hover { border-color: var(--mx-ink); }
.mx-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers .current { border-color: var(--mx-ink); background: var(--mx-ink); color: var(--mx-gold); }
.mx-pagination .prev .mx-icon,
.woocommerce-pagination .prev .mx-icon { transform: rotate(90deg); }
.mx-pagination .next .mx-icon,
.woocommerce-pagination .next .mx-icon { transform: rotate(-90deg); }
.mx-pagination .dots { border-color: transparent; background: none; }

/* ---------- Empty state ---------- */
.mx-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 560px;
	margin: 0 auto;
	padding: clamp(32px, 6vw, 64px) 16px;
	text-align: center;
	color: var(--mx-text-muted);
}
.mx-empty__icon {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border: 1.5px dashed var(--mx-gold-deep);
	border-radius: 50%;
	color: var(--mx-ink);
}
.mx-empty__title { margin: 6px 0 0; color: var(--mx-ink); font-size: 26px; font-stretch: 90%; }
.mx-empty p { margin: 0; }
.mx-empty__form { width: 100%; margin: 8px 0; }

/* ---------- Search form ---------- */
.mx-searchform {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 6px 6px 18px;
	border: 1px solid rgba(16, 32, 25, 0.2);
	border-radius: 999px;
	background: #fff;
	color: var(--mx-text-muted);
	transition: border-color 0.2s var(--mx-ease), box-shadow 0.2s var(--mx-ease);
}
.mx-searchform:focus-within { border-color: var(--mx-ink); box-shadow: 0 0 0 4px rgba(242, 207, 133, 0.55); }
.mx-searchform input {
	flex: 1;
	min-width: 0;
	height: 44px;
	border: 0;
	background: transparent;
	color: var(--mx-text);
	font: 400 16px var(--mx-font);
}
.mx-searchform input:focus { outline: none; }
.mx-searchform .mx-btn { min-height: 44px; }

/* ---------- Prose (page and article content) ---------- */
.mx-prose {
	color: #26322c;
	font-size: clamp(16.5px, 1.25vw, 18px);
	line-height: 1.75;
}
.mx-prose > * { margin-top: 0; margin-bottom: 1.15em; }
.mx-prose > :last-child { margin-bottom: 0; }
.mx-prose h2,
.mx-prose h3,
.mx-prose h4 {
	color: var(--mx-ink);
	font-stretch: 90%;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
	scroll-margin-top: calc(var(--mx-header-h) + 24px);
}
.mx-prose h2 { margin-top: 1.9em; margin-bottom: 0.6em; font-size: clamp(26px, 2.6vw, 34px); font-weight: 750; }
.mx-prose h3 { margin-top: 1.6em; margin-bottom: 0.5em; font-size: clamp(20px, 1.9vw, 24px); font-weight: 700; }
.mx-prose h4 { margin-top: 1.4em; margin-bottom: 0.4em; font-size: 19px; font-weight: 700; }
.mx-prose > h2:first-child,
.mx-prose > h3:first-child { margin-top: 0; }
.mx-prose a { color: var(--mx-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--mx-gold-deep); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.mx-prose a:hover { text-decoration-style: dashed; }
.mx-prose ul,
.mx-prose ol { padding-left: 1.4em; }
.mx-prose li { margin-bottom: 0.45em; }
.mx-prose li::marker { color: var(--mx-gold-deep); font-weight: 700; }
.mx-prose blockquote {
	position: relative;
	margin: 1.8em 0;
	padding: 22px 26px 22px 30px;
	border-radius: 0 14px 14px 0;
	background: var(--mx-cotton);
	color: var(--mx-ink);
	font-size: 1.12em;
	font-weight: 500;
	line-height: 1.55;
}
.mx-prose blockquote::before {
	content: "";
	position: absolute;
	left: 0;
	top: 12px;
	bottom: 12px;
	border-left: 2px dashed var(--mx-gold-deep);
}
.mx-prose blockquote p { margin: 0; }
.mx-prose blockquote cite { display: block; margin-top: 10px; color: var(--mx-text-muted); font-size: 0.8em; font-style: normal; }
.mx-prose img,
.mx-prose figure img { height: auto; border-radius: 14px; }
.mx-prose figure { margin-inline: 0; }
.mx-prose figcaption,
.mx-prose .wp-element-caption { margin-top: 8px; color: var(--mx-text-muted); font-size: 14px; text-align: center; }
.mx-prose hr { height: 2px; border: 0; background: repeating-linear-gradient(90deg, var(--mx-gold-deep) 0 8px, transparent 8px 14px); opacity: 0.6; margin-block: 2.4em; }
.mx-prose table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.mx-prose .wp-block-table { overflow-x: auto; }
.mx-prose th,
.mx-prose td { padding: 12px 14px; border-bottom: 1px solid var(--mx-line-light); text-align: left; }
.mx-prose thead th { color: var(--mx-ink); border-bottom: 2px solid var(--mx-ink); }
.mx-prose code { padding: 2px 6px; border-radius: 6px; background: var(--mx-cotton); font-size: 0.88em; }
.mx-prose pre { overflow-x: auto; padding: 18px; border-radius: 12px; background: var(--mx-ink); color: var(--mx-thread); font-size: 0.86em; }
.mx-prose .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--mx-gold);
	color: var(--mx-ink);
	font-weight: 600;
	text-decoration: none;
}
.mx-prose .wp-block-button__link:hover { background: var(--mx-gold-soft); }
.mx-prose .alignwide { margin-inline: calc(-1 * min(8vw, 120px)); max-width: none; }
.mx-prose .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.mx-page-links { display: flex; gap: 8px; margin-top: 24px; font-weight: 600; }

/* ---------- WooCommerce notices (anywhere) ---------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 12px;
	background: var(--mx-cotton);
	color: var(--mx-ink);
	list-style: none;
}
.woocommerce-error { background: #fdecea; color: #7a1a12; }
.woocommerce-message .button,
.woocommerce-info .button { margin-left: auto; color: var(--mx-ink); font-weight: 600; }

/* ---------- Comments ---------- */
.mx-comments { max-width: 760px; margin-inline: auto; padding-block: 24px var(--mx-section-y); }
.mx-comments__title { font-size: 24px; font-stretch: 90%; }
.mx-comments__list { margin: 0 0 32px; padding: 0; list-style: none; }
.mx-comments__list .comment-body { padding: 18px 0; border-bottom: 1px dashed var(--mx-line-light); }
.mx-comments__list .avatar { float: left; margin-right: 12px; border-radius: 50%; }
.mx-comments__list .children { padding-left: 32px; list-style: none; }
.comment-respond label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14.5px; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid rgba(16, 32, 25, 0.22);
	border-radius: 10px;
	background: #fff;
	font: 400 16px var(--mx-font);
}
.comment-respond textarea { min-height: 140px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.mx-js [data-reveal] { transform: none; transition: opacity 0.2s linear; transition-delay: 0s; }
	.mx-hero__title,
	.mx-hero__intro { animation: none; }
	.mx-card,
	.mx-card:hover,
	.mx-card__media img,
	.mx-card:hover .mx-card__media img,
	.mx-link-arrow:hover .mx-icon { transform: none; }
}

/* ---------- Light header & footer: hero matches ---------- */
.mx-chrome-light .mx-hero { background: #f1f3ec; }
