/* ==========================================================================
   MIRZAX CO: single product (woocommerce/content-single-product.php,
   template-parts/product/*)
   ========================================================================== */

.mx-product { padding-top: clamp(20px, 3vw, 32px); }
.mx-product > .mx-container > .mx-breadcrumbs { margin-bottom: clamp(18px, 2.4vw, 28px); }

.mx-product__top {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
	gap: clamp(28px, 4.4vw, 72px);
	align-items: start;
}

/* ---------- Gallery (WooCommerce markup) ---------- */
.mx-product__gallery { min-width: 0; animation: mx-rise 0.7s var(--mx-ease-out) backwards; }
.woocommerce-product-gallery { position: relative; margin: 0; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery .flex-viewport,
.woocommerce-product-gallery--without-images .woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper {
	overflow: hidden;
	border-radius: 22px;
	background: var(--mx-cotton);
}
.woocommerce-product-gallery__image a { display: block; }
.woocommerce-product-gallery__image img { display: block; width: 100%; height: auto; }
.woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image:not(:first-child) { display: none; }
.woocommerce-product-gallery .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}
.woocommerce-product-gallery .flex-control-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	opacity: 0.55;
	cursor: pointer;
	transition: opacity 0.25s var(--mx-ease), outline-color 0.25s var(--mx-ease);
	outline: 2px solid transparent;
	outline-offset: 2px;
}
.woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 0.85; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active { opacity: 1; outline-color: var(--mx-ink); }
.woocommerce-product-gallery__trigger {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 9;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23102019' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.4-4.4M11 8v6M8 11h6'/%3E%3C/svg%3E") no-repeat center;
	box-shadow: var(--mx-shadow-sm);
	font-size: 0;
	transition: transform 0.3s var(--mx-ease-out);
}
.woocommerce-product-gallery__trigger:hover { transform: scale(1.06); }
.woocommerce-product-gallery__trigger span,
.woocommerce-product-gallery__trigger img { display: none; }
.woocommerce-product-gallery .zoomImg { background: #fff; }

/* ---------- Summary ---------- */
.mx-product__summary { position: sticky; top: calc(var(--mx-header-h) + 24px); min-width: 0; }
.mx-product__summary-inner > * { animation: mx-rise 0.7s var(--mx-ease-out) backwards; }
.mx-product__summary-inner > :nth-child(2) { animation-delay: 0.05s; }
.mx-product__summary-inner > :nth-child(3) { animation-delay: 0.1s; }
.mx-product__summary-inner > :nth-child(4) { animation-delay: 0.15s; }
.mx-product__summary-inner > :nth-child(5) { animation-delay: 0.2s; }
.mx-product__summary-inner > :nth-child(n+6) { animation-delay: 0.25s; }
.mx-product__title {
	margin: 14px 0 6px;
	color: var(--mx-ink);
	font-size: clamp(30px, 3.6vw, 48px);
	font-weight: 750;
	font-stretch: 86%;
	line-height: 1.04;
	letter-spacing: -0.018em;
	text-wrap: balance;
}
.mx-product__sku { margin: 0 0 16px; color: var(--mx-text-muted); font-size: 14px; }
.mx-product__sku span { color: var(--mx-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.mx-product__price { margin: 0 0 14px; font-size: 22px; font-weight: 700; }
.mx-product__excerpt { color: var(--mx-text-muted); font-size: 16.5px; line-height: 1.65; }
.mx-product__excerpt p { margin: 0 0 12px; }

.mx-keyspecs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	margin: 18px 0 0;
	overflow: hidden;
	border: 1px solid var(--mx-line-light);
	border-radius: 16px;
	background: var(--mx-line-light);
}
.mx-keyspecs div { padding: 14px 16px; background: var(--mx-surface); }
.mx-keyspecs dt { color: var(--mx-text-muted); font-size: 12.5px; font-weight: 600; }
.mx-keyspecs dd { margin: 3px 0 0; color: var(--mx-ink); font-size: 15px; font-weight: 600; line-height: 1.35; }

.mx-product .mx-quote-box { margin: 20px 0 0; }

.mx-trust {
	display: grid;
	gap: 10px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}
.mx-trust li { display: flex; align-items: center; gap: 12px; color: var(--mx-text); font-size: 15px; }
.mx-trust .mx-icon {
	flex: none;
	box-sizing: content-box;
	padding: 8px;
	border-radius: 50%;
	background: var(--mx-cotton);
	color: var(--mx-ink);
}

/* ---------- Details ---------- */
.mx-product__details { padding-top: var(--mx-section-y) !important; }
.mx-product__details-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
	gap: clamp(28px, 5vw, 80px);
	align-items: start;
}
.mx-product__description .mx-section__title { margin-bottom: 22px; }
.mx-product__description .mx-prose { max-width: 68ch; }
.mx-product__specs {
	position: sticky;
	top: calc(var(--mx-header-h) + 24px);
	padding: 26px 24px;
	border-radius: 20px;
	background: var(--mx-cotton);
}
.mx-product__specs-title { margin: 0 0 14px; color: var(--mx-ink); font-size: 20px; font-stretch: 92%; }
.mx-spectable { width: 100%; border-collapse: collapse; font-size: 15px; }
.mx-spectable th,
.mx-spectable td { padding: 12px 0; border-bottom: 1px dashed rgba(16, 32, 25, 0.18); text-align: left; vertical-align: top; }
.mx-spectable th { width: 42%; padding-right: 14px; color: var(--mx-text-muted); font-weight: 500; }
.mx-spectable td { color: var(--mx-ink); font-weight: 600; }
.mx-spectable a { color: var(--mx-ink); text-underline-offset: 3px; }
.mx-spectable tr:last-child th,
.mx-spectable tr:last-child td { border-bottom: 0; }
.mx-product__specs-note { margin: 14px 0 0; color: var(--mx-text-muted); font-size: 13.5px; line-height: 1.5; }

/* ---------- How ordering works ---------- */
.mx-product__process-inner {
	position: relative;
	padding: clamp(26px, 3.4vw, 44px);
	border-radius: 24px;
	background: var(--mx-ink);
	color: var(--mx-muted);
}
.mx-product__process-inner::before {
	content: "";
	position: absolute;
	inset: 10px;
	border: 1px dashed rgba(242, 207, 133, 0.3);
	border-radius: 16px;
	pointer-events: none;
}
.mx-product__process-title { position: relative; margin: 0 0 24px; color: var(--mx-thread); font-size: clamp(22px, 2.4vw, 30px); font-stretch: 88%; }
.mx-ministeps {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: mini;
}
.mx-ministeps li { display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; line-height: 1.5; }
.mx-ministeps strong { color: var(--mx-thread); font-size: 16px; }
.mx-ministeps__icon {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	margin-bottom: 10px;
	border-radius: 12px;
	background: var(--mx-gold);
	color: var(--mx-ink);
}
@media (max-width: 899px) { .mx-ministeps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .mx-ministeps { grid-template-columns: 1fr; } }

.mx-product__related { padding-top: var(--mx-section-y) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 959px) {
	.mx-product__top { grid-template-columns: 1fr; }
	.mx-product__summary { position: static; }
	.mx-product__details-grid { grid-template-columns: 1fr; }
	.mx-product__specs { position: static; }
}
@media (max-width: 479px) {
	.mx-keyspecs { grid-template-columns: 1fr; }
	.woocommerce-product-gallery .flex-control-thumbs { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.mx-product__gallery,
	.mx-product__summary-inner > * { animation: none; }
	.woocommerce-product-gallery__trigger:hover { transform: none; }
}
