/**
 * Tekton — single product page (Customizer-driven).
 */

/* Gallery hidden — summary full width */
body.tekton-single-product-no-gallery .woocommerce div.product {
	grid-template-columns: 1fr !important;
}

/* Breadcrumb trail (Home / Category / product) */
body.tekton-single-product-no-breadcrumbs .tekton-breadcrumbs,
body.tekton-single-product-no-breadcrumbs nav.tekton-breadcrumbs,
body.tekton-single-product-no-breadcrumbs .yoast-breadcrumb,
body.tekton-single-product-no-breadcrumbs .rank-math-breadcrumb,
body.tekton-single-product-no-breadcrumbs .woocommerce-breadcrumb {
	display: none !important;
}

/* Content width */
body.tekton-single-product-width-narrow .site-content .container,
body.tekton-single-product-width-narrow #primary.site-main,
body.tekton-single-product-width-narrow main.woocommerce-site-main {
	max-width: 960px;
}

body.tekton-single-product-width-wide .site-content .container,
body.tekton-single-product-width-wide #primary.site-main,
body.tekton-single-product-width-wide main.woocommerce-site-main {
	max-width: 1280px;
}

body.tekton-single-product-width-full .site-content .container,
body.tekton-single-product-width-full #primary.site-main,
body.tekton-single-product-width-full main.woocommerce-site-main {
	max-width: 100%;
}

body.tekton-single-product-width-full .site-content .container {
	padding-left: clamp(16px, 3vw, 32px);
	padding-right: clamp(16px, 3vw, 32px);
}

body.tekton-single-product-width-narrow #primary.site-main,
body.tekton-single-product-width-wide #primary.site-main,
body.tekton-single-product-width-full #primary.site-main,
body.tekton-single-product-width-narrow main.woocommerce-site-main,
body.tekton-single-product-width-wide main.woocommerce-site-main,
body.tekton-single-product-width-full main.woocommerce-site-main {
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

/* Main product grid — disable WC clearfix pseudo-elements that break grid layout */
body.tekton-single-product .woocommerce div.product::before,
body.tekton-single-product .woocommerce div.product::after {
	content: none !important;
	display: none !important;
}

body.tekton-single-product .woocommerce div.product {
	display: grid;
	grid-template-columns: var(--tekton-product-gallery-width, 48%) var(--tekton-product-summary-width, 52%);
	gap: var(--tekton-product-grid-gap, 2.5rem);
	align-items: start;
	width: 100%;
	margin-bottom: 2.5rem;
}

body.tekton-single-product-layout-gallery-right .woocommerce div.product {
	grid-template-columns: var(--tekton-product-summary-width, 52%) var(--tekton-product-gallery-width, 48%);
}

body.tekton-single-product-layout-gallery-right .woocommerce div.product .woocommerce-product-gallery {
	order: 2;
}

body.tekton-single-product-layout-gallery-right .woocommerce div.product .summary {
	order: 1;
}

body.tekton-single-product-layout-stacked .woocommerce div.product,
body.tekton-single-product-layout-wide-gallery .woocommerce div.product {
	grid-template-columns: 1fr;
}

body.tekton-single-product-layout-wide-gallery .woocommerce div.product .woocommerce-product-gallery {
	width: 100%;
	max-width: 100%;
}

/* Summary spacing & typography */
body.tekton-single-product .woocommerce div.product .summary {
	display: flex;
	flex-direction: column;
	gap: var(--tekton-product-summary-gap, 24px);
}

body.tekton-single-product .woocommerce div.product .summary > * {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

body.tekton-single-product .woocommerce div.product .product_title {
	font-size: var(--tekton-product-title-size, 32px);
	line-height: 1.2;
	margin: 0;
	color: var(--tekton-woo-catalog-title-color, var(--heading-color, #0f172a));
}

body.tekton-single-product .woocommerce div.product p.price,
body.tekton-single-product .woocommerce div.product span.price {
	font-size: var(--tekton-product-price-size, 22px);
	margin: 0;
	color: var(--tekton-woo-catalog-price-color, #0f172a);
}

body.tekton-single-product .woocommerce div.product .woocommerce-product-rating {
	margin: 0;
}

body.tekton-single-product .woocommerce div.product .woocommerce-product-details__short-description {
	margin: 0;
}

body.tekton-single-product .woocommerce div.product form.cart {
	margin: 0;
}

body.tekton-single-product .woocommerce div.product .product_meta {
	margin: 0;
	font-size: 0.9rem;
}

/* Sticky summary (desktop) */
@media (min-width: 960px) {
	body.tekton-single-product-summary-sticky .woocommerce div.product .summary {
		position: sticky;
		top: calc(var(--tekton-header-offset-desktop, 80px) + 24px);
		align-self: start;
		max-height: calc(100vh - var(--tekton-header-offset-desktop, 80px) - 48px);
		overflow-y: auto;
	}
}

/* Hide quantity */
body.tekton-single-product-hide-quantity .woocommerce div.product form.cart .quantity {
	display: none !important;
}

/* Full-width add to cart */
body.tekton-single-product-btn-full .woocommerce div.product form.cart .button,
body.tekton-single-product-btn-full .woocommerce div.product form.cart button[type="submit"] {
	width: 100%;
	text-align: center;
	justify-content: center;
}

/* Tabs: accordion style */
body.tekton-single-product-tabs-accordion .woocommerce div.product .woocommerce-tabs ul.tabs {
	display: none !important;
}

body.tekton-single-product-tabs-accordion .woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel,
body.tekton-single-product-tabs-accordion .woocommerce div.product .woocommerce-tabs .panel {
	display: block !important;
	visibility: visible !important;
	height: auto !important;
	overflow: visible !important;
	opacity: 1 !important;
	border: 1px solid var(--border-color, #e2e8f0);
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1rem;
}


/* Related & upsells */
body.tekton-single-product .woocommerce .related.products,
body.tekton-single-product .woocommerce .up-sells.upsells {
	margin-top: 2.5rem;
	clear: both;
}

body.tekton-single-product .woocommerce .related.products > h2,
body.tekton-single-product .woocommerce .up-sells.upsells > h2 {
	font-size: 1.35rem;
	margin-bottom: 1.25rem;
	color: var(--footer-main-heading-color, var(--heading-color, #0f172a));
}

/* Mobile: always stacked */
@media (max-width: 959px) {
	body.tekton-single-product .woocommerce div.product {
		grid-template-columns: 1fr !important;
		gap: 1.5rem;
	}

	body.tekton-single-product-layout-gallery-right .woocommerce div.product .woocommerce-product-gallery,
	body.tekton-single-product-layout-gallery-right .woocommerce div.product .summary {
		order: unset;
	}

	body.tekton-single-product-summary-sticky .woocommerce div.product .summary {
		position: static;
		max-height: none;
		overflow: visible;
	}
}

/* --- Gallery style variants --- */
body.tekton-single-product .woocommerce-product-gallery {
	position: relative;
}

body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery,
body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: var(--tekton-gallery-thumb-gap, 12px);
}

body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery .flex-viewport,
body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery .flex-viewport {
	flex: 1 1 auto;
	min-width: 0;
	order: 2;
}

body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery .flex-control-nav,
body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery .flex-control-nav {
	display: flex !important;
	flex-direction: column;
	flex: 0 0 72px;
	gap: 8px;
	width: 72px;
	margin: 0 !important;
	order: 1;
}

body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery .flex-control-nav {
	order: 3;
}

body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery .flex-control-nav li,
body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery .flex-control-nav li {
	width: 100% !important;
	margin: 0 !important;
}

body.tekton-single-product-gallery-vertical-stack .woocommerce-product-gallery .flex-viewport {
	margin-bottom: 1rem;
}

body.tekton-single-product-gallery-vertical-stack .woocommerce-product-gallery .flex-control-nav {
	display: flex !important;
	flex-direction: column;
	gap: 10px;
	position: static !important;
	margin: 0 !important;
}

body.tekton-single-product-gallery-vertical-stack .woocommerce-product-gallery .flex-control-nav li {
	width: 100% !important;
	margin: 0 !important;
}

body.tekton-single-product-gallery-single-hero .woocommerce-product-gallery .flex-control-nav,
body.tekton-single-product-gallery-hero-dots .woocommerce-product-gallery .flex-control-nav {
	display: flex !important;
	justify-content: center;
	gap: 8px;
	margin-top: 12px !important;
}

body.tekton-single-product-gallery-single-hero .woocommerce-product-gallery .flex-control-nav li img,
body.tekton-single-product-gallery-hero-dots .woocommerce-product-gallery .flex-control-nav li {
	width: auto !important;
}

body.tekton-single-product-gallery-hero-dots .woocommerce-product-gallery .flex-control-nav li img {
	width: 10px !important;
	height: 10px !important;
	border-radius: 50%;
	object-fit: cover;
	opacity: 0.45;
}

body.tekton-single-product-gallery-hero-dots .woocommerce-product-gallery .flex-control-nav li img.flex-active,
body.tekton-single-product-gallery-hero-dots .woocommerce-product-gallery .flex-control-nav .flex-active img {
	opacity: 1;
}

body.tekton-single-product-gallery-single-hero .woocommerce-product-gallery .flex-control-nav {
	display: none !important;
}

body.tekton-single-product-gallery-hero-wide .woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
body.tekton-single-product-gallery-hero-wide .woocommerce-product-gallery .flex-viewport {
	border-radius: 12px;
	overflow: hidden;
}

body.tekton-single-product-preset-showcase .woocommerce-product-gallery,
body.tekton-single-product-gallery-hero-wide .woocommerce-product-gallery {
	max-width: 100%;
}

@media (max-width: 959px) {
	body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery,
	body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery {
		flex-direction: column;
	}

	body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery .flex-control-nav,
	body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery .flex-control-nav {
		flex-direction: row;
		flex-wrap: wrap;
		width: 100%;
		order: 3;
	}

	body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery .flex-control-nav li,
	body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery .flex-control-nav li {
		width: calc(25% - 6px) !important;
	}
}

/* --- Rating styles --- */
body.tekton-single-product .tekton-product-rating-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
}

body.tekton-single-product-gallery-no-slider .woocommerce-product-gallery .flex-control-nav {
	display: none !important;
}

/* Sticky summary on stacked layout */
@media (min-width: 960px) {
	body.tekton-single-product-layout-stacked.tekton-single-product-summary-sticky .woocommerce div.product .summary {
		position: sticky;
		top: calc(var(--tekton-header-offset-desktop, 80px) + 24px);
	}
}

body.tekton-single-product .tekton-product-rating-wrap .star-rating {
	font-size: var(--tekton-rating-size, 1.1rem);
}

body.tekton-single-product-rating-prominent .tekton-product-rating-wrap .star-rating {
	font-size: var(--tekton-rating-size, 1.35rem);
}

body.tekton-single-product-rating-compact .tekton-product-rating-wrap {
	gap: 0.35rem 0.5rem;
}

body.tekton-single-product-rating-badge .tekton-rating-count,
body.tekton-single-product-rating-compact .tekton-rating-count {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	background: var(--tekton-woo-catalog-price-color, rgba(15, 23, 42, 0.08));
	color: var(--heading-color, #0f172a);
}

body.tekton-single-product-summary-title-rating-row .tekton-product-title-rating {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	width: 100%;
}

body.tekton-single-product-summary-title-rating-row .tekton-product-title-rating .product_title {
	flex: 1 1 220px;
}

body.tekton-single-product-summary-title-rating-row .tekton-product-title-rating .tekton-product-rating-wrap {
	flex: 0 0 auto;
}

body.tekton-single-product-summary-price-first .woocommerce div.product p.price,
body.tekton-single-product-summary-price-first .woocommerce div.product span.price {
	font-weight: 700;
}

body.tekton-single-product-summary-meta-compact .tekton-product-meta-compact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.25rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--border-color, #e2e8f0);
	font-size: 0.85rem;
}

/* --- Description layouts --- */
body.tekton-single-product .tekton-product-summary-description {
	font-size: 0.98rem;
	line-height: 1.65;
	color: var(--body-color, #334155);
	padding: 1rem 0;
	border-top: 1px solid var(--border-color, #e2e8f0);
}

body.tekton-single-product .tekton-product-description-wide {
	width: 100%;
	clear: both;
	margin: 2rem 0 2.5rem;
	padding: 2rem 0 0;
	border-top: 1px solid var(--border-color, #e2e8f0);
}

body.tekton-single-product .tekton-product-description-wide__title {
	font-size: 1.35rem;
	margin: 0 0 1rem;
	color: var(--heading-color, #0f172a);
}

body.tekton-single-product .tekton-product-description-wide__content {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--body-color, #334155);
	max-width: 72ch;
}

body.tekton-single-product-desc-split-columns .woocommerce-Tabs-panel--description,
body.tekton-single-product-desc-split-columns .woocommerce-tabs .panel.entry-content {
	column-count: 1;
}

@media (min-width: 768px) {
	body.tekton-single-product-desc-split-columns .woocommerce-Tabs-panel--description,
	body.tekton-single-product-desc-split-columns .woocommerce-tabs .panel.entry-content {
		column-count: 2;
		column-gap: 2.5rem;
	}
}

body.tekton-single-product-desc-inline-summary .woocommerce-product-details__short-description {
	font-size: 1.02rem;
	line-height: 1.65;
}

/* --- Tabs: pill style --- */
body.tekton-single-product-tabs-pills .woocommerce div.product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	border: none;
	padding: 0;
	margin-bottom: 1.25rem;
}

body.tekton-single-product-tabs-pills .woocommerce div.product .woocommerce-tabs ul.tabs::before,
body.tekton-single-product-tabs-pills .woocommerce div.product .woocommerce-tabs ul.tabs::after {
	display: none;
}

body.tekton-single-product-tabs-pills .woocommerce div.product .woocommerce-tabs ul.tabs li {
	border: none;
	background: transparent;
	margin: 0;
	padding: 0;
	border-radius: 999px;
}

body.tekton-single-product-tabs-pills .woocommerce div.product .woocommerce-tabs ul.tabs li a {
	display: inline-block;
	padding: 0.45rem 1rem;
	border-radius: 999px;
	background: var(--border-color, #f1f5f9);
	color: var(--heading-color, #0f172a);
	font-weight: 600;
	font-size: 0.9rem;
}

body.tekton-single-product-tabs-pills .woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
body.tekton-single-product-tabs-pills .woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
	background: var(--tekton-woo-catalog-price-color, #0f172a);
	color: #fff;
}

/* Preset polish */
body.tekton-single-product-preset-luxury .woocommerce div.product .product_title {
	letter-spacing: -0.02em;
}

body.tekton-single-product-preset-commerce .woocommerce div.product form.cart {
	margin-top: 0.25rem;
}

body.tekton-single-product-preset-minimal .woocommerce div.product .product_title {
	font-weight: 600;
}

/* Block-based product gallery (WooCommerce 8+) — layout variants */
body.tekton-single-product-gallery-vertical-stack .woocommerce-product-gallery__wrapper {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery__wrapper,
body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery__wrapper {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: var(--tekton-gallery-thumb-gap, 12px);
	align-items: start;
}

body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery__image:first-child,
body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery__image:first-child {
	grid-column: 2;
	grid-row: 1 / -1;
}

body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery__wrapper {
	grid-template-columns: minmax(0, 1fr) 72px;
}

body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery__image:first-child {
	grid-column: 1;
}

body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery__image:not(:first-child) {
	grid-column: 2;
}

body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery__image:not(:first-child) {
	grid-column: 1;
}

body.tekton-single-product-gallery-single-hero .woocommerce-product-gallery__image:not(:first-child),
body.tekton-single-product-gallery-no-slider .woocommerce-product-gallery__image:not(:first-child) {
	display: none !important;
}

body.tekton-single-product-gallery-hero-dots .woocommerce-product-gallery__wrapper {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

body.tekton-single-product-gallery-hero-dots .woocommerce-product-gallery__image:not(:first-child) {
	max-width: 56px;
	opacity: 0.55;
}

body.tekton-single-product-gallery-hero-dots .woocommerce-product-gallery__image:not(:first-child) img {
	border-radius: 50%;
	aspect-ratio: 1;
	object-fit: cover;
}

@media (max-width: 959px) {
	body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery__wrapper,
	body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery__wrapper {
		grid-template-columns: 1fr;
	}

	body.tekton-single-product-gallery-thumbs-left .woocommerce-product-gallery__image:first-child,
	body.tekton-single-product-gallery-thumbs-right .woocommerce-product-gallery__image:first-child {
		grid-column: 1;
		grid-row: auto;
	}
}

