/**
 * Knotiva Rugs — PDP
 */

body.single-product {
	--color-primary: #7b1d1d;
	--color-bg: #faf8f5;
	--color-text: #1c1c1c;
	--color-muted: #888888;
	--color-border: rgba(0, 0, 0, 0.08);
}

body.single-product .k-btn--whatsapp,
body.single-product a.k-btn--whatsapp,
body.single-product .elementor-element-8b566b7 .elementor-button,
body.single-product a[href*="whatsapp"] .elementor-button,
body.single-product .elementor-button[href*="whatsapp"] {
	background: transparent !important;
	border: 1px solid var(--color-primary) !important;
	color: var(--color-primary) !important;
	box-shadow: none !important;
}

body.single-product .k-btn--whatsapp:hover,
body.single-product .elementor-element-8b566b7 .elementor-button:hover {
	background: var(--color-primary) !important;
	color: #fff !important;
}

body.single-product .k-btn--outline,
body.single-product .elementor-element-4025cad .elementor-button {
	background: transparent !important;
	border: 1px solid var(--color-primary) !important;
	color: var(--color-primary) !important;
	box-shadow: none !important;
	border-radius: 2px !important;
	padding: 12px 20px !important;
	font-size: 12px !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
}

body.single-product .k-btn--outline:hover,
body.single-product .elementor-element-4025cad .elementor-button:hover {
	background: var(--color-primary) !important;
	color: #fff !important;
}

body.single-product .k-btn--outline svg {
	margin-right: 6px;
	flex-shrink: 0;
}

/* Hero overlay — a second product name, hidden so the buy title stays primary */
body.single-product .knotiva-pdp-hero {
	display: none !important;
}

body.single-product .knotiva-pdp-hero .elementor-background-overlay,
body.single-product .knotiva-pdp-hero:before {
	background: linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.38)) !important;
	opacity: 1 !important;
}

body.single-product .knotiva-pdp-hero .elementor-heading-title,
body.single-product .knotiva-pdp-hero h1,
body.single-product .knotiva-pdp-hero h2 {
	font-family: var(--k-font-display) !important;
	font-weight: 300 !important;
	font-size: 48px !important;
	letter-spacing: 0.06em !important;
	color: #fff !important;
}

@media (max-width: 767px) {
	body.single-product .knotiva-pdp-hero {
		display: none !important;
	}

	body.single-product {
		padding-bottom: 80px;
	}
}

/* Layout + sticky gallery */
body.single-product .pdp-layout {
	display: flex;
	align-items: flex-start;
	gap: 64px;
}

body.single-product .pdp-image-column {
	position: sticky;
	top: 80px;
	height: calc(100vh - 80px);
	overflow-y: auto;
	align-self: flex-start;
	flex: 0 1 48%;
	max-width: 52%;
	scrollbar-width: thin;
}

body.single-product .pdp-right-column {
	flex: 1;
	min-width: 0;
}

@media (max-width: 1279px) {
	body.single-product .pdp-layout {
		display: block;
		gap: 0;
	}

	body.single-product .pdp-image-column {
		position: static;
		height: auto;
		max-width: none;
		overflow: visible;
	}
}

/* Gallery */
body.single-product .woocommerce-product-gallery {
	display: grid !important;
	grid-template-columns: 80px 1fr;
	gap: 8px;
	align-items: start;
	margin-bottom: 12px;
}

body.single-product .woocommerce-product-gallery .flex-viewport,
body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
	order: 2;
	background: var(--color-bg);
	overflow: hidden;
	border-radius: 4px;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs,
body.single-product .woocommerce-product-gallery ol.flex-control-nav {
	order: 1;
	display: flex !important;
	flex-direction: column;
	gap: 8px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	width: 80px;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
	width: 80px !important;
	height: 100px !important;
	margin: 0 !important;
	border: 1px solid var(--color-border);
	border-radius: 2px;
	overflow: hidden;
	opacity: 0.75;
	transition: opacity 200ms ease, border-color 200ms ease;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: pointer;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li.flex-active {
	opacity: 1;
	border: 2px solid var(--color-primary);
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li:hover {
	opacity: 1;
	border-color: var(--color-primary);
}

body.single-product .woocommerce-product-gallery__image img,
body.single-product .woocommerce-product-gallery .flex-viewport img {
	width: 100%;
	min-height: 600px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	background: var(--color-bg);
	border-radius: 4px;
	cursor: zoom-in;
}

.knotiva-tap-zoom {
	display: block;
	margin: 8px 0 16px;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-muted);
	text-align: center;
}

.knotiva-gallery-actions {
	display: flex;
	gap: 12px;
	margin: 8px 0 20px;
}

.knotiva-gallery-actions .elementor-widget,
.knotiva-gallery-actions .elementor-element {
	flex: 1;
	width: auto !important;
	margin: 0 !important;
}

.knotiva-gallery-actions .elementor-button {
	width: 100%;
}

.knotiva-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0, 0, 0, 0.88);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
}

.knotiva-lightbox[hidden] {
	display: none !important;
}

.knotiva-lightbox img {
	max-width: 92vw;
	max-height: 90vh;
	object-fit: contain;
}

.knotiva-lightbox__close {
	position: absolute;
	top: 16px;
	right: 20px;
	background: none;
	border: 0;
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 1279px) and (min-width: 768px) {
	body.single-product .woocommerce-product-gallery {
		grid-template-columns: 1fr;
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs,
	body.single-product .woocommerce-product-gallery ol.flex-control-nav {
		flex-direction: row;
		width: 100%;
		order: 2;
		overflow-x: auto;
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
		flex: 0 0 64px;
		width: 64px !important;
		height: 80px !important;
	}

	body.single-product .woocommerce-product-gallery .flex-viewport,
	body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
		order: 1;
	}

	body.single-product .woocommerce-product-gallery__image img,
	body.single-product .woocommerce-product-gallery .flex-viewport img {
		min-height: 0;
	}
}

@media (max-width: 767px) {
	body.single-product .woocommerce-product-gallery {
		grid-template-columns: 1fr;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		width: 100vw;
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs {
		display: none !important;
	}

	body.single-product .woocommerce-product-gallery__image img,
	body.single-product .woocommerce-product-gallery .flex-viewport img {
		min-height: 0;
		width: 100%;
		border-radius: 0;
		aspect-ratio: 3 / 4;
	}

	.knotiva-gallery-dots {
		display: flex;
		justify-content: center;
		gap: 8px;
		margin: 12px 0;
	}

	.knotiva-gallery-dots button {
		width: 7px;
		height: 7px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: #d0d0d0;
		cursor: pointer;
	}

	.knotiva-gallery-dots button.is-active {
		background: var(--color-primary);
	}
}

@media (min-width: 768px) {
	.knotiva-gallery-dots {
		display: none;
	}
}

/* Breadcrumb */
body.single-product .woocommerce-breadcrumb,
body.single-product .ast-breadcrumbs,
body.single-product nav.woocommerce-breadcrumb {
	font-family: var(--k-font-ui);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin-bottom: 20px;
}

body.single-product .woocommerce-breadcrumb a {
	color: var(--color-muted);
}

body.single-product .knotiva-crumb-current {
	color: var(--color-text);
}

@media (max-width: 767px) {
	body.single-product .woocommerce-breadcrumb,
	body.single-product .ast-breadcrumbs {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* Title / price / meta */
body.single-product .product_title,
body.single-product .elementor-widget-woocommerce-product-title .product_title {
	font-family: var(--k-font-display) !important;
	font-size: 40px !important;
	font-weight: 400 !important;
	letter-spacing: 0.02em !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	color: var(--color-text) !important;
	margin-bottom: 8px !important;
}

body.single-product .knotiva-pdp-byline {
	font-family: var(--k-font-ui);
	font-size: 15px;
	line-height: 1.6;
	color: var(--color-muted);
	margin: 0 0 12px;
}

body.single-product .knotiva-craft-meta {
	font-size: 11px !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	color: var(--color-muted) !important;
	font-weight: 400 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.single-product .price,
body.single-product .elementor-widget-woocommerce-product-price .price {
	font-family: var(--k-font-ui) !important;
	font-size: 28px !important;
	font-weight: 500 !important;
	color: var(--color-text) !important;
	margin: 12px 0 4px !important;
}

body.single-product .knotiva-size-fact {
	font-family: var(--k-font-ui);
	font-size: 16px;
	line-height: 1.4;
	color: var(--color-text);
	margin: 0 0 16px;
}

body.single-product .knotiva-size-fact__label {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-muted);
}

body.single-product .knotiva-shipping-note {
	font-style: italic;
	font-size: 12px;
	color: var(--color-muted);
	margin: 4px 0 16px;
}

body.single-product .woocommerce-product-details__short-description,
body.single-product .elementor-widget-woocommerce-product-short-description {
	font-size: 16px;
	line-height: 1.7;
	color: var(--color-text);
}

body.single-product .woocommerce-product-details__short-description p {
	margin-bottom: 16px;
}

@media (max-width: 767px) {
	body.single-product .product_title,
	body.single-product .elementor-widget-woocommerce-product-title .product_title {
		font-size: 30px !important;
	}

	body.single-product .price,
	body.single-product .elementor-widget-woocommerce-product-price .price {
		font-size: 22px !important;
	}
}

.knotiva-special-note {
	border-top: 1px solid var(--color-border);
	margin-top: 8px;
}

.knotiva-special-note summary {
	width: 100%;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: none;
	border: 0;
	padding: 8px 0;
	cursor: pointer;
	font-family: var(--k-font-display);
	font-size: 14px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-primary);
	list-style: none;
}

.knotiva-special-note summary::-webkit-details-marker {
	display: none;
}

.knotiva-special-note summary::after {
	content: "+";
	font-size: 18px;
	line-height: 1;
}

.knotiva-special-note[open] summary::after {
	content: "−";
}

.knotiva-special-note__body {
	font-size: 13px;
	line-height: 1.8;
	color: var(--color-muted);
	padding-bottom: 12px;
}

.knotiva-special-note__body ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.knotiva-special-note__body li::before {
	content: "— ";
}

/* Spec grid */
.knotiva-spec-grid {
	margin: 1.75rem 0 2rem;
}

.knotiva-spec-grid__title {
	font-family: var(--k-font-ui);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 0 0 24px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--color-border);
}

.knotiva-spec-grid__items {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 32px;
	row-gap: 28px;
	margin: 0;
	padding: 0;
}

.knotiva-spec-grid__item dt {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 0;
}

.knotiva-spec-grid__item dd {
	font-family: var(--k-font-display);
	font-size: 16px;
	color: var(--color-text);
	margin: 4px 0 0;
	font-weight: 400;
}

.knotiva-spec-grid__note {
	font-family: var(--k-font-display);
	font-size: 14px;
	font-style: italic;
	margin: 24px 0 0;
	padding: 16px 20px;
	background: var(--color-bg);
	border-left: 3px solid var(--color-primary);
}

@media (max-width: 767px) {
	.knotiva-spec-grid__items {
		grid-template-columns: 1fr 1fr;
		gap: 20px;
	}
}

/* Size guide / stock */
body.single-product .knotiva-size-guide {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--color-primary);
	text-decoration: none;
}

body.single-product .knotiva-size-guide:hover {
	text-decoration: underline;
}

body.single-product .knotiva-availability {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: var(--color-text);
	margin: 10px 0 16px;
}

body.single-product .knotiva-availability__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4caf50;
	flex-shrink: 0;
}

body.single-product .stock,
body.single-product .in-stock {
	color: var(--color-text) !important;
}

/* ATC */
body.single-product .single_add_to_cart_button {
	max-width: 380px;
	height: 52px !important;
	min-height: 52px !important;
	border-radius: 2px !important;
	font-size: 13px !important;
	letter-spacing: 0.2em !important;
	font-weight: 500 !important;
	background: var(--color-primary) !important;
	border-color: var(--color-primary) !important;
	color: #fff !important;
	transition: background-color 200ms ease !important;
}

body.single-product .single_add_to_cart_button:hover {
	background: #5c1515 !important;
	border-color: #5c1515 !important;
}

body.single-product .single_add_to_cart_button.loading {
	color: transparent !important;
}

body.single-product .single_add_to_cart_button.loading::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: knotiva-spin 0.7s linear infinite;
}

@keyframes knotiva-spin {
	to {
		transform: rotate(360deg);
	}
}

body.single-product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 14px;
	row-gap: 8px;
}

body.single-product form.cart .quantity,
body.single-product form.cart .single_add_to_cart_button {
	margin: 0 !important;
}

.knotiva-consult-hint {
	display: block;
	margin: 0;
	align-self: center;
	font-size: 11px;
	font-style: italic;
	line-height: 1.3;
	color: var(--color-muted);
}

@media (max-width: 767px) {
	body.single-product .single_add_to_cart_button {
		max-width: none;
		width: 100%;
	}
}

/* Consult */
.knotiva-consult {
	margin-top: 1.5rem;
	padding: 28px 32px;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: 4px;
}

.knotiva-consult__title {
	font-family: var(--k-font-display);
	font-size: 24px;
	font-weight: 400;
	color: var(--color-text);
	margin: 0 0 8px;
}

.knotiva-consult__text {
	font-size: 13px;
	line-height: 1.6;
	color: var(--color-muted);
	margin: 0 0 1.25rem;
}

.knotiva-consult__actions {
	display: flex;
	gap: 12px;
}

.knotiva-consult__actions .k-btn {
	flex: 1;
	min-width: 0;
	border-radius: 2px !important;
	padding: 10px 20px !important;
	font-size: 11px !important;
	letter-spacing: 0.12em !important;
}

.knotiva-pdp-trust {
	display: grid;
	grid-template-columns: max-content max-content;
	justify-content: center;
	column-gap: 48px;
	row-gap: 12px;
	width: 100%;
	box-sizing: border-box;
	margin: 20px 0 0;
	margin-inline: 0;
	padding: 20px 0 0;
	padding-inline: 0;
	border-top: 1px solid var(--color-border);
	list-style: none;
}

.knotiva-pdp-trust li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
	font-size: 12px;
	color: var(--color-muted);
	list-style: none;
}

.knotiva-pdp-trust li::marker {
	content: none;
}

.knotiva-pdp-trust svg {
	flex-shrink: 0;
	margin-top: 1px;
}

@media (max-width: 767px) {
	.knotiva-consult {
		padding: 20px 24px;
	}

	.knotiva-consult__actions {
		flex-direction: column;
	}

	.knotiva-consult__actions .k-btn {
		width: 100%;
	}

	.knotiva-pdp-trust {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		justify-content: stretch;
		column-gap: 16px;
	}

	.knotiva-pdp-trust li {
		font-size: 11px;
	}
}

/* SKU / promises */
.knotiva-sku-row {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-muted);
	margin: 16px 0 12px;
}

.knotiva-promises {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.knotiva-promises li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--color-muted);
}

/* Tabs — full-width band under the image / content row */
body.single-product .elementor-widget-woocommerce-product-data-tabs,
body.single-product .woocommerce-tabs {
	width: 100%;
	max-width: none;
}

body.single-product .woocommerce-tabs {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--color-border);
	box-sizing: border-box;
}

body.single-product .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 40px;
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0 0 1.5rem;
	border-bottom: 1px solid var(--color-border);
	list-style: none;
	overflow-x: auto;
	box-sizing: border-box;
}

body.single-product .woocommerce-tabs ul.tabs li {
	margin: 0;
	background: none !important;
	border: 0 !important;
	padding: 0;
}

body.single-product.woocommerce div.product.elementor .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0.85rem 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-muted);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

body.single-product .woocommerce-tabs ul.tabs li.active a {
	color: var(--color-text);
	border-bottom-color: var(--color-primary);
}

body.single-product .woocommerce-Tabs-panel {
	display: none;
	opacity: 0;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	font-size: 14px;
	line-height: 1.8;
	color: var(--color-muted);
}

body.single-product.woocommerce div.product.elementor .woocommerce-tabs .panel {
	width: 100%;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
	box-sizing: border-box;
}

body.single-product .woocommerce-Tabs-panel table.shop_attributes,
body.single-product table.woocommerce-product-attributes {
	width: 100%;
	margin: 0;
}

body.single-product .woocommerce-Tabs-panel.active,
body.single-product .woocommerce-Tabs-panel[style*="block"] {
	display: block;
	opacity: 1;
}

body.single-product .woocommerce-Tabs-panel h2,
body.single-product .woocommerce-Tabs-panel h3 {
	font-family: var(--k-font-display);
	font-size: 16px;
	color: var(--color-text);
	margin-top: 28px;
	font-weight: 400;
}

body.single-product .woocommerce-Tabs-panel strong {
	font-family: var(--k-font-ui);
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text);
}

.knotiva-reviews-empty {
	padding: 2rem 0;
}

.knotiva-reviews-empty p {
	font-family: var(--k-font-display);
	font-size: 24px;
	color: var(--color-text);
	margin: 0 0 12px;
}

.knotiva-star-row {
	display: flex;
	gap: 6px;
	margin: 12px 0 16px;
}

.knotiva-star-row button {
	background: none;
	border: 0;
	font-size: 22px;
	color: var(--color-muted);
	cursor: pointer;
	padding: 0;
}

.knotiva-star-row button.is-on {
	color: var(--color-primary);
}

#review-form.knotiva-review-form {
	display: grid;
	gap: 12px;
	max-width: 480px;
}

@media (max-width: 767px) {
	body.single-product .woocommerce-tabs {
		padding-left: 20px;
		padding-right: 20px;
	}

	body.single-product .woocommerce-tabs ul.tabs {
		gap: 24px;
	}

	body.single-product .woocommerce-tabs ul.tabs li a {
		font-size: 11px;
	}

	.knotiva-consult__title,
	.knotiva-reviews-empty p,
	body.single-product .related.products > h2,
	body.single-product .elementor-widget-woocommerce-product-related .elementor-heading-title,
	body.single-product .knotiva-related-heading {
		font-size: 22px !important;
	}
}

/* Related */
body.single-product .related.products > h2,
body.single-product .elementor-widget-woocommerce-product-related .elementor-heading-title,
body.single-product .knotiva-related-heading {
	font-family: var(--k-font-display) !important;
	font-size: 24px !important;
	font-weight: 400 !important;
	text-align: center;
	margin-bottom: 8px !important;
}

body.single-product .related.products > h2::after,
body.single-product .knotiva-related-heading::after {
	content: "";
	display: block;
	width: 40px;
	height: 1px;
	background: var(--color-primary);
	margin: 12px auto 28px;
}

body.single-product .related ul.products,
body.single-product .elementor-widget-woocommerce-product-related ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

body.single-product .related ul.products li.product img,
body.single-product .related .e-loop-item img {
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 4px;
	transition: transform 300ms ease, box-shadow 300ms ease;
}

body.single-product .related ul.products li.product:hover img,
body.single-product .related .e-loop-item:hover img {
	transform: scale(1.03);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

body.single-product .related .woocommerce-loop-product__title,
body.single-product .related .product_title {
	font-family: var(--k-font-display) !important;
	font-size: 15px !important;
	font-weight: 400 !important;
}

body.single-product .related .price {
	font-size: 13px !important;
	color: var(--color-muted) !important;
	font-weight: 400 !important;
}

body.single-product .related .add_to_cart_button,
body.single-product .related .elementor-widget-woocommerce-product-add-to-cart,
body.single-product .related .button.product_type_simple {
	display: none !important;
}

.knotiva-view-product {
	display: inline-block;
	margin-top: 8px;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-primary);
	text-decoration: none;
}

@media (max-width: 767px) {
	body.single-product .elementor-widget-woocommerce-product-related {
		box-sizing: border-box;
		padding-left: 20px;
		padding-right: 20px;
	}

	body.single-product .related ul.products,
	body.single-product .elementor-widget-woocommerce-product-related ul.products {
		grid-template-columns: 1fr 1fr;
	}

	body.single-product .related.products > h2 {
		font-size: 22px !important;
	}

	body.single-product .related .woocommerce-loop-product__title {
		font-size: 14px !important;
	}
}

/* Sticky mobile ATC */
.knotiva-sticky-buy {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100;
	background: #fff;
	border-top: 1px solid var(--color-border);
	padding: 12px 20px;
	gap: 12px;
	align-items: center;
}

.knotiva-sticky-buy.is-visible {
	display: flex;
}

.knotiva-sticky-buy .k-btn {
	flex: 1;
	height: 48px !important;
	min-height: 48px !important;
}

.knotiva-sticky-buy__wa {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--color-primary);
	color: var(--color-primary);
	border-radius: 2px;
	text-decoration: none;
}

@media (min-width: 768px) {
	.knotiva-sticky-buy {
		display: none !important;
	}
}

/* ------------------------------------------------------------------
   Mobile-only PDP layout (max-width: 768px)
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
	body.single-product .woocommerce-product-gallery {
		grid-template-columns: 1fr;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		width: 100vw;
	}

	body.single-product .woocommerce-product-gallery .flex-viewport,
	body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
	body.single-product .product-main-image-container {
		order: 1;
		width: 100%;
		height: auto !important;
		max-height: 48vh;
		overflow: hidden;
		background: transparent;
	}

	body.single-product .woocommerce-product-gallery__image img,
	body.single-product .woocommerce-product-gallery .flex-viewport img,
	body.single-product .product-main-image {
		width: 100% !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: 48vh;
		aspect-ratio: unset;
		object-fit: contain;
		object-position: center;
		border-radius: 0;
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs,
	body.single-product .woocommerce-product-gallery ol.flex-control-nav {
		display: flex !important;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 6px;
		width: 100%;
		order: 2;
		margin: 8px 0 0 !important;
		padding: 0 12px !important;
		overflow: visible;
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
		flex: 0 0 52px;
		width: 52px !important;
		height: 68px !important;
		aspect-ratio: 3 / 4;
		overflow: hidden;
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}

	.knotiva-gallery-dots {
		display: none;
	}

	.knotiva-gallery-actions {
		flex-direction: column;
		gap: 10px;
	}

	.knotiva-gallery-actions .elementor-widget,
	.knotiva-gallery-actions .elementor-element {
		flex: none;
		width: 100% !important;
	}

	.knotiva-gallery-actions .elementor-button,
	body.single-product .knotiva-gallery-actions .k-btn--outline,
	body.single-product .elementor-element-4025cad .elementor-button,
	body.single-product .elementor-element-8b566b7 .elementor-button {
		width: 100%;
		padding: 12px 16px !important;
		min-height: 44px;
		white-space: normal;
	}

	.knotiva-spec-grid__items {
		display: grid;
		grid-template-columns: 1fr;
		row-gap: 12px;
		column-gap: 0;
	}

	.knotiva-spec-grid__item {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: 12px;
		padding-bottom: 12px;
		border-bottom: 1px solid var(--color-border);
	}

	.knotiva-spec-grid__item dt {
		font-weight: 600;
		letter-spacing: 0.16em;
		text-transform: uppercase;
		flex-shrink: 0;
	}

	.knotiva-spec-grid__item dd {
		margin: 0;
		text-align: right;
	}

	.knotiva-consult__actions {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.knotiva-consult__actions .k-btn {
		width: 100%;
		padding: 12px !important;
	}

	body.single-product .related ul.products li.product .astra-shop-thumbnail-wrap,
	body.single-product .related ul.products li.product a img,
	body.single-product .related .e-loop-item img {
		aspect-ratio: 3 / 4;
		width: 100%;
		height: auto;
		object-fit: cover;
		object-position: center;
	}

	body.single-product .related ul.products li.product .astra-shop-thumbnail-wrap {
		overflow: hidden;
		display: block;
	}

	.knotiva-sticky-buy {
		padding: 10px 16px;
		padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
		gap: 12px;
	}

	body.single-product .price,
	body.single-product .elementor-widget-woocommerce-product-price {
		margin-bottom: 20px !important;
	}

	body.single-product .woocommerce-product-details__short-description,
	body.single-product .elementor-widget-woocommerce-product-short-description {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		margin-bottom: 20px;
		padding-left: 15px;
		padding-right: 15px;
	}

	body.single-product .knotiva-spec-grid,
	body.single-product .knotiva-spec-grid__items,
	body.single-product .knotiva-spec-grid__item {
		max-width: 100%;
		min-width: 0;
	}

	body.single-product .knotiva-spec-grid__item dd {
		min-width: 0;
		overflow-wrap: anywhere;
	}

	.knotiva-special-note,
	.knotiva-spec-grid,
	body.single-product .knotiva-availability,
	body.single-product .elementor-widget-woocommerce-product-add-to-cart,
	.knotiva-shipping-note {
		margin-bottom: 20px;
	}
}

/* ------------------------------------------------------------------
   Desktop: fit gallery in column (no nested H/V scroll)
   ------------------------------------------------------------------ */
@media (min-width: 769px) {
	body.single-product .woocommerce-product-gallery {
		overflow-x: hidden;
		grid-template-columns: 56px minmax(0, 1fr);
	}

	body.single-product .woocommerce-product-gallery .flex-viewport,
	body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
	body.single-product .product-main-image-container {
		width: 100%;
		max-width: 100%;
		height: min(64vh, calc(100vh - 160px));
		margin: 0;
		overflow: hidden;
	}

	body.single-product .woocommerce-product-gallery__image img,
	body.single-product .woocommerce-product-gallery .flex-viewport img,
	body.single-product .product-main-image-container img,
	body.single-product .product-main-image {
		width: 100%;
		height: 100%;
		min-height: 0;
		max-height: min(64vh, calc(100vh - 160px));
		aspect-ratio: unset;
		object-fit: contain;
		object-position: center;
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs,
	body.single-product .woocommerce-product-gallery ol.flex-control-nav {
		width: 56px;
		max-height: min(64vh, calc(100vh - 160px));
		overflow-x: hidden;
		overflow-y: auto;
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
		width: 56px !important;
		height: 72px !important;
	}
}

@media (min-width: 769px) and (max-width: 1279px) {
	body.single-product .woocommerce-product-gallery {
		grid-template-columns: minmax(0, 1fr);
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs,
	body.single-product .woocommerce-product-gallery ol.flex-control-nav {
		width: 100%;
		max-height: none;
		flex-direction: row;
		flex-wrap: wrap;
		overflow-x: hidden;
		overflow-y: hidden;
		order: 2;
	}

	body.single-product .woocommerce-product-gallery .flex-viewport,
	body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
	body.single-product .product-main-image-container {
		order: 1;
	}
}

@media (min-width: 1280px) {
	body.single-product .pdp-image-column {
		overflow: hidden;
		scrollbar-width: none;
	}

	body.single-product .woocommerce-product-gallery .flex-viewport,
	body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
	body.single-product .product-main-image-container {
		height: min(64vh, calc(100vh - 280px));
	}

	body.single-product .woocommerce-product-gallery__image img,
	body.single-product .woocommerce-product-gallery .flex-viewport img,
	body.single-product .product-main-image-container img,
	body.single-product .product-main-image {
		max-height: min(64vh, calc(100vh - 280px));
	}

	body.single-product .woocommerce-product-gallery .flex-control-thumbs,
	body.single-product .woocommerce-product-gallery ol.flex-control-nav {
		max-height: min(64vh, calc(100vh - 280px));
	}

	.knotiva-gallery-actions {
		padding-bottom: 2px;
	}
}

