/*
 Theme Name:   Hitek Child
 Description:  Hitek Child Theme
 Author:       XTemos
 Author URI:   https://xtemos.com
 Template:     xts-hitek
 Version:      1.0.0
 Text Domain:  xts-theme
 Tested up to: 6.9.1
 Requires PHP: 7.4
*/

/* Product description images: 2-column grid */
.hlfx-desc-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	align-items: start;
}
.hlfx-desc-gallery img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border-radius: 6px;
}
@media (max-width: 575px) {
	.hlfx-desc-gallery { grid-template-columns: 1fr; gap: 8px; }
}

/* Single product page: all text #F2F2F2 (matches home page). Prices, badges, stars, buttons and form fields keep their own colours. */
body.single-product .xts-site-content {
	color: #F2F2F2;
}
body.single-product .xts-site-content :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, th, td, label, legend, span, strong, em, b, small, div, a, nav, .title):not(.price):not(.price *):not(.amount):not(.amount *):not(del):not(del *):not(.button):not(.button *):not(button):not(button *):not(.onsale):not(.xts-product-label):not(.xts-product-label *):not(.star-rating):not(.star-rating *):not(.stock):not(select *):not(.select2 *):not(.vi-wpvs-variation-wrap-wrap *):not(.xts-popup *):not(.mejs-container *) {
	color: #F2F2F2;
}

/* Header: hide the empty white main row on desktop (it holds the menu/cart on phones, so it stays there). */
@media (min-width: 1025px) {
	.xts-header-row.xts-general-header { display: none; }
}

/* Product description: text box + images box */
.hlfx-desc-boxes { display: grid; gap: 24px; }
.hlfx-desc-box {
	background: #161616;
	border: 1px solid #2A2A2A;
	border-radius: 12px;
	padding: 28px;
}
.hlfx-desc-box__title {
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid #E10600;
	display: inline-block;
	font-size: 20px;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.hlfx-desc-box--text > *:last-child { margin-bottom: 0; }
.hlfx-desc-box--text ul { margin-left: 0; padding-left: 0; list-style: none; }
.hlfx-desc-box--text li { padding: 8px 0; border-bottom: 1px solid #2A2A2A; }
.hlfx-desc-box--text li:last-child { border-bottom: 0; }
.hlfx-desc-gallery--single { grid-template-columns: 1fr; }
@media (max-width: 575px) {
	.hlfx-desc-box { padding: 18px; }
}

/* Product top section (breadcrumbs, gallery, summary) in a box matching the description boxes */
body.single-product .xts-single-product > .row:first-child {
	margin: 0 0 40px;
	padding: 22px 13px 28px;
	background: #161616;
	border: 1px solid #2A2A2A;
	border-radius: 12px;
}
@media (max-width: 575px) {
	body.single-product .xts-single-product > .row:first-child { padding: 14px 3px 18px; margin-bottom: 28px; }
}

/* Product top box: wider on desktop (up to 1600px), centred, no sideways scroll */
@media (min-width: 1025px) {
	body.single-product .xts-single-product > .row:first-child {
		--hlfx-top-w: min(1600px, calc(100vw - 60px));
		width: var(--hlfx-top-w);
		max-width: none;
		margin-left: calc((100% - var(--hlfx-top-w)) / 2);
		margin-right: calc((100% - var(--hlfx-top-w)) / 2);
	}
}

/* Product gallery video slide */
.hlfx-video-slide .xts-col-inner { position: relative; aspect-ratio: 1 / 1; background: #000; border-radius: 6px; overflow: hidden; }
.hlfx-video-slide video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.hlfx-video-play {
	position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; padding: 0;
	border: 0; border-radius: 50%; background: #E10600; color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 0 0 10px rgba(225, 6, 0, .25), 0 8px 30px rgba(0, 0, 0, .5);
	transition: transform .15s ease, opacity .2s ease;
}
.hlfx-video-play:hover { transform: scale(1.06); background: #E10600; }
.hlfx-video-play svg { width: 40px; height: 40px; margin-left: 5px; }
.hlfx-video-slide.is-playing .hlfx-video-play { opacity: 0; pointer-events: none; }
.hlfx-video-active .xts-single-product-image-actions { display: none; }
.hlfx-video-thumb { position: relative; cursor: pointer; }
.hlfx-video-thumb img { display: block; width: 100%; height: auto; filter: brightness(.55); }
.hlfx-video-thumb-icon {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 38px; height: 38px; border-radius: 50%; background: #E10600; color: #fff;
	display: flex; align-items: center; justify-content: center;
}
.hlfx-video-thumb-icon svg { width: 20px; height: 20px; margin-left: 3px; }
.hlfx-video-thumb:not(:has(img)) { aspect-ratio: 1 / 1; background: #161616; }

/* Product gallery: 41px narrower (and shorter, images are square) on desktop */
@media (min-width: 1025px) {
	body.single-product .woocommerce-product-gallery { padding-right: 41px; }
}
