/**
 * Single Product Page Styles
 */

/* Single Product Main */
.product-main {
	padding: 2rem 1.5rem;
	max-width: 100rem;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

/* Product Breadcrumbs - Same as cart/checkout */
.product-breadcrumbs-wrapper {
	max-width: 100rem;
	margin: 0 auto 2rem;
	padding: 0 1.5rem;
	width: 100%;
	box-sizing: border-box;
}

.product-breadcrumbs {
	margin-bottom: 1rem;
}

.product-breadcrumbs .rank-math-breadcrumb {
	font-family: "Lato", sans-serif;
	font-size: 0.875rem;
	color: #6b5f52;
}

.product-breadcrumbs .rank-math-breadcrumb a {
	color: #6b5f52;
	text-decoration: none;
	transition: color 0.3s ease;
}

.product-breadcrumbs .rank-math-breadcrumb a:hover {
	color: #877d71;
}

.product-breadcrumbs .rank-math-breadcrumb .separator {
	margin: 0 0.5rem;
	color: #9a8f85;
}

.product-breadcrumbs .rank-math-breadcrumb .last {
	color: #2c2824;
	font-weight: 500;
}

.woocommerce-wrapper {
	max-width: 100rem;
	margin: 0 auto;
	padding: 0;
	width: 100%;
	box-sizing: border-box;
}

.product-container-wrapper {
	max-width: 100rem;
	margin: 0 auto;
	padding: 0;
	width: 100%;
	box-sizing: border-box;
}

/* Override ALL Kadence styles - remove any Kadence classes */
.kadence-woo-template-wrap,
.kadence-woo-template,
[class*="kadence"],
[class*="Kadence"],
[id*="kadence"],
[id*="Kadence"] {
	max-width: 100% !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Ensure product containers are properly constrained */
.product.type-product,
div[id^="product-"] {
	max-width: 100% !important;
	width: 100% !important;
}

/* Ensure all containers respect max-width */
.woocommerce .product-container-wrapper,
.woocommerce-wrapper .product-container-wrapper {
	max-width: 100rem !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

.product-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	margin-bottom: 4rem;
}

.product-gallery-wrapper {
	position: sticky;
	top: 2rem;
	height: fit-content;
}

.product-summary-wrapper {
	display: flex;
	flex-direction: column;
}

/* Product Gallery */
.woocommerce-product-gallery {
	position: relative;
	margin-bottom: 1rem;
	display: flex;
	flex-direction: row;
	gap: 1rem;
	align-items: flex-start;
}

/* Main Image Container */
.woocommerce-product-gallery__wrapper {
	margin: 0;
	padding: 0;
	list-style: none;
	flex: 1;
	position: relative;
}

.woocommerce-product-gallery__image {
	margin-bottom: 0;
	border-radius: 0.5rem;
	overflow: visible;
	position: relative;
	cursor: pointer;
}

.woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 0.5rem;
	transition: transform 0.3s ease;
}

.woocommerce-product-gallery__image:hover img {
	transform: scale(1.02);
}

/* Make gallery images clickable for lightbox */
.woocommerce-product-gallery__image {
	cursor: pointer;
}

.woocommerce-product-gallery__image:hover img {
	opacity: 0.9;
}

/* Omnibus Price Display */
.joga-omnibus-price {
	margin-block: 1rem;
	padding: 1rem;
	background: linear-gradient(135deg, #f8f7f5 0%, #ffffff 100%);
	border-radius: 0.5rem;
	border-left: 0.25rem solid #8B7355;
	box-shadow: 0 0.125rem 0.5rem rgba(135, 125, 113, 0.1);
}

.joga-omnibus-price p {
	display: flex;
	margin: 0;
	font-family: "Lato", sans-serif;
}

.joga-omnibus-price strong {
	color: #6b5f52;
	font-size: 0.875rem;
	font-weight: 600;
}

.joga-omnibus-price .price .woocommerce-Price-amount,
.joga-omnibus-price .woocommerce-Price-currencySymbol{
	font-size: 1.125rem !important;
	font-weight: 700;
	color: #2c2824;
	margin-left: 0.5rem;
}

.joga-omnibus-price .date {
display: none;
}

/* Thumbnails Container - Vertical Scroll */
.woocommerce-product-gallery__wrapper .flex-control-thumbs,
.woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-height: 32rem;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 0.5rem;
	margin: 0;
	list-style: none;
	width: 5rem;
	flex-shrink: 0;
}

/* Custom Scrollbar for Thumbnails */
.woocommerce-product-gallery__wrapper .flex-control-thumbs::-webkit-scrollbar,
.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar {
	width: 0.375rem;
}

.woocommerce-product-gallery__wrapper .flex-control-thumbs::-webkit-scrollbar-track,
.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar-track {
	background: #f8f7f5;
	border-radius: 0.25rem;
}

.woocommerce-product-gallery__wrapper .flex-control-thumbs::-webkit-scrollbar-thumb,
.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar-thumb {
	background: linear-gradient(135deg, #8B7355 0%, #6B5A47 100%);
	border-radius: 0.25rem;
	transition: background 0.3s ease;
}

.woocommerce-product-gallery__wrapper .flex-control-thumbs::-webkit-scrollbar-thumb:hover,
.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(135deg, #6B5A47 0%, #8B7355 100%);
}

/* Thumbnail Items */
.woocommerce-product-gallery .flex-control-thumbs li {
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	border-radius: 0.375rem;
	overflow: hidden;
	border: 0.125rem solid transparent;
	transition: all 0.3s ease;
	cursor: pointer;
}

.product-gallery-wrapper img.emoji{
	display: none !important;
}

.woocommerce-product-gallery .flex-control-thumbs li:hover {
	border-color: #8B7355;
	transform: scale(1.05);
}

.woocommerce-product-gallery .flex-control-thumbs li.flex-active {
	border-color: #8B7355;
	border-width: 0.1875rem;
	box-shadow: 0 0 0 0.125rem rgba(139, 115, 85, 0.2);
}

.woocommerce-product-gallery .flex-control-thumbs li img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 0.25rem;
	opacity: 0.7;
	transition: opacity 0.3s ease;
}

.woocommerce-product-gallery .flex-control-thumbs li:hover img,
.woocommerce-product-gallery .flex-control-thumbs li.flex-active img {
	opacity: 1;
}

/* Gallery Layout - Thumbnails Left, Main Image Right */
.woocommerce-product-gallery--with-images {
	display: flex;
	flex-direction: row;
	gap: 1rem;
	align-items: flex-start;
}

.woocommerce-product-gallery--with-images .woocommerce-product-gallery__wrapper {
	order: 2;
	flex: 1;
	min-width: 0;
}

.woocommerce-product-gallery--with-images .flex-control-thumbs {
	order: 1;
	width: 5rem;
	flex-shrink: 0;
	position: relative;
}

/* Ensure thumbnails are always on the left */
.woocommerce-product-gallery {
	display: flex;
	flex-direction: row;
	gap: 1rem;
	align-items: flex-start;
}

.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
	order: 2 !important;
	flex: 1;
	min-width: 0;
}

/* Product Thumbnails Slider */
.product-thumbnails-slider {
	order: 1 !important;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 6.5rem;
	flex-shrink: 0;
	position: relative;
}

.thumbnails-container {
	position: relative;
	width: 100%;
	overflow: hidden;
	height: 19.5rem; /* 3 thumbnails * ~6.5rem each */
}

.thumbnails-container .flex-control-thumbs {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	width: 100%;
}

.thumbnails-container .flex-control-thumbs li {
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	border-radius: 0.5rem;
	overflow: hidden;
	border: 0.125rem solid transparent;
	transition: all 0.3s ease;
	cursor: pointer;
	flex-shrink: 0;
	height: 6.5rem;
}

.thumbnails-container .flex-control-thumbs li a {
	display: block;
	width: 100%;
	height: 100%;
	position: relative;
}

.thumbnails-container .flex-control-thumbs li img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0.25rem;
	opacity: 0.7;
	transition: opacity 0.3s ease;
}

.thumbnails-container .flex-control-thumbs li:hover {
	border-color: #8B7355;
	transform: scale(1.05);
}

.thumbnails-container .flex-control-thumbs li:hover img,
.thumbnails-container .flex-control-thumbs li.flex-active img {
	opacity: 1;
}

.thumbnails-container .flex-control-thumbs li.flex-active {
	border-color: #8B7355;
	border-width: 0.1875rem;
	box-shadow: 0 0 0 0.125rem rgba(139, 115, 85, 0.2);
}

/* Navigation Arrows */
.thumbnails-nav {
	width: 2rem;
	height: 2rem;
	border: none;
	background: linear-gradient(135deg, #8B7355 0%, #6B5A47 100%);
	color: #ffffff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 0.125rem 0.5rem rgba(139, 115, 85, 0.3);
	flex-shrink: 0;
	z-index: 10;
}

.thumbnails-nav:hover {
	background: linear-gradient(135deg, #6B5A47 0%, #8B7355 100%);
	transform: scale(1.1);
	box-shadow: 0 0.25rem 0.75rem rgba(139, 115, 85, 0.4);
}

.thumbnails-nav:active {
	transform: scale(0.95);
}

.thumbnails-nav:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
}

.thumbnails-nav i {
	font-size: 0.875rem;
}



/* Hide arrows when not needed */
.product-thumbnails-slider:has(.flex-control-thumbs[data-thumbnails-count="3"]) .thumbnails-nav,
.product-thumbnails-slider:has(.flex-control-thumbs[data-thumbnails-count="2"]) .thumbnails-nav,
.product-thumbnails-slider:has(.flex-control-thumbs[data-thumbnails-count="1"]) .thumbnails-nav {
	display: none;
}

/* Fallback for browsers without :has() support */
.product-thumbnails-slider.no-many-thumbnails .thumbnails-nav {
	display: none;
}

/* Product Summary */
.summary.entry-summary {
	display: flex;
	flex-direction: column;
	position: sticky;
	top:  100px;
}

/* Product Title */
.product_title {
	font-size: 2.5rem;
	font-weight: 700;
	margin: 0 0 1rem 0;
	color: #2c2824;
	line-height: 1.2;
}

/* Product Rating */
.woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.star-rating {
	color: #fbbf24;
	font-size: 1.125rem;
}

.woocommerce-review-link {
	color: #666666;
	font-size: 0.875rem;
	text-decoration: none;
}

.woocommerce-review-link:hover {
	color: #877d71;
}

/* Product Price */
.woocommerce-Price-amount {
	font-size: 2.5rem;
	font-weight: 700;
	color: #2c2824;
	line-height: 1.2;
}

.woocommerce-Price-currencySymbol {
	font-size: 1.75rem;
	font-weight: 600;
	margin-left: 0.125rem;
}

/* Regular Price */
.price .woocommerce-Price-amount {
	color: #2c2824;
}

/* Sale Price - Strikethrough */
.price del {
	font-size: 1.5rem;
	font-weight: 400;
	color: #999999;
	text-decoration: line-through;
	margin-right: 0.75rem;
	opacity: 0.7;
}

.price del .woocommerce-Price-amount {
	font-size: 1.5rem;
	font-weight: 400;
	color: #999999;
}

.price del .woocommerce-Price-currencySymbol {
	font-size: 1.25rem;
}

/* Sale Price - Current */
.price ins {
	text-decoration: none;
	display: inline-block;
}

.price ins .woocommerce-Price-amount {
	font-size: 2.5rem;
	font-weight: 700;
	color: #8B7355;
	background: linear-gradient(135deg, #8B7355 0%, #6B5A47 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.price ins .woocommerce-Price-currencySymbol {
	font-size: 1.75rem;
	font-weight: 600;
	color: #8B7355;
	-webkit-text-fill-color: #8B7355;
}

/* Price Badge for Sale */
.price .sale-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.375rem 0.75rem;
	background: linear-gradient(135deg, #8B7355 0%, #6B5A47 100%);
	color: #ffffff;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-left: 0.5rem;
	box-shadow: 0 0.125rem 0.375rem rgba(139, 115, 85, 0.3);
}

/* Variable Product Price Range */
.price .price-range {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.price .price-range .from {
	font-size: 1rem;
	font-weight: 400;
	color: #666666;
	text-transform: lowercase;
}

.price .price-range .to {
	font-size: 1rem;
	font-weight: 400;
	color: #666666;
	text-transform: lowercase;
}

/* Product Excerpt */
.woocommerce-product-details__short-description {
	font-size: 1.125rem;
	line-height: 1.8;
	color: #666666;
	margin-bottom: 1rem;
}

.woocommerce-product-details__short-description p {
	margin: 0 0 1rem 0;
}

.woocommerce-product-details__short-description p:last-child {
	margin-bottom: 0;
}

/* Add to Cart Form */
.woocommerce div.product form.cart {
	padding: 2rem;
	background: #f8f7f5;
	border-radius: 0.5rem;
}

.woocommerce div.product form.cart .variations {
	margin-bottom: 1.5rem;
}

.woocommerce div.product form.cart .variations tr {
	display: flex;
	flex-direction: column;
	margin-bottom: 1rem;
}

.woocommerce div.product form.cart .variations td {
	padding: 0;
}

.woocommerce div.product form.cart .variations label {
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: #2c2824;
	display: block;
}

.woocommerce div.product form.cart .variations select {
	width: 100%;
	padding: 0.75rem;
	border: 0.125rem solid #e0ddd9;
	border-radius: 0.375rem;
	background: #ffffff;
	color: #2c2824;
	font-size: 1rem;
	cursor: pointer;
}

.woocommerce div.product form.cart .variations select:focus {
	outline: none;
	border-color: #877d71;
}

/* Quantity and Add to Cart Container */
.woocommerce div.product form.cart {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.woocommerce div.product form.cart .quantity-wrapper {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.woocommerce div.product form.cart .quantity {
	margin-bottom: 0;
	display: flex;
	align-items: center;
	border: 0.125rem solid #e0ddd9;
	border-radius: 0.375rem;
	overflow: hidden;
	background: #ffffff;
}

.woocommerce div.product form.cart .quantity .qty-minus,
.woocommerce div.product form.cart .quantity .qty-plus {
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: none;
	background: #f8f7f5;
	color: #2c2824;
	font-size: 1.25rem;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	user-select: none;
	-webkit-user-select: none;
}

.woocommerce div.product form.cart .quantity .qty-minus:hover,
.woocommerce div.product form.cart .quantity .qty-plus:hover {
	background: #e0ddd9;
	color: #877d71;
}

.woocommerce div.product form.cart .quantity .qty-minus:active,
.woocommerce div.product form.cart .quantity .qty-plus:active {
	background: #d0cdc9;
}

.woocommerce div.product form.cart .quantity .qty-minus:disabled,
.woocommerce div.product form.cart .quantity .qty-plus:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.woocommerce div.product form.cart .quantity .qty-minus:disabled:hover,
.woocommerce div.product form.cart .quantity .qty-plus:disabled:hover {
	background: #f8f7f5;
	color: #2c2824;
}

.sku_wrapper{
	display: flex !important;
	gap: 10px;
}

.woocommerce div.product form.cart .quantity .qty {
	width:calc(100% - 5rem);
	padding: 0.75rem 0.5rem;
	border: none;
	border-left: 0.125rem solid #e0ddd9;
	border-right: 0.125rem solid #e0ddd9;
	border-radius: 0;
	text-align: center;
	font-size: 1rem;
	background: #ffffff;
	-moz-appearance: textfield;
}

.woocommerce div.product form.cart .quantity .qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.woocommerce div.product form.cart .quantity .qty:focus {
	outline: none;
	border-color: #877d71;
}

.woocommerce div.product form.cart .single_add_to_cart_button {
	padding: 0.75rem 2rem;
	background: #877d71;
	color: #ffffff;
	border: none;
	border-radius: 0.375rem;
	font-size: 1.125rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	flex: 1;
	min-width: 0;
}

/* Desktop: quantity and button side by side */
@media (min-width: 768px) {
	.woocommerce div.product form.cart {
		flex-direction: row;
		align-items: center;
		gap: 1rem;
	}

	.woocommerce div.product form.cart .quantity-wrapper {
		flex-shrink: 0;
	}

	.woocommerce div.product form.cart .single_add_to_cart_button {
		flex: 1;
		min-width: 12rem;
	}
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
	background: #6b6359;
	transform: translateY(-0.125rem);
}

.woocommerce div.product form.cart .single_add_to_cart_button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Product Meta */
.product_meta {
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 0.0625rem solid #e0ddd9;
	font-size: 0.875rem;
	color: #666666;
}

.product_meta span {
	display: block;
	margin-bottom: 0.75rem;
}

.product_meta span:last-child {
	margin-bottom: 0;
}

.product_meta .sku {
	font-weight: 600;
}

.product_meta a {
	color: #877d71;
	text-decoration: none;
}

.product_meta a:hover {
	text-decoration: underline;
}

/* Product Tabs */
.woocommerce-tabs {
	margin-top: 4rem;
}

.woocommerce-tabs ul.tabs {
	list-style: none;
	margin: 0 0 2rem 0;
	padding: 0;
	display: flex;
	border-bottom: 0.125rem solid #e0ddd9;
	gap: 2rem;
}

.woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
}

.woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 1rem 0;
	color: #666666;
	text-decoration: none;
	font-weight: 600;
	border-bottom: 0.125rem solid transparent;
	transition: all 0.3s ease;
	margin-bottom: -0.125rem;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
	color: #877d71;
	border-bottom-color: #877d71;
}

.woocommerce-tabs .panel {
	padding: 2rem 0;
	color: #666666;
	line-height: 1.8;
}

.woocommerce-tabs .panel h2 {
	display: none; /* Hide duplicate heading since tab title already shows it */
}

.woocommerce-tabs .panel h2:first-child {
	display: none; /* Hide first h2 in description tab */
}

.woocommerce-tabs .panel p {
	margin-bottom: 1rem;
}

.woocommerce-tabs .panel table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
}

.woocommerce-tabs .panel table th,
.woocommerce-tabs .panel table td {
	padding: 0.75rem;
	border: 0.0625rem solid #e0ddd9;
	text-align: left;
}

.woocommerce-tabs .panel table th {
	background: #f8f7f5;
	font-weight: 600;
	color: #2c2824;
}

/* Related Products */
.woocommerce .related {
	margin-top: 4rem;
	padding-top: 4rem;
	border-top: 0.125rem solid #e0ddd9;
	max-width: 100rem;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.woocommerce .related h2 {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 2rem;
	font-weight: 400;
	margin-bottom: 2rem;
	color: #2c2824;
	text-align: center;
}

/* Related Products Grid */
.woocommerce .related ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 1024px) {
	.woocommerce .related ul.products {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.5rem;
	}
}

/* Related Products Slider on Mobile */
@media (max-width: 768px) {
	.woocommerce .related {
		position: relative;
		padding-left: 0;
		padding-right: 0;
	}

	.woocommerce .related ul.products {
		display: flex;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		scrollbar-color: #8B7355 #f8f7f5;
		gap: 1.5rem;
		padding: 0 1.5rem 1rem;
		margin: 0 -1.5rem;
	}

	.woocommerce .related ul.products::-webkit-scrollbar {
		height: 0.375rem;
	}

	.woocommerce .related ul.products::-webkit-scrollbar-track {
		background: #f8f7f5;
		border-radius: 0.25rem;
		margin: 0 1.5rem;
	}

	.woocommerce .related ul.products::-webkit-scrollbar-thumb {
		background: linear-gradient(135deg, #8B7355 0%, #6B5A47 100%);
		border-radius: 0.25rem;
	}

	.woocommerce .related ul.products li.product {
		flex: 0 0 100%;
		max-width: 100%;
		scroll-snap-align: start;
		min-width: 0;
	}
}

.woocommerce .related ul.products li.product {
	margin: 0;
	padding: 0;
	background: #ffffff;
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 0.25rem 1.25rem rgba(135, 125, 113, 0.1);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.woocommerce .related ul.products li.product:hover {
	transform: translateY(-0.25rem);
	box-shadow: 0 0.5rem 1.875rem rgba(135, 125, 113, 0.2);
}

.woocommerce .related ul.products li.product img {
	width: 100%;
	height: auto;
	display: block;
}

.woocommerce .related ul.products li.product .woocommerce-loop-product__title {
	font-family: "Lato", sans-serif;
	font-size: 1.125rem;
	font-weight: 600;
	margin: 1rem 1rem 0.5rem;
	color: #2c2824;
	flex-grow: 0;
	line-height: 1.4;
}

.woocommerce .related ul.products li.product .woocommerce-loop-product__link {
	flex-grow: 0;
	text-decoration: none;
}

.woocommerce .related ul.products li.product .price {
	font-family: "Lato", sans-serif;
	font-size: 1.25rem;
	font-weight: 600;
	color: #8B7355;
	margin: 0.5rem 1rem 1rem;
	flex-grow: 0;
}

.woocommerce .related ul.products li.product .button,
.woocommerce .related ul.products li.product a.button {
	font-family: "Lato", sans-serif;
	font-size: 1rem;
	font-weight: 600;
	padding: 0.75rem 1.5rem;
	margin: 0 1rem 1rem;
	border-radius: 0.375rem;
	text-align: center;
	text-decoration: none;
	transition: all 0.3s ease;
	display: inline-block;
	border: none;
	cursor: pointer;
	flex-grow: 0;
}

.woocommerce .related ul.products li.product .button:first-of-type,
.woocommerce .related ul.products li.product a.button:first-of-type {
	background: #8B7355;
	color: #ffffff;
	margin-top: auto;
}

.woocommerce .related ul.products li.product .button:first-of-type:hover,
.woocommerce .related ul.products li.product a.button:first-of-type:hover {
	background: #6B5A47;
	transform: translateY(-0.0625rem);
	box-shadow: 0 0.25rem 0.75rem rgba(135, 125, 113, 0.2);
}

.woocommerce .related ul.products li.product .button:last-child,
.woocommerce .related ul.products li.product a.button:last-child,
.woocommerce .related ul.products li.product .added_to_cart {
	background: #f8f7f5;
	color: #8B7355;
	border: 0.125rem solid #8B7355;
	margin-top: 0.5rem;
}

.woocommerce .related ul.products li.product .button:last-child:hover,
.woocommerce .related ul.products li.product a.button:last-child:hover {
	background: #8B7355;
	color: #ffffff;
}

/* Upsell Products */
.woocommerce .upsells {
	margin-top: 4rem;
	padding-top: 4rem;
	border-top: 0.125rem solid #e0ddd9;
	max-width: 100rem;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.woocommerce .upsells h2 {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 2rem;
	font-weight: 400;
	margin-bottom: 2rem;
	color: #2c2824;
	text-align: center;
}

/* Upsell Products Grid */
.woocommerce .upsells ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce .upsells ul.products li.product {
	margin: 0;
	padding: 0;
	background: #ffffff;
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 0.25rem 1.25rem rgba(135, 125, 113, 0.1);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.woocommerce .upsells ul.products li.product:hover {
	transform: translateY(-0.25rem);
	box-shadow: 0 0.5rem 1.875rem rgba(135, 125, 113, 0.2);
}

.woocommerce .upsells ul.products li.product img {
	width: 100%;
	height: auto;
	display: block;
}

.woocommerce .upsells ul.products li.product .woocommerce-loop-product__title {
	font-family: "Lato", sans-serif;
	font-size: 1.125rem;
	font-weight: 600;
	margin: 1rem 1rem 0.5rem;
	color: #2c2824;
	flex-grow: 0;
	line-height: 1.4;
}

.woocommerce .upsells ul.products li.product .woocommerce-loop-product__link {
	flex-grow: 0;
	text-decoration: none;
}

.woocommerce .upsells ul.products li.product .price {
	font-family: "Lato", sans-serif;
	font-size: 1.25rem;
	font-weight: 600;
	color: #8B7355;
	margin: 0.5rem 1rem 1rem;
	flex-grow: 0;
}

.woocommerce .upsells ul.products li.product .button,
.woocommerce .upsells ul.products li.product a.button {
	font-family: "Lato", sans-serif;
	font-size: 1rem;
	font-weight: 600;
	padding: 0.75rem 1.5rem;
	margin: 0 1rem 1rem;
	border-radius: 0.375rem;
	text-align: center;
	text-decoration: none;
	transition: all 0.3s ease;
	display: inline-block;
	border: none;
	cursor: pointer;
	flex-grow: 0;
}

.woocommerce .upsells ul.products li.product .button:first-of-type,
.woocommerce .upsells ul.products li.product a.button:first-of-type {
	background: #8B7355;
	color: #ffffff;
	margin-top: auto;
}

.woocommerce .upsells ul.products li.product .button:first-of-type:hover,
.woocommerce .upsells ul.products li.product a.button:first-of-type:hover {
	background: #6B5A47;
	transform: translateY(-0.0625rem);
	box-shadow: 0 0.25rem 0.75rem rgba(135, 125, 113, 0.2);
}

.woocommerce .upsells ul.products li.product .button:last-child,
.woocommerce .upsells ul.products li.product a.button:last-child,
.woocommerce .upsells ul.products li.product .added_to_cart {
	background: #f8f7f5;
	color: #8B7355;
	border: 0.125rem solid #8B7355;
	margin-top: 0.5rem;
}

.woocommerce .upsells ul.products li.product .button:last-child:hover,
.woocommerce .upsells ul.products li.product a.button:last-child:hover {
	background: #8B7355;
	color: #ffffff;
}

/* Sale Badge */
.woocommerce span.onsale {
	position: absolute;
	top: 1rem;
	right: 1rem;
	left: auto;
	background: linear-gradient(135deg, #8B7355 0%, #6B5A47 100%);
	color: #ffffff;
	padding: 0.5rem 1rem;
	border-radius: 0.375rem;
	font-weight: 600;
	font-size: 0.875rem;
	z-index: 10;
	box-shadow: 0 0.125rem 0.5rem rgba(139, 115, 85, 0.3);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Stock Status */
.woocommerce div.product p.stock {
	font-weight: 600;
	margin-bottom: 1rem;
}

.woocommerce div.product p.stock.in-stock {
	color: #22c55e;
}

.woocommerce div.product p.stock.out-of-stock {
	color: #ef4444;
}

/* Mobile: Thumbnails below main image, 2 thumbnails visible with horizontal arrows */
@media (max-width: 768px) {
	/* Change gallery layout to column */
	.woocommerce-product-gallery {
		flex-direction: column;
		gap: 1rem;
	}

	.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
		order: 1 !important;
		width: 100%;
	}

	/* Product Thumbnails Slider - horizontal layout on mobile */
	.product-thumbnails-slider {
		order: 2 !important;
		width: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 0.5rem;
		padding: 0 3rem;
		position: relative;
	}

	.thumbnails-nav-up{
		transform: translateY(-50%) !important;

	}

	.thumbnails-nav-down{
		rotate: 180deg !important;
		transform: translateY(43%) !important;
	}

	.thumbnails-container {
		width: 100%;
		height: auto;
		max-width: calc(2 * 6.5rem + 0.75rem); /* 2 thumbnails + gap */
		overflow: hidden;
		position: relative;
	}

	.thumbnails-container .flex-control-thumbs {
		flex-direction: row;
		gap: 0.75rem;
		transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		width: max-content;
	}

	.thumbnails-container .flex-control-thumbs li {
		width: 6.5rem;
		height: 6.5rem;
		flex-shrink: 0;
		display: block; /* Show all thumbnails, container will handle overflow */
	}

	/* Navigation arrows - horizontal on mobile (left/right) */
	.thumbnails-nav {
		position: absolute;
		top: 50%;
		z-index: 10;
		width: 2.5rem;
		height: 2.5rem;
		border-radius: 50%;
		background: linear-gradient(135deg, #8B7355 0%, #6B5A47 100%);
		color: #ffffff;
		border: none;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		transition: all 0.3s ease;
		transform: translateY(-50%);
	}

	.thumbnails-nav:hover {
		background: linear-gradient(135deg, #6B5A47 0%, #8B7355 100%);
		transform: translateY(-50%) scale(1.1);
	}

	.thumbnails-nav:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}

	.thumbnails-nav-up {
		left: 0;
	}

	.thumbnails-nav-up i.fa-chevron-up {
		transform: rotate(-90deg); /* Rotate chevron-up to point left (previous) */
	}

	.thumbnails-nav-down {
		right: 0;
	}

	.thumbnails-nav-down i.fa-chevron-down {
		transform: rotate(90deg); /* Rotate chevron-down to point right (next) */
	}

	.thumbnails-nav i {
		font-size: 0.875rem;
		display: inline-block;
		transition: transform 0.3s ease;
	}

	/* Hide navigation if not enough thumbnails */
	.product-thumbnails-slider.no-many-thumbnails .thumbnails-nav {
		display: none;
	}
}

/* Responsive */
@media (max-width: 1024px) {
	.product-container {
		grid-template-columns: 1fr;
		gap: 3rem;
	}

	.product-gallery-wrapper {
		position: static;
	}
}

@media (max-width: 768px) {
	.product-main {
		padding: 1rem;
	}

	.product_title {
		font-size: 2rem;
	}

	.woocommerce-Price-amount {
		font-size: 1.75rem;
	}

	.woocommerce-tabs ul.tabs {
		flex-direction: column;
		gap: 0;
	}

	.woocommerce-tabs ul.tabs li {
		border-bottom: 0.0625rem solid #e0ddd9;
	}

	.woocommerce-tabs ul.tabs li:last-child {
		border-bottom: none;
	}

	.woocommerce-tabs ul.tabs li a {
		padding: 1rem;
		border-bottom: none;
		margin-bottom: 0;
	}

	.woocommerce-tabs ul.tabs li.active a,
	.woocommerce-tabs ul.tabs li a:hover {
		border-bottom: none;
		background: #f8f7f5;
	}
}

