/*
Theme Name: Woodmart Child
Theme URI: https://eleforce.uk
Description: Child theme for Woodmart with custom product template
Author: Eleforce
Author URI: https://eleforce.uk
Template: woodmart
Version: 1.0.0
Text domain: woodmart-child
*/

/* =============================================
   CUSTOM PRODUCT TEMPLATE STYLES
   ============================================= */

.ef-custom-product-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Breadcrumb */
.ef-breadcrumb {
	margin-bottom: 20px;
	font-size: 13px;
	color: #777;
}

/* Main product grid: thumbnails | main image | details */
.ef-product-grid {
	display: grid;
	grid-template-columns: 80px 1fr 1fr;
	gap: 24px;
	align-items: start;
}

/* --- Thumbnails Column --- */
.ef-thumbnails {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 560px;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: #ccc transparent;
}

.ef-thumbnails::-webkit-scrollbar {
	width: 4px;
}

.ef-thumbnails::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 2px;
}

.ef-thumb {
	width: 72px;
	height: 72px;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	flex-shrink: 0;
	transition: border-color 0.2s ease;
}

.ef-thumb:hover,
.ef-thumb.active {
	border-color: #333;
}

.ef-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* --- Main Image Column --- */
.ef-main-image {
	position: relative;
	overflow: hidden;
	border-radius: 6px;
	background: #f8f8f8;
	cursor: zoom-in;
}

.ef-main-image img {
	width: 100%;
	height: auto;
	display: block;
	transition: opacity 0.3s ease;
}

.ef-main-image img.ef-fading {
	opacity: 0;
}

/* Sale badge */
.ef-sale-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #e74c3c;
	color: #fff;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	border-radius: 3px;
	z-index: 2;
	letter-spacing: 0.5px;
}

/* Zoom lens overlay */
.ef-zoom-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-repeat: no-repeat;
	opacity: 0;
	pointer-events: none;
	z-index: 1;
	transition: opacity 0.2s ease;
}

.ef-main-image:hover .ef-zoom-overlay {
	opacity: 1;
}

/* --- Product Details Column --- */
.ef-product-details {
	position: sticky;
	top: 100px;
	padding: 0 0 0 8px;
}

.ef-product-title {
	font-size: 28px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 12px;
	color: #1a1a1a;
}

.ef-product-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	font-size: 14px;
	color: #777;
}

.ef-product-rating .star-rating {
	font-size: 14px;
}

.ef-product-price {
	margin-bottom: 20px;
}

.ef-product-price .price {
	font-size: 26px;
	font-weight: 700;
	color: #1a1a1a;
}

.ef-product-price .price del {
	font-size: 18px;
	color: #999;
	font-weight: 400;
}

.ef-product-price .price ins {
	text-decoration: none;
	color: #e74c3c;
}

.ef-short-description {
	font-size: 15px;
	line-height: 1.7;
	color: #555;
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid #eee;
}

.ef-short-description p:last-child {
	margin-bottom: 0;
}

/* Add to cart area */
.ef-add-to-cart {
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid #eee;
}

.ef-add-to-cart .cart {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ef-add-to-cart .quantity {
	display: flex;
	align-items: center;
}

.ef-add-to-cart .quantity .qty {
	width: 60px;
	height: 48px;
	text-align: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
}

.ef-add-to-cart .single_add_to_cart_button {
	background: #333;
	color: #fff;
	border: none;
	padding: 0 32px;
	height: 48px;
	font-size: 15px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s ease;
	flex: 1;
}

.ef-add-to-cart .single_add_to_cart_button:hover {
	background: #000;
}

/* Variations */
.ef-add-to-cart .variations {
	margin-bottom: 16px;
	width: 100%;
}

.ef-add-to-cart .variations td {
	padding: 4px 0;
}

.ef-add-to-cart .variations select {
	width: 100%;
	height: 42px;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 0 12px;
}

/* Product meta */
.ef-product-meta {
	font-size: 14px;
	color: #777;
	line-height: 1.8;
}

.ef-product-meta span {
	display: block;
}

.ef-product-meta strong {
	color: #333;
	font-weight: 600;
}

.ef-product-meta a {
	color: #333;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ef-product-meta a:hover {
	color: #000;
}

/* --- Lightbox --- */
.ef-lightbox {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.92);
	z-index: 99999;
	justify-content: center;
	align-items: center;
	cursor: zoom-out;
}

.ef-lightbox.active {
	display: flex;
}

.ef-lightbox img {
	max-width: 90%;
	max-height: 90%;
	object-fit: contain;
	border-radius: 4px;
}

.ef-lightbox-close {
	position: absolute;
	top: 20px;
	right: 24px;
	color: #fff;
	font-size: 32px;
	cursor: pointer;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: opacity 0.2s ease;
}

.ef-lightbox-close:hover {
	opacity: 0.7;
}

.ef-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #fff;
	font-size: 36px;
	cursor: pointer;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease;
	user-select: none;
}

.ef-lightbox-nav:hover {
	opacity: 0.7;
}

.ef-lightbox-prev {
	left: 20px;
}

.ef-lightbox-next {
	right: 20px;
}

/* --- After Product Sections --- */
.ef-after-product {
	max-width: 1200px;
	margin: 40px auto;
	padding: 0 20px;
}

/* --- Responsive --- */
@media (max-width: 991px) {
	.ef-product-grid {
		grid-template-columns: 70px 1fr;
		gap: 16px;
	}

	.ef-product-details {
		grid-column: 1 / -1;
		position: static;
		padding: 0;
	}

	.ef-product-title {
		font-size: 24px;
	}

	.ef-product-price .price {
		font-size: 22px;
	}
}

@media (max-width: 576px) {
	.ef-product-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.ef-thumbnails {
		flex-direction: row;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 4px;
		order: 2;
	}

	.ef-thumb {
		width: 60px;
		height: 60px;
	}

	.ef-main-image {
		order: 1;
	}

	.ef-product-details {
		order: 3;
	}

	.ef-custom-product-wrap {
		padding: 12px;
	}

	.ef-product-title {
		font-size: 20px;
	}

	.ef-add-to-cart .cart {
		flex-wrap: wrap;
	}

	.ef-add-to-cart .single_add_to_cart_button {
		width: 100%;
	}
}
