/* =============================================================================
   SINGLE PRODUCT — woocommerce/content-single-product.php
   Gallery | purchase column (price, dosage, qty, Add to cart + Buy now),
   details accordion, optional shared Elementor content below.
   ============================================================================= */

.nova-single-product {
	width: min(100% - 2 * var(--space-5), var(--container-width, 1280px));
	margin: 0 auto;
	padding: var(--space-6) 0 var(--space-8);
}

/* Breadcrumb */
.nova-sp-breadcrumb .woocommerce-breadcrumb {
	margin: 0 0 var(--space-6);
	font-size: var(--text-sm);
	color: var(--color-muted);
}

body .nova-sp-breadcrumb a {
	color: var(--color-text);
	text-decoration: none;
}

body .nova-sp-breadcrumb a:hover {
	color: var(--color-primary);
}

.nova-bc-sep {
	margin: 0 var(--space-1);
	color: var(--color-muted);
}

/* Layout */
.nova-sp-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--space-8);
	align-items: start;
}

/* Gallery */
.nova-sp-gallery .woocommerce-product-gallery {
	position: relative;
	margin: 0;
	opacity: 1 !important; /* WC sets inline opacity:0 until its JS runs. */
}

.nova-sp-gallery .woocommerce-product-gallery__wrapper {
	margin: 0;
}

.nova-sp-gallery .woocommerce-product-gallery__image {
	overflow: hidden;
	border-radius: var(--radius-card, 12px);
	background: var(--color-surface-alt);
}

.nova-sp-gallery .woocommerce-product-gallery__image:not(:first-child) {
	display: none;
}

.nova-sp-gallery .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

/* Hover zoom: the enlarged image covers the original — also when the product image is transparent. */
.nova-sp-gallery .woocommerce-product-gallery__image .zoomImg {
	background-color: var(--color-surface-alt);
}

.nova-sp-gallery .woocommerce-product-gallery__trigger {
	display: none;
}

.nova-sp-gallery .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--space-2);
	margin: var(--space-3) 0 0;
	padding: 0;
	list-style: none;
}

.nova-sp-gallery .flex-control-thumbs img {
	border-radius: var(--radius-input, 6px);
	cursor: pointer;
	opacity: 0.6;
}

.nova-sp-gallery .flex-control-thumbs img.flex-active {
	opacity: 1;
}

/* Info column */
.nova-sp-info {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	min-width: 0;
}

.nova-sp-info .nova-sp-title {
	margin: 0;
	font-size: var(--text-h3);
	line-height: 1.2;
}

.nova-sp-excerpt,
.nova-sp-excerpt p {
	margin: 0;
	color: var(--color-muted);
}

.nova-sp-price {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.nova-sp-price-main {
	display: flex;
	align-items: baseline;
	gap: var(--space-2);
}

.nova-sp-price-from {
	font-size: var(--text-sm);
	color: var(--color-muted);
}

.nova-sp-price .price {
	font-family: var(--font-heading);
	font-size: var(--text-h4);
	font-weight: var(--weight-heading);
	color: var(--color-heading);
}

.nova-sp-price .price del {
	margin-right: var(--space-2);
	font-size: 0.7em;
	color: var(--color-muted);
}

.nova-sp-price .price ins {
	text-decoration: none;
}

.nova-sp-price-note {
	font-size: var(--text-sm);
	color: var(--color-muted);
}

.nova-sp-divider {
	height: 1px;
	background: var(--color-border);
}

/* Purchase form */
.nova-sp-purchase {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}

.nova-sp-info form.cart {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	margin: 0;
}

.nova-sp-info table.variations,
.nova-sp-info table.variations tbody,
.nova-sp-info table.variations tr,
.nova-sp-info table.variations th,
.nova-sp-info table.variations td {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
}

.nova-sp-info table.variations tr + tr {
	margin-top: var(--space-4);
}

.nova-sp-info table.variations label,
.nova-sp-amount-label {
	display: block;
	margin-bottom: var(--space-2);
	font-size: var(--text-sm);
	font-weight: 600;
	color: var(--color-heading);
}

.nova-sp-info table.variations select {
	width: 100%;
	max-width: 420px;
	height: 48px;
	padding: 0 40px 0 var(--space-4);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-input, 6px);
	background: var(--color-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236B7280' stroke-width='1.5' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") right 16px center no-repeat;
	font-size: var(--text-base);
	color: var(--color-text);
	appearance: none;
	cursor: pointer;
}

.nova-sp-info table.variations select:focus {
	border-color: var(--color-primary);
	box-shadow: var(--focus-ring);
	outline: none;
}

.nova-sp-info .reset_variations {
	display: inline-block;
	margin-top: var(--space-2);
	font-size: var(--text-sm);
	color: var(--color-muted);
}

.nova-sp-info .woocommerce-variation-price,
.nova-sp-info .woocommerce-variation-availability:empty {
	display: none; /* The selected variation price is shown in .nova-sp-price. */
}

.nova-sp-info .stock {
	margin: 0;
	font-size: var(--text-sm);
}

.nova-sp-info .stock.out-of-stock {
	color: var(--color-error);
}

.nova-sp-info .woocommerce-variation-add-to-cart,
.nova-sp-info form.cart:not(.variations_form) {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-4);
}

.nova-sp-shipping-note {
	margin: 0;
	font-size: var(--text-sm);
	font-weight: 500;
	color: var(--color-success);
}

/* Actions: Add to cart (outline) + Buy now (primary) */
.nova-sp-button-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: var(--space-3);
}

body .nova-sp-button-row :is(.single_add_to_cart_button, .nova-sp-buy-now) {
	width: 100%;
	min-height: 50px;
	margin: 0;
}

body .nova-sp-button-row .single_add_to_cart_button {
	background: transparent;
	color: var(--color-primary);
	box-shadow: inset 0 0 0 1.5px currentColor;
}

body .nova-sp-button-row .single_add_to_cart_button:hover,
body .nova-sp-button-row .single_add_to_cart_button:focus-visible {
	background: var(--color-primary);
	color: var(--color-on-dark);
}

body .nova-sp-button-row :is(.single_add_to_cart_button, .nova-sp-buy-now):disabled,
body .nova-sp-button-row :is(.single_add_to_cart_button, .nova-sp-buy-now).disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.nova-sp-button-row .is-loading {
	opacity: 0.7;
	pointer-events: none;
}

/* Add-to-cart feedback (assets/js/single-product.js) */
.nova-sp-cart-notice {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-input, 6px);
	background: color-mix(in srgb, var(--color-success) 10%, var(--color-card));
	color: var(--color-success);
	font-size: var(--text-sm);
}

.nova-sp-cart-notice.is-visible {
	display: flex;
}

.nova-sp-cart-notice--error {
	background: color-mix(in srgb, var(--color-error) 10%, var(--color-card));
	color: var(--color-error);
}

body .nova-sp-cart-notice__link {
	font-weight: 600;
	color: inherit;
}

/* Details accordion */
.nova-sp-accordion {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.nova-sp-details-item {
	border: 1px solid var(--color-border);
	border-radius: var(--radius-input, 6px);
	background: var(--color-card);
}

.nova-sp-details-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-4);
	font-weight: 600;
	color: var(--color-heading);
	list-style: none;
	cursor: pointer;
}

.nova-sp-details-summary::-webkit-details-marker {
	display: none;
}

.nova-sp-details-summary::after {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 1.5px solid var(--color-muted);
	border-bottom: 1.5px solid var(--color-muted);
	transform: rotate(45deg);
	transition: transform var(--transition);
}

.nova-sp-details-item[open] > .nova-sp-details-summary::after {
	transform: rotate(225deg);
}

.nova-sp-details-content {
	padding: 0 var(--space-4) var(--space-4);
	font-size: var(--text-sm);
	color: var(--color-text);
}

.nova-sp-details-content > :last-child {
	margin-bottom: 0;
}

/* Shared Elementor content below the product (FAQ, process…) spans full width. */
.nova-sp-custom-content {
	width: 100%;
}

/* Hide WooCommerce extras the layout replaces. */
.single-product .woocommerce-tabs,
.single-product .related.products,
.single-product .up-sells {
	display: none;
}

@media (max-width: 1024px) {
	.nova-sp-layout {
		gap: var(--space-6);
	}
}

@media (max-width: 767px) {
	.nova-single-product {
		padding-top: var(--space-4);
	}

	.nova-sp-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.nova-sp-breadcrumb .woocommerce-breadcrumb {
		margin-bottom: var(--space-4);
	}
}
