/**
 * Stage 6 — single product (PDP) storefront polish.
 * Loaded after aroma-up-product. Does not rename .aroma-pdp-* hooks.
 */

body.aroma-product-page {
	background: var(--ws-bg, #f6f6f6);
}
.aroma-pdp-app {
	color: var(--ws-text, #2c2e2e);
}
.aroma-pdp-gallery,
.aroma-pdp-info,
.aroma-pdp-actions,
.aroma-pdp-tabs-wrap {
	border-color: var(--ws-line, #e6e8e8) !important;
	box-shadow: 0 8px 22px rgba(28, 31, 36, 0.045) !important;
	background: #fff;
}
.aroma-pdp-gallery {
	background: #fff !important;
	border-color: var(--ws-line, #e6e8e8) !important;
}
.aroma-pdp-top {
	display: grid;
	grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
	grid-template-areas:
		"gallery info"
		"actions info";
	gap: 18px;
	align-items: start;
}
.aroma-pdp-gallery { grid-area: gallery; }
.aroma-pdp-actions { grid-area: actions; }
.aroma-pdp-info { grid-area: info; }
.aroma-pdp-actions {
	padding: 12px 14px;
	align-self: start;
}
.aroma-pdp-main {
	background: linear-gradient(180deg, #fff, #f6f6f6) !important;
	border: 1px solid var(--ws-line, #e6e8e8) !important;
	cursor: zoom-in;
	touch-action: manipulation;
}
.aroma-pdp-thumb {
	border-color: var(--ws-line, #e6e8e8) !important;
	background: #f6f6f6 !important;
}
.aroma-pdp-title {
	color: var(--ws-heading, #1a1c1c);
	letter-spacing: -0.02em;
}
.aroma-pdp-cats,
.aroma-pdp-updated,
.aroma-pdp-spec span,
.aroma-pdp-html {
	color: var(--ws-muted, #5c6060);
}
.aroma-pdp-price-box {
	background: #f6f6f6 !important;
	border: 1px solid var(--ws-line, #e6e8e8) !important;
	border-radius: 16px;
	padding: 14px 14px 12px;
	margin: 0 0 12px;
}
.aroma-pdp-price,
.aroma-pdp-price .woocommerce-Price-amount {
	color: var(--ws-heading, #1a1c1c) !important;
	font-weight: 800;
}
.aroma-pdp-stock { color: var(--ws-muted, #5c6060) !important; }

.aroma-pdp-buy .single_add_to_cart_button,
.aroma-pdp-buy button.button,
.aroma-pdp-sticky-btn {
	background: var(--ws-btn-bg, #c830f8) !important;
	background-image: none !important;
	color: var(--ws-btn-text, #fff) !important;
	border-radius: 999px !important;
	box-shadow: 0 8px 18px color-mix(in srgb, var(--ws-btn-bg, #c830f8) 22%, transparent) !important;
	min-height: 52px;
	font-weight: 800;
}
.aroma-pdp-buy .single_add_to_cart_button:focus-visible,
.aroma-pdp-sticky-btn:focus-visible {
	outline: 2px solid var(--ws-primary, #c830f8);
	outline-offset: 2px;
}

.aroma-pdp-trust {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 8px !important;
	margin: 0 !important;
}
.aroma-pdp-trust li {
	text-align: center;
	font-size: 11px;
	font-weight: 800;
	color: var(--ws-secondary, #909898) !important;
	background: #fff;
	border: 1px solid var(--ws-line, #e6e8e8) !important;
	border-radius: 12px;
	padding: 10px 8px;
	line-height: 1.45;
	position: relative;
}
.aroma-pdp-trust li::before {
	content: "";
	display: block;
	width: 1.4rem;
	height: 3px;
	border-radius: 999px;
	margin: 0 auto 0.4rem;
	background: var(--ws-gold, #909898);
}

.aroma-pdp-specs {
	border-color: var(--ws-line, #e6e8e8) !important;
}
.aroma-pdp-spec { background: #fff; }
.aroma-pdp-spec:nth-child(odd) { background: #f6f6f6 !important; }
.aroma-pdp-spec.is-silver {
	background: color-mix(in srgb, var(--ws-primary, #c830f8) 6%, #fff) !important;
	border-inline-start: 3px solid var(--ws-primary, #c830f8);
	box-shadow: none;
}
.aroma-pdp-spec.is-silver span {
	color: var(--ws-primary, #c830f8) !important;
	font-weight: 700;
}

.aroma-pdp-tool {
	border-color: var(--ws-line, #e6e8e8) !important;
	color: var(--ws-muted, #5c6060) !important;
	background: #fff;
}
.aroma-pdp-tabs {
	background: #f6f6f6 !important;
	border-bottom-color: var(--ws-line, #e6e8e8) !important;
}
.aroma-pdp-tab { color: var(--ws-muted, #5c6060) !important; }
.aroma-pdp-tab.on {
	color: var(--ws-heading, #1a1c1c) !important;
	background: #fff;
	box-shadow: inset 0 -2px 0 var(--ws-primary, #c830f8) !important;
}

.aroma-pdp-card {
	border-color: var(--ws-line, #e6e8e8) !important;
	box-shadow: 0 2px 8px rgba(28, 31, 36, 0.04);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
	flex: 0 0 210px;
	width: 210px;
	max-width: 210px;
	min-width: 0;
	box-sizing: border-box;
}
.aroma-pdp-card:hover {
	transform: none;
	border-color: color-mix(in srgb, var(--ws-gold, #909898) 42%, #fff);
	box-shadow: 0 10px 22px rgba(28, 31, 36, 0.08);
}
.aroma-pdp-card-img {
	background: #f6f6f6 !important;
	aspect-ratio: 1 / 1;
	width: 100%;
	max-width: 100%;
	height: auto !important;
	overflow: hidden;
}
.aroma-pdp-card-img img {
	object-fit: cover;
	width: 100%;
	max-width: 100%;
	height: 100%;
	contain-intrinsic-size: 210px 210px;
}
.aroma-pdp-related h2 { text-align: right; }

/* Mobile Chrome + Safari: hidden + pan-y stops rubber-band; never viewport-width units. */
html.aroma-product-page,
html.single-product,
html:has(body.aroma-product-page),
html:has(body.single-product),
body.aroma-product-page,
body.single-product {
	overflow-x: hidden !important;
	overflow-y: auto;
	overscroll-behavior-x: none;
	touch-action: pan-y;
	width: 100%;
	max-width: 100%;
	position: relative;
}
body.aroma-product-page .site,
body.single-product .site,
body.aroma-product-page #page,
body.single-product #page,
body.aroma-product-page .content-area,
body.single-product .content-area,
body.aroma-product-page .aroma-pdp,
body.single-product .aroma-pdp,
body.aroma-product-page main,
body.single-product main,
body.aroma-product-page .woocommerce,
body.single-product.woocommerce,
body.woocommerce-page.single-product {
	max-width: 100% !important;
	overflow-x: hidden !important;
}
body.aroma-product-page #wikishop-app,
body.single-product #wikishop-app,
body.aroma-product-page #wikishop-main,
body.single-product #wikishop-main,
body.aroma-product-page .wikishop-container,
body.single-product .wikishop-container,
body.aroma-product-page .wikishop-footer,
body.single-product .wikishop-footer,
body.aroma-product-page .aroma-pdp-app,
body.aroma-product-page .aroma-pdp,
body.aroma-product-page .aroma-pdp-top,
body.aroma-product-page .aroma-pdp-tabs-wrap,
body.aroma-product-page .aroma-pdp-related,
body.aroma-product-page .aroma-pdp-rel-viewport {
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	overflow-x: hidden;
}
body.aroma-product-page .aroma-pdp-extra,
body.aroma-product-page .aroma-pdp-buy,
body.aroma-product-page .aroma-pdp-info,
body.aroma-product-page .aroma-pdp-actions,
body.aroma-product-page .aroma-pdp-gallery {
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
}
body.aroma-product-page .aroma-pdp-extra iframe,
body.aroma-product-page .aroma-pdp-extra table,
body.aroma-product-page .aroma-pdp-buy iframe,
body.aroma-product-page .aroma-pdp-buy table,
body.aroma-product-page img,
body.aroma-product-page svg,
body.aroma-product-page video,
body.aroma-product-page iframe,
body.single-product iframe {
	max-width: 100%;
}
body.aroma-product-page .wikishop-footer-widgets {
	grid-template-columns: minmax(0, 1fr);
}
body.aroma-product-page .wikishop-footer-seals {
	flex-wrap: wrap;
	max-width: 100%;
}

/* Related carousel must swipe inside its box — never widen the page (RTL / mobile). */
body.aroma-product-page .aroma-pdp-related {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) !important;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
	overflow-y: visible;
	box-sizing: border-box;
	contain: inline-size;
}
body.aroma-product-page .aroma-pdp-rel-viewport {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
	overflow-y: visible;
	box-sizing: border-box;
	contain: inline-size;
}
body.aroma-product-page .aroma-pdp-rel-track {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	overscroll-behavior-y: auto;
	touch-action: pan-x pan-y;
	box-sizing: border-box;
	contain: inline-size;
}

/* Keep chat panel clear of PDP chrome; launcher stays mid-right by plugin CSS. */
body.aroma-product-page .wnai-chat-panel,
body.single-product .wnai-chat-panel {
	width: min(380px, calc(100% - 1.5rem)) !important;
	max-width: calc(100% - 1.5rem) !important;
}

.aroma-pdp-backbar {
	border-color: var(--ws-line, #e6e8e8) !important;
}
.aroma-pdp-back {
	background: #f6f6f6 !important;
	color: var(--ws-primary, #c830f8) !important;
}

.aroma-pdp-zoom {
	z-index: 1000;
	inset: 0;
	width: auto;
	height: auto;
	max-width: none;
}
body.aroma-pdp-zoom-open .aroma-pdp-sticky,
body.aroma-pdp-zoom-open .wikishop-bottom-nav {
	visibility: hidden;
	pointer-events: none;
}

/* Mobile: only the sticky bottom ATC. Keep the in-flow button clipped so sticky JS can still click it. */
@media (max-width: 900px) {
	.aroma-pdp-top {
		grid-template-columns: 1fr;
		grid-template-areas:
			"gallery"
			"actions"
			"info";
	}
	body.aroma-product-page .aroma-pdp-buy .single_add_to_cart_button,
	body.aroma-product-page .aroma-pdp-buy button.single_add_to_cart_button,
	body.aroma-product-page .aroma-pdp-buy button.button {
		position: absolute !important;
		width: 1px !important;
		height: 1px !important;
		min-height: 0 !important;
		padding: 0 !important;
		margin: -1px !important;
		overflow: hidden !important;
		clip: rect(0, 0, 0, 0) !important;
		clip-path: inset(50%) !important;
		border: 0 !important;
		white-space: nowrap !important;
	}
	body.aroma-product-page .aroma-pdp-buy .quantity {
		position: static !important;
		width: auto !important;
		height: 44px !important;
		min-height: 44px !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		clip: auto !important;
		clip-path: none !important;
		border: 1px solid var(--ws-line, #e6e8e8) !important;
		opacity: 1 !important;
		pointer-events: auto !important;
		display: inline-flex !important;
	}
	body.aroma-product-page .aroma-pdp-buy .woocommerce-variation-add-to-cart,
	body.aroma-product-page .aroma-pdp-buy form.cart:not(.variations_form) {
		display: flex !important;
		flex-wrap: wrap;
		align-items: center;
		gap: 10px;
		min-height: 0;
		padding: 0;
		margin: 0;
	}
	.aroma-pdp-trust {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
	.aroma-pdp-trust li {
		font-size: 10px;
		padding: 8px 4px;
	}
	.aroma-pdp-sticky {
		border-color: var(--ws-line, #e6e8e8) !important;
		box-shadow: 0 10px 24px rgba(28, 31, 36, 0.12) !important;
		/* Physical left+right pin to the visual viewport — never viewport-width units. */
		inset-inline: 8px;
		left: 8px;
		right: 8px;
		width: auto !important;
		max-width: none !important;
		min-width: 0;
		box-sizing: border-box;
		overflow: hidden;
		gap: 8px;
	}
	.aroma-pdp-sticky-meta {
		min-width: 0;
		flex: 1 1 auto;
		overflow: hidden;
	}
	.aroma-pdp-sticky-meta b,
	.aroma-pdp-sticky-meta span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.aroma-pdp-sticky-meta span { color: var(--ws-muted, #5c6060) !important; }
	.aroma-pdp-sticky-btn {
		flex: 0 1 auto;
		min-width: 0 !important;
		max-width: 58%;
		width: auto;
		white-space: nowrap;
	}
	body.aroma-product-page .wikishop-bottom-nav {
		width: auto;
		max-width: 100%;
		inset-inline: 0;
		left: 0;
		right: 0;
		overflow: hidden;
		box-sizing: border-box;
	}
	body.aroma-product-page #wikishop-app {
		padding-bottom: calc(148px + env(safe-area-inset-bottom));
	}
}

@media (max-width: 420px) {
	.aroma-pdp-trust { grid-template-columns: 1fr !important; }
}

/* Nuclear PDP: no viewport-width units, clip pay widgets, pan-y page / pan-x tracks only. */
html.aroma-product-page,
html.single-product,
body.aroma-product-page,
body.single-product {
	overflow-x: hidden !important;
	overscroll-behavior-x: none;
	touch-action: pan-y;
}
body.aroma-product-page .aroma-pdp-rel-track,
body.aroma-product-page .aroma-pdp-thumbs {
	touch-action: pan-x pan-y;
}
body.aroma-product-page .snapppay-widget,
body.aroma-product-page .digipay-widget,
body.aroma-product-page .torobpay-widget,
body.aroma-product-page .tarpay-widget,
body.single-product .snapppay-widget,
body.single-product .digipay-widget,
body.single-product .torobpay-widget,
body.single-product .tarpay-widget,
body.aroma-product-page #torobpay-variation-widget-container,
body.single-product #torobpay-variation-widget-container,
body.aroma-product-page iframe,
body.single-product iframe {
	max-width: 100% !important;
	width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box;
	overflow: hidden !important;
	white-space: normal;
	flex-wrap: wrap;
}
body.aroma-product-page .snapppay-widget *,
body.aroma-product-page .digipay-widget *,
body.aroma-product-page .torobpay-widget *,
body.aroma-product-page .tarpay-widget *,
body.single-product .snapppay-widget *,
body.single-product .digipay-widget *,
body.single-product .torobpay-widget *,
body.single-product .tarpay-widget * {
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box;
	overflow-wrap: anywhere;
	word-break: break-word;
}
body.aroma-product-page .wikishop-minicart-panel,
body.single-product .wikishop-minicart-panel,
body.aroma-product-page .wikishop-login-card,
body.single-product .wikishop-login-card,
body.aroma-product-page .wikishop-modal .wikishop-modal-card,
body.single-product .wikishop-modal .wikishop-modal-card {
	width: min(420px, calc(100% - 1.5rem)) !important;
	max-width: calc(100% - 1.5rem) !important;
}
@media (max-width: 1024px) {
	body.aroma-product-page .wikishop-minicart-panel,
	body.single-product .wikishop-minicart-panel {
		width: auto !important;
		max-width: none !important;
		top: auto !important;
		bottom: 0 !important;
		left: 0;
		right: 0;
		transform: none !important;
		height: min(82dvh, 640px);
		border-radius: 20px 20px 0 0;
	}
	body.aroma-product-page .wnai-chat-panel,
	body.single-product .wnai-chat-panel {
		width: auto !important;
		max-width: none !important;
		left: 0;
		right: 0;
	}
}
