
/**
 * TactNexa WooCommerce — Single Product
 *
 * Styles only for individual WooCommerce product pages.
 *
 * Parent theme: Blocksy
 *
 * Preserves:
 * - Product gallery and thumbnails
 * - Product variations
 * - Quantity controls
 * - Add to Cart functionality
 * - WooCommerce product tabs
 * - Related products
 *
 * No checkout or payment logic.
 */

/* =========================================================
   Design Tokens
   ========================================================= */

body.single-product {
	--tnx-product-navy: #031126;
	--tnx-product-navy-light: #061a36;
	--tnx-product-blue: #1677ff;
	--tnx-product-blue-hover: #075fd7;
	--tnx-product-cyan: #52d7ff;
	--tnx-product-muted: #60758c;
	--tnx-product-border: rgba(3, 17, 38, 0.10);
	--tnx-product-radius: 14px;
}


/* =========================================================
   Breadcrumbs
   ========================================================= */

body.single-product :is(
	.ct-breadcrumbs,
	.woocommerce-breadcrumb
) {
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.7;
	color: var(--tnx-product-muted);
}

body.single-product :is(
	.ct-breadcrumbs,
	.woocommerce-breadcrumb
) a {
	color: var(--tnx-product-blue-hover);
	text-decoration: none;
}

body.single-product :is(
	.ct-breadcrumbs,
	.woocommerce-breadcrumb
) a:hover {
	text-decoration: underline;
}


/* =========================================================
   Product Gallery
   ========================================================= */

body.single-product :is(
	.woocommerce-product-gallery,
	.ct-product-gallery-container
) {
	min-width: 0;
	border-radius: var(--tnx-product-radius);
}

/*
 * Style image containers without changing the gallery
 * dimensions or JavaScript-controlled positioning.
 */

body.single-product :is(
	.woocommerce-product-gallery__image,
	.ct-product-gallery-container .ct-image-container
) {
	overflow: hidden;

	border: 1px solid rgba(3, 17, 38, 0.045);
	border-radius: 12px;

	background-color: #ffffff;
}

body.single-product :is(
	.woocommerce-product-gallery,
	.ct-product-gallery-container
) img {
	max-width: 100%;
	height: auto;
}

/* =========================================================
   Gallery Thumbnails
   ========================================================= */

body.single-product :is(
	.flex-control-thumbs,
	.ct-product-gallery-thumbnails
) img {
	border-radius: 8px;

	transition:
		opacity 180ms ease,
		filter 180ms ease;
}

body.single-product :is(
	.flex-control-thumbs,
	.ct-product-gallery-thumbnails
) img:hover {
	filter: brightness(0.97);
}


/* =========================================================
   Product Summary
   ========================================================= */

body.single-product .entry-summary {
	min-width: 0;
	color: var(--tnx-product-navy-light);
}


/* =========================================================
   Product Title
   ========================================================= */

body.single-product :is(
	.entry-summary .product_title,
	.entry-summary .entry-title
) {
	margin-top: 0;

	font-size: clamp(1.65rem, 2.7vw, 2.45rem);
	font-weight: 800;
	line-height: 1.22;
	letter-spacing: -0.025em;

	color: var(--tnx-product-navy);

	overflow-wrap: anywhere;
}


/* =========================================================
   Product Price
   ========================================================= */

body.single-product .entry-summary .price {
	font-size: clamp(1.35rem, 2.1vw, 1.7rem);
	font-weight: 800;
	line-height: 1.4;

	color: var(--tnx-product-navy);
}

body.single-product .entry-summary .price .amount {
	font-weight: inherit;
}

body.single-product .entry-summary .price del {
	margin-right: 6px;

	font-size: 0.9rem;
	font-weight: 500;

	color: #64748b;
}

body.single-product .entry-summary .price ins {
	font-weight: 800;

	color: var(--tnx-product-blue-hover);
	text-decoration: none;
}


/* =========================================================
   Short Description
   ========================================================= */

body.single-product .woocommerce-product-details__short-description {
	font-size: 0.98rem;
	line-height: 1.8;

	color: #43566d;
}

body.single-product
.woocommerce-product-details__short-description p {
	margin-bottom: 16px;
}

body.single-product
.woocommerce-product-details__short-description li {
	margin-bottom: 6px;
}

body.single-product
.woocommerce-product-details__short-description li::marker {
	color: var(--tnx-product-blue);
}


/* =========================================================
   Variations
   ========================================================= */

body.single-product form.variations_form {
	width: 100%;
}

body.single-product table.variations {
	width: 100%;
}

body.single-product table.variations label {
	font-size: 0.9rem;
	font-weight: 700;

	color: var(--tnx-product-navy);
}

body.single-product table.variations select {
	width: 100%;
	min-height: 48px;

	border: 1px solid #d8e3f0;
	border-radius: 8px;

	background-color: #ffffff;

	font-size: 0.92rem;
	color: var(--tnx-product-navy-light);

	transition:
		border-color 160ms ease,
		box-shadow 160ms ease;
}

body.single-product table.variations select:focus-visible {
	outline: 3px solid rgba(82, 215, 255, 0.45);
	outline-offset: 2px;

	border-color: var(--tnx-product-blue);
}

body.single-product .reset_variations {
	font-size: 0.82rem;
	font-weight: 700;

	color: var(--tnx-product-blue-hover);
}


/* =========================================================
   Variation Information
   ========================================================= */

body.single-product .woocommerce-variation-description {
	font-size: 0.9rem;
	line-height: 1.7;

	color: var(--tnx-product-muted);
}

body.single-product .woocommerce-variation-price {
	margin-bottom: 14px;

	font-weight: 800;

	color: var(--tnx-product-navy);
}


/* =========================================================
   Quantity
   ========================================================= */

body.single-product form.cart .quantity {
	border-radius: 8px;
}

body.single-product form.cart .quantity input.qty {
	min-height: 46px;

	font-size: 0.92rem;
	font-weight: 700;

	color: var(--tnx-product-navy);
}

body.single-product form.cart .quantity button {
	color: var(--tnx-product-navy-light);
}

body.single-product form.cart .quantity button:hover {
	color: var(--tnx-product-blue-hover);
}


/* =========================================================
   Add to Cart Button
   ========================================================= */

body.single-product form.cart .single_add_to_cart_button {
	min-height: 48px;

	padding: 12px 26px;

	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;

	background: linear-gradient(
		135deg,
		#1677ff,
		#2f8cff
	);

	color: #ffffff;

	font-size: 0.94rem;
	font-weight: 800;
	line-height: 1.4;

	box-shadow: 0 8px 24px rgba(22, 119, 255, 0.20);

	transition:
		filter 160ms ease,
		box-shadow 160ms ease,
		transform 160ms ease;
}

body.single-product
form.cart .single_add_to_cart_button:not(:disabled):not(.disabled):hover {
	background: linear-gradient(
		135deg,
		#075fd7,
		#1677ff
	);

	color: #ffffff;

	filter: brightness(1.04);
	transform: translateY(-2px);

	box-shadow: 0 12px 30px rgba(22, 119, 255, 0.28);
}

body.single-product
form.cart .single_add_to_cart_button:focus-visible {
	outline: 3px solid var(--tnx-product-cyan);
	outline-offset: 3px;
}

body.single-product
form.cart .single_add_to_cart_button:is(:disabled, .disabled) {
	cursor: not-allowed;
	opacity: 0.6;
	box-shadow: none;
}


/* =========================================================
   Product Metadata
   ========================================================= */

body.single-product .product_meta {
	font-size: 0.8rem;
	line-height: 1.8;

	color: var(--tnx-product-muted);

	overflow-wrap: anywhere;
}

body.single-product .product_meta a {
	color: var(--tnx-product-blue-hover);
	text-decoration: none;
}

body.single-product .product_meta a:hover {
	text-decoration: underline;
}


/* =========================================================
   Product Tabs
   ========================================================= */

body.single-product .woocommerce-tabs {
	margin-top: 54px;
}

body.single-product .woocommerce-tabs ul.tabs {
	gap: 12px;

	border-bottom-color: var(--tnx-product-border);
}

body.single-product .woocommerce-tabs ul.tabs li a {
	font-size: 0.85rem;
	font-weight: 750;
	line-height: 1.5;

	color: var(--tnx-product-muted);

	transition: color 160ms ease;
}

body.single-product .woocommerce-tabs ul.tabs li.active a,
body.single-product .woocommerce-tabs ul.tabs li a:hover {
	color: var(--tnx-product-blue-hover);
}

body.single-product .woocommerce-tabs .woocommerce-Tabs-panel {
	padding-top: 26px;

	color: #43566d;

	font-size: 0.97rem;
	line-height: 1.8;
}

body.single-product .woocommerce-Tabs-panel h2 {
	margin-bottom: 18px;

	color: var(--tnx-product-navy);

	font-weight: 800;
	letter-spacing: -0.02em;
}

body.single-product .woocommerce-Tabs-panel li::marker {
	color: var(--tnx-product-blue);
}


/* =========================================================
   Additional Information Table
   ========================================================= */

body.single-product
.woocommerce-product-attributes th {
	font-weight: 700;
	color: var(--tnx-product-navy);
}

body.single-product
.woocommerce-product-attributes td {
	color: #43566d;
}


/* =========================================================
   Related Products
   ========================================================= */

body.single-product .related.products {
	margin-top: 56px;
}

body.single-product .related.products > h2 {
	margin-bottom: 28px;

	font-size: clamp(1.8rem, 3vw, 2.3rem);
	font-weight: 800;

	color: var(--tnx-product-navy);
}

body.single-product .related.products ul.products li.product {
	min-width: 0;

	border: 1px solid var(--tnx-product-border);
	border-radius: 14px;

	background: #ffffff;

	overflow: hidden;

	box-shadow:
		0 3px 8px rgba(3, 17, 38, 0.025),
		0 12px 30px rgba(3, 17, 38, 0.045);

	transition:
		transform 180ms ease,
		box-shadow 180ms ease;
}

body.single-product .related.products ul.products li.product:hover {
	transform: translateY(-3px);

	box-shadow:
		0 8px 18px rgba(3, 17, 38, 0.06),
		0 18px 40px rgba(3, 17, 38, 0.08);
}

body.single-product .related.products ul.products li.product img {
	max-width: 100%;
	height: auto;

	object-fit: contain;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1024px) {

	body.single-product :is(
		.entry-summary .product_title,
		.entry-summary .entry-title
	) {
		font-size: clamp(1.55rem, 3vw, 2rem);
	}

	body.single-product .woocommerce-tabs {
		margin-top: 42px;
	}

	body.single-product .related.products {
		margin-top: 44px;
	}
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767px) {

	body.single-product :is(
		.entry-summary .product_title,
		.entry-summary .entry-title
	) {
		font-size: clamp(1.5rem, 6vw, 1.9rem);
		line-height: 1.26;
	}

	body.single-product .entry-summary .price {
		font-size: 1.4rem;
	}

	body.single-product
	.woocommerce-product-details__short-description {
		font-size: 0.94rem;
		line-height: 1.75;
	}

	body.single-product .woocommerce-tabs {
		margin-top: 34px;
	}

	body.single-product .woocommerce-tabs .woocommerce-Tabs-panel {
		padding-top: 20px;
	}

	body.single-product .related.products {
		margin-top: 36px;
	}

	body.single-product .related.products > h2 {
		font-size: 1.65rem;
	}
}


/* =========================================================
   Small Mobile
   ========================================================= */

@media (max-width: 480px) {

	body.single-product form.cart .single_add_to_cart_button {
		min-height: 48px;
	}

	body.single-product .woocommerce-tabs ul.tabs {
		gap: 8px;
	}

	body.single-product .woocommerce-tabs ul.tabs li a {
		font-size: 0.78rem;
	}
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

	body.single-product :is(
		.single_add_to_cart_button,
		.related.products ul.products li.product,
		.woocommerce-tabs ul.tabs li a,
		table.variations select,
		.flex-control-thumbs img,
		.ct-product-gallery-thumbnails img
	) {
		transition: none;
	}

	body.single-product
	form.cart .single_add_to_cart_button:hover,
	body.single-product
	.related.products ul.products li.product:hover {
		transform: none;
	}
}
