/**
 * PDP conversion — scoped to WooCommerce single product pages only.
 * Prefix: rs-pdp-
 */

body.single-product .rs-pdp-bnpl {
	margin: 0.55rem 0 0.15rem;
	padding: 0;
}

body.single-product .rs-pdp-bnpl__icons {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 0.85rem;
}

body.single-product .rs-pdp-bnpl__icon {
	display: block;
	width: 20px;
	height: 20px;
	padding: 2px;
	border-radius: 4px;
	object-fit: cover;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	opacity: 0.92;
}

body.single-product .rs-pdp-bnpl__estimate {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.45;
	color: rgba(0, 0, 0, 0.58);
	letter-spacing: 0.015em;
}

body.single-product .rs-pdp-bnpl__estimate em {
	font-style: italic;
	font-weight: 400;
}

body.single-product .rs-pdp-bnpl__amount,
body.single-product .rs-pdp-bnpl__amount .woocommerce-Price-amount {
	font-style: italic;
	font-weight: 500;
	color: rgba(0, 0, 0, 0.68);
}

body.single-product .rs-pdp-bnpl__note {
	margin: 0.25rem 0 0;
	font-size: 0.68rem;
	line-height: 1.4;
	font-style: normal;
	color: rgba(0, 0, 0, 0.22);
	letter-spacing: 0.01em;
}

/* Halve WoodMart spacing below variation / attribute options on PDP */
body.single-product form.variations_form {
	--wd-var-table-mb: 10px !important;
}

body.single-product form.variations_form table.variations {
	margin-bottom: 10px !important;
}

body.single-product table.variations .cell {
	padding-bottom: 10px !important;
}

body.single-product table.variations tr:last-child .cell {
	padding-bottom: 0;
}

/* Wider add-to-cart button on PDP (Woodmart loads variation CSS late and sets * { flex: 1 1 100% }) */
body.single-product form.cart .woocommerce-variation-add-to-cart.variations_button {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: stretch !important;
	gap: 0.65rem !important;
	width: 100% !important;
}

body.single-product form.cart .woocommerce-variation-add-to-cart .quantity {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
}

body.single-product form.cart .woocommerce-variation-add-to-cart.variations_button > button.single_add_to_cart_button,
body.single-product form.cart .woocommerce-variation-add-to-cart > button.single_add_to_cart_button[type="submit"] {
	-webkit-box-flex: 1 !important;
	-ms-flex: 1 1 12rem !important;
	flex: 1 1 12rem !important;
	flex-grow: 1 !important;
	flex-basis: 12rem !important;
	min-width: min(100%, 18rem) !important;
	width: auto !important;
	max-width: none !important;
}

body.single-product form.cart .woocommerce-variation-add-to-cart > :not(.quantity):not(button.single_add_to_cart_button) {
	flex: 1 1 100% !important;
	width: 100% !important;
}

body.single-product form.cart:not(.variations_form) {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: stretch !important;
	gap: 0.65rem !important;
}

body.single-product form.cart:not(.variations_form) > .quantity {
	flex: 0 0 auto !important;
}

body.single-product form.cart:not(.variations_form) > button.single_add_to_cart_button[type="submit"] {
	flex: 1 1 12rem !important;
	min-width: min(100%, 18rem) !important;
	width: auto !important;
}

/* Mobile: match primary buy box — black button, white label (same as theme custom CSS on desktop) */
@media (max-width: 782px) {
	body.single-product form.cart button.single_add_to_cart_button.button,
	body.single-product form.cart button.single_add_to_cart_button.button.alt {
		background-color: #000 !important;
		background-image: none !important;
		color: #fff !important;
		border-color: #000 !important;
		box-shadow: none !important;
	}

	body.single-product form.cart button.single_add_to_cart_button.button:hover,
	body.single-product form.cart button.single_add_to_cart_button.button:focus,
	body.single-product form.cart button.single_add_to_cart_button.button.alt:hover,
	body.single-product form.cart button.single_add_to_cart_button.button.alt:focus {
		background-color: #1a1a1a !important;
		color: #fff !important;
		border-color: #1a1a1a !important;
	}

	body.single-product form.cart button.single_add_to_cart_button.button:active,
	body.single-product form.cart button.single_add_to_cart_button.button.alt:active {
		background-color: #000 !important;
		color: #fff !important;
	}
}

body.single-product .rs-pdp-trust-bar {
	margin-top: 1rem;
	padding: 0.75rem 0 0;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body.single-product .rs-pdp-trust-bar__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.5rem 0.75rem;
}

@media (min-width: 480px) {
	body.single-product .rs-pdp-trust-bar__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	body.single-product .rs-pdp-trust-bar__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

body.single-product .rs-pdp-trust-bar__item {
	display: flex;
	align-items: flex-start;
	gap: 0.45rem;
	margin: 0;
	padding: 0.3rem 0;
	font-size: 0.8125rem;
	line-height: 1.35;
	color: rgba(0, 0, 0, 0.72);
	letter-spacing: 0.01em;
}

body.single-product .rs-pdp-trust-bar__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	margin-top: 0.1rem;
}

body.single-product .rs-pdp-trust-bar__icon .rs-pdp-svg {
	display: block;
	width: 14px;
	height: 14px;
}

body.single-product .rs-pdp-trust-bar__text {
	flex: 1;
	min-width: 0;
}

body.single-product .rs-pdp-card {
	margin-top: 1.25rem;
	padding: 1.1rem 1.15rem;
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.07);
	background: linear-gradient(180deg, #fdfcfa 0%, #f8f6f2 100%);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
}

body.single-product .rs-pdp-card__title {
	margin: 0 0 0.65rem;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: rgba(0, 0, 0, 0.88);
}

body.single-product .rs-pdp-why-buy__list {
	list-style: none;
	margin: 0;
	padding: 0;
	color: rgba(0, 0, 0, 0.72);
	font-size: 0.9rem;
	line-height: 1.55;
}

body.single-product .rs-pdp-why-buy__item {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

body.single-product .rs-pdp-why-buy__item + .rs-pdp-why-buy__item {
	margin-top: 0.4rem;
}

body.single-product .rs-pdp-why-buy__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	margin-top: 0.2rem;
}

body.single-product .rs-pdp-why-buy__icon .rs-pdp-svg {
	display: block;
	width: 14px;
	height: 14px;
}

body.single-product .rs-pdp-why-buy__text {
	flex: 1;
	min-width: 0;
}

body.single-product .rs-pdp-shipping-note {
	margin: 1rem 0 0;
	padding: 0.75rem 0.85rem;
	border-radius: 10px;
	border: 1px dashed rgba(0, 0, 0, 0.1);
	background: rgba(255, 255, 255, 0.65);
	font-size: 0.8125rem;
	line-height: 1.5;
	color: rgba(0, 0, 0, 0.68);
}

body.single-product .rs-pdp-install__text {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	line-height: 1.55;
	color: rgba(0, 0, 0, 0.72);
}

body.single-product .rs-pdp-install__cta {
	margin: 0;
}

body.single-product .rs-pdp-install__cta-link {
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	color: rgba(0, 0, 0, 0.78);
}

body.single-product .rs-pdp-install__cta-link:hover,
body.single-product .rs-pdp-install__cta-link:focus {
	color: rgba(0, 0, 0, 0.95);
}

/* “Complete The Space” — related block */
body.single-product .rs-pdp-complete-space {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body.single-product .rs-pdp-complete-space__subtitle {
	margin: 0 0 0.35rem;
	font-size: 0.875rem;
	line-height: 1.45;
	color: rgba(0, 0, 0, 0.58);
	max-width: 42rem;
}

body.single-product .rs-pdp-complete-space__title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
	font-weight: 600;
	letter-spacing: 0.02em;
	color: rgba(0, 0, 0, 0.9);
}

/* Floating sticky ATC — desktop + mobile */
body.single-product .rs-pdp-sticky-atc {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 340;
	padding: 0.55rem max(0.75rem, env(safe-area-inset-right)) calc(0.55rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
	background: rgba(253, 252, 250, 0.96);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.08);
	transform: translate3d(0, 100%, 0);
	opacity: 0;
	pointer-events: none;
	transition: transform 0.28s ease, opacity 0.28s ease;
}

body.single-product .rs-pdp-sticky-atc.is-pinned {
	transform: translate3d(0, 0, 0);
	opacity: 1;
	pointer-events: auto;
}

body.single-product .rs-pdp-sticky-atc__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1rem;
	max-width: 1200px;
	margin: 0 auto;
}

body.single-product .rs-pdp-sticky-atc__meta {
	flex: 1 1 10rem;
	min-width: 0;
}

body.single-product .rs-pdp-sticky-atc__title {
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.25;
	color: rgba(0, 0, 0, 0.88);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.single-product .rs-pdp-sticky-atc__price {
	font-size: 0.8125rem;
	color: rgba(0, 0, 0, 0.65);
	margin-top: 0.15rem;
}

/* Keep assistive copy out of the compact bar if markup slips through. */
body.single-product .rs-pdp-sticky-atc__price .screen-reader-text {
	border: 0;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

body.single-product .rs-pdp-sticky-atc__price .woocommerce-Price-amount {
	font-weight: 600;
	color: rgba(0, 0, 0, 0.82);
}

body.single-product .rs-pdp-sticky-atc__vars {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.85rem;
	flex: 2 1 16rem;
	min-width: 0;
}

body.single-product .rs-pdp-sticky-atc__var {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	min-width: 0;
}

body.single-product .rs-pdp-sticky-atc__var-label {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: rgba(0, 0, 0, 0.5);
	white-space: nowrap;
}

body.single-product .rs-pdp-sticky-atc__swatches.variable-items-wrapper {
	--wd-swatch-size: 28px;
	--wd-swatch-text-size: 12px;
	margin: 0;
	padding: 0;
}

body.single-product .rs-pdp-sticky-atc__select {
	min-width: 8.5rem;
	max-width: 14rem;
	height: 36px;
	padding: 0 0.65rem;
	font-size: 0.8125rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 4px;
	background: #fff;
}

body.single-product .rs-pdp-sticky-atc__actions {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	flex: 1 1 auto;
	justify-content: flex-end;
	margin-left: auto;
}

body.single-product .rs-pdp-sticky-atc__qty .quantity {
	margin: 0;
}

body.single-product .rs-pdp-sticky-atc__qty .qty {
	min-height: 40px;
	width: 3.25rem;
}

body.single-product .rs-pdp-sticky-atc__btn {
	flex-shrink: 0;
	min-height: 44px;
	min-width: 9.5rem;
	padding-left: 1.15rem;
	padding-right: 1.15rem;
	white-space: nowrap;
}

body.single-product .rs-pdp-sticky-atc__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

@media (max-width: 782px) {
	body.single-product .rs-pdp-sticky-atc__btn.button,
	body.single-product .rs-pdp-sticky-atc__btn.button.alt {
		background-color: #000 !important;
		background-image: none !important;
		color: #fff !important;
		border-color: #000 !important;
		box-shadow: none !important;
	}

	body.single-product .rs-pdp-sticky-atc__btn.button:hover,
	body.single-product .rs-pdp-sticky-atc__btn.button:focus,
	body.single-product .rs-pdp-sticky-atc__btn.button.alt:hover,
	body.single-product .rs-pdp-sticky-atc__btn.button.alt:focus {
		background-color: #1a1a1a !important;
		color: #fff !important;
		border-color: #1a1a1a !important;
	}

	body.single-product .rs-pdp-sticky-atc__inner {
		flex-direction: column;
		align-items: stretch;
	}

	body.single-product .rs-pdp-sticky-atc__meta,
	body.single-product .rs-pdp-sticky-atc__vars,
	body.single-product .rs-pdp-sticky-atc__actions {
		flex: 1 1 auto;
		width: 100%;
	}

	body.single-product .rs-pdp-sticky-atc__actions {
		justify-content: stretch;
	}

	body.single-product .rs-pdp-sticky-atc__btn {
		flex: 1 1 auto;
	}
}
