/**
 * Frontend styles for the Shopify Products block
 * This file contains all block-specific styles
 */

.wp-block-products-showcase-products {
	margin: 2rem 0;

	// Ensure block displays properly
	&.alignwide {
		max-width: 1200px;
	}

	&.alignfull {
		max-width: 100%;
	}
}

/* Shopify Product Showcase - Block Styles */

/* Container */
.prodshow-shopify-block {
	margin: 0 !important;
	padding: 3rem 0 !important;
	overflow-x: hidden;
	max-width: 100% !important;
	@media (min-width: 768px) {
			padding: 6rem 0 !important;
	}
}

/* Color inheritance for custom text color */
.prodshow-shopify-block .prodshow-title,
.prodshow-shopify-block .prodshow-description,
.prodshow-shopify-block .prodshow-product-title,
.prodshow-shopify-block .prodshow-product-title a,
.prodshow-shopify-block .prodshow-product-price {
	color: inherit;
}

/* Override global padding when disabled */
.prodshow-no-global-padding.prodshow-shopify-block {
	margin-left: calc(-1 * var(--wp--style--root--padding-left)) !important;
	margin-right: calc(-1 * var(--wp--style--root--padding-right)) !important;
	padding-right: var(--wp--style--root--padding-right) !important;
	padding-left: var(--wp--style--root--padding-left) !important;

}

.prodshow-container {
	max-width: 1320px;
	margin: 0 auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

/* Header */
.prodshow-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	flex-wrap: wrap;
	gap: 1rem;
}

.prodshow-title {
	font-size: 2rem;
	font-weight: 700;
	margin: 0;
}

.prodshow-description {
	font-size: 1.125rem;
	margin: 0;
}

.prodshow-cta-button {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0.2rem 1rem;
	height: 2.25rem;
	background-color: #171717;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 1rem;
	position: relative;
	overflow: hidden;
	text-transform: none;
	box-shadow: none;
	border-radius: 9999px;
	cursor: pointer;
	width: auto;
	transition: background-color 0.5s cubic-bezier(0.45, 0, 0.15, 1), color 0.5s cubic-bezier(0.45, 0, 0.15, 1);
}

.prodshow-cta-button:hover {
	background-color: #404040;
}

/* Carousel */
.prodshow-carousel {
	position: relative;
}

.prodshow-carousel-viewport {
	overflow: visible;
}

.prodshow-carousel-container {
	display: flex;
	gap: 1rem;
}

.prodshow-carousel-controls {
	display: none;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-top: 1rem;
}

@media (min-width: 768px) {
	.prodshow-carousel-controls {
			display: flex;
	}
}

.prodshow-carousel-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s;
}

.prodshow-carousel-btn:hover:not(:disabled) rect {
	fill: #E5E5E5;
}

.prodshow-carousel-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

/* Product Card */
.prodshow-product-card {
	flex: 0 0 auto;
	min-width: 228px;
	max-width: 304px;
	width: 100%;
}

.prodshow-product-link {
	display: block;
	text-decoration: none;
}

.prodshow-product-image-wrapper {
	position: relative;
	width: 100%;
	padding-bottom: 100%; /* 1:1 Aspect Ratio */
	background-color: #F5F5F5;
	border-radius: 0.5rem;
	overflow: hidden;
}

.prodshow-product-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.3s ease;
}

/* Primary image is visible by default */
.prodshow-product-image-primary {
	opacity: 1;
	z-index: 1;
}

/* Secondary image is hidden by default */
.prodshow-product-image-secondary {
	opacity: 0;
	z-index: 2;
}

/* Show secondary image on hover */
.prodshow-product-image-wrapper:hover .prodshow-product-image-secondary {
	opacity: 1;
}

/* Smooth transition when hovering on product card */
.prodshow-product-card {
	transition: transform 0.2s ease;
}

.prodshow-product-image-placeholder {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #F5F5F5 0%, #E5E5E5 100%);
}

.prodshow-product-content {
	padding: 0.75rem 0;
}

.prodshow-product-title {
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.33;
	margin: 0 0 0.5rem;
}

.prodshow-product-title a {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s;
}

.prodshow-product-title a:hover {
	opacity: 0.7;
}

.prodshow-product-swatches {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin: 0.5rem 0 0;
}

.prodshow-swatch {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.20) inset;
	background-size: cover;
	background-position: center;
	cursor: pointer;
	position: relative;
	margin-left: -0.5rem;
	box-sizing: border-box;
	transition: transform 0.2s ease-in-out;
	&:first-child {
			margin-left: 0;
	}
}

.prodshow-swatch:hover {
	transform: scale(1.1);
}

.prodshow-swatch-more {
	font-size: 0.875rem;
	color: #737373;
	font-weight: 500;
}

.prodshow-product-price {
	font-size: 0.875rem;
	font-weight: 400;
	margin: 0.75rem 0 0;
	line-height: 1.25;
}

@media (min-width: 768px) {
	.prodshow-product-price {
			font-size: 1rem;
	}
}

/* Single Product View */
.prodshow-single-product {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
}

@media (min-width: 768px) {
	.prodshow-single-product {
			grid-template-columns: 1fr 1.3fr;
	}
}
.prodshow-single-info-content{
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.prodshow-single-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
}

.prodshow-single-product-card {
	background-color: #F5F5F5;
	padding: 2rem;
	border-radius: 0.5rem;
}

.prodshow-single-product-card .prodshow-product-card {
	max-width: 100%;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 768px) {
	.prodshow-single-product-card .prodshow-product-card {
			grid-template-columns: 1fr 1fr;
			gap: 2rem;
	}
}

/* Responsive */
@media (max-width: 767px) {
	.prodshow-title {
			font-size: 1.5rem;
	}
	
	.prodshow-header {
			flex-direction: column;
			align-items: flex-start;
	}
	
	.prodshow-product-card {
			min-width: 200px;
	}
}

