/**
 * 3DOTECH Theme - Product Page Styles
 *
 * @package 3DOTECH
 */

/* ========================================
   Products Archive
   ======================================== */
.dotech-products-archive {
	padding: var(--dotech-spacing-lg) 0;
}

.dotech-products-archive__header {
	text-align: center;
	margin-bottom: var(--dotech-spacing-lg);
}

.dotech-products-archive__title {
	font-size: 2.5rem;
	margin-bottom: var(--dotech-spacing-sm);
}

.dotech-products-archive__description {
	max-width: 800px;
	margin: 0 auto;
	color: var(--dotech-text-light);
}

.dotech-products-archive__no-products {
	text-align: center;
	color: var(--dotech-text-light);
	padding: var(--dotech-spacing-lg) 0;
}

/* ========================================
   Single Product
   ======================================== */
.dotech-single-product {
	padding: var(--dotech-spacing-lg) 0;
}

.dotech-single-product__header {
	margin-bottom: var(--dotech-spacing-lg);
	text-align: center;
}

.dotech-single-product__title {
	font-size: 2.5rem;
	margin-bottom: var(--dotech-spacing-sm);
}

.dotech-single-product__categories {
	color: var(--dotech-text-light);
}

.dotech-single-product__categories a {
	color: var(--dotech-primary);
}

.dotech-single-product__content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--dotech-spacing-lg);
	margin-bottom: var(--dotech-spacing-lg);
}

/* Product Gallery */
.dotech-single-product__gallery {
	position: sticky;
	top: 100px;
	align-self: start;
}

.dotech-single-product__main-image {
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: var(--dotech-spacing-md);
	box-shadow: 0 4px 12px var(--dotech-shadow);
}

.dotech-single-product__main-image img {
	width: 100%;
	height: auto;
	display: block;
}

.dotech-single-product__thumbnails {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--dotech-spacing-sm);
}

.dotech-single-product__thumbnail {
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid transparent;
	transition: border-color 0.3s ease;
}

.dotech-single-product__thumbnail:hover,
.dotech-single-product__thumbnail.is-active {
	border-color: var(--dotech-primary);
}

.dotech-single-product__thumbnail img {
	width: 100%;
	height: auto;
	display: block;
}

/* Product Info */
.dotech-single-product__info {
	display: flex;
	flex-direction: column;
	gap: var(--dotech-spacing-md);
}

.dotech-single-product__description h2 {
	font-size: 1.75rem;
	margin-bottom: var(--dotech-spacing-sm);
}

.dotech-single-product__description p {
	color: var(--dotech-text-light);
	line-height: 1.8;
}

/* Specifications */
.dotech-single-product__specifications h2 {
	font-size: 1.75rem;
	margin-bottom: var(--dotech-spacing-sm);
}

.dotech-specs-list {
	display: grid;
	gap: var(--dotech-spacing-sm);
}

.dotech-specs-list__item {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: var(--dotech-spacing-sm);
	padding: var(--dotech-spacing-sm);
	background-color: var(--dotech-light-bg);
	border-radius: 4px;
}

.dotech-specs-list__label {
	font-weight: 600;
	color: var(--dotech-dark);
}

.dotech-specs-list__value {
	color: var(--dotech-text-light);
}

/* Product Action */
.dotech-single-product__action {
	margin-top: var(--dotech-spacing-md);
}

/* Related Products */
.dotech-single-product__related {
	margin-top: var(--dotech-spacing-xl);
	padding-top: var(--dotech-spacing-lg);
	border-top: 1px solid var(--dotech-border);
}

.dotech-single-product__related h2 {
	text-align: center;
	font-size: 2rem;
	margin-bottom: var(--dotech-spacing-lg);
}

/* ========================================
   Video Modal (for product videos)
   ======================================== */
.dotech-video-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.dotech-video-modal.is-active {
	opacity: 1;
	visibility: visible;
}

.dotech-video-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.9);
}

.dotech-video-modal__content {
	position: relative;
	width: 90%;
	max-width: 1000px;
	aspect-ratio: 16 / 9;
}

.dotech-video-modal__close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: white;
	font-size: 2rem;
	cursor: pointer;
	z-index: 1;
}

.dotech-video-modal__iframe {
	width: 100%;
	height: 100%;
	border: none;
}

/* ========================================
   Product Tabs (for additional info)
   ======================================== */
.dotech-product-tabs {
	margin-top: var(--dotech-spacing-lg);
}

.dotech-product-tabs__nav {
	display: flex;
	gap: var(--dotech-spacing-xs);
	border-bottom: 2px solid var(--dotech-border);
	margin-bottom: var(--dotech-spacing-md);
}

.dotech-product-tabs__tab {
	padding: var(--dotech-spacing-sm) var(--dotech-spacing-md);
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	cursor: pointer;
	font-weight: 500;
	color: var(--dotech-text-light);
	transition: all 0.3s ease;
}

.dotech-product-tabs__tab:hover {
	color: var(--dotech-primary);
}

.dotech-product-tabs__tab.is-active {
	color: var(--dotech-primary);
	border-bottom-color: var(--dotech-primary);
}

.dotech-product-tabs__panel {
	display: none;
}

.dotech-product-tabs__panel.is-active {
	display: block;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 1024px) {
	.dotech-single-product__content {
		grid-template-columns: 1fr;
	}

	.dotech-single-product__gallery {
		position: static;
	}
}

@media (max-width: 768px) {
	.dotech-products-archive__title,
	.dotech-single-product__title {
		font-size: 2rem;
	}

	.dotech-specs-list__item {
		grid-template-columns: 1fr;
		gap: var(--dotech-spacing-xs);
	}

	.dotech-single-product__thumbnails {
		grid-template-columns: repeat(3, 1fr);
	}

	.dotech-product-tabs__nav {
		flex-wrap: wrap;
	}
}

@media (max-width: 480px) {
	.dotech-single-product__thumbnails {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ========================================
   RTL Adjustments for Products
   ======================================== */
.rtl .dotech-specs-list__item {
	direction: rtl;
}

.rtl .dotech-product-tabs__nav {
	direction: rtl;
}

.rtl .dotech-video-modal__close {
	right: auto;
	left: 0;
}
