/*
Theme Name: Merlier Child
Theme URI: https://merlierslijperij.be/
Description: Child theme voor Merlier gebaseerd op Hello Elementor.
Author: Athes Agency
Author URI: https://athes-agency.com/
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/

/* Custom tweaks for enquiry cart to mirror checkout styling */
.custom-cart-container .cart_item_card .product-name {
	color:#385B83;
	font-weight:600;
	text-decoration:none;
}

.custom-cart-container .cart_item_card .product-name:hover {
	text-decoration:underline;
}

.custom-cart-container .cart_item_card .product-meta-inline {
	display:flex;
	flex-wrap:wrap;
	gap:12px;
	margin-top:6px;
}

.custom-cart-container .cart_item_card .meta-label {
	font-weight:700;
	color:#385B83;
	margin-right:4px;
	text-transform:capitalize;
}

.custom-cart-container .cart_item_card .meta-value {
	color:#1f2937;
}

.pi-enquiry-summary-card #pi-eqw-enquiry-form input[type="text"],
.pi-enquiry-summary-card #pi-eqw-enquiry-form input[type="email"],
.pi-enquiry-summary-card #pi-eqw-enquiry-form input[type="tel"],
.pi-enquiry-summary-card #pi-eqw-enquiry-form textarea {
	width:100%;
	border-radius:12px;
	border:1px solid #E1E6F0;
	padding:12px 16px;
	background:#fff;
	font-size:1rem;
	box-shadow:0 6px 18px rgba(56,91,131,0.08);
	transition:border-color .2s ease, box-shadow .2s ease;
}

.pi-enquiry-summary-card #pi-eqw-enquiry-form input[type="text"]:focus,
.pi-enquiry-summary-card #pi-eqw-enquiry-form input[type="email"]:focus,
.pi-enquiry-summary-card #pi-eqw-enquiry-form input[type="tel"]:focus,
.pi-enquiry-summary-card #pi-eqw-enquiry-form textarea:focus {
	outline:none;
	border-color:#385B83;
	box-shadow:0 0 0 2px rgba(56,91,131,0.2);
}

.pi-enquiry-summary-card #pi-eqw-enquiry-form input[type="submit"] {
	border:none;
	border-radius:999px;
	background:#385B83;
	color:#fff;
	padding:14px 28px;
	font-weight:700;
	cursor:pointer;
	transition:background .2s ease, transform .2s ease;
}

.pi-enquiry-summary-card #pi-eqw-enquiry-form input[type="submit"]:hover {
	background:#2c4b6d;
	transform:translateY(-1px);
}

/* Lintzaag calculator inputs match checkout forms */
.mlc-field{
	margin-bottom:14px;
}
.mlc-field label{
	font-weight:600;
	color:#385B83;
	display:block;
	margin-bottom:6px;
}
.mlc-input{
	border-radius:12px;
	border:1px solid #E1E6F0;
	padding:12px 16px;
	background:#fff;
	box-shadow:0 6px 18px rgba(56,91,131,0.08);
	transition:border-color .2s ease, box-shadow .2s ease;
}
.mlc-input:focus{
	border-color:#385B83;
	outline:none;
	box-shadow:0 0 0 2px rgba(56,91,131,0.2);
}
.mlc-button{
	border:none;
	border-radius:999px;
	padding:12px 26px;
	font-weight:600;
	font-family:inherit;
	background:#385B83;
	color:#fff;
	cursor:pointer;
	transition:background .2s ease, transform .2s ease, opacity .2s;
}
.mlc-button:disabled{
	opacity:.5;
	cursor:not-allowed;
}
.mlc-button:not(:disabled):hover{
	background:#2c4b6d;
	transform:translateY(-1px);
}
.mlc-inline-row{
	display:flex;
	flex-wrap:wrap;
	gap:16px;
	align-items:center;
	margin-bottom:18px;
}
.mlc-price-feedback{
	margin:0;
	font-weight:600;
	color:#0f172a;
}

/* Hide wishlist button on cart for smaller screens */
@media (max-width: 767px){
	.woocommerce-cart .wishlist-button{
		display:none !important;
	}
}

#wc-premium-search-results{
	display:none !important;
}

#wc-premium-search-results.has-results{
	display:block !important;
}

@media (max-width: 767px){
	.woocommerce .track_order{
		max-width:100%;
		margin:0;
	}

	.woocommerce .track_order .form-row,
	.woocommerce .track_order .form-row-first,
	.woocommerce .track_order .form-row-last{
		width:100%;
		float:none;
		margin-right:0;
	}

	.woocommerce .track_order .form-row label{
		margin-bottom:6px;
	}

	.woocommerce .track_order button{
		width:100%;
	}

	.woocommerce .track_order .clear{
		display:none;
	}
}

/* Better mobile layout for variation table + quantity */
@media (max-width: 767px){
	body.single-product.woocommerce .elementor-jet-single-add-to-cart .cart,
	body.single-product.woocommerce div.product form.variations_form.cart,
	body.single-product.woocommerce form.variations_form.cart{
		display:flex !important;
		flex-direction:column;
		gap:16px;
		width:100%;
	}

	body.single-product.woocommerce .elementor-jet-single-add-to-cart .cart > *,
	body.single-product.woocommerce .elementor-jet-single-add-to-cart form.variations_form.cart,
	body.single-product.woocommerce div.product form.variations_form.cart,
	body.single-product.woocommerce form.variations_form.cart{
		width:100% !important;
		max-width:100% !important;
	}

	body.single-product.woocommerce .elementor-jet-single-add-to-cart form.variations_form.cart table.variations,
	body.single-product.woocommerce div.product form.variations_form.cart table.variations,
	body.single-product.woocommerce form.variations_form.cart table.variations{
		width:100% !important;
		max-width:100% !important;
		table-layout:fixed;
	}

	body.single-product.woocommerce .elementor-jet-single-add-to-cart form.variations_form.cart .single_variation_wrap,
	body.single-product.woocommerce div.product form.variations_form.cart .single_variation_wrap,
	body.single-product.woocommerce form.variations_form.cart .single_variation_wrap{
		width:100% !important;
	}

	body.single-product.woocommerce .elementor-jet-single-add-to-cart .woocommerce-variation-add-to-cart,
	body.single-product.woocommerce div.product form.variations_form.cart .woocommerce-variation-add-to-cart,
	body.single-product.woocommerce form.variations_form.cart .woocommerce-variation-add-to-cart{
		display:flex !important;
		flex-wrap:wrap !important;
		gap:12px;
		width:100%;
	}

	body.single-product.woocommerce .elementor-jet-single-add-to-cart .woocommerce-variation-add-to-cart .quantity,
	body.single-product.woocommerce div.product form.variations_form.cart .woocommerce-variation-add-to-cart .quantity,
	body.single-product.woocommerce form.variations_form.cart .woocommerce-variation-add-to-cart .quantity{
		display:block;
		flex:0 0 calc(45% - 6px) !important;
		max-width:calc(45% - 6px) !important;
		width:100%;
		min-width:0;
	}

	body.single-product.woocommerce .elementor-jet-single-add-to-cart .woocommerce-variation-add-to-cart .quantity .qty,
	body.single-product.woocommerce div.product form.variations_form.cart .woocommerce-variation-add-to-cart .quantity .qty,
	body.single-product.woocommerce form.variations_form.cart .woocommerce-variation-add-to-cart .quantity .qty{
		width:100% !important;
	}

	body.single-product.woocommerce .elementor-jet-single-add-to-cart .woocommerce-variation-add-to-cart .single_add_to_cart_button,
	body.single-product.woocommerce div.product form.variations_form.cart .woocommerce-variation-add-to-cart .single_add_to_cart_button,
	body.single-product.woocommerce form.variations_form.cart .woocommerce-variation-add-to-cart .single_add_to_cart_button{
		flex:1 1 calc(55% - 6px) !important;
		max-width:calc(55% - 6px) !important;
	}

	body.single-product.woocommerce table.shop_attributes,
	body.single-product.woocommerce .jet-woo-builder .shop_attributes{
		width:100% !important;
		max-width:none !important;
		table-layout:fixed;
		margin:0;
	}

	body.single-product.woocommerce #woocommerce-variations-table_wrapper,
	body.single-product.woocommerce #woocommerce-variations-table{
		clear:both;
		width:100% !important;
		max-width:100% !important;
		display:block;
	}

	body.single-product.woocommerce #woocommerce-variations-table{
		margin:0;
	}

	body.single-product.woocommerce #woocommerce-variations-table .variations-table-row{
		width:100%;
	}

	body.single-product.woocommerce #woocommerce-variations-table .variations-table-value-qt .quantity{
		width:50%;
		max-width:160px;
		min-width:120px;
	}

	body.single-product.woocommerce #woocommerce-variations-table .variations-table-value-qt .quantity .qty{
		width:100%;
	}

@media (min-width: 768px){
	body.single-product.woocommerce .awv-variation-table .awv-vt-qty,
	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Aantal" i],
	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Quantity" i],
	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Actie" i],
	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Add to Cart" i]{
		display:flex;
		align-items:center;
		justify-content:center;
		text-align:center;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-qty .quantity{
		width:auto;
		min-width:110px;
		display:flex;
		align-items:center;
		justify-content:center;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-qty .quantity .awv-qty-input{
		text-align:center;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Actie" i] .awvvt-button,
	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Add to Cart" i] .awvvt-button{
		width:auto;
		min-width:150px;
	}
}

	body.single-product.woocommerce .single-product-wrapper{
		display:flex !important;
		flex-direction:column;
		gap:24px;
		width:100%;
	}

	body.single-product.woocommerce .single-product-wrapper .product-images-wrapper,
	body.single-product.woocommerce .single-product-wrapper .summary{
		width:100% !important;
		max-width:100% !important;
		flex:0 0 100% !important;
		float:none !important;
		margin:0;
	}

	body.single-product.woocommerce .product-images-wrapper > div{
		width:100% !important;
	}

	body.single-product.woocommerce .dataTables_wrapper{
		width:100% !important;
	}

	body.single-product.woocommerce .dataTables_scrollHead,
	body.single-product.woocommerce .dataTables_scrollBody{
		width:100% !important;
	}

	body.single-product.woocommerce .awv-variation-table,
	body.single-product.woocommerce .awv-variation-table .awvvt-table-wrap,
	body.single-product.woocommerce .awv-variation-table .awv-vt-table{
		width:100% !important;
		max-width:100% !important;
	}

	body.single-product.woocommerce .awv-variation-table{
		display:block;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-table td{
		width:100%;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-attr{
		max-width:none !important;
		width:100%;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-attr-text{
		white-space:normal;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-qty .quantity{
		width:50%;
		max-width:140px;
		min-width:110px;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-qty .quantity .awv-qty-input{
		width:100%;
		text-align:center;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Actie" i]::before,
	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Add to Cart" i]::before{
		display:none !important;
		content:none !important;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-qty,
	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Actie" i],
	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Add to Cart" i]{
		text-align:left;
		vertical-align:middle;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Actie" i] .awvvt-button,
	body.single-product.woocommerce .awv-variation-table .awv-vt-table td[data-label*="Add to Cart" i] .awvvt-button{
		width:auto;
		min-width:150px;
		margin:0;
	}

	body.single-product.woocommerce .awv-variation-table .awv-vt-price,
body.single-product.woocommerce .awv-variation-table .awv-vt-price-stack{
		width:100%;
		max-width:none !important;
	}

}

/* Ensure product gallery images scale inside the frame without cropping */
body.single-product.woocommerce{
	--product-gallery-max-height: clamp(320px, 60vh, 680px);
}

body.single-product.woocommerce .woocommerce-product-gallery__wrapper,
body.single-product.woocommerce .woocommerce-product-gallery__image,
body.single-product.woocommerce .woocommerce .woocommerce-product-gallery__image{
	display:flex;
	align-items:center;
	justify-content:center;
	min-height:var(--product-gallery-max-height);
}

body.single-product.woocommerce .woocommerce-product-gallery__wrapper,
body.single-product.woocommerce .woocommerce div.product div.images .flex-viewport{
	min-height:var(--product-gallery-max-height);
}

body.single-product.woocommerce .woocommerce-product-gallery__image img,
body.single-product.woocommerce .woocommerce-product-gallery__wrapper img{
	width:100%;
	height:100%;
	object-fit:contain;
}

body.single-product.woocommerce .woocommerce-product-gallery .flex-control-thumbs li img{
	object-fit:contain;
}

/* Product cards (blue tiles) keep image contained without stretching */
body.woocommerce-page,
.jet-woo-products,
.jet-woo-products-list{
	--product-card-thumb-height: clamp(210px, 28vw, 360px);
}

/* WooCommerce product archives: force 300x300 frame with white padding */
.woocommerce ul.products li.product img.attachment-woocommerce_thumbnail,
.woocommerce ul.products li.product img.woocommerce-placeholder,
.elementor-wc-products ul.products li.product img.attachment-woocommerce_thumbnail,
.elementor-wc-products ul.products li.product img.woocommerce-placeholder{
	width:300px;
	height:300px;
	object-fit:contain;
	background:#fff;
	display:block;
	margin:0 auto;
}

/* Elementor Archive Products widget: 300x300 contain frame without breaking layout */
.elementor-widget-wc-archive-products ul.products li.product img,
.elementor-widget-wc-archive-products ul.products li.product img.woocommerce-placeholder{
	width:100% !important;
	max-width:300px;
	aspect-ratio:1 / 1;
	height:auto;
	object-fit:contain !important;
	object-position:center;
	background:#fff;
	border-radius:20px;
	display:block;
	margin:0 auto 1em;
}

/* Elementor loop template featured images: 300x300 contain with white padding */
.elementor-2621 .elementor-widget-theme-post-featured-image .elementor-widget-container,
.elementor-2621 .elementor-widget-post-featured-image .elementor-widget-container,
.woocommerce .elementor-loop-container .e-loop-item .elementor-widget-theme-post-featured-image .elementor-widget-container,
.woocommerce .elementor-loop-container .e-loop-item .elementor-widget-post-featured-image .elementor-widget-container,
.woocommerce-page .elementor-loop-container .e-loop-item .elementor-widget-theme-post-featured-image .elementor-widget-container,
.woocommerce-page .elementor-loop-container .e-loop-item .elementor-widget-post-featured-image .elementor-widget-container{
	width:300px;
	height:300px;
	max-width:100%;
	margin-left:auto;
	margin-right:auto;
	display:flex;
	align-items:center;
	justify-content:center;
	background:#fff;
}

.elementor-2621 .elementor-widget-theme-post-featured-image img,
.elementor-2621 .elementor-widget-post-featured-image img,
.woocommerce .elementor-loop-container .e-loop-item .elementor-widget-theme-post-featured-image img,
.woocommerce .elementor-loop-container .e-loop-item .elementor-widget-post-featured-image img,
.woocommerce-page .elementor-loop-container .e-loop-item .elementor-widget-theme-post-featured-image img,
.woocommerce-page .elementor-loop-container .e-loop-item .elementor-widget-post-featured-image img{
	width:100% !important;
	height:100% !important;
	object-fit:contain !important;
	object-position:center;
	background:#fff;
	display:block;
}

.jet-woo-products .jet-woo-products__thumb-wrap,
.jet-woo-products .jet-woo-product-thumbnail,
.jet-woo-products-list .jet-woo-products-list__item-img{
	height:var(--product-card-thumb-height, clamp(210px, 28vw, 360px));
	min-height:var(--product-card-thumb-height, clamp(210px, 28vw, 360px));
	display:flex;
	align-items:center;
	justify-content:center;
	padding:16px;
}

.jet-woo-products .jet-woo-product-thumbnail > a,
.jet-woo-products-list .jet-woo-products-list__item-img > a{
	display:flex;
	align-items:center;
	justify-content:center;
	width:100%;
	height:100%;
}

.jet-woo-products .jet-woo-product-thumbnail img,
.jet-woo-products .jet-woo-products__thumb-wrap img,
.jet-woo-products-list .jet-woo-products-list__item-img img{
	max-width:100%;
	max-height:100%;
	width:auto !important;
	height:auto !important;
	object-fit:contain !important;
	transition:none !important;
	position:static !important;
}

.jet-woo-thumb-with-effect .jet-woo-product-thumbs img,
.jet-woo-thumb-with-effect:hover .jet-woo-product-thumbs img{
	transform:none !important;
	opacity:1 !important;
}

.jet-woo-product-thumbs{
	position:relative !important;
}

.jet-woo-product-thumbs img+img{
	display:none !important;
}
