/**
 * Amazon-style Product Page Layout
 * Main image on left, options on right, thumbnails below in scrollable row
 */

/* Main product layout container */
.splot-amazon-product-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	margin-bottom: 40px;
}

/* Images wrapper - left side */
.splot-product-images-wrapper {
	flex: 0 0 100%;
	max-width: 100%;
}

@media (min-width: 768px) {
	.splot-product-images-wrapper {
		flex: 0 0 calc(50% - 15px);
		max-width: calc(50% - 15px);
	}
}

/* Product summary wrapper - right side */
.splot-product-summary-wrapper {
	flex: 0 0 100%;
	max-width: 100%;
}

@media (min-width: 768px) {
	.splot-product-summary-wrapper {
		flex: 0 0 calc(50% - 15px);
		max-width: calc(50% - 15px);
	}
}

/* Main product image gallery */
.splot-product-images-wrapper .woocommerce-product-gallery {
	width: 100% !important;
	max-width: 100% !important;
	margin-bottom: 15px;
}

.splot-product-images-wrapper .woocommerce-product-gallery__wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
}

/* Main/Featured image - make it full width (but NOT thumbnails) */
.splot-product-images-wrapper .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child:not(.splot-thumbnails-horizontal-scroll .woocommerce-product-gallery__image) {
	margin-bottom: 0;
	width: 100% !important;
	max-width: 100% !important;
}

/* Ensure first thumbnail has the same size as others */
.splot-thumbnails-horizontal-scroll .woocommerce-product-gallery__image:first-child {
	width: 80px !important;
	min-width: 80px !important;
	max-width: 80px !important;
}

.splot-product-images-wrapper .woocommerce-product-gallery__image {
	margin-bottom: 0;
	width: 100%;
	max-width: 100%;
}

.splot-product-images-wrapper .woocommerce-product-gallery__image img {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	border-radius: 8px;
	display: block;
	object-fit: cover;
}

/* Horizontal scrollable thumbnails below main image */
.splot-thumbnails-horizontal-scroll {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 10px 0;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #ccc transparent;
}

.splot-thumbnails-horizontal-scroll::-webkit-scrollbar {
	height: 6px;
}

.splot-thumbnails-horizontal-scroll::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.splot-thumbnails-horizontal-scroll::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 3px;
}

.splot-thumbnails-horizontal-scroll::-webkit-scrollbar-thumb:hover {
	background: #555;
}

.splot-thumbnails-horizontal-scroll .woocommerce-product-gallery__image {
	flex: 0 0 auto;
	width: 80px;
	min-width: 80px;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.3s ease;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
}

.splot-thumbnails-horizontal-scroll .woocommerce-product-gallery__image:hover {
	opacity: 1;
	border-color: #333;
}

.splot-thumbnails-horizontal-scroll .woocommerce-product-gallery__image.flex-active-slide {
	opacity: 1;
	border-color: #7c3aed;
}

.splot-thumbnails-horizontal-scroll .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

/* Product summary styling */
.splot-product-summary-wrapper .product_title {
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 15px;
	color: #333;
}

.splot-product-summary-wrapper .woocommerce-product-rating {
	margin-bottom: 15px;
}

.splot-product-summary-wrapper .price {
	font-size: 28px;
	font-weight: 700;
	color: #000 !important;
	margin-bottom: 20px;
}

/* Force all price elements to be black */
.splot-product-summary-wrapper .price,
.splot-product-summary-wrapper .price *,
.splot-product-summary-wrapper .price .woocommerce-Price-amount,
.splot-product-summary-wrapper .price .woocommerce-Price-amount *,
.splot-product-summary-wrapper .price .woocommerce-Price-amount.amount,
.splot-product-summary-wrapper .price span,
.splot-product-summary-wrapper .price .woocommerce-Price-currencySymbol,
.splot-product-summary-wrapper .price bdi,
.splot-product-summary-wrapper .price bdi *,
.splot-product-summary-wrapper p.price,
.splot-product-summary-wrapper p.price * {
	color: #000 !important;
}

.splot-product-summary-wrapper .woocommerce-product-details__short-description {
	margin-bottom: 25px;
	line-height: 1.6;
	color: #555;
}

/* Full product description styling */
.splot-product-summary-wrapper .splot-product-full-description {
	margin-top: 30px;
	margin-bottom: 25px;
	padding-top: 25px;
	border-top: 1px solid #e0e0e0;
}

.splot-product-summary-wrapper .splot-description-heading {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 15px;
	color: #333;
}

.splot-product-summary-wrapper .splot-description-content {
	line-height: 1.7;
	color: #555;
}

.splot-product-summary-wrapper .splot-description-content p {
	margin-bottom: 15px;
}

.splot-product-summary-wrapper .splot-description-content ul,
.splot-product-summary-wrapper .splot-description-content ol {
	margin-bottom: 15px;
	padding-left: 20px;
}

.splot-product-summary-wrapper .splot-description-content li {
	margin-bottom: 8px;
}

/* Variations/Options styling - ensure they're visible on the right */
.splot-product-summary-wrapper .variations_form {
	margin-bottom: 25px;
}

.splot-product-summary-wrapper .splot-variations-wrapper {
	margin-bottom: 20px;
}

.splot-product-summary-wrapper .splot-variation-attribute {
	margin-bottom: 20px;
}

/* Hide reset variations (Clear) link */
.splot-product-summary-wrapper .reset_variations {
	display: none !important;
}

/* Single variation wrap - contains price and add to cart button */
.splot-product-summary-wrapper .single_variation_wrap {
	margin-top: 20px;
}

/* Variation price and add to cart on one line */
.splot-product-summary-wrapper .single_variation_wrap .woocommerce-variation-add-to-cart {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 20px;
	margin-top: 20px;
	flex-wrap: wrap;
}

/* Hide the variation price - we're showing total instead */
.splot-product-summary-wrapper .single_variation_wrap .woocommerce-variation-price,
.splot-product-summary-wrapper .single_variation_wrap .woocommerce-variation-price .price {
	display: none !important;
}

/* Quantity input alignment */
.splot-product-summary-wrapper .single_variation_wrap .quantity {
	margin-bottom: 0;
	margin-right: 0;
}

.splot-product-summary-wrapper .single_variation_wrap .quantity input {
	width: 80px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
}

/* Quantity Total Display - positioned before quantity input */
.splot-quantity-total {
	display: inline-flex !important;
	align-items: center;
	font-size: 24px !important;
	font-weight: 700 !important;
	color: #000 !important;
	margin-right: 15px;
	padding: 8px 15px;
	background: #f8f8f8;
	border-radius: 6px;
	border: 2px solid #7c3aed;
}

.splot-quantity-total .splot-total-label {
	font-size: 16px;
	font-weight: 600;
	color: #666;
	margin-right: 8px;
}

.splot-quantity-total .splot-total-price {
	font-size: 24px !important;
	font-weight: 700 !important;
	color: #7c3aed !important;
}

.splot-quantity-total .splot-total-price bdi {
	color: #7c3aed !important;
}

/* Ensure the total is visible and properly positioned */
.splot-product-summary-wrapper .single_variation_wrap .splot-quantity-total {
	display: inline-flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Add to cart button - inline with price */
.splot-product-summary-wrapper .single_variation_wrap .single_add_to_cart_button,
.splot-product-summary-wrapper .single_variation_wrap button.single_add_to_cart_button {
	width: auto;
	min-width: 200px;
	max-width: none;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 600;
	background-color: #7c3aed;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	margin: 0;
	display: inline-block;
	text-align: center;
	flex-shrink: 0;
}

.splot-product-summary-wrapper .single_variation_wrap .single_add_to_cart_button:hover,
.splot-product-summary-wrapper .single_variation_wrap button.single_add_to_cart_button:hover {
	background-color: #6d28d9;
}

/* Add to cart button for non-variable products */
.splot-product-summary-wrapper .single_add_to_cart_button,
.splot-product-summary-wrapper button.single_add_to_cart_button {
	width: auto;
	min-width: 200px;
	max-width: none;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 600;
	background-color: #7c3aed;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	margin: 0;
	display: inline-block;
}

.splot-product-summary-wrapper .single_add_to_cart_button:hover,
.splot-product-summary-wrapper button.single_add_to_cart_button:hover {
	background-color: #6d28d9;
}

/* Ensure proper alignment for non-variable products */
.splot-product-summary-wrapper form.cart {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 20px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.splot-product-summary-wrapper form.cart .quantity {
	margin-bottom: 0;
	margin-right: 0;
}

.splot-product-summary-wrapper form.cart .single_add_to_cart_button {
	margin: 0;
}

/* Ensure Add to Cart button is always visible - high specificity to override theme defaults */
.splot-product-summary-wrapper .single_add_to_cart_button,
.splot-product-summary-wrapper button.single_add_to_cart_button,
.splot-product-summary-wrapper .woocommerce button.button.single_add_to_cart_button,
.splot-product-summary-wrapper .woocommerce a.button.single_add_to_cart_button {
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
	padding: 12px 24px !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	background-color: #7c3aed !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 6px !important;
	cursor: pointer !important;
	text-decoration: none !important;
	transition: background-color 0.3s ease !important;
}

.splot-product-summary-wrapper .single_add_to_cart_button:hover,
.splot-product-summary-wrapper button.single_add_to_cart_button:hover,
.splot-product-summary-wrapper .woocommerce button.button.single_add_to_cart_button:hover,
.splot-product-summary-wrapper .woocommerce a.button.single_add_to_cart_button:hover {
	background-color: #6d28d9 !important;
}

/* Reviews section - below product images and summary */
.woocommerce #reviews,
.woocommerce #comments {
	clear: both;
	width: 100%;
	margin-top: 50px;
	padding-top: 30px;
	border-top: 1px solid #e0e0e0;
}

.woocommerce #reviews h2,
.woocommerce #comments h2 {
	font-size: 22px;
	font-weight: 600;
	margin-bottom: 25px;
	color: #333;
}

/* Product tabs - ensure they appear below */
.woocommerce div.product .woocommerce-tabs {
	clear: both;
	width: 100%;
	margin-top: 40px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
	.splot-amazon-product-layout {
		flex-direction: column;
		gap: 20px;
	}
	
	.splot-product-images-wrapper,
	.splot-product-summary-wrapper {
		flex: 0 0 100%;
		max-width: 100%;
	}
	
	.splot-product-summary-wrapper .product_title {
		font-size: 20px;
	}
	
	.splot-product-summary-wrapper .price {
		font-size: 24px;
	}
	
	.splot-thumbnails-horizontal-scroll .woocommerce-product-gallery__image {
		width: 70px;
		min-width: 70px;
	}
}

/* Ensure proper spacing and layout */
.king-single-shop {
	position: relative;
}

/* Clear floats */
.splot-amazon-product-layout::after {
	content: "";
	display: table;
	clear: both;
}
