/**
 * Luxury Jewelry Products Widget Styles
 */

.luxury-jewelry-products-widget {
	width: 100%;
	direction: rtl;
	text-align: right;
}

.luxury-products-title {
	margin: 0 0 30px 0;
	font-weight: 400;
	color: #2C2C2C;
}

.luxury-products-grid {
	display: grid;
	gap: 20px;
	width: 100%;
}

.luxury-products-columns-1 {
	grid-template-columns: 1fr;
}

.luxury-products-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.luxury-products-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.luxury-products-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.luxury-product-item {
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
	border: 0 solid transparent;
}

/* Button align bottom - make all cards same height */
.elementor-widget-luxury_jewelry_products.button-align-bottom-yes .luxury-products-grid,
.elementor-widget.button-align-bottom-yes .luxury-products-grid,
.luxury-jewelry-products-widget.button-align-bottom .luxury-products-grid {
	align-items: stretch !important;
}

/* Button align bottom - make cards fill height */
.elementor-widget-luxury_jewelry_products.button-align-bottom-yes .luxury-product-item,
.elementor-widget.button-align-bottom-yes .luxury-product-item,
.luxury-jewelry-products-widget.button-align-bottom .luxury-product-item {
	height: 100% !important;
	min-height: 100% !important;
}

.luxury-product-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px rgba(44, 44, 44, 0.1);
}

.luxury-product-image {
	width: 100%;
	overflow: hidden;
	background: #FFFFFF;
	position: relative;
}

/**
 * Elementor: «תמונה ברוחב מלא של הכרטיס» — override slider width/height (incl. saved data).
 */
.elementor-widget-luxury_jewelry_products.ljp-img-fill-card-yes .luxury-product-image .luxury-main-image {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	object-fit: unset;
}

.elementor-widget-luxury_jewelry_products.ljp-img-fill-card-yes .luxury-product-image a {
	width: 100%;
}

.elementor-widget-luxury_jewelry_products.ljp-img-fill-card-yes .luxury-product-item.has-gallery-hover .luxury-hover-image {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

/**
 * Flex centering: in RTL, a block-level img narrower than the column sticks to the
 * inline-start edge (right). That breaks visual alignment and looks worse on hover
 * when the overlay uses a different box. Center the image strip for all breakpoints.
 */
.luxury-product-image a {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	width: 100%;
	position: relative;
	overflow: hidden;
}

.luxury-product-image img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Gallery Hover Effect */
.luxury-product-item.has-gallery-hover .luxury-product-image {
	position: relative;
}

.luxury-product-item.has-gallery-hover .luxury-product-image a {
	position: relative;
}

.luxury-product-item.has-gallery-hover .luxury-main-image {
	position: relative;
	z-index: 2;
	flex-shrink: 0;
	object-fit: cover;
	opacity: 1 !important;
	transition: opacity 0.4s ease;
}

.luxury-product-item.has-gallery-hover .luxury-hover-image {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	opacity: 0 !important;
	z-index: 3;
	transition: opacity 0.4s ease;
}

.luxury-product-item.has-gallery-hover:hover .luxury-hover-image {
	opacity: 1 !important;
}

.luxury-product-item.has-gallery-hover:hover .luxury-main-image {
	opacity: 0 !important;
}

/* Ensure first image is always visible when not hovering */
.luxury-product-item.has-gallery-hover:not(:hover) .luxury-main-image {
	opacity: 1 !important;
}

.luxury-product-item.has-gallery-hover:not(:hover) .luxury-hover-image {
	opacity: 0 !important;
}

/* Default hover effect when no gallery */
.luxury-product-item:not(.has-gallery-hover):hover .luxury-product-image img {
	transform: scale(1.05);
}

.luxury-product-info {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Button align bottom - make info section fill available space */
.elementor-widget-luxury_jewelry_products.button-align-bottom-yes .luxury-product-info,
.elementor-widget.button-align-bottom-yes .luxury-product-info,
.luxury-jewelry-products-widget.button-align-bottom .luxury-product-info {
	flex: 1 1 auto !important;
	display: flex !important;
	flex-direction: column !important;
}

.luxury-product-name {
	margin: 0;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
}

.luxury-product-name a {
	color: #2C2C2C;
	text-decoration: none;
	transition: color 0.3s ease;
}

.luxury-product-name a:hover {
	color: #B4996C;
}

.luxury-product-price {
	font-size: 16px;
	font-weight: 500;
	color: #2C2C2C;
}

.luxury-product-button {
	display: inline-block;
	padding: 12px 30px;
	background-color: #2C2C2C;
	color: #FFFFFF;
	text-decoration: none;
	text-align: center;
	transition: background-color 0.3s ease, color 0.3s ease;
	cursor: pointer;
	border: none;
	font-size: 14px;
	font-weight: 400;
	width: fit-content;
}

/* Button align bottom - push button to bottom */
.elementor-widget-luxury_jewelry_products.button-align-bottom-yes .luxury-product-button,
.elementor-widget.button-align-bottom-yes .luxury-product-button,
.luxury-jewelry-products-widget.button-align-bottom .luxury-product-button {
	margin-top: auto !important;
	margin-bottom: 0 !important;
}

.luxury-product-button:hover {
	background-color: #B4996C;
	color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.luxury-products-columns-4 {
		grid-template-columns: repeat(3, 1fr);
	}
	
	.luxury-products-columns-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.luxury-products-columns-4,
	.luxury-products-columns-3,
	.luxury-products-columns-2 {
		grid-template-columns: repeat(2, 1fr);
	}

	/**
	 * Mobile / narrow: center card content (override wrapper text-align: right and narrow images).
	 * Elementor column alignment does not affect inner .luxury-jewelry-products-widget text-align.
	 */
	.luxury-jewelry-products-widget {
		text-align: center;
	}

	.luxury-jewelry-products-widget .luxury-product-item {
		align-items: center;
	}

	.luxury-jewelry-products-widget .luxury-product-info {
		align-items: center;
		text-align: center;
	}

	.luxury-jewelry-products-widget .luxury-product-name {
		width: 100%;
		text-align: center;
	}

	.luxury-jewelry-products-widget .luxury-product-price {
		width: 100%;
		text-align: center;
	}

	.luxury-jewelry-products-widget .luxury-product-price * {
		text-align: center;
	}

	.luxury-jewelry-products-widget .luxury-product-name a {
		text-align: center;
	}
}

@media (max-width: 480px) {
	.luxury-products-columns-4,
	.luxury-products-columns-3,
	.luxury-products-columns-2,
	.luxury-products-columns-1 {
		grid-template-columns: 1fr;
	}
	
	.luxury-product-info {
		padding: 15px;
	}
	
	.luxury-product-name {
		font-size: 16px;
	}
	
	.luxury-product-price {
		font-size: 14px;
	}
}

