/**
 * Single Product Gallery — modern, clean, functional
 */

/* ─── Gallery wrapper ──────────────────────────────────── */
.rh-product-gallery-wrapper {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
}

/* ─── Main gallery container ───────────────────────────── */
.woocommerce-product-gallery {
	position: relative;
	background: #ffffff;
}

/* FlexSlider viewport — clips off-screen slides */
.woocommerce-product-gallery .flex-viewport {
	overflow: hidden !important;
	border-radius: 16px 16px 0 0;
	background: #ffffff;
}

/* ─── Image slide wrapper ──────────────────────────────── */
.woocommerce-product-gallery__wrapper {
	margin: 0;
	padding: 0;
}

.woocommerce-product-gallery__image {
	margin: 0;
	padding: 0;
}

.woocommerce-product-gallery__image img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #ffffff;
	display: block;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Zoom/lightbox trigger ──────────────────────────── */
.woocommerce-product-gallery__trigger {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 42px;
	height: 42px;
	background: rgba(255, 255, 255, 0.75);
	border-radius: 50%;
	display: flex !important;
	align-items: center;
	justify-content: center;
	z-index: 10;
	border: 1px solid rgba(255, 255, 255, 0.6);
	cursor: pointer;
	backdrop-filter: blur(12px) saturate(190%);
	-webkit-backdrop-filter: blur(12px) saturate(190%);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
	text-indent: -9999px;
	overflow: hidden;
	opacity: 0.85;
	/* Visible default so mobile users see it */
}

.woocommerce-product-gallery__trigger::after {
	font-family: "Phosphor-Thin" !important;
	content: "\e310";
	/* ph-magnifying-glass-plus */
	position: absolute;
	font-size: 20px;
	color: #0f172a;
	line-height: 1;
	text-indent: 0;
	display: block;
	speak: never;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.woocommerce-product-gallery__trigger:hover {
	background: #ffffff;
	transform: scale(1.08);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
	border-color: #ffffff;
	opacity: 1;
}

.woocommerce-product-gallery__trigger img {
	display: none !important;
}

/* ─── Sale badge ───────────────────────────────────────── */
.rh-product-gallery-wrapper .onsale {
	position: absolute;
	top: 1rem;
	left: 1rem;
	background: linear-gradient(135deg, #3454f0, #2c47cc);
	/* Using theme primary-color */
	color: #ffffff;
	padding: .35rem .9rem;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
	border-radius: 100px;
	z-index: 10;
	box-shadow: 0 4px 12px rgba(52, 84, 240, 0.25);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ─── Navigation arrows ──────────────────────────────── */
.flex-direction-nav {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	pointer-events: none;
	z-index: 5;
}

.flex-direction-nav li {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	padding: 0;
	list-style: none;
	pointer-events: auto;
}

.flex-direction-nav .flex-nav-prev {
	left: 1rem;
}

.flex-direction-nav .flex-nav-next {
	right: 1rem;
}

.flex-direction-nav a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.5);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
	backdrop-filter: blur(12px) saturate(190%);
	-webkit-backdrop-filter: blur(12px) saturate(190%);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	text-indent: -9999px;
	overflow: hidden;
	opacity: 0;
}

/* Sliding animation when parent is hovered */
.flex-direction-nav .flex-prev {
	transform: translateX(-8px);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.flex-direction-nav .flex-next {
	transform: translateX(8px);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rh-product-gallery-wrapper:hover .flex-direction-nav a {
	opacity: 1;
}

.rh-product-gallery-wrapper:hover .flex-direction-nav .flex-prev {
	transform: translateX(0);
}

.rh-product-gallery-wrapper:hover .flex-direction-nav .flex-next {
	transform: translateX(0);
}

.flex-direction-nav a:hover {
	background: #ffffff;
	transform: scale(1.08) !important;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
	border-color: #ffffff;
}

.flex-direction-nav .flex-prev::after,
.flex-direction-nav .flex-next::after {
	font-family: "Phosphor-Thin" !important;
	position: absolute;
	font-size: 22px;
	color: #0f172a;
	text-indent: 0;
	line-height: 1;
	display: block;
	speak: never;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.flex-direction-nav .flex-prev::after {
	content: "\e138";
	/* ph-caret-left */
}

.flex-direction-nav .flex-next::after {
	content: "\e13a";
	/* ph-caret-right */
}

/* ─── Thumbnails ───────────────────────────────────────── */
.woocommerce-product-gallery ol.flex-control-thumbs {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 0.75rem !important;
	margin: 0 !important;
	padding: 1rem !important;
	list-style: none !important;
	background: #ffffff !important;
	border-top: 1px solid rgba(226, 232, 240, 0.6) !important;
	position: relative !important;
	bottom: auto !important;
	left: auto !important;
	right: auto !important;
	width: 100% !important;
	float: none !important;
}

.woocommerce-product-gallery ol.flex-control-thumbs li {
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	border-radius: 10px !important;
	overflow: hidden !important;
	background: #ffffff !important;
	float: none !important;
	display: block !important;
}

.woocommerce-product-gallery ol.flex-control-thumbs li img {
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
	aspect-ratio: 1 / 1 !important;
	object-fit: cover !important;
	border-radius: 10px !important;
	cursor: pointer !important;
	opacity: .5 !important;
	border: 2px solid transparent !important;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
	display: block !important;
	background: #ffffff !important;
}

.woocommerce-product-gallery ol.flex-control-thumbs li img:hover {
	opacity: .9 !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
	border-color: #cbd5e1 !important;
}

.woocommerce-product-gallery ol.flex-control-thumbs li img.flex-active {
	opacity: 1 !important;
	border-color: var(--primary-color, #3454f0) !important;
	box-shadow: 0 4px 12px rgba(52, 84, 240, 0.15) !important;
	transform: translateY(-2px) !important;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
	.flex-direction-nav a {
		width: 38px;
		height: 38px;
		opacity: 1;
		transform: translateX(0) !important;
	}

	.woocommerce-product-gallery__trigger {
		opacity: 0.9;
		top: 0.75rem;
		right: 0.75rem;
		width: 38px;
		height: 38px;
	}

	.woocommerce-product-gallery__trigger::after {
		font-size: 18px;
	}

	.flex-direction-nav .flex-prev::after,
	.flex-direction-nav .flex-next::after {
		font-size: 18px;
	}

	.rh-product-gallery-wrapper {
		border-radius: 12px;
	}

	.woocommerce-product-gallery .flex-viewport {
		border-radius: 12px 12px 0 0;
	}
}

@media (max-width: 480px) {
	.woocommerce-product-gallery ol.flex-control-thumbs {
		gap: 0.5rem !important;
		padding: 0.75rem !important;
	}

	.woocommerce-product-gallery__image img {
		aspect-ratio: 4 / 3;
	}

	.woocommerce-product-gallery ol.flex-control-thumbs li {
		border-radius: 8px !important;
	}

	.woocommerce-product-gallery ol.flex-control-thumbs li img {
		border-radius: 8px !important;
	}
}

/* ============================================================
   Variation Form — select, price calculator, add-to-cart
   ============================================================ */

/* ─── Form container ──────────────────────────────────── */
body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary>form.cart.variations_form {
	background: #f8fafc;
	border: 1px solid #f1f5f9;
	border-radius: 12px;
	padding: 1.25rem;
	margin: 1.25rem 0;
}

/* ─── Variations table ────────────────────────────────── */
body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary>form.cart.variations_form table.variations {
	margin-bottom: 0;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary>form.cart.variations_form table.variations th.label {
	white-space: nowrap;
	padding-right: 1rem;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary>form.cart.variations_form table.variations td.value select {
	border-radius: 8px;
	padding: 0.55rem 2rem 0.55rem 0.75rem;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary>form.cart.variations_form .reset_variations {
	display: inline-block;
	margin-top: 0.5rem;
}

/* ─── Variation price display ─────────────────────────── */
body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary>form.cart.variations_form .single_variation_wrap {
	margin-top: 1rem;
}

/* ─── Price calculator table ──────────────────────────── */
body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator {
	width: 100%;
	margin: 1rem 0;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator td {
	padding: 0.65rem 1rem;
	border: none;
	vertical-align: middle;
	font-size: 0.875rem;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator td:first-child {
	color: #475569;
	font-weight: 500;
	width: 60%;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator td:last-child {
	text-align: right;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator tr.area-input {
	background: #f8fafc;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator tr.area-input td:first-child label {
	font-weight: 600;
	color: #1e293b;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator input#area_needed {
	width: 100%;
	max-width: 110px;
	padding: 0.45rem 0.65rem;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 0.875rem;
	color: #1e293b;
	text-align: right;
	transition: border-color .2s, box-shadow .2s;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator input#area_needed:focus {
	outline: none;
	border-color: #4d68ed;
	box-shadow: 0 0 0 3px rgba(14, 165, 233, .1);
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator tr.total-amount td:last-child {
	font-weight: 600;
	color: #334155;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary #price_calculator tr.calculated-price td:last-child .amount {
	font-size: 1.125rem;
	font-weight: 800;
	color: #4d68ed;
}

/* ─── Add-to-cart section ─────────────────────────────── */
body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #f1f5f9;
}

body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary .woocommerce-variation-add-to-cart .single_add_to_cart_button {
	flex: 1;
	min-width: 160px;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 480px) {
	body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary .woocommerce-variation-add-to-cart {
		flex-direction: column;
	}

	body>#site-content>.rh-single-product-page>.container>.rh-single-layout>main.rh-single-main>.rh-single-product>.rh-product-main>.rh-product-summary-wrapper>.summary .woocommerce-variation-add-to-cart .single_add_to_cart_button {
		width: 100%;
	}
}

/* ─── Quantity Input and Add to Cart Button Premium Styles ─── */
.woocommerce .quantity {
	display: inline-flex !important;
	align-items: center !important;
	height: 40px !important;
	border: 1px solid var(--border, #e4e6eb) !important;
	border-radius: 8px !important;
	overflow: hidden !important;
	background: #ffffff !important;
	box-sizing: border-box !important;
	padding: 0 !important;
	margin: 0 !important;
}

.woocommerce .quantity .qty_button {
	width: 38px !important;
	height: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	background: #f8fafc !important;
	color: #0f172a !important;
	font-size: 20px !important;
	font-weight: 300 !important;
	cursor: pointer !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: none !important;
	transition: background-color 0.2s ease !important;
	outline: none !important;
	line-height: 1 !important;
}

.woocommerce .quantity .qty_button:hover {
	background: #e2e8f0 !important;
}

.woocommerce .quantity .qty {
	width: 48px !important;
	height: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-left: 1px solid var(--border, #e4e6eb) !important;
	border-right: 1px solid var(--border, #e4e6eb) !important;
	background: #ffffff !important;
	color: #0f172a !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-align: center !important;
	box-shadow: none !important;
	-moz-appearance: textfield !important;
	outline: none !important;
	display: block !important;
}

/* Add to cart button brand blue colors */
.woocommerce .single_add_to_cart_button {
	height: 40px !important;
	padding: 0 2rem !important;
	background: var(--primary-color, #3454f0) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 8px !important;
	font-size: 0.9375rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em !important;
	cursor: pointer !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
	box-shadow: 0 4px 12px rgba(52, 84, 240, 0.15) !important;
	outline: none !important;
	line-height: 1 !important;
}

.woocommerce .single_add_to_cart_button:hover {
	background: var(--primary-hover, #2c47cc) !important;
	box-shadow: 0 6px 18px rgba(52, 84, 240, 0.25) !important;
	transform: translateY(-1px) !important;
}

.woocommerce .single_add_to_cart_button:active {
	transform: translateY(0) !important;
}