/**
 * Product View 2 — scoped overrides for the manual layout.
 * Base #product_page, #product_hero, and #related_products styles come from style.css.
 *
 * @package dreamtime
 */

/* ------------------------------------------------------------------
   Product gallery — .product-gallery
   ------------------------------------------------------------------ */

.page-template-product_view_2 #product_hero_l {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
}

.page-template-product_view_2 .product-gallery {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	gap: 14px;
	float: none;
}

/* Reset legacy fixed heights — equal ratio box on all products */
.page-template-product_view_2 #product_main_image.main-image {
	position: relative;
	width: 100%;
	height: auto !important;
	min-height: 0 !important;
	float: none;
	padding: 0;
	margin: 0;
	overflow: visible;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
}

.page-template-product_view_2 .zoom-container,
.page-template-product_view_2 .main-image__viewport {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 34px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
	line-height: 0;
	touch-action: none;
	cursor: zoom-in;
}

.page-template-product_view_2 .zoom-container.zoomed {
	cursor: grab;
}

.page-template-product_view_2 .zoom-container.is-grabbing {
	cursor: grabbing;
}

.page-template-product_view_2 .main-image__img,
.page-template-product_view_2 .fullscreen-viewer__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	float: none !important;
	object-fit: cover;
	object-position: center center;
	transform: translate3d(0, 0, 0) scale(1);
	transform-origin: center center;
	will-change: transform;
	-webkit-user-select: none;
	user-select: none;
	-webkit-user-drag: none;
	transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.page-template-product_view_2 .main-image__img.is-panning,
.page-template-product_view_2 .fullscreen-viewer__img.is-panning {
	transition: transform 0.08s linear, opacity 0.25s ease;
}

.page-template-product_view_2 .main-image__img.is-zoom-animating,
.page-template-product_view_2 .fullscreen-viewer__img.is-zoom-animating {
	transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.page-template-product_view_2 .main-image__img.is-fading {
	opacity: 0;
}

.page-template-product_view_2 .main-image__img.is-loading::after,
.page-template-product_view_2 .fullscreen-viewer__img.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(110deg, rgba(255, 255, 255, 0.05) 8%, rgba(255, 255, 255, 0.35) 18%, rgba(255, 255, 255, 0.05) 33%);
	background-size: 200% 100%;
	animation: pv2-gallery-shimmer 1.2s linear infinite;
	pointer-events: none;
}

@keyframes pv2-gallery-shimmer {
	to {
		background-position-x: -200%;
	}
}

.page-template-product_view_2 .main-image.zoomed .product-gallery__arrow,
.page-template-product_view_2 .main-image.zoomed .product-gallery__dots {
	opacity: 0;
	pointer-events: none;
}

.page-template-product_view_2 .product-gallery__zoom-btn {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 4;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #222;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease;
}

.page-template-product_view_2 .main-image:hover .product-gallery__zoom-btn,
.page-template-product_view_2 .main-image:focus-within .product-gallery__zoom-btn {
	opacity: 1;
}

.page-template-product_view_2 .product-gallery__zoom-btn:hover {
	background: #fff;
	transform: scale(1.05);
}

.page-template-product_view_2 .gallery-overlay {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(8, 12, 20, 0.88);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.32s ease, visibility 0.32s ease;
}

.page-template-product_view_2 .gallery-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.page-template-product_view_2 .gallery-overlay[hidden] {
	display: flex;
}

.page-template-product_view_2 .gallery-overlay__close {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.page-template-product_view_2 .gallery-overlay__close:hover {
	background: rgba(255, 255, 255, 0.24);
	transform: scale(1.04);
}

.page-template-product_view_2 .fullscreen-viewer {
	position: relative;
	width: min(960px, 100%);
	height: min(80vh, 860px);
}

.page-template-product_view_2 .fullscreen-viewer__stage {
	width: 100%;
	height: 100%;
	border-radius: 20px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
	background: #111;
}

.page-template-product_view_2 .pv2-gallery-scroll-lock,
html.pv2-gallery-scroll-lock,
body.pv2-gallery-scroll-lock {
	overflow: hidden !important;
}

.page-template-product_view_2 .product-gallery__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #222;
	font-size: 22px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease;
}

.page-template-product_view_2 .main-image:hover .product-gallery__arrow,
.page-template-product_view_2 .main-image:focus-within .product-gallery__arrow {
	opacity: 1;
}

.page-template-product_view_2 .product-gallery__arrow:hover {
	background: #fff;
	transform: translateY(-50%) scale(1.04);
}

.page-template-product_view_2 .product-gallery__arrow--prev {
	left: 14px;
}

.page-template-product_view_2 .product-gallery__arrow--next {
	right: 14px;
}

.page-template-product_view_2 .product-gallery__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	z-index: 3;
	display: flex;
	justify-content: center;
	gap: 7px;
	pointer-events: none;
}

.page-template-product_view_2 .product-gallery__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	pointer-events: auto;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
}

.page-template-product_view_2 .product-gallery__dot.is-active {
	background: #fff;
	transform: scale(1.2);
}

.page-template-product_view_2 .thumbnail-wrapper {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0 0 4px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
}

.page-template-product_view_2 .thumbnail {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	padding: 0;
	border: 2px solid #e8edf2;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
	cursor: pointer;
	scroll-snap-align: start;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.page-template-product_view_2 .thumbnail:hover {
	border-color: #c7a27c;
	transform: translateY(-1px);
}

.page-template-product_view_2 .thumbnail.is-active {
	border-color: #9b7b58;
	box-shadow: 0 4px 14px rgba(155, 123, 88, 0.22);
}

.page-template-product_view_2 .thumbnail__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	float: none;
	pointer-events: none;
}

.page-template-product_view_2 .product-gallery__data {
	display: none !important;
}

@media only screen and (max-width: 991px) {
	.page-template-product_view_2 #product_main_image.main-image {
		height: auto !important;
	}

	.page-template-product_view_2 .main-image__viewport,
	.page-template-product_view_2 .zoom-container {
		border-radius: 24px;
	}

	.page-template-product_view_2 .product-gallery__zoom-btn {
		opacity: 1;
		width: 36px;
		height: 36px;
		font-size: 15px;
	}

	.page-template-product_view_2 .product-gallery__arrow {
		opacity: 1;
		width: 38px;
		height: 38px;
		font-size: 20px;
	}

	.page-template-product_view_2 .thumbnail-wrapper {
		gap: 8px;
	}

	.page-template-product_view_2 .thumbnail {
		flex: 0 0 64px;
		width: 64px;
		height: 64px;
		border-radius: 10px;
	}
}

@media only screen and (max-width: 576px) {
	.page-template-product_view_2 .main-image__viewport,
	.page-template-product_view_2 .zoom-container {
		border-radius: 18px;
	}

	.page-template-product_view_2 .gallery-overlay {
		padding: 12px;
	}

	.page-template-product_view_2 .fullscreen-viewer {
		height: min(72vh, 640px);
	}

	.page-template-product_view_2 .fullscreen-viewer__stage {
		border-radius: 14px;
	}

	.page-template-product_view_2 .product-gallery__arrow--prev {
		left: 10px;
	}

	.page-template-product_view_2 .product-gallery__arrow--next {
		right: 10px;
	}

	.page-template-product_view_2 .thumbnail {
		flex: 0 0 58px;
		width: 58px;
		height: 58px;
	}
}

/* ------------------------------------------------------------------
   #product_video — separate media section
   ------------------------------------------------------------------ */

.page-template-product_view_2 #product_video.pv2-product-video {
	width: 100%;
	float: left;
	padding-top: 80px;
	padding-bottom: 80px;
	background: #fff;
}

.page-template-product_view_2 .pv2-product-video__frame {
	position: relative;
	width: 100%;
	max-width: 960px;
	margin: 0 auto;
	aspect-ratio: 16 / 9;
	border-radius: 24px;
	overflow: hidden;
	background: #0f172a;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.page-template-product_view_2 .pv2-product-video__iframe,
.page-template-product_view_2 .pv2-product-video__el {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	object-fit: cover;
}

/* ------------------------------------------------------------------
   #product_content — Gutenberg / the_content
   ------------------------------------------------------------------ */

.page-template-product_view_2 #product_content.pv2-product-content {
	width: 100%;
	float: left;
	padding-top: 100px;
	padding-bottom: 100px;
	background: #fff;
}

.page-template-product_view_2 .pv2-product-content__inner {
	width: 70%;
	margin-left: auto;
	margin-right: auto;
	float: none;
}

.page-template-product_view_2 .pv2-product-content__inner > :first-child {
	margin-top: 0;
}

.page-template-product_view_2 .pv2-product-content__inner p {
	font-size: var(--dt-body, 16px);
	line-height: var(--dt-line-body, 1.65);
	font-weight: 300;
	color: #666;
	margin-bottom: 28px;
}

.page-template-product_view_2 .pv2-product-content__inner h2,
.page-template-product_view_2 .pv2-product-content__inner h3 {
	color: #222;
	margin-bottom: 16px;
}

@media only screen and (max-width: 991px) {
	.page-template-product_view_2 #product_video.pv2-product-video {
		padding-top: 56px;
		padding-bottom: 56px;
	}

	.page-template-product_view_2 .pv2-product-video__frame {
		border-radius: 18px;
	}

	.page-template-product_view_2 #product_content.pv2-product-content {
		padding-top: 72px;
		padding-bottom: 72px;
	}

	.page-template-product_view_2 .pv2-product-content__inner {
		width: 88%;
	}
}

@media only screen and (max-width: 576px) {
	.page-template-product_view_2 .pv2-product-content__inner {
		width: 100%;
	}

	.page-template-product_view_2 .pv2-product-content__inner p {
		font-size: var(--dt-body, 16px);
		line-height: var(--dt-line-body, 1.65);
	}

	.page-template-product_view_2 .pv2-product-video__frame {
		border-radius: 14px;
	}
}

/* ------------------------------------------------------------------
   #product_features — simple highlights list (inside #product_hero_r)
   Overrides live .product_feature_item table/flex rows
   ------------------------------------------------------------------ */

.page-template-product_view_2 #product_hero_r #product_features.product_features,
.page-template-product_view_2 #product_hero_r .product_features {
	width: 100%;
	float: left;
	margin-bottom: 45px;
}

.page-template-product_view_2 #product_hero_r .product_feature_item {
	display: none;
}

/* Premium highlights list */
.page-template-product_view_2 .product_features__list {
	position: relative;
	width: 100%;
	float: left;
	margin: 0;
	padding: 6px 0 6px 30px;
	list-style: none;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

.page-template-product_view_2 .product_features__list::before {
	content: '';
	position: absolute;
	left: 9px;
	top: 14px;
	bottom: 14px;
	width: 2px;
	border-radius: 2px;
	background: linear-gradient(
		180deg,
		rgba(199, 162, 124, 0) 0%,
		rgba(199, 162, 124, 0.55) 18%,
		rgba(155, 123, 88, 0.75) 50%,
		rgba(199, 162, 124, 0.55) 82%,
		rgba(199, 162, 124, 0) 100%
	);
}

.page-template-product_view_2 .product_features__list li {
	position: relative;
	padding: 17px 12px 17px 38px;
	border-bottom: 1px solid rgba(232, 237, 242, 0.75);
	font-size: var(--dt-body, 16px);
	line-height: var(--dt-line-body, 1.62);
	font-weight: 400;
	letter-spacing: 0.015em;
	color: #5a5a5a;
	transition:
		color 0.3s ease,
		padding-left 0.3s ease,
		background-color 0.3s ease;
	animation: pv2FeatureFadeIn 0.55s ease backwards;
}

.page-template-product_view_2 .product_features__list li:nth-child(1) { animation-delay: 0.04s; }
.page-template-product_view_2 .product_features__list li:nth-child(2) { animation-delay: 0.1s; }
.page-template-product_view_2 .product_features__list li:nth-child(3) { animation-delay: 0.16s; }
.page-template-product_view_2 .product_features__list li:nth-child(4) { animation-delay: 0.22s; }
.page-template-product_view_2 .product_features__list li:nth-child(n+5) { animation-delay: 0.28s; }

.page-template-product_view_2 .product_features__list li:last-child {
	border-bottom: none;
	padding-bottom: 14px;
}

/* Check circle */
.page-template-product_view_2 .product_features__list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #ebe3d9;
	box-shadow: 0 2px 10px rgba(155, 123, 88, 0.08);
	transform: translateY(-50%);
	transition:
		border-color 0.3s ease,
		box-shadow 0.3s ease,
		transform 0.3s ease,
		background-color 0.3s ease;
}

/* Checkmark */
.page-template-product_view_2 .product_features__list li::after {
	content: '';
	position: absolute;
	left: 8px;
	top: 50%;
	width: 5px;
	height: 10px;
	margin-top: -1px;
	border: solid #9b7b58;
	border-width: 0 2px 2px 0;
	transform: translateY(-60%) rotate(45deg);
	opacity: 0.9;
	transition:
		opacity 0.3s ease,
		border-color 0.3s ease;
}

.page-template-product_view_2 .product_features__list li:hover {
	color: #1f1f1f;
	padding-left: 42px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 100%);
	border-radius: 0 12px 12px 0;
}

.page-template-product_view_2 .product_features__list li:hover::before {
	border-color: #c7a27c;
	background: #fffdf9;
	box-shadow: 0 4px 14px rgba(155, 123, 88, 0.14);
	transform: translateY(-50%) scale(1.08);
}

.page-template-product_view_2 .product_features__list li:hover::after {
	opacity: 1;
	border-color: #8a6b47;
}

@keyframes pv2FeatureFadeIn {
	from {
		opacity: 0;
		transform: translateX(-8px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ------------------------------------------------------------------
   #related_products — inside #product_page
   ------------------------------------------------------------------ */

.page-template-product_view_2 #product_page #related_products {
	float: left;
}

.page-template-product_view_2 #product_page .pv2-related-carousel .related_product_box {
	margin: 0 12px;
}

.page-template-product_view_2 #product_page .pv2-related-carousel.owl-carousel .owl-wrapper-outer {
	overflow: visible;
}

.page-template-product_view_2 #product_page .pv2-related-carousel.owl-carousel .owl-buttons {
	margin-top: 0;
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media only screen and (max-width: 991px) {
	.page-template-product_view_2 .product_features__list {
		padding-left: 26px;
	}

	.page-template-product_view_2 .product_features__list li {
		padding: 15px 10px 15px 34px;
	}

	.page-template-product_view_2 .product_features__list li::before {
		width: 22px;
		height: 22px;
	}

	.page-template-product_view_2 .product_features__list li::after {
		left: 7px;
		width: 4px;
		height: 9px;
	}
}

@media only screen and (max-width: 600px) {
	.page-template-product_view_2 #product_hero_r #product_features.product_features,
	.page-template-product_view_2 #product_hero_r .product_features {
		margin-bottom: 36px;
	}

	.page-template-product_view_2 .product_features__list {
		padding-left: 22px;
	}

	.page-template-product_view_2 .product_features__list::before {
		left: 7px;
	}

	.page-template-product_view_2 .product_features__list li {
		padding: 14px 8px 14px 32px;
		line-height: var(--dt-line-body, 1.6);
	}

	.page-template-product_view_2 .product_features__list li:hover {
		padding-left: 36px;
	}

	.page-template-product_view_2 .product_features__list li::before {
		width: 20px;
		height: 20px;
	}

	.page-template-product_view_2 .product_features__list li::after {
		left: 6px;
		height: 8px;
	}
}
