/**
 * Zenonik Custom Single Product Styles
 * Matches the provided desktop + mobile UI screenshots
 * + Gallery slider (arrows, swipe, autoplay)
 * + Related products hover image swap
 */

/* ========== RESET & BASE ========== */
.zenonik-single-product-wrapper {
	background: #f5f5f5;
	padding: 0;
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #1a1a1a;
}

.znk-container {
	max-width: 1448px;
	margin: 0 auto;
	padding: 0 20px;
}
p.stock.in-stock {
    display: none;
}
.woocommerce:where(body:not(.woocommerce-uses-block-theme)) .woocommerce-breadcrumb {
    display: none;
}
body:not([class*=elementor-page-]) .site-main {
        max-width: 100%!important;
    }
    .woocommerce div.product form.cart .button {
    background: #fff;
    color: #000;
}
.woocommerce div.product form.cart div.quantity {
    display: none !important;
}
/* Hide default WooCommerce elements we replace */
.zenonik-product .woocommerce-product-gallery,
.zenonik-product .summary.entry-summary,
.zenonik-product .woocommerce-tabs,
.zenonik-product .related.products,
.zenonik-product .upsells.products {
	display: none !important;
}

/* ========== MAIN PRODUCT SECTION ========== */
.znk-product-main {
	background: #f5f5f5;
	padding: 30px 0 40px;
}

.znk-product-main .znk-container {
	display: grid;
	grid-template-columns: 1fr 450px;
	gap: 24px;
	align-items: start;
}

/* ----- Gallery ----- */
.znk-gallery {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.znk-gallery-item {
	background: #e8e8e8;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	position: relative;
}

.znk-gallery-item img,
.znk-product-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	user-select: none;
	-webkit-user-drag: none;
}

.znk-placeholder {
	width: 100%;
	height: 100%;
	background: #ddd;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ========== RIGHT SIDE SLIDER ========== */
.znk-gallery-slider-wrap {
	position: relative;
}

.znk-slider {
	width: 100%;
	height: 100%;
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	touch-action: pan-y;
}

.znk-slider-track {
	display: flex;
	width: 100%;
	height: 100%;
	transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
	will-change: transform;
}

.znk-slide {
	min-width: 100%;
	width: 100%;
	height: 100%;
	flex-shrink: 0;
	position: relative;
}

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

/* Arrows */
.znk-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #111;
	z-index: 10;
	opacity: 0;
	transition: opacity 0.25s, background 0.2s, transform 0.2s;
	padding: 0;
}

.znk-gallery-slider-wrap:hover .znk-slider-arrow {
	opacity: 1;
}

.znk-slider-arrow:hover {
	background: #fff;
	transform: translateY(-50%) scale(1.08);
}

.znk-slider-arrow.znk-prev {
	left: 12px;
}

.znk-slider-arrow.znk-next {
	right: 12px;
}

.znk-slider-arrow svg {
	pointer-events: none;
}

/* Dots */
.znk-slider-dots {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 7px;
	z-index: 10;
}

.znk-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}

.znk-dot.active {
	background: #fff;
	transform: scale(1.25);
}

.znk-dot:hover {
	background: rgba(255, 255, 255, 0.85);
}

/* ----- Summary Card ----- */
.znk-summary {
	position: sticky;
	top: 100px;
}

.znk-summary-inner {
	background: #fff;
	border-radius: 16px;
	padding: 28px 24px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.znk-product-title {
	font-size: 1.35rem;
	font-weight: 600;
	margin: 0 0 8px;
	line-height: 1.3;
	color: #111;
}

.znk-price-wrap {
	font-size: 1.25rem;
	font-weight: 600;
	color: #111;
	margin-bottom: 16px;
}

.znk-price-wrap del {
	opacity: 0.5;
	font-size: 0.95em;
	margin-right: 6px;
}

.znk-price-wrap ins {
	text-decoration: none;
}

/* Size Guide link */
.znk-size-guide-link {
	text-align: right;
	margin-bottom: 12px;
}

.znk-size-guide-btn {
	display: inline-block;
	font-size: 0.8rem;
	color: #666;
	background: #f0f0f0;
	padding: 4px 12px;
	border-radius: 20px;
	text-decoration: none;
	transition: background 0.2s;
}

.znk-size-guide-btn:hover {
	background: #e0e0e0;
	color: #111;
}

/* ----- Variation / Size buttons ----- */
.znk-add-to-cart-wrap {
	margin-bottom: 24px;
}

.znk-add-to-cart-wrap .variations {
	margin-bottom: 16px;
}

.znk-add-to-cart-wrap .variations td,
.znk-add-to-cart-wrap .variations th {
	display: block;
	padding: 0;
	border: none;
}

.znk-add-to-cart-wrap .variations label {
	display: none;
}

.znk-add-to-cart-wrap .variations select {
	display: none;
}

.znk-add-to-cart-wrap .variable-items-wrapper,
.znk-add-to-cart-wrap .woo-variation-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.znk-add-to-cart-wrap .variable-item,
.znk-add-to-cart-wrap .button-variable-item {
	min-width: 48px;
	height: 40px;
	padding: 0 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: #fff;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.znk-add-to-cart-wrap .variable-item:hover,
.znk-add-to-cart-wrap .button-variable-item:hover {
	border-color: #111;
}

.znk-add-to-cart-wrap .variable-item.selected,
.znk-add-to-cart-wrap .button-variable-item.selected,
.znk-add-to-cart-wrap .variable-item.selected:hover {
	background: #111;
	color: #fff;
	border-color: #111;
}

.znk-add-to-cart-wrap .quantity {
	display: none;
}

.znk-add-to-cart-wrap .single_add_to_cart_button,
.znk-add-to-cart-wrap button.button {
	width: 100%;
	height: 48px;
	background: #f5f5f5;
	color: #111;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	text-transform: none;
	letter-spacing: 0;
}

.znk-add-to-cart-wrap .single_add_to_cart_button:hover,
.znk-add-to-cart-wrap button.button:hover {
	background: #111;
	color: #fff;
	border-color: #111;
}

/* ----- Tabs ----- */
.znk-tabs {
	border-top: 1px solid #eee;
	padding-top: 16px;
}

.znk-tab-nav {
	display: flex;
	gap: 4px;
	margin-bottom: 16px;
	border-bottom: 1px solid #eee;
	padding-bottom: 0;
}

.znk-tab-btn {
	background: none;
	border: none;
	padding: 10px 14px;
	font-size: 0.85rem;
	font-weight: 500;
	color: #888;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: all 0.2s;
	white-space: nowrap;
}

.znk-tab-btn:hover {
	color: #333;
}

.znk-tab-btn.active {
	color: #111;
	border-bottom-color: #111;
}

.znk-tab-panel {
	display: none;
	font-size: 0.9rem;
	line-height: 1.6;
	color: #555;
}

.znk-tab-panel.active {
	display: block;
}

.znk-description p {
	margin: 0 0 10px;
}

.znk-tab-panel table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.znk-tab-panel table th,
.znk-tab-panel table td {
	padding: 8px 0;
	border-bottom: 1px solid #eee;
	text-align: left;
}

.znk-tab-panel table th {
	font-weight: 500;
	color: #333;
	width: 40%;
}

/* ========== RELATED PRODUCTS ========== */
.znk-related {
	background: #fff;
	padding: 40px 0 60px;
	border-radius: 24px 24px 0 0;
	margin-top: -10px;
}

.znk-related-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 24px;
	color: #111;
}

.znk-related-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.znk-related-card {
	background: #f8f8f8;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	transition: box-shadow 0.2s;
}

.znk-related-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.znk-related-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.znk-related-img {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #eee;
	position: relative;
}

.znk-related-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.35s ease, transform 0.4s ease;
}

/* Hover image swap */
.znk-related-img-main {
	position: relative;
	z-index: 1;
}

.znk-related-img-hover {
	position: absolute;
	inset: 0;
	z-index: 2;
	opacity: 0;
}

.znk-related-card.has-hover-img:hover .znk-related-img-main {
	opacity: 0;
	transform: scale(1.05);
}

.znk-related-card.has-hover-img:hover .znk-related-img-hover {
	opacity: 1;
	transform: scale(1.05);
}

/* Fallback scale if no hover image */
.znk-related-card:not(.has-hover-img):hover .znk-related-img-main {
	transform: scale(1.05);
}

.znk-related-info {
	padding: 12px 14px 16px;
}

.znk-related-name {
	font-size: 0.85rem;
	font-weight: 500;
	margin: 0 0 4px;
	line-height: 1.3;
	color: #111;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.znk-related-price {
	font-size: 0.9rem;
	font-weight: 600;
	color: #111;
}

.znk-related-add {
	position: absolute;
	bottom: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #ddd;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	font-weight: 400;
	color: #111;
	text-decoration: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	transition: all 0.2s;
	line-height: 1;
	z-index: 5;
}

.znk-related-add:hover {
	background: #111;
	color: #fff;
	border-color: #111;
}

/* ========== SIZE GUIDE MODAL ========== */
.znk-size-guide-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 20px;
}

.znk-size-guide-modal[hidden] {
	display: none !important;
}

.znk-size-guide-content {
	background: #fff;
	border-radius: 16px;
	padding: 28px;
	max-width: 420px;
	width: 100%;
	position: relative;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.znk-close-size-guide {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 1.6rem;
	cursor: pointer;
	color: #666;
	line-height: 1;
}

.znk-size-guide-content h3 {
	margin: 0 0 16px;
	font-size: 1.2rem;
}

.znk-size-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.znk-size-table th,
.znk-size-table td {
	padding: 10px 8px;
	text-align: center;
	border-bottom: 1px solid #eee;
}

.znk-size-table th {
	font-weight: 600;
	background: #f8f8f8;
}

/* ========== RESPONSIVE: TABLET ========== */
@media (max-width: 1024px) {
	.znk-product-main .znk-container {
		grid-template-columns: 1fr 450px;
		gap: 20px;
	}

	.znk-related-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 900px) {
	.znk-product-main .znk-container {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.znk-summary {
		position: static;
	}

	.znk-gallery {
		grid-template-columns: 1fr 1fr;
	}

	/* Always show arrows on tablet/touch */
	.znk-slider-arrow {
		opacity: 0.85;
	}
}

/* ========== RESPONSIVE: MOBILE ========== */
@media (max-width: 640px) {
	.znk-product-main {
		padding: 16px 0 24px;
	}

	.znk-container {
		padding: 0 12px;
	}

	/* Stack images vertically on mobile */
	.znk-gallery {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.znk-gallery-item {
		border-radius: 10px;
		aspect-ratio: 3 / 3.6;
	}

	/* On mobile show arrows always */
	.znk-slider-arrow {
		opacity: 0.9;
		width: 36px;
		height: 36px;
	}

	.znk-slider-arrow.znk-prev {
		left: 10px;
	}

	.znk-slider-arrow.znk-next {
		right: 10px;
	}

	.znk-summary-inner {
		padding: 20px 16px;
		border-radius: 12px;
	}

	.znk-product-title {
		font-size: 1.2rem;
	}

	.znk-price-wrap {
		font-size: 1.15rem;
	}

	.znk-tab-nav {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.znk-tab-nav::-webkit-scrollbar {
		display: none;
	}

	.znk-tab-btn {
		padding: 10px 12px;
		font-size: 0.8rem;
	}

	.znk-related {
		padding: 28px 0 40px;
		border-radius: 16px 16px 0 0;
	}

	.znk-related-title {
		font-size: 1.1rem;
		margin-bottom: 16px;
	}

	.znk-related-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.znk-related-info {
		padding: 10px 10px 14px;
	}

	.znk-related-name {
		font-size: 0.8rem;
	}

	.znk-related-price {
		font-size: 0.85rem;
	}

	.znk-related-add {
		width: 28px;
		height: 28px;
		bottom: 10px;
		right: 10px;
		font-size: 1.1rem;
	}
}

@media (max-width: 380px) {
	.znk-related-grid {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}
}
