/* =========================================================
   X-POD – Single product
   Loaded after xpod-shop.css (tokens, buttons, cards, form controls).
   Selectors start with "body.xpod-woo .xpod-shop" so they beat WooCommerce's
   own ".woocommerce div.product …" rules without !important.
   ========================================================= */

/* ---------- Breadcrumb bar ---------- */
.xp-product-bar {
	position: relative;
	padding-block: calc(var(--xp-header-offset) + clamp(28px, 4vw, 48px)) clamp(20px, 3vw, 32px);
}

.xp-product-bar::before {
	content: "";
	position: absolute;
	inset: 0 0 -380px;
	z-index: 0;
	background: radial-gradient(50% 60% at 25% 30%, rgba(139, 92, 246, .22), transparent 70%);
	pointer-events: none;
}

.xp-product-bar .xp-container { position: relative; z-index: 1; }
.xp-product-bar .xp-breadcrumb { margin-top: 0; }

.xp-product-page {
	/* The Elementor header overlays page content instead of occupying document flow. */
	--xp-header-offset: 96px;
	padding-bottom: clamp(64px, 8vw, 110px);
}

/* The product view needs more breathing room than the catalogue pages. */
.xp-product-page > .xp-container,
.xp-product-bar .xp-container {
	max-width: 1680px;
}

/* ---------- Layout: gallery | summary ---------- */
body.xpod-woo .xpod-shop div.product.xp-product {
	position: relative;
	z-index: 1;
	margin: 0;
}

.xp-product__top {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(32px, 4vw, 64px);
	align-items: start;
}

.xp-product__gallery,
.xp-product__summary {
	position: relative;
	min-width: 0;
	width: 100%;
}

body.xpod-woo .xpod-shop div.product div.images,
body.xpod-woo .xpod-shop div.product div.summary {
	float: none;
	width: 100%;
	margin: 0;
}

body.xpod-woo .xpod-shop div.product div.summary {
	position: sticky;
	top: calc(var(--xp-header-offset) + 28px);
}

/* ---------- Gallery ---------- */
body.xpod-woo .xpod-shop div.product div.images .woocommerce-product-gallery__wrapper {
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius-lg);
	background:
		radial-gradient(70% 70% at 50% 55%, rgba(139, 92, 246, .22), transparent 70%),
		var(--xp-surface);
	overflow: hidden;
}

/* WooCommerce and page-builder rules sometimes retain an intrinsic image width.
   Keep every gallery layer stretched to the full left column. */
body.xpod-woo .xpod-shop div.product div.images,
body.xpod-woo .xpod-shop div.product div.images .woocommerce-product-gallery__wrapper,
body.xpod-woo .xpod-shop div.product div.images .woocommerce-product-gallery__image,
body.xpod-woo .xpod-shop div.product div.images .woocommerce-product-gallery__image > a {
	display: block;
	width: 100%;
	max-width: none;
}

body.xpod-woo .xpod-shop div.product div.images .flex-viewport {
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius-lg);
	background:
		radial-gradient(70% 70% at 50% 55%, rgba(139, 92, 246, .22), transparent 70%),
		var(--xp-surface);
}

/* When the slider is active the viewport carries the frame, not the inner wrapper */
body.xpod-woo .xpod-shop div.product div.images .flex-viewport .woocommerce-product-gallery__wrapper {
	border: 0;
	border-radius: 0;
	background: none;
}

body.xpod-woo .xpod-shop div.product div.images img {
	width: 100%;
	max-width: none;
	height: auto;
	border-radius: 0;
	box-shadow: none;
}

/* Thumbnails */
body.xpod-woo .xpod-shop div.product div.images .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
	margin: 14px 0 0;
	padding: 0;
}

body.xpod-woo .xpod-shop div.product div.images .flex-control-thumbs li {
	float: none;
	width: auto;
	margin: 0;
}

body.xpod-woo .xpod-shop div.product div.images .flex-control-thumbs li img {
	aspect-ratio: 1;
	object-fit: cover;
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius-md);
	opacity: .55;
	transition: opacity .2s, border-color .2s;
}

body.xpod-woo .xpod-shop div.product div.images .flex-control-thumbs li img:hover,
body.xpod-woo .xpod-shop div.product div.images .flex-control-thumbs li img.flex-active {
	opacity: 1;
	border-color: var(--xp-accent);
}

/* Zoom / lightbox trigger */
body.xpod-woo .xpod-shop div.product .woocommerce-product-gallery__trigger {
	top: 16px;
	right: 16px;
	width: 42px;
	height: 42px;
	border: 1px solid var(--xp-border-strong);
	border-radius: 50%;
	background: rgba(5, 4, 9, .7);
	-webkit-backdrop-filter: blur(6px);
	        backdrop-filter: blur(6px);
}

body.xpod-woo .xpod-shop div.product .woocommerce-product-gallery__trigger::before { border-color: var(--xp-text); top: 11px; left: 11px; }
body.xpod-woo .xpod-shop div.product .woocommerce-product-gallery__trigger::after { background: var(--xp-text); top: 25px; left: 25px; }

/* Sale badge */
body.xpod-woo .xpod-shop .xp-product__gallery span.onsale {
	top: 16px;
	left: 16px;
	z-index: 9;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--xp-accent);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1;
}

/* ---------- Summary ---------- */
.xp-product__cat { display: inline-block; margin-bottom: 12px; }
.xp-product__cat:hover { color: var(--xp-text); }

body.xpod-woo .xpod-shop div.product .product_title {
	margin: 0 0 14px;
	color: var(--xp-text);
	font-family: var(--xp-font-head);
	font-size: clamp(2rem, 4vw, 3.1rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.025em;
}

body.xpod-woo .xpod-shop div.product .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	font-size: 0.9rem;
}

body.xpod-woo .xpod-shop div.product .woocommerce-product-rating .star-rating { margin: 0; color: var(--xp-accent-2); }
body.xpod-woo .xpod-shop div.product .woocommerce-review-link { color: var(--xp-muted); }
body.xpod-woo .xpod-shop div.product .woocommerce-review-link:hover { color: var(--xp-text); }

body.xpod-woo .xpod-shop div.product p.price,
body.xpod-woo .xpod-shop div.product span.price {
	margin: 0 0 22px;
	color: var(--xp-text);
	font-family: var(--xp-font-head);
	font-size: 1.75rem;
	font-weight: 600;
}

body.xpod-woo .xpod-shop div.product p.price del,
body.xpod-woo .xpod-shop div.product span.price del {
	margin-right: 8px;
	color: var(--xp-muted);
	font-size: .7em;
	font-weight: 400;
	opacity: 1;
}

body.xpod-woo .xpod-shop div.product p.price ins,
body.xpod-woo .xpod-shop div.product span.price ins { text-decoration: none; }

body.xpod-woo .xpod-shop div.product .woocommerce-product-details__short-description {
	margin-bottom: 26px;
	color: var(--xp-muted);
	font-size: 1.02rem;
	line-height: 1.7;
}

body.xpod-woo .xpod-shop div.product .woocommerce-product-details__short-description p { margin: 0 0 .8em; }

/* Stock */
body.xpod-woo .xpod-shop div.product .stock {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	color: #86efac;
	font-size: 0.9rem;
	font-weight: 500;
}

body.xpod-woo .xpod-shop div.product .stock::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 10px currentColor;
}

body.xpod-woo .xpod-shop div.product .stock.out-of-stock { color: var(--xp-danger); }
body.xpod-woo .xpod-shop div.product .stock.available-on-backorder { color: #fcd34d; }

/* Add to cart */
body.xpod-woo .xpod-shop div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0 0 26px;
	padding: 22px 0;
	border-block: 1px solid var(--xp-border);
}

body.xpod-woo .xpod-shop div.product form.cart::before,
body.xpod-woo .xpod-shop div.product form.cart::after { display: none; }

body.xpod-woo .xpod-shop div.product form.cart div.quantity { float: none; margin: 0; }

body.xpod-woo .xpod-shop div.product form.cart .single_add_to_cart_button {
	flex: 1 1 200px;
	float: none;
	min-height: 48px;
	font-size: 1rem;
}

/* Variable products */
body.xpod-woo .xpod-shop div.product form.variations_form { display: block; }

body.xpod-woo .xpod-shop div.product form.cart .variations {
	width: 100%;
	margin: 0 0 6px;
	border: 0;
	border-collapse: collapse;
}

body.xpod-woo .xpod-shop div.product form.cart .variations tr { display: block; margin-bottom: 14px; }

body.xpod-woo .xpod-shop div.product form.cart .variations th,
body.xpod-woo .xpod-shop div.product form.cart .variations td {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
}

body.xpod-woo .xpod-shop div.product form.cart .variations label {
	display: block;
	margin-bottom: 8px;
	color: var(--xp-text);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.3;
}

body.xpod-woo .xpod-shop div.product form.cart .variations .value,
body.xpod-woo .xpod-shop div.product form.cart .variations select {
	width: 100%;
	max-width: none;
	min-width: 0;
}

body.xpod-woo .xpod-shop div.product form.cart .variations select {
	display: block;
	margin: 0;
	background-color: var(--xp-surface);
	color: var(--xp-text);
	cursor: pointer;
}

body.xpod-woo .xpod-shop div.product form.cart .reset_variations {
	display: inline-block;
	margin-top: 8px;
	color: var(--xp-accent-2);
	font-size: 0.85rem;
}

body.xpod-woo .xpod-shop div.product .single_variation_wrap .woocommerce-variation { margin-bottom: 14px; }

body.xpod-woo .xpod-shop div.product .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

body.xpod-woo .xpod-shop div.product form.variations_form .woocommerce-variation-add-to-cart { padding: 0; border: 0; }
body.xpod-woo .xpod-shop div.product form.variations_form { padding-bottom: 22px; }

/* Grouped products */
body.xpod-woo .xpod-shop div.product form.cart .group_table { width: 100%; border: 0; }
body.xpod-woo .xpod-shop div.product form.cart .group_table td {
	padding: 12px 8px;
	border: 0;
	border-bottom: 1px solid var(--xp-border);
	background: none;
	vertical-align: middle;
}

/* Meta + help line */
body.xpod-woo .xpod-shop div.product .product_meta {
	display: grid;
	gap: 6px;
	color: var(--xp-muted);
	font-size: 0.88rem;
}

body.xpod-woo .xpod-shop div.product .product_meta > span { display: block; }
body.xpod-woo .xpod-shop div.product .product_meta span span,
body.xpod-woo .xpod-shop div.product .product_meta a { color: var(--xp-text); }
body.xpod-woo .xpod-shop div.product .product_meta a:hover { color: var(--xp-accent-2); }

.xp-product__help {
	margin: 22px 0 0;
	padding: 16px 18px;
	border: 1px dashed var(--xp-border-strong);
	border-radius: var(--xp-radius-md);
	color: var(--xp-muted);
	font-size: 0.92rem;
}

.xp-product__help a { color: var(--xp-accent-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tabs ---------- */
.xp-product__more { margin-top: clamp(56px, 8vw, 96px); }

body.xpod-woo .xpod-shop div.product .woocommerce-tabs { margin-bottom: clamp(56px, 8vw, 96px); }

body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 28px;
	padding: 0;
	overflow: visible;
}

body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs::before,
body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs li::before,
body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs li::after { display: none; }

body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 1px solid var(--xp-border);
	border-radius: 999px;
	background: var(--xp-surface);
	transition: border-color .2s, background .2s;
}

body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 11px 20px;
	color: var(--xp-muted);
	font-size: 0.92rem;
	font-weight: 500;
}

body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs li:hover { border-color: var(--xp-border-strong); }
body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs li:hover a { color: var(--xp-text); }

body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs li.active {
	border-color: var(--xp-accent);
	background: var(--xp-accent);
}

body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs li.active a { color: #fff; }

body.xpod-woo .xpod-shop div.product .woocommerce-tabs .panel {
	margin: 0;
	padding: clamp(24px, 4vw, 40px);
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius-lg);
	background: var(--xp-surface);
	color: var(--xp-muted);
	font-size: 1rem;
	line-height: 1.75;
}

body.xpod-woo .xpod-shop div.product .woocommerce-tabs .panel > :first-child { margin-top: 0; }
body.xpod-woo .xpod-shop div.product .woocommerce-tabs .panel > :last-child { margin-bottom: 0; }

body.xpod-woo .xpod-shop div.product .woocommerce-tabs .panel h2,
body.xpod-woo .xpod-shop div.product .woocommerce-tabs .panel h3 {
	color: var(--xp-text);
	font-family: var(--xp-font-head);
	letter-spacing: -0.01em;
}

body.xpod-woo .xpod-shop div.product .woocommerce-tabs .panel a { color: var(--xp-accent-2); }

/* Additional information table */
body.xpod-woo .xpod-shop table.woocommerce-product-attributes {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
}

body.xpod-woo .xpod-shop table.woocommerce-product-attributes th,
body.xpod-woo .xpod-shop table.woocommerce-product-attributes td {
	padding: 14px 0;
	border: 0;
	border-bottom: 1px solid var(--xp-border);
	background: none;
	font-style: normal;
	text-align: left;
	vertical-align: top;
}

body.xpod-woo .xpod-shop table.woocommerce-product-attributes th { width: 34%; color: var(--xp-text); font-weight: 600; }
body.xpod-woo .xpod-shop table.woocommerce-product-attributes td p { margin: 0; }

/* ---------- Reviews ---------- */
body.xpod-woo .xpod-shop #reviews #comments h2,
body.xpod-woo .xpod-shop #reviews #reply-title {
	margin: 0 0 18px;
	color: var(--xp-text);
	font-family: var(--xp-font-head);
	font-size: 1.35rem;
}

body.xpod-woo .xpod-shop #reviews #comments ol.commentlist { margin: 0 0 32px; padding: 0; }

body.xpod-woo .xpod-shop #reviews #comments ol.commentlist li {
	margin: 0 0 16px;
	padding: 20px;
	border: 1px solid var(--xp-border);
	border-radius: var(--xp-radius-md);
	background: var(--xp-surface-2);
}

body.xpod-woo .xpod-shop #reviews #comments ol.commentlist li img.avatar {
	width: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
}

body.xpod-woo .xpod-shop #reviews #comments ol.commentlist li .comment-text {
	margin-left: 56px;
	padding: 0;
	border: 0;
	border-radius: 0;
}

body.xpod-woo .xpod-shop #reviews #comments ol.commentlist li .meta { color: var(--xp-muted); font-size: 0.85rem; }
body.xpod-woo .xpod-shop #reviews #comments ol.commentlist li .meta strong { color: var(--xp-text); }

body.xpod-woo .xpod-shop #review_form #respond { padding: 0; }
body.xpod-woo .xpod-shop #review_form #respond p { margin: 0 0 16px; }
body.xpod-woo .xpod-shop #review_form #respond label { display: block; margin-bottom: 8px; color: var(--xp-text); font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
body.xpod-woo .xpod-shop #review_form #respond textarea,
body.xpod-woo .xpod-shop #review_form #respond input[type="text"],
body.xpod-woo .xpod-shop #review_form #respond input[type="email"] { width: 100%; }

body.xpod-woo .xpod-shop p.stars a { color: var(--xp-accent-2); }

/* ---------- Related / upsells (cards come from xpod-shop.css) ---------- */
body.xpod-woo .xpod-shop .upsells { margin-bottom: clamp(56px, 8vw, 96px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.xp-product-page { --xp-header-offset: 78px; }

	.xp-product__top { grid-template-columns: 1fr; }

	body.xpod-woo .xpod-shop div.product div.summary { position: static; }

	body.xpod-woo .xpod-shop div.product div.images .flex-control-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
	.xp-product-page { --xp-header-offset: 68px; }

	body.xpod-woo .xpod-shop div.product form.cart .single_add_to_cart_button { flex-basis: 100%; }

	body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	body.xpod-woo .xpod-shop div.product .woocommerce-tabs ul.tabs li { flex: 0 0 auto; }
}