/**
 * MaxFurn Custom — product page: gallery and zoom, summary, options,
 * quantity, enquiry buttons, accordions, description/specification tabs.
 */

.mf-product-top {
	padding-block: 20px 40px;
	background: var(--mf-surface);
}

.site-main:has(.mf-product-top) {
	padding-top: 0;
}

.mf-product {
	display: grid;
	gap: 32px;
	margin-top: 20px;
}

@media (min-width: 1024px) {
	.mf-product {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		gap: 56px;
		align-items: start;
	}
}

/* ---------- Gallery ---------- */

.mf-gallery__stage {
	position: relative;
	overflow: hidden;
	border-radius: var(--mf-radius-card);
	background: var(--mf-bg);
	aspect-ratio: 3 / 2;
}

.mf-gallery__main {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mf-gallery__placeholder {
	width: 100%;
	height: 100%;
}

.mf-gallery__zoom {
	position: absolute;
	right: 12px;
	bottom: 12px;
	background: var(--mf-surface);
	color: var(--mf-ink);
	box-shadow: 0 2px 8px rgba(20, 20, 20, 0.15);
}

.no-js .mf-gallery__zoom {
	display: none;
}

.mf-gallery .mf-card__badges {
	top: 12px;
	left: 12px;
}

.mf-gallery__thumbs {
	display: flex;
	gap: 10px;
	margin: 12px 0 0;
	padding: 0 0 4px;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x proximity;
}

.mf-gallery__thumb {
	display: block;
	flex: none;
	width: 76px;
	height: 76px;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 10px;
	scroll-snap-align: start;
}

.mf-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mf-gallery__thumb[aria-current="true"] {
	border-color: var(--mf-red);
}

/* Zoom lightbox */
.mf-zoom {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(20, 20, 20, 0.92);
}

.mf-zoom[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.mf-zoom::backdrop {
	background: rgba(20, 20, 20, 0.92);
}

.mf-zoom__image {
	max-width: 92vw;
	max-height: 86vh;
	object-fit: contain;
}

.mf-zoom__close,
.mf-zoom__prev,
.mf-zoom__next {
	position: absolute;
	background: var(--mf-surface);
	color: var(--mf-ink);
	font-size: 24px;
}

.mf-zoom__close {
	top: 16px;
	right: 16px;
}

.mf-zoom__prev {
	left: 16px;
	top: 50%;
}

.mf-zoom__next {
	right: 16px;
	top: 50%;
}

.mf-zoom :focus-visible {
	outline-color: var(--mf-surface);
	outline-offset: 3px;
}

/* ---------- Summary ---------- */

.mf-product__title {
	margin: 0 0 8px;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
}

.mf-product__sku {
	margin: 0 0 12px;
	color: var(--mf-muted);
	font-size: var(--wp--preset--font-size--small);
}

.mf-product__price {
	font-size: 26px;
}

.mf-product__price .mf-price__tax {
	font-size: 14px;
}

/* "₹X incl. 18% GST": small, under the ex-GST price. */
.mf-product__incl-gst {
	margin: 2px 0 0;
	color: var(--mf-muted);
	font-size: var(--wp--preset--font-size--small);
}

.mf-product__savings {
	margin: 4px 0 0;
	color: var(--mf-price);
	font-weight: 600;
}

.mf-product__stock {
	margin: 12px 0;
	font-weight: 600;
}

.mf-product__stock--in_stock {
	color: #00733a;
}

.mf-product__stock--out_of_stock {
	color: var(--mf-price);
}

.mf-product__stock--on_request {
	color: #8a5a00;
}

.mf-product__excerpt {
	color: var(--mf-text);
}

/* Options */
.mf-option {
	margin: 20px 0 0;
	padding: 0;
	border: 0;
}

.mf-option__name {
	margin-bottom: 10px;
	padding: 0;
	font-weight: 600;
}

.mf-option__chosen {
	color: var(--mf-muted);
	font-weight: 400;
}

.mf-option__values {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.mf-option__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.mf-option__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: var(--mf-tap);
	padding: 0 20px;
	border: 1px solid var(--mf-border);
	border-radius: var(--mf-radius-pill);
	background: var(--mf-surface);
	cursor: pointer;
	font-weight: 500;
}

.mf-option__input:checked + .mf-option__pill {
	border-color: var(--mf-ink);
	background: var(--mf-ink);
	color: var(--mf-surface);
}

.mf-option__input:focus-visible + .mf-option__pill {
	outline: 2px solid var(--mf-red);
	outline-offset: 2px;
}

.mf-option__input:disabled + .mf-option__pill {
	color: var(--mf-strike);
	text-decoration: line-through;
	cursor: not-allowed;
}

.mf-option__sold {
	font-size: 12px;
	text-decoration: none;
}

/* Quantity and buttons */
.mf-buy__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
}

.mf-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--mf-border);
	border-radius: var(--mf-radius-pill);
	background: var(--mf-surface);
}

.mf-qty__btn {
	/* Never squeezed below the tap target in narrow rows (enquiry list on phones). */
	flex: none;
	width: var(--mf-tap);
	padding: 0;
	background: transparent;
	color: var(--mf-ink);
	font-size: 20px;
}

.mf-qty__btn:hover {
	background: var(--mf-tint);
	color: var(--mf-red);
}

.mf-qty__input {
	width: 56px;
	min-height: var(--mf-tap);
	padding: 0;
	border: 0;
	background: transparent;
	text-align: center;
	appearance: textfield;
	-moz-appearance: textfield;
}

.mf-qty__input::-webkit-outer-spin-button,
.mf-qty__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.mf-buy__add,
.mf-buy__now {
	flex: 1 1 180px;
}

.mf-buy__now {
	background: var(--mf-ink);
}

.mf-buy__now:hover {
	background: var(--mf-red);
}

.mf-buy__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	margin-top: 16px;
}

.mf-buy__whatsapp,
.mf-buy__call {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: var(--mf-tap);
	color: var(--mf-ink);
	font-weight: 500;
}

.mf-buy__whatsapp .mf-icon {
	color: var(--mf-whatsapp);
}

.mf-buy__call .mf-icon {
	color: var(--mf-red);
}

/* Accordions */
.mf-accordions {
	margin-top: 28px;
	border-top: 1px solid var(--mf-border);
}

.mf-accordion {
	border-bottom: 1px solid var(--mf-border);
}

.mf-accordion__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 52px;
	cursor: pointer;
	font-weight: 600;
	list-style: none;
}

.mf-accordion__summary::-webkit-details-marker {
	display: none;
}

.mf-accordion__summary::after {
	content: "+";
	color: var(--mf-red);
	font-size: 22px;
	font-weight: 400;
}

.mf-accordion[open] > .mf-accordion__summary::after {
	content: "−";
}

.mf-accordion__body {
	padding-bottom: 16px;
	color: var(--mf-text);
}

/* ---------- Description / specifications ---------- */

.mf-details {
	margin-top: 40px;
	padding: 28px;
	border-radius: var(--mf-radius-card);
	background: var(--mf-surface);
}

.mf-details__tabs {
	display: flex;
	gap: 24px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--mf-border);
}

.mf-details__tabs [role="tab"] {
	min-height: var(--mf-tap);
	margin-bottom: -1px;
	padding: 0 2px;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	background: transparent;
	color: var(--mf-muted);
	font-family: var(--mf-font-heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
}

.mf-details__tabs [role="tab"][aria-selected="true"] {
	border-bottom-color: var(--mf-red);
	color: var(--mf-ink);
}

.mf-details__tabs [role="tab"]:hover {
	background: transparent;
	color: var(--mf-ink);
}

/* With tabs active, the panel headings repeat the tab names: keep them for screen readers only. */
.has-tabs .mf-details__heading {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
}

.mf-details__panel + .mf-details__panel {
	margin-top: 32px;
}

.has-tabs .mf-details__panel + .mf-details__panel {
	margin-top: 0;
}

.mf-specs {
	width: 100%;
	border-collapse: collapse;
}

.mf-specs th,
.mf-specs td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--mf-border);
	text-align: left;
	vertical-align: top;
}

.mf-specs th {
	width: 38%;
	color: var(--mf-muted);
	font-weight: 500;
}

.mf-related {
	margin-block: 48px 24px;
}
