/**
 * Single product — Marketplace redesign (Amazon / TikTok Shop / eBay inspired)
 * Brand tokens: button-color, peach-puff, Switzer.
 */

/* —— Page shell —— */
body.single-product .wp-site-blocks,
body.single-product,
.single-product .wp-block-single-product-main {
	background-color: var(--wp--preset--color--peach-puff, var(--wp--preset--color--body-background, #f8ebe4));
}

.single-product .sophia-pdp-inner {
	max-width: 1320px;
}

.single-product .woocommerce-breadcrumb {
	color: var(--wp--preset--color--secondary-text, #686868);
	font-size: var(--wp--preset--font-size--body-small, 0.875rem);
	margin-bottom: 1.25rem;
}

.single-product .woocommerce-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.single-product .woocommerce-breadcrumb a:hover {
	color: var(--wp--preset--color--button-color, #954e26);
	text-decoration: underline;
}

/* —— Hero: gallery + buy box —— */
.wp-block-columns.wp-single-product-column.sophia-pdp-hero {
	align-items: flex-start !important;
	gap: clamp(1.5rem, 4vw, 3rem) !important;
}

.sophia-pdp-gallery,
.sophia-pdp-buybox {
	display: flex !important;
	flex-direction: column;
	min-width: 0;
}

/* Side-by-side widths only when columns are not stacked (~1200px+) */
@media screen and (min-width: 1200px) {
	.sophia-pdp-gallery {
		flex-basis: 46% !important;
		max-width: 46%;
	}

	.sophia-pdp-buybox {
		flex-basis: 54% !important;
		max-width: 54%;
	}
}

.sophia-pdp-gallery > .wp-block-woocommerce-product-image-gallery {
	align-self: stretch !important;
	display: block !important;
	float: none !important;
	flex: 0 0 auto;
	/* Override WC blocks max-width:512px so card matches share width */
	max-width: none !important;
	width: 100% !important;
}

/* Gallery card — content height only (no equal-height stretch with buybox) */
.sophia-pdp-gallery .woocommerce-product-gallery,
.sophia-pdp-gallery .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery {
	align-self: stretch !important;
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-color-light, #eedcd0);
	border-radius: 16px;
	box-sizing: border-box !important;
	display: flex !important;
	flex: 0 0 auto;
	flex-direction: column;
	float: none !important;
	height: auto;
	justify-content: flex-start;
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none !important;
	min-height: 0;
	opacity: 1 !important;
	overflow: hidden;
	padding: 1.75rem 0.65rem 0.85rem;
	width: 100% !important;
}

/*
 * Kill classic WC layout: .woocommerce div.product div.images { float:left; width:48% }
 * Specificity must beat: .woocommerce div.product div.images (0,3,2)
 */
body.single-product.woocommerce div.product .sophia-pdp-gallery .woocommerce-product-gallery.images,
body.single-product.woocommerce-page div.product .sophia-pdp-gallery .woocommerce-product-gallery.images,
body.single-product.woocommerce #content div.product .sophia-pdp-gallery .woocommerce-product-gallery.images,
body.single-product.woocommerce-page #content div.product .sophia-pdp-gallery .woocommerce-product-gallery.images,
body.single-product.woocommerce .sophia-pdp-gallery .woocommerce-product-gallery.images,
body.single-product.woocommerce .sophia-pdp-gallery .woocommerce-product-gallery,
body.single-product.woocommerce-page .sophia-pdp-gallery div.images {
	box-sizing: border-box !important;
	clear: both !important;
	float: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none !important;
	width: 100% !important;
}

.woocommerce .wp-block-woocommerce-product-image-gallery,
body.single-product .sophia-pdp-gallery .wp-block-woocommerce-product-image-gallery,
body.woocommerce .sophia-pdp-gallery .wp-block-woocommerce-product-image-gallery {
	clear: none !important;
	float: none !important;
	height: auto;
	max-width: none !important;
	width: 100% !important;
}

.woocommerce div.product div.images {
	margin-bottom: 0;
}

.wp-block-woocommerce-product-image-gallery .onsale {
	display: none;
}

/* Main image stage — size to image; do not stretch (avoids gap above thumbs) */
.sophia-pdp-gallery .woocommerce-product-gallery .flex-viewport {
	background: #fff;
	border-radius: 10px;
	flex: 0 0 auto;
	margin: 0;
	min-height: 0;
	overflow: hidden;
	position: relative;
	touch-action: pan-y;
}

.sophia-pdp-gallery .sophia-pdp-stage {
	align-items: center;
	background: #fff;
	border-radius: 10px;
	display: flex;
	flex: 0 0 auto;
	justify-content: center;
	margin: 0;
	min-height: 0;
	overflow: hidden;
	position: relative;
	touch-action: pan-y;
	width: 100%;
}

.sophia-pdp-gallery .sophia-pdp-stage .woocommerce-product-gallery__image {
	width: 100%;
}

.sophia-pdp-gallery .woocommerce-product-gallery__wrapper {
	/* Leave layout to Flexslider / our enhancer — no display:flex here */
	background: #fff;
	flex: 0 0 auto;
	min-height: 0;
	width: 100%;
}

.sophia-pdp-gallery .woocommerce-product-gallery .woocommerce-product-gallery__image,
.sophia-pdp-gallery .sophia-pdp-stage .woocommerce-product-gallery__image {
	background: #fff;
	text-align: center;
	width: 100%;
}

.sophia-pdp-gallery .woocommerce-product-gallery .woocommerce-product-gallery__image a,
.sophia-pdp-gallery .sophia-pdp-stage .woocommerce-product-gallery__image a {
	display: block;
	line-height: 0;
	width: 100%;
}

.sophia-pdp-gallery .woocommerce-product-gallery .woocommerce-product-gallery__image img,
.sophia-pdp-gallery .woocommerce-product-gallery .flex-viewport img,
.sophia-pdp-gallery .sophia-pdp-stage img {
	border-radius: 8px;
	display: block !important;
	height: auto !important;
	margin: 0 auto !important;
	max-height: min(700px, 76vh) !important;
	max-width: 100% !important;
	object-fit: contain !important;
	width: 100% !important;
}

/* Always-visible thumbnail strip */
body.woocommerce div.product div.images .flex-control-thumbs,
body.single-product .sophia-pdp-gallery .woocommerce-product-gallery .flex-control-thumbs,
body.single-product .sophia-pdp-gallery .sophia-pdp-thumbs {
	display: flex !important;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	gap: 0.5rem;
	justify-content: flex-start;
	list-style: none;
	margin: 0.5rem 0 0 !important;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0.1rem 0.1rem 0.15rem !important;
	-webkit-overflow-scrolling: touch;
}

body.woocommerce div.product .woocommerce-product-gallery--columns-4 .flex-control-thumbs li,
body.single-product .sophia-pdp-gallery .woocommerce-product-gallery .flex-control-thumbs li,
body.single-product .sophia-pdp-gallery .sophia-pdp-thumbs li,
body.single-product .sophia-pdp-gallery .woocommerce-product-gallery--columns-4 .flex-control-thumbs li {
	float: none !important;
	flex: 0 0 4.5rem !important;
	height: 4.5rem !important;
	list-style: none;
	margin: 0 !important;
	max-width: 4.5rem !important;
	padding: 0 !important;
	width: 4.5rem !important;
}

body.single-product .sophia-pdp-gallery .woocommerce-product-gallery .flex-control-thumbs li img,
body.single-product .sophia-pdp-gallery .sophia-pdp-thumbs li img {
	background: #fff;
	border: 1.5px solid var(--wp--preset--color--border-color-light, rgba(90, 70, 55, 0.22));
	border-radius: 0.5rem;
	box-sizing: border-box;
	cursor: pointer;
	display: block;
	height: 100% !important;
	object-fit: contain;
	opacity: 1 !important;
	padding: 0.2rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	width: 100% !important;
}

body.single-product .sophia-pdp-gallery .woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
body.single-product .sophia-pdp-gallery .woocommerce-product-gallery .flex-control-thumbs li img:hover,
body.single-product .sophia-pdp-gallery .sophia-pdp-thumbs li img.is-active,
body.single-product .sophia-pdp-gallery .sophia-pdp-thumbs li img:hover {
	border-color: var(--wp--preset--color--button-color, #954e26);
	box-shadow: 0 0 0 1px var(--wp--preset--color--button-color, #954e26);
}

/* VIP lock inside gallery */
.sophia-pdp-gallery .sophia-vip-lock--single {
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	max-height: min(700px, 76vh);
	min-height: 380px;
	width: 100%;
}

/* Compact share strip — separate card below gallery */
.sophia-pdp-share {
	align-items: center;
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-color-light, #eedcd0);
	border-radius: 14px;
	box-sizing: border-box;
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 0.55rem 0.75rem;
	margin: 0.75rem 0 0;
	padding: 0.7rem 0.95rem;
	width: 100%;
}

.sophia-pdp-share__label {
	color: var(--wp--preset--color--body-text, #5a4637);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1;
	margin: 0;
	text-transform: uppercase;
}

.sophia-pdp-share__list {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sophia-pdp-share__list li {
	margin: 0;
	padding: 0;
}

.sophia-pdp-share__btn {
	align-items: center;
	background: #f7efe8;
	border: 1px solid transparent;
	border-radius: 999px;
	color: var(--wp--preset--color--button-color, #954e26);
	cursor: pointer;
	display: inline-flex;
	height: 2.15rem;
	justify-content: center;
	padding: 0;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	width: 2.15rem;
}

.sophia-pdp-share__btn:hover,
.sophia-pdp-share__btn:focus-visible {
	background: #fff;
	border-color: var(--wp--preset--color--button-color, #954e26);
	color: var(--wp--preset--color--button-color, #954e26);
	outline: none;
}

.sophia-pdp-share__btn svg {
	display: block;
	fill: currentColor;
	height: 1rem;
	width: 1rem;
}

.sophia-pdp-share__btn.is-copied {
	background: var(--wp--preset--color--button-color, #954e26);
	border-color: var(--wp--preset--color--button-color, #954e26);
	color: #fff;
}

/* —— Buy box —— */
.sophia-pdp-buybox {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-color-light, #eedcd0);
	border-radius: 16px;
	box-sizing: border-box;
	flex: 1 1 auto;
	height: auto;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

.sophia-pdp-buybox .wp-block-post-title {
	color: var(--wp--preset--color--title, #010101);
	font-size: clamp(1.5rem, 2.4vw, 2rem) !important;
	font-weight: 700 !important;
	letter-spacing: -0.02em;
	line-height: 1.25 !important;
	margin: 0 0 0.65rem !important;
}

.sophia-pdp-buybox > .wc-block-components-product-rating {
	margin: 0 0 0.85rem;
	padding-inline: 0;
}

.wp-price-tags-row {
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 0.65rem 0.85rem !important;
	margin-bottom: 0.35rem !important;
	margin-top: 0 !important;
}

.wp-price-tags-row .wc-block-components-product-price,
.wp-price-tags-row .wc-block-components-product-price .amount {
	color: var(--wp--preset--color--title, #010101);
	font-size: clamp(1.65rem, 2.6vw, 2.125rem) !important;
	font-weight: 700 !important;
	line-height: 1.15 !important;
	margin: 0;
}

.wp-price-tags-row .wc-block-components-product-price del,
.wp-price-tags-row .wc-block-components-product-price del .amount {
	color: var(--wp--preset--color--secondary-text, #686868);
	font-size: 1rem !important;
	font-weight: 500 !important;
	opacity: 0.85;
}

.wp-price-tags-row .wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--button-color, #954e26) !important;
	border: none !important;
	border-radius: 999px !important;
	color: #fff !important;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding: 0.4rem 0.85rem;
	position: static;
	text-transform: uppercase;
}

.wp-price-tags-row .wc-block-components-product-sale-badge .wc-block-components-product-sale-badge__text::after {
	content: '!';
}

.sophia-pdp-buybox .sophia-product-specification {
	border-top: 1px solid var(--wp--preset--color--border-color-light, #eedcd0);
	margin-top: 1rem !important;
	padding-top: 1rem;
}

.sophia-pdp-buybox .wp-block-post-excerpt {
	margin: 0.85rem 0 0;
}

.sophia-pdp-buybox .wp-block-post-excerpt__excerpt {
	color: var(--wp--preset--color--secondary-text, #686868);
	font-size: 0.9375rem !important;
	line-height: 1.55 !important;
	margin: 0 !important;
}

/* ATC form */
.woocommerce.single-product .sophia-pdp-buybox .wp-block-woocommerce-add-to-cart-form {
	margin-top: 1.25rem;
}

.woocommerce.single-product .wp-block-woocommerce-add-to-cart-form form.cart,
.woocommerce.single-product .sophia-pdp-buybox form.cart {
	align-items: stretch;
	display: flex;
	flex-wrap: nowrap;
	gap: 0.75rem;
	width: 100%;
}

.woocommerce.single-product .wp-block-woocommerce-add-to-cart-form form.cart .quantity,
.woocommerce.single-product .sophia-pdp-buybox form.cart .quantity {
	flex: 0 0 auto;
	margin: 0;
}

.woocommerce.single-product .wc-block-add-to-cart-form--stepper form.cart .wc-block-components-quantity-selector.quantity {
	background-color: var(--wp--preset--color--background, #fff);
	border: 1.5px solid var(--wp--preset--color--border-color-light, #eedcd0);
	border-radius: 10px;
	display: inline-flex;
	margin-bottom: 0;
	min-height: 52px;
	overflow: hidden;
	position: relative;
	width: 118px;
}

.woocommerce.single-product .wc-block-components-quantity-selector {
	border-radius: 10px;
}

.woocommerce.single-product .wc-block-components-quantity-selector::after {
	border: none !important;
	content: none !important;
	display: none !important;
	pointer-events: none !important;
}

/* Keep +/- tappable on mobile (theme global input[type=number]{width:100%} must not cover them). */
.woocommerce.single-product .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	align-items: center;
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	justify-content: center;
	min-height: 48px;
	min-width: 44px;
	pointer-events: auto;
	position: relative;
	touch-action: manipulation;
	z-index: 2;
	-webkit-tap-highlight-color: rgba(149, 78, 38, 0.12);
}

.woocommerce.single-product .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input,
.woocommerce.single-product .wc-block-components-quantity-selector input.qty {
	flex: 1 1 auto;
	max-width: none;
	min-width: 0;
	position: relative;
	width: auto !important;
	z-index: 1;
}

.woocommerce.single-product .wp-block-woocommerce-add-to-cart-form form.cart .single_add_to_cart_button,
.woocommerce.single-product div.product form.cart .button,
.woocommerce.single-product .sophia-pdp-buybox .sophia-vip-cart-locked {
	align-items: center !important;
	border-radius: 10px !important;
	display: inline-flex !important;
	flex: 1 1 auto !important;
	font-size: 1.0625rem !important;
	font-weight: 600 !important;
	justify-content: center !important;
	letter-spacing: 0.01em;
	min-height: 52px !important;
	padding: 0.85rem 1.25rem !important;
	text-align: center;
	width: auto !important;
}

.woocommerce.single-product div.product form.cart .button::after {
	content: none !important;
	display: none !important;
}

.woocommerce.single-product div.product form.cart .button:hover,
.woocommerce.single-product div.product form.cart .button:focus {
	background-color: var(--wp--preset--color--chocolate-dim, #bd6230) !important;
	border-color: var(--wp--preset--color--chocolate-dim, #bd6230) !important;
	color: var(--wp--preset--color--light, #fff) !important;
}

/* Trust chips */
.sophia-pdp-buybox .wp-block-group.wp-shopping-features {
	border-top: 1px solid var(--wp--preset--color--border-color-light, #eedcd0);
	margin-top: 0.65rem !important;
	padding-top: 0.65rem !important;
}

.sophia-pdp-buybox .wp-block-group.wp-shopping-features > p {
	margin: 0 0 0.55rem !important;
}

.woocommerce.single-product .sophia-pdp-buybox .wp-block-woocommerce-add-to-cart-form,
.woocommerce.single-product .sophia-pdp-buybox form.cart {
	margin-bottom: 0 !important;
}

.sophia-pdp-buybox .wp-shopping-features-list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

@media screen and (min-width: 782px) {
	.sophia-pdp-buybox .wp-shopping-features-list {
		display: grid;
		gap: 0.55rem;
		grid-template-columns: 1fr;
	}
}

.sophia-pdp-buybox .wp-shopping-features-item,
.sophia-pdp-buybox .wp-shopping-features-list > .wp-block-group {
	align-items: center;
	background: var(--wp--preset--color--peach-puff, #f8ebe4);
	border-radius: 10px;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 0.6rem;
	padding: 0.65rem 0.75rem;
}

.sophia-pdp-buybox .wp-shopping-features-item__icon,
.sophia-pdp-buybox .wp-shopping-features-list .wp-block-image {
	display: inline-flex;
	flex: 0 0 22px;
	height: 22px;
	margin: 0;
	width: 22px;
}

.sophia-pdp-buybox .wp-shopping-features-item__icon img,
.sophia-pdp-buybox .wp-shopping-features-list .wp-block-image img {
	display: block;
	height: 22px;
	object-fit: contain;
	width: 22px;
}

.sophia-pdp-buybox .wp-shopping-features-item__text,
.sophia-pdp-buybox .wp-shopping-features-list p {
	flex: 1 1 auto;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.4;
	margin: 0;
	opacity: 1;
}

/* Meta */
.sophia-pdp-buybox .wp-block-woocommerce-product-meta {
	border-top: 1px solid var(--wp--preset--color--border-color-light, #eedcd0);
	margin-top: 1.15rem;
	opacity: 0.95;
	padding-top: 0.85rem;
}

.sophia-pdp-buybox .wp-block-woocommerce-product-meta a {
	color: var(--wp--preset--color--button-color, #954e26);
	text-decoration: none;
}

.sophia-pdp-buybox .wp-block-woocommerce-product-meta a:hover {
	text-decoration: underline;
}

.sophia-pdp-buybox .wp-block-woocommerce-product-meta .wp-block-post-terms span {
	font-weight: 500;
}

.sophia-pdp-buybox .wp-block-woocommerce-product-meta > .wp-block-group {
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin-top: 0 !important;
}

/* —— Details tabs —— */
.single-product .sophia-pdp-details,
.single-product .wp-block-woocommerce-product-details {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-color-light, #eedcd0);
	border-radius: 16px;
	box-sizing: border-box;
	margin-top: clamp(1.5rem, 3vw, 2.5rem);
	padding: clamp(1rem, 2.5vw, 1.75rem);
}

.single-product .woocommerce div.product .woocommerce-tabs ul.tabs,
.single-product .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs {
	background-color: var(--wp--preset--color--tab-bg, #f2e8e3);
	border-radius: 999px;
	box-sizing: border-box;
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0 0 1.25rem;
	max-width: max-content;
	padding: 6px !important;
	width: auto;
}

.single-product .woocommerce div.product .woocommerce-tabs ul.tabs::before,
.single-product .woocommerce div.product .woocommerce-tabs ul.tabs::after,
.single-product .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs::before,
.single-product .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs::after {
	display: none !important;
}

.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li,
html body.single-product .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li {
	background: transparent !important;
	border: none !important;
	border-radius: 999px !important;
	display: inline-flex !important;
	float: none !important;
	margin: 0 !important;
	opacity: 1 !important;
	overflow: hidden;
	padding: 0 !important;
}

.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li a,
html body.single-product .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li a {
	border: none !important;
	border-radius: 999px;
	color: inherit;
	display: inline-block;
	font-size: 0.9375rem;
	font-weight: 500;
	padding: 0.55em 1.1em;
	text-decoration: none;
}

.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li:hover a,
.single-product .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li:hover a {
	background-color: rgba(255, 255, 255, 0.65);
}

.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li.active,
.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
html body.single-product .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li.active,
html body.single-product .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li.active a {
	background-color: #fff !important;
	border: none !important;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
	color: var(--wp--preset--color--foreground, #0d0d0d) !important;
}

.single-product .woocommerce div.product .woocommerce-tabs .panel {
	max-width: 920px;
}

.wp-block-woocommerce-product-details .woocommerce-Tabs-panel h2 {
	display: none;
}

.wp-block-woocommerce-related-products,
.sophia-related-products {
	margin-top: clamp(2rem, 4vw, 3rem);
}

/*
 * Related products images: full artwork (uncropped source via imageSizing=single),
 * contained in a stable frame — no shop crop slot, no stretched white gap.
 */
.sophia-related-products .wc-block-product-template .wc-block-components-product-image,
.sophia-related-products .wc-block-product-template .wc-block-components-product-image[style],
.sophia-related-products .wc-block-product-template .wc-block-components-product-image--aspect-ratio-auto,
body.single-product .sophia-related-products .wc-block-product-template .wc-block-components-product-image,
body.woocommerce.single-product .sophia-related-products .wc-block-product-template .wc-block-components-product-image {
	--shop-product-image-max: unset;
	--shop-product-image-slot: unset;
	aspect-ratio: 1 / 1.1 !important;
	background: #fff;
	display: block !important;
	flex: 0 0 auto !important;
	height: auto !important;
	margin: 0 !important;
	max-height: none !important;
	min-height: 0 !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: relative !important;
	width: 100% !important;
}

.sophia-related-products .wc-block-product-template .wc-block-components-product-image a,
body.single-product .sophia-related-products .wc-block-product-template .wc-block-components-product-image a {
	align-items: center !important;
	display: flex !important;
	height: 100% !important;
	justify-content: center !important;
	max-height: none !important;
	min-height: 0 !important;
	overflow: hidden !important;
	position: relative !important;
	width: 100% !important;
}

.sophia-related-products .wc-block-product-template .wc-block-components-product-image img,
.sophia-related-products .wc-block-product-template .wc-block-components-product-image img[style],
body.single-product .sophia-related-products .wc-block-product-template .wc-block-components-product-image img,
body.single-product .sophia-related-products .wc-block-product-template .wc-block-components-product-image img[style] {
	aspect-ratio: unset !important;
	display: block !important;
	height: 88% !important;
	max-height: 88% !important;
	max-width: 88% !important;
	object-fit: contain !important;
	object-position: center center !important;
	width: 88% !important;
}

/* Keep sale badge overlay on top of the image frame (WC default). */
.sophia-related-products .wc-block-product-template .wc-block-components-product-image__inner-container,
body.single-product .sophia-related-products .wc-block-product-template .wc-block-components-product-image__inner-container {
	bottom: 0 !important;
	height: auto !important;
	left: 0 !important;
	max-height: none !important;
	overflow: visible !important;
	pointer-events: none;
	position: absolute !important;
	right: 0 !important;
	top: 0 !important;
}

/* —— Variation pills —— */
.woocommerce.single-product form.variations_form table.variations {
	border: 0;
	display: block;
	margin: 0 0 1rem;
	width: 100%;
}

.woocommerce.single-product form.variations_form table.variations tbody,
.woocommerce.single-product form.variations_form table.variations tr,
.woocommerce.single-product form.variations_form table.variations th,
.woocommerce.single-product form.variations_form table.variations td {
	border: 0;
	display: block;
	padding: 0;
	width: 100%;
}

.woocommerce.single-product form.variations_form table.variations tr + tr {
	margin-top: 1rem;
}

.woocommerce.single-product form.variations_form table.variations th.label {
	margin: 0 0 0.5rem;
	text-align: left;
}

.woocommerce.single-product form.variations_form table.variations th.label label {
	color: var(--wp--preset--color--title, inherit);
	font-size: 0.9375rem;
	font-weight: 600;
	margin: 0;
}

.woocommerce.single-product form.variations_form table.variations td.value {
	position: relative;
}

.woocommerce.single-product form.variations_form .sophia-variation-attribute select,
.woocommerce.single-product form.variations_form table.variations select {
	height: 1px !important;
	left: 0;
	margin: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
	position: absolute !important;
	top: 0;
	width: 1px !important;
}

.woocommerce.single-product .sophia-variation-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.woocommerce.single-product .sophia-variation-swatch {
	align-items: center;
	background: #fff;
	border: 1.5px solid var(--wp--preset--color--border-color, #cfae9b);
	border-radius: 999px;
	color: var(--wp--preset--color--title, #1a1a1a);
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	justify-content: center;
	line-height: 1.2;
	min-height: 2.5rem;
	padding: 0.5rem 1rem;
	text-align: center;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.woocommerce.single-product .sophia-variation-swatch:hover,
.woocommerce.single-product .sophia-variation-swatch:focus-visible {
	border-color: var(--wp--preset--color--button-color, #954e26);
	outline: none;
}

.woocommerce.single-product .sophia-variation-swatch.is-selected {
	background: var(--wp--preset--color--button-color, #954e26);
	border-color: var(--wp--preset--color--button-color, #954e26);
	color: #fff;
}

.woocommerce.single-product .sophia-variation-swatch.is-disabled,
.woocommerce.single-product .sophia-variation-swatch:disabled {
	cursor: not-allowed;
	opacity: 0.35;
	pointer-events: none;
	text-decoration: line-through;
}

.woocommerce.single-product form.variations_form a.reset_variations {
	display: inline-block;
	font-size: 0.8125rem;
	margin-top: 0.65rem;
	text-decoration: underline;
}

.woocommerce.single-product form.variations_form a.reset_variations:empty,
.woocommerce.single-product form.variations_form a.reset_variations[style*="visibility: hidden"],
.woocommerce.single-product form.variations_form a.reset_variations[style*="display: none"] {
	display: none !important;
}

.woocommerce.single-product .woocommerce-variation {
	margin: 0 0 0.75rem;
}

.woocommerce.single-product .woocommerce-variation-price {
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.35rem;
}

.woocommerce.single-product .woocommerce-variation-availability {
	font-size: 0.875rem;
	margin: 0 0 0.5rem;
}

.woocommerce.single-product .single_variation_wrap {
	width: 100%;
}

/* —— Mobile sticky ATC bar —— */
.sophia-pdp-sticky-atc {
	background: rgba(255, 255, 255, 0.96);
	border-top: 1px solid var(--wp--preset--color--border-color-light, #eedcd0);
	bottom: 0;
	box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.1);
	box-sizing: border-box;
	display: none;
	left: 0;
	padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
	pointer-events: none;
	position: fixed;
	right: 0;
	/* Below research modal (100000); above page content. */
	z-index: 99950;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.sophia-pdp-sticky-atc.is-visible {
	display: block;
	pointer-events: auto;
}

.sophia-pdp-sticky-atc__inner {
	align-items: center;
	display: flex;
	gap: 0.75rem;
	margin: 0 auto;
	max-width: 720px;
}

.sophia-pdp-sticky-atc__price {
	color: var(--wp--preset--color--title, #010101);
	flex: 1 1 auto;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.2;
	min-width: 0;
}

.sophia-pdp-sticky-atc__price del {
	color: var(--wp--preset--color--secondary-text, #686868);
	font-size: 0.8125rem;
	font-weight: 500;
	margin-right: 0.35rem;
}

.sophia-pdp-sticky-atc__btn {
	align-items: center;
	background: var(--wp--preset--color--button-color, #954e26) !important;
	border: none !important;
	border-radius: 10px !important;
	color: #fff !important;
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 0.9375rem;
	font-weight: 600;
	justify-content: center;
	min-height: 48px;
	padding: 0.7rem 1.15rem !important;
	text-decoration: none !important;
	white-space: nowrap;
}

.sophia-pdp-sticky-atc__btn.is-locked,
.sophia-pdp-sticky-atc__btn.sophia-vip-cart-locked {
	background: #bdbdbd !important;
	cursor: pointer;
}

.sophia-pdp-sticky-atc__btn:hover,
.sophia-pdp-sticky-atc__btn:focus {
	background: var(--wp--preset--color--chocolate-dim, #bd6230) !important;
	color: #fff !important;
}

.sophia-pdp-sticky-atc__btn.is-locked:hover,
.sophia-pdp-sticky-atc__btn.sophia-vip-cart-locked:hover {
	background: #b0b0b0 !important;
}

/* Room for sticky bar on mobile */
@media screen and (max-width: 781px) {
	body.single-product.sophia-pdp-has-sticky-atc .wp-block-single-product-main {
		padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
	}
}

/* —— Tablet —— */
@media screen and (max-width: 1024px) {
	.sophia-pdp-gallery .woocommerce-product-gallery .woocommerce-product-gallery__image img,
	.sophia-pdp-gallery .woocommerce-product-gallery .flex-viewport img,
	.sophia-pdp-gallery .sophia-pdp-stage img {
		max-height: min(600px, 68vh) !important;
	}

	body.single-product .sophia-pdp-gallery .woocommerce-product-gallery .flex-control-thumbs li,
	body.single-product .sophia-pdp-gallery .sophia-pdp-thumbs li,
	body.single-product .sophia-pdp-gallery .woocommerce-product-gallery--columns-4 .flex-control-thumbs li {
		flex: 0 0 4.25rem !important;
		height: 4.25rem !important;
		max-width: 4.25rem !important;
		width: 4.25rem !important;
	}
}

@media screen and (max-width: 1199px) {
	.wp-block-columns.wp-single-product-column.sophia-pdp-hero {
		align-items: stretch !important;
	}

	.sophia-pdp-gallery,
	.sophia-pdp-buybox {
		align-items: stretch !important;
		flex-basis: 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	/* Force gallery card + share + buybox to identical full column width */
	.sophia-pdp-gallery > .wp-block-woocommerce-product-image-gallery,
	.sophia-pdp-gallery .woocommerce-product-gallery,
	.sophia-pdp-gallery .woocommerce-product-gallery.images,
	body.single-product.woocommerce div.product .sophia-pdp-gallery .woocommerce-product-gallery.images,
	body.single-product.woocommerce-page div.product .sophia-pdp-gallery .woocommerce-product-gallery.images,
	.sophia-pdp-share,
	.sophia-pdp-buybox {
		align-self: stretch !important;
		box-sizing: border-box !important;
		float: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		max-width: none !important;
		width: 100% !important;
	}
}

/* —— Phone / single column —— */
@media screen and (max-width: 781px) {
	.single-product .wp-block-single-product-main {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
		padding-top: 1rem !important;
	}

	.wp-block-columns.wp-single-product-column.sophia-pdp-hero {
		flex-wrap: wrap !important;
		gap: 1rem !important;
	}

	.wp-block-columns.wp-single-product-column.sophia-pdp-hero > .wp-block-column {
		flex-basis: 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	.sophia-pdp-gallery .woocommerce-product-gallery,
	.sophia-pdp-gallery .wp-block-woocommerce-product-image-gallery {
		border-radius: 14px;
		height: auto;
		padding: 1.35rem 0.65rem 0.65rem;
	}

	.sophia-pdp-gallery .woocommerce-product-gallery .woocommerce-product-gallery__image img,
	.sophia-pdp-gallery .woocommerce-product-gallery .flex-viewport img,
	.sophia-pdp-gallery .sophia-pdp-stage img {
		max-height: min(520px, 60vh) !important;
	}

	.sophia-pdp-buybox {
		border-radius: 14px;
		height: auto;
		padding: 1.15rem;
		position: static;
	}

	.sophia-pdp-buybox .wp-block-post-title {
		font-size: 1.375rem !important;
	}

	.wp-price-tags-row .wc-block-components-product-price,
	.wp-price-tags-row .wc-block-components-product-price .amount {
		font-size: 1.5rem !important;
	}

	.woocommerce.single-product .wp-block-woocommerce-add-to-cart-form form.cart,
	.woocommerce.single-product .sophia-pdp-buybox form.cart {
		flex-wrap: wrap;
	}

	.woocommerce.single-product .wp-block-woocommerce-add-to-cart-form form.cart .single_add_to_cart_button,
	.woocommerce.single-product div.product form.cart .button,
	.woocommerce.single-product .sophia-pdp-buybox .sophia-vip-cart-locked {
		flex: 1 1 100% !important;
		width: 100% !important;
	}

	.woocommerce.single-product .wc-block-add-to-cart-form--stepper form.cart .wc-block-components-quantity-selector.quantity {
		width: 100%;
	}

	.single-product .woocommerce div.product .woocommerce-tabs ul.tabs,
	.single-product .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs {
		max-width: 100%;
		width: 100%;
	}

	.single-product .sophia-pdp-details,
	.single-product .wp-block-woocommerce-product-details {
		border-radius: 14px;
		padding: 1rem;
	}
}

@media screen and (max-width: 480px) {
	.single-product .woocommerce-breadcrumb {
		font-size: 0.8125rem;
		margin-bottom: 0.85rem;
	}

	body.single-product .sophia-pdp-gallery .woocommerce-product-gallery .flex-control-thumbs li,
	body.single-product .sophia-pdp-gallery .sophia-pdp-thumbs li,
	body.single-product .sophia-pdp-gallery .woocommerce-product-gallery--columns-4 .flex-control-thumbs li {
		flex: 0 0 3.75rem !important;
		height: 3.75rem !important;
		max-width: 3.75rem !important;
		width: 3.75rem !important;
	}

	.sophia-pdp-sticky-atc__inner {
		gap: 0.55rem;
	}

	.sophia-pdp-sticky-atc__price {
		font-size: 1rem;
	}

	.sophia-pdp-sticky-atc__btn {
		font-size: 0.875rem;
		min-height: 46px;
		padding: 0.65rem 0.9rem !important;
	}
}
