/**
 * Negar Theme — single product page.
 *
 * Loaded only on product pages (inc/enqueue.php). Layout comes from the hook order in
 * inc/single-product.php; WooCommerce's own selectors are overridden with one extra class
 * (.negar-product), never with !important.
 *
 * Layout
 *   mobile   one column: intro → gallery → summary → details → sliders
 *   ≥768     the top block becomes a centred column (36rem)
 *   ≥1024    two columns: gallery (inline start, right in RTL) | intro + summary
 *
 * Contents
 *   1. Page frame, breadcrumb, notices
 *   2. Product grid
 *   3. Intro (kicker, title, short description)
 *   4. Gallery (main image, thumbnails, zoom, arrows)
 *   5. Key specs
 *   6. Stock and price
 *   7. Buy box (frame, add to cart, consult, installment)
 *   8. Details (tabs, specs table, texture close-up)
 *   9. Product sliders
 */

/* 1. Page frame ---------------------------------------------------------- */
.single-product .site-main--woocommerce {
	padding-block-start: var(--space-4);
	background: var(--color-background);
}

.single-product .woocommerce-breadcrumb {
	margin-block-end: var(--space-4);
	font-size: var(--font-size-xs);
	line-height: var(--line-height-tight);
}

.single-product .woocommerce .woocommerce-breadcrumb a,
.single-product .woocommerce-breadcrumb a {
	color: var(--color-text);
	font-weight: var(--font-weight-bold);
	text-decoration: none;
}

.single-product .woocommerce-breadcrumb a:hover {
	color: var(--color-primary);
}

.single-product .woocommerce-notices-wrapper:not(:empty) {
	margin-block-end: var(--space-5);
}

.single-product .woocommerce-notices-wrapper .woocommerce-message,
.single-product .woocommerce-notices-wrapper .woocommerce-info,
.single-product .woocommerce-notices-wrapper .woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	margin: 0;
	padding: var(--space-3) var(--space-4);
	padding-inline-start: 3rem;
	border: 0;
	border-radius: var(--radius-md);
	background: var(--color-white);
	box-shadow: var(--shadow-card);
	color: var(--color-text);
	font-size: var(--font-size-sm);
	line-height: var(--line-height-tight);
}

.single-product .woocommerce-notices-wrapper .woocommerce-message::before,
.single-product .woocommerce-notices-wrapper .woocommerce-info::before,
.single-product .woocommerce-notices-wrapper .woocommerce-error::before {
	top: 50%;
	inset-inline-start: var(--space-4);
	transform: translateY(-50%);
}

.single-product .woocommerce-notices-wrapper .woocommerce-message .button,
.single-product .woocommerce-notices-wrapper .woocommerce-info .button {
	order: 2;
	float: none;
	min-height: var(--control-h-sm);
	padding-inline: var(--space-4);
	font-size: var(--font-size-xs);
}

/* 2. Product grid -------------------------------------------------------- */
.woocommerce div.product.negar-product {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas:
		"intro"
		"gallery"
		"summary"
		"details";
	row-gap: var(--space-5);
	margin: 0;
}

.negar-product > .product-intro {
	grid-area: intro;
}

.woocommerce div.product.negar-product > div.images {
	grid-area: gallery;
	float: none;
	width: auto;
	min-width: 0;
	margin: 0;
}

.woocommerce div.product.negar-product > div.summary {
	grid-area: summary;
	float: none;
	width: auto;
	min-width: 0;
	margin: 0;
}

.negar-product > .product-details {
	grid-area: details;
	min-width: 0;
}

.negar-product > .product-rail-section {
	grid-column: 1 / -1;
	min-width: 0;
}

@media (min-width: 768px) and (max-width: 1023px) {
	.negar-product > .product-intro,
	.woocommerce div.product.negar-product > div.images,
	.woocommerce div.product.negar-product > div.summary {
		width: 100%;
		max-width: 36rem;
		justify-self: center;
	}
}

@media (min-width: 1024px) {
	/* RTL: the first column is on the right, as in the reference. */
	.woocommerce div.product.negar-product {
		grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
		grid-template-rows: auto 1fr auto;
		grid-template-areas:
			"gallery intro"
			"gallery summary"
			"details details";
		column-gap: clamp(2.5rem, 4vw, 4rem);
		row-gap: var(--space-5);
	}

	.woocommerce div.product.negar-product > div.images {
		align-self: start;
	}

	/* Tall (portrait) photos: the main image keeps its whole frame within a calm height,
	   never cropped or stretched; the lightbox shows the full size. */
	.woocommerce div.product.negar-product div.images .woocommerce-product-gallery__image img:not(.zoomImg) {
		max-height: 36rem;
		object-fit: contain;
	}
}

/* 3. Intro --------------------------------------------------------------- */
.product-intro {
	display: grid;
	justify-items: center;
	gap: var(--space-2);
	text-align: center;
}

.product-intro__kicker {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin: 0;
	color: var(--color-accent);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-ui);
}

.product-intro__kicker::before,
.product-intro__kicker::after {
	content: "";
	width: 2.25rem;
	height: 1px;
	background: currentColor;
	opacity: 0.6;
}

.woocommerce div.product.negar-product .product_title {
	margin: 0;
	color: var(--color-primary);
	font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-tight);
}

.product-intro .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin: 0;
	font-size: var(--font-size-xs);
}

.woocommerce div.product.negar-product .product-intro .star-rating {
	float: none;
	margin: 0;
	color: var(--color-accent);
}

.product-intro .woocommerce-product-details__short-description {
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
	line-height: var(--line-height-tight);
}

.product-intro .woocommerce-product-details__short-description > * {
	margin: 0;
}

.product-intro__ornament {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-block-start: var(--space-1);
	color: var(--color-accent);
}

.product-intro__ornament::before,
.product-intro__ornament::after {
	content: "";
	width: clamp(3.5rem, 12vw, 5.5rem);
	height: 1px;
	background: currentColor;
	opacity: 0.45;
}

.product-intro__ornament .negar-ornament {
	width: 18px;
	height: 18px;
}

/* 4. Gallery ------------------------------------------------------------- */
.woocommerce div.product.negar-product div.images .flex-viewport,
.woocommerce div.product.negar-product div.images .woocommerce-product-gallery__wrapper {
	border-radius: var(--radius-md);
}

.woocommerce div.product.negar-product div.images .flex-viewport {
	overflow: hidden;
	box-shadow: var(--shadow-card);
}

/* Without the slider (single image / no JS) the wrapper itself is the frame. */
.woocommerce div.product.negar-product div.images > .woocommerce-product-gallery__wrapper {
	overflow: hidden;
	box-shadow: var(--shadow-card);
}

.woocommerce div.product.negar-product div.images img {
	background: var(--color-white);
}

.woocommerce div.product.negar-product div.images .woocommerce-product-gallery__trigger {
	top: auto;
	right: auto;
	left: auto;
	bottom: var(--space-3);
	inset-inline-start: var(--space-3);
	display: grid;
	place-items: center;
	width: var(--icon-button);
	height: var(--icon-button);
	padding: 0;
	border-radius: 50%;
	background: var(--color-white);
	box-shadow: var(--shadow-sm);
	color: var(--color-primary);
	font-size: 0;
	text-indent: 0;
	box-sizing: border-box;
	transition: box-shadow var(--transition), transform var(--transition);
}

.woocommerce div.product.negar-product div.images .woocommerce-product-gallery__trigger:hover {
	box-shadow: var(--shadow-md);
	transform: scale(1.04);
}

.woocommerce div.product.negar-product div.images .woocommerce-product-gallery__trigger::before {
	position: static;
	width: 20px;
	height: 20px;
	border: 0;
	border-radius: 0;
	background: currentColor;
	-webkit-mask: url("../icons/zoom-in.svg") center / contain no-repeat;
	mask: url("../icons/zoom-in.svg") center / contain no-repeat;
}

.woocommerce div.product.negar-product div.images .woocommerce-product-gallery__trigger::after {
	content: none;
}

/* Thumbnails: one row of four, scrollable when there are more; arrows on wide screens. */
.product-gallery__thumbs {
	position: relative;
	margin-block-start: var(--space-3);
}

.woocommerce div.product.negar-product div.images .flex-control-thumbs {
	display: flex;
	gap: var(--space-3);
	margin: 0;
	padding: 3px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.woocommerce div.product.negar-product div.images .flex-control-thumbs::-webkit-scrollbar {
	display: none;
}

/* Before the slider script runs, WooCommerce prints no thumbnails; keep the row height. */
.woocommerce div.product.negar-product div.images .flex-control-thumbs li {
	flex: 0 0 calc((100% - 3 * var(--space-3)) / 4);
	float: none;
	width: auto;
	scroll-snap-align: start;
}

.woocommerce div.product.negar-product div.images .flex-control-thumbs li img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-card);
	opacity: 0.78;
	transition: opacity var(--transition), box-shadow var(--transition);
}

.woocommerce div.product.negar-product div.images .flex-control-thumbs li img:hover {
	opacity: 1;
}

.woocommerce div.product.negar-product div.images .flex-control-thumbs li img.flex-active {
	box-shadow: 0 0 0 2px var(--color-white), 0 0 0 3.5px var(--color-primary);
	opacity: 1;
}

.product-gallery__arrow {
	display: none;
}

@media (min-width: 1024px) {
	.product-gallery__thumbs.has-arrows {
		padding-inline: 2.75rem;
	}

	.product-gallery__thumbs.has-arrows .product-gallery__arrow {
		position: absolute;
		top: 50%;
		display: grid;
		place-items: center;
		width: 2rem;
		height: 2rem;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: transparent;
		box-shadow: none;
		color: var(--color-text);
		cursor: pointer;
		transform: translateY(-50%);
		transition: background-color var(--transition), color var(--transition);
	}

	.product-gallery__arrow:hover {
		background: var(--color-white);
		box-shadow: var(--shadow-sm);
		color: var(--color-primary);
	}

	.product-gallery__arrow--prev {
		inset-inline-start: 0;
	}

	.product-gallery__arrow--next {
		inset-inline-end: 0;
	}
}

/* 5. Key specs ----------------------------------------------------------- */
.product-specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--space-5);
	margin: 0;
	font-size: var(--font-size-sm);
	line-height: var(--line-height-tight);
}

.product-specs__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: var(--space-2);
	padding-block: 0.625rem;
	border-block-end: 1px solid rgb(34 44 90 / 0.08);
}

.product-specs dt {
	flex: 0 0 auto;
	min-width: 4.75rem;
	color: var(--color-text);
	font-weight: var(--font-weight-bold);
}

.product-specs dd {
	margin: 0;
	color: var(--color-text-muted);
}

@media (max-width: 479px) {
	.product-specs {
		column-gap: var(--space-4);
		font-size: var(--font-size-xs);
	}

	.product-specs dt {
		min-width: 0;
	}
}

/* 6. Stock and price ----------------------------------------------------- */
.product-price {
	display: grid;
	justify-items: center;
	gap: var(--space-2);
	margin-block-start: var(--space-5);
	text-align: center;
}

.product-price__stock:empty {
	display: none;
}

.woocommerce div.product.negar-product .product-price .stock {
	margin: 0;
	padding: 0.3rem 0.75rem;
	border-radius: var(--radius-xs);
	background: var(--color-surface);
	color: var(--color-primary);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-ui);
}

.woocommerce div.product.negar-product .product-price .out-of-stock {
	background: #f7e9e9;
	color: #8f2d2d;
}

.product-price__badge {
	padding: 0.2rem 0.65rem;
	border-radius: var(--radius-pill);
	background: rgb(198 168 108 / 0.16);
	color: #8a6d33;
	font-size: var(--font-size-2xs);
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-ui);
}

.woocommerce div.product.negar-product .product-price__amount {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0 var(--space-3);
	margin: 0;
	color: var(--color-primary);
	font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-tight);
}

.woocommerce div.product.negar-product .product-price__amount del {
	color: var(--color-text-muted);
	font-size: 0.55em;
	font-weight: var(--font-weight-regular);
	opacity: 1;
}

.woocommerce div.product.negar-product .product-price__amount ins {
	text-decoration: none;
}

.product-price__amount .woocommerce-price-suffix {
	flex-basis: 100%;
	color: var(--color-text-muted);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-regular);
}

.product-price__note {
	margin: 0;
	color: var(--color-text-muted);
	font-size: var(--font-size-xs);
	line-height: var(--line-height-tight);
}

/* 7. Buy box ------------------------------------------------------------- *
 * Mobile/tablet, two equal columns:   [frame | add to cart]  [consult | installment]
 * Desktop:                            [frame (full)]  [add to cart | consult]  [installment bar]
 * The WooCommerce form and its wrappers are flattened (display: contents), so the select,
 * the add-to-cart group and the two links are items of one grid. */
.product-buy {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-3);
	margin-block-start: var(--space-5);
}

.woocommerce div.product.negar-product .product-buy form.variations_form,
.woocommerce div.product.negar-product .product-buy .single_variation_wrap {
	display: contents;
}

.woocommerce div.product.negar-product .product-buy form.cart::before,
.woocommerce div.product.negar-product .product-buy form.cart::after {
	content: none;
	display: none;
}

/* Add-to-cart group: the simple-product form, or the variation button row. */
.woocommerce div.product.negar-product .product-buy form.cart:not(.variations_form),
.woocommerce div.product.negar-product .product-buy .woocommerce-variation-add-to-cart {
	display: flex;
	gap: var(--space-2);
	order: 2;
	min-width: 0;
	margin: 0;
}

.woocommerce div.product.negar-product .product-buy table.variations {
	order: 1;
	width: 100%;
	min-width: 0;
	margin: 0;
	border: 0;
}

.product-buy__consult {
	order: 3;
}

.product-buy__installment {
	order: 4;
}

.woocommerce div.product.negar-product .product-buy .single_variation {
	grid-column: 1 / -1;
	order: 5;
}

/* No options (simple product): add to cart spans the row. One extra link: full row. */
.woocommerce div.product.negar-product .product-buy:not(.product-buy--options) form.cart,
.product-buy--single-extra .product-buy__consult,
.product-buy--single-extra .product-buy__installment {
	grid-column: 1 / -1;
}

/* A visible quantity field (more than one can be bought) needs room: frame and add to cart
   take full rows. The class is set in PHP (simple) or per variation (single-product.js). */
.woocommerce div.product.negar-product .product-buy--qty table.variations,
.woocommerce div.product.negar-product .product-buy--qty .woocommerce-variation-add-to-cart,
.woocommerce div.product.negar-product .product-buy--qty form.cart {
	grid-column: 1 / -1;
}

/* Unavailable / out-of-stock messages of the form repeat the stock line above the price. */
.woocommerce div.product.negar-product .product-buy > .stock,
.woocommerce div.product.negar-product .product-buy form.variations_form > .stock {
	grid-column: 1 / -1;
	margin: 0;
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
}

/* The chosen variation's price and stock are shown above (single-product.js). */
.woocommerce div.product.negar-product .product-buy .woocommerce-variation-price,
.woocommerce div.product.negar-product .product-buy .woocommerce-variation-availability {
	display: none;
}

.woocommerce div.product.negar-product .product-buy .woocommerce-variation-description {
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
}

.woocommerce div.product.negar-product .product-buy .woocommerce-variation-description > * {
	margin: 0;
}

/* Frame select: label on the field's top edge (mobile) or above it (desktop). */
.woocommerce div.product.negar-product .product-buy table.variations tbody,
.woocommerce div.product.negar-product .product-buy table.variations tr,
.woocommerce div.product.negar-product .product-buy table.variations th,
.woocommerce div.product.negar-product .product-buy table.variations td {
	display: block;
	padding: 0;
	border: 0;
	line-height: var(--line-height-ui);
	text-align: start;
}

.woocommerce div.product.negar-product .product-buy table.variations tr {
	position: relative;
}

.woocommerce div.product.negar-product .product-buy table.variations tr + tr {
	margin-block-start: var(--space-4);
}

.woocommerce div.product.negar-product .product-buy table.variations th.label {
	position: absolute;
	z-index: 1;
	top: 0;
	inset-inline-start: 0.625rem;
	max-width: calc(100% - 1.25rem);
	padding-inline: 0.3rem;
	background: linear-gradient(var(--color-background) 50%, var(--color-white) 50%);
	transform: translateY(-50%);
}

.woocommerce div.product.negar-product .product-buy table.variations label {
	display: block;
	overflow: hidden;
	color: var(--color-text);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	line-height: 1.4;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.woocommerce div.product.negar-product .product-buy table.variations td.value {
	position: relative;
}

.woocommerce div.product.negar-product .product-buy table.variations td.value::after {
	content: "";
	position: absolute;
	top: calc(var(--control-h) / 2);
	inset-inline-end: 0.875rem;
	width: 18px;
	height: 18px;
	background: var(--color-text);
	pointer-events: none;
	transform: translateY(-50%);
	-webkit-mask: url("../icons/chevron-down.svg") center / contain no-repeat;
	mask: url("../icons/chevron-down.svg") center / contain no-repeat;
}

.woocommerce div.product.negar-product .product-buy table.variations select {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: none;
	height: var(--control-h);
	margin: 0;
	padding-block: 0;
	padding-inline: var(--space-3) 2.5rem;
	border-color: rgb(34 44 90 / 0.16);
	background: var(--color-white);
	box-shadow: var(--shadow-xs);
	color: var(--color-text);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-bold);
	text-overflow: ellipsis;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.woocommerce div.product.negar-product .product-buy table.variations select:hover {
	border-color: rgb(34 44 90 / 0.32);
}

/* Small screens: the select's empty option clears the choice; the link would crowd the label. */
.woocommerce div.product.negar-product .product-buy .reset_variations {
	display: none;
	position: absolute;
	z-index: 1;
	top: 0;
	inset-inline-end: 0.625rem;
	margin: 0;
	padding-inline: 0.3rem;
	background: linear-gradient(var(--color-background) 50%, var(--color-white) 50%);
	color: var(--color-text-muted);
	font-size: var(--font-size-2xs);
	line-height: 1.4;
	transform: translateY(-50%);
}

/* Quantity (only when more than one can be bought). */
.woocommerce div.product.negar-product .product-buy .quantity {
	flex: 0 0 4.25rem;
	float: none;
	margin: 0;
}

.woocommerce div.product.negar-product .product-buy .quantity:has(input[type="hidden"]) {
	display: none;
}

.woocommerce div.product.negar-product .product-buy .quantity .qty {
	width: 100%;
	height: var(--control-h);
	padding-inline: var(--space-1);
	border-color: rgb(34 44 90 / 0.16);
	text-align: center;
}

/* Buttons share one size and one icon axis. */
.woocommerce div.product.negar-product .product-buy .single_add_to_cart_button,
.woocommerce div.product.negar-product .product-buy a.product-buy__consult,
.woocommerce div.product.negar-product .product-buy a.product-buy__installment {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-width: 0;
	min-height: var(--control-h);
	padding-block: 0;
	padding-inline: var(--space-3);
	border-radius: var(--radius-sm);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-bold);
	line-height: 1;
}

.product-buy .negar-icon {
	width: 20px;
	height: 20px;
}

.woocommerce div.product.negar-product .product-buy .single_add_to_cart_button {
	flex: 1 1 auto;
	float: none;
	margin: 0;
	border: 1px solid transparent;
	background: var(--color-primary);
	box-shadow: 0 1px 2px rgb(34 44 90 / 0.12);
	color: var(--color-white);
}

.woocommerce div.product.negar-product .product-buy .single_add_to_cart_button:hover {
	background: #2b3770;
	box-shadow: 0 4px 14px rgb(34 44 90 / 0.18);
	color: var(--color-white);
}

/* The owner's cart icon (assets/icons/cart.svg) before the label. */
.woocommerce div.product.negar-product .product-buy .single_add_to_cart_button::before {
	content: "";
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("../icons/cart.svg") center / contain no-repeat;
	mask: url("../icons/cart.svg") center / contain no-repeat;
}

.woocommerce div.product.negar-product .product-buy .single_add_to_cart_button.disabled,
.woocommerce div.product.negar-product .product-buy .single_add_to_cart_button:disabled {
	background: var(--color-primary);
	color: var(--color-white);
	opacity: 0.45;
	cursor: not-allowed;
}

.woocommerce div.product.negar-product .product-buy .single_add_to_cart_button.loading {
	opacity: 0.7;
}

.woocommerce div.product.negar-product .product-buy .single_add_to_cart_button.loading::after {
	position: static;
	margin: 0;
}

/* .woocommerce a.button (WooCommerce + woocommerce.css) is more specific than the theme
   button variants, so the two links are styled at product scope. */
.woocommerce div.product.negar-product .product-buy a.product-buy__consult {
	border: 1px solid rgb(34 44 90 / 0.24);
	background: var(--color-white);
	box-shadow: var(--shadow-xs);
	color: var(--color-primary);
}

.woocommerce div.product.negar-product .product-buy a.product-buy__consult:hover {
	border-color: rgb(34 44 90 / 0.4);
	background: var(--color-white);
	box-shadow: 0 4px 14px rgb(34 44 90 / 0.1);
	color: var(--color-primary);
}

.woocommerce div.product.negar-product .product-buy a.product-buy__installment {
	border: 1px solid transparent;
	background: #e3e8f2;
	box-shadow: none;
	color: var(--color-primary);
}

.woocommerce div.product.negar-product .product-buy a.product-buy__installment:hover {
	background: #d8dfed;
	color: var(--color-primary);
}

.product-buy__more {
	display: none;
}

.product-buy .label-full,
.product-buy .label-short {
	overflow: hidden;
	text-overflow: ellipsis;
}

.product-buy .label-full {
	display: none;
}

@media (min-width: 1024px) {
	.product-buy .label-full {
		display: inline;
	}

	.product-buy .label-short {
		display: none;
	}

	.woocommerce div.product.negar-product .product-buy table.variations {
		grid-column: 1 / -1;
	}

	.woocommerce div.product.negar-product .product-buy table.variations th.label {
		position: static;
		max-width: none;
		margin-block-end: var(--space-2);
		padding: 0;
		background: none;
		transform: none;
	}

	.woocommerce div.product.negar-product .product-buy table.variations label {
		font-size: var(--font-size-sm);
	}

	.woocommerce div.product.negar-product .product-buy table.variations td.value::after {
		top: 50%;
	}

	.woocommerce div.product.negar-product .product-buy .reset_variations {
		display: inline;
		top: calc(-1 * var(--space-2));
		inset-inline-end: 0;
		padding: 0;
		background: none;
		font-size: var(--font-size-xs);
		transform: translateY(-100%);
	}

	.product-buy--no-consult .woocommerce-variation-add-to-cart,
	.product-buy--no-consult form.cart,
	.product-buy--qty .product-buy__consult,
	.product-buy__installment {
		grid-column: 1 / -1;
	}

	/* Installment: a quiet full-width bar with «مشاهده شرایط» at the far end. */
	.woocommerce div.product.negar-product .product-buy a.product-buy__installment {
		justify-content: flex-start;
		padding-inline: var(--space-4);
	}

	.product-buy__more {
		display: inline-flex;
		align-items: center;
		gap: var(--space-1);
		margin-inline-start: auto;
		font-size: var(--font-size-xs);
	}

	.product-buy__more .negar-icon {
		width: 16px;
		height: 16px;
	}
}

/* 8. Details ------------------------------------------------------------- */
.product-details {
	margin-block-start: calc(var(--section-space) - var(--space-5));
}

.product-details__body {
	display: grid;
	gap: var(--space-6);
}

@media (min-width: 1024px) {
	.product-details__body.has-texture {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
		align-items: start;
		gap: clamp(2.5rem, 4vw, 4rem);
	}
}

.woocommerce div.product.negar-product .woocommerce-tabs {
	min-width: 0;
	margin: 0;
}

.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs {
	display: flex;
	margin: 0 0 var(--space-2);
	padding: 0;
	overflow-x: auto;
	border-block-end: 1px solid rgb(34 44 90 / 0.1);
	scrollbar-width: none;
}

.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs::-webkit-scrollbar {
	display: none;
}

.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs li::after {
	content: none;
	display: none;
}

.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs li {
	flex: 1 0 auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	text-align: center;
}

.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs li a {
	position: relative;
	display: block;
	padding: var(--space-3) var(--space-3);
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-ui);
	white-space: nowrap;
	text-decoration: none;
	transition: color var(--transition);
}

.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs li a:hover {
	color: var(--color-primary);
}

.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs li.active {
	background: none;
}

@media (max-width: 479px) {
	.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs li a {
		padding-inline: var(--space-2);
		font-size: 0.8125rem;
	}
}

.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs li.active a {
	color: var(--color-primary);
	font-weight: var(--font-weight-bold);
}

.woocommerce div.product.negar-product .woocommerce-tabs ul.tabs li.active a::after {
	content: "";
	position: absolute;
	inset-inline: var(--space-2);
	bottom: -1px;
	height: 2px;
	border-radius: 2px;
	background: var(--color-primary);
}

.woocommerce div.product.negar-product .woocommerce-tabs .panel {
	margin: 0;
	padding: 0;
	color: var(--color-text);
	font-size: var(--font-size-sm);
	line-height: var(--line-height-base);
}

.woocommerce div.product.negar-product .woocommerce-tabs .panel > :first-child {
	margin-block-start: var(--space-3);
}

/* «مشخصات کامل»: no box, only hairlines between rows. */
.woocommerce div.product.negar-product table.shop_attributes {
	display: table;
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	table-layout: fixed;
}

.woocommerce div.product.negar-product table.shop_attributes tbody {
	display: table-row-group;
}

.woocommerce div.product.negar-product table.shop_attributes tr {
	display: table-row;
}

.woocommerce div.product.negar-product table.shop_attributes th,
.woocommerce div.product.negar-product table.shop_attributes td,
.woocommerce div.product.negar-product table.shop_attributes tr:nth-child(even) th,
.woocommerce div.product.negar-product table.shop_attributes tr:nth-child(even) td {
	/* WooCommerce's small-screen sheet stacks table cells; label and value stay on one row. */
	display: table-cell;
	padding: 0.625rem 0;
	border: 0;
	border-block-end: 1px solid rgb(34 44 90 / 0.07);
	background: none;
	font-size: var(--font-size-sm);
	line-height: var(--line-height-tight);
	text-align: start;
	vertical-align: top;
}

.woocommerce div.product.negar-product table.shop_attributes th {
	width: 45%;
	padding-inline-end: var(--space-4);
	color: var(--color-text);
	font-weight: var(--font-weight-bold);
}

.woocommerce div.product.negar-product table.shop_attributes td {
	color: var(--color-text-muted);
	font-style: normal;
}

.woocommerce div.product.negar-product table.shop_attributes td p {
	margin: 0;
	padding: 0;
}

.woocommerce div.product.negar-product table.shop_attributes td a {
	color: inherit;
	text-decoration: none;
}

.woocommerce div.product.negar-product table.shop_attributes td a:hover {
	color: var(--color-primary);
	text-decoration: underline;
}

.woocommerce div.product.negar-product .woocommerce-tabs .panel > table.shop_attributes:first-child {
	margin-block-start: 0;
}

/* Reviews */
.woocommerce div.product.negar-product #reviews #comments h2,
.woocommerce div.product.negar-product #reviews .comment-reply-title {
	margin: var(--space-3) 0;
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-bold);
}

.woocommerce div.product.negar-product #reviews #comments ol.commentlist li .comment-text {
	border: 0;
	border-radius: var(--radius-md);
	background: var(--color-white);
	box-shadow: var(--shadow-card);
}

.woocommerce div.product.negar-product #review_form #respond textarea {
	min-height: 7rem;
}

.woocommerce div.product.negar-product #review_form #respond .form-submit input {
	float: none;
}

/* Texture close-up: square, never stretched; smaller than the main image on mobile. */
.product-texture {
	position: relative;
	width: min(64%, 16rem);
	margin: 0 auto;
	overflow: hidden;
	border-radius: var(--radius-md);
	background: var(--color-surface);
	box-shadow: var(--shadow-card);
	aspect-ratio: 1;
}

.product-texture__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-texture__caption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	display: grid;
	justify-items: start;
	gap: var(--space-1);
	padding: 2.5rem var(--space-4) var(--space-3);
	background: linear-gradient(to top, rgb(15 20 40 / 0.78), rgb(15 20 40 / 0));
	color: var(--color-white);
	text-align: start;
}

.product-texture__title {
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-ui);
}

.product-texture__ornament {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--color-accent);
}

.product-texture__ornament::before,
.product-texture__ornament::after {
	content: "";
	width: 1.75rem;
	height: 1px;
	background: currentColor;
	opacity: 0.7;
}

.product-texture__ornament .negar-ornament {
	width: 14px;
	height: 14px;
}

.product-texture__text {
	display: none;
	font-size: var(--font-size-xs);
	line-height: var(--line-height-tight);
	opacity: 0.92;
}

@media (min-width: 768px) {
	.product-texture {
		width: min(48%, 20rem);
	}

	.product-texture__caption {
		padding: 3rem var(--space-5) var(--space-4);
	}

	.product-texture__title {
		font-size: var(--font-size-lg);
	}

	.product-texture__ornament::before,
	.product-texture__ornament::after {
		width: 3.5rem;
	}

	.product-texture__ornament .negar-ornament {
		width: 16px;
		height: 16px;
	}

	.product-texture__text {
		display: block;
		max-width: 26rem;
	}
}

@media (min-width: 1024px) {
	.product-texture {
		width: 100%;
		max-width: 28rem;
		margin: 0;
		justify-self: end;
	}
}

/* 9. Product sliders (related, upsells) ---------------------------------- */
.product-rail-section {
	margin-block-start: calc(var(--section-space) - var(--space-5));
}
