/* ============================================================
	NEGAFA CAFTAN SOUAAD — WooCommerce Custom Styling
	Archive (Boutique) + Single Product
============================================================ */

:root{
	/* Elementor global colors — fallback hex kept only in case a
	template renders before Elementor's globals CSS is printed */
	--ncs-c1: var(--e-global-color-color_1, #5B5B5B); /* mid grey   */
	--ncs-c2: var(--e-global-color-color_2, #EDEDED); /* light grey */
	--ncs-c3: var(--e-global-color-color_3, #F5F5F5); /* lightest   */
	--ncs-c4: var(--e-global-color-color_4, #161616); /* near black */

	/* Elementor global typography */
	--ncs-font-heading: var(--e-global-typography-primary-font-family, 'Playfair Display'), serif;
	--ncs-font-body:    var(--e-global-typography-text-font-family, 'Montserrat'), sans-serif;
}

/* ---------- Shared type resets on WC areas ---------- */
.custom-boutique-archive-layout,
.custom-single-product-layout{
	font-family: var(--ncs-font-body);
	color: var(--ncs-c4);
}

.custom-boutique-archive-layout h1.page-title,
.woocommerce-products-header__title{
	font-family: var(--ncs-font-heading);
	font-weight: 400;
	font-size: clamp(2rem, 3vw, 2.75rem);
	letter-spacing: .02em;
	color: var(--ncs-c4);
	position: relative;
	padding-bottom: 18px;
	margin-bottom: 20px;
}
.custom-boutique-archive-layout h1.page-title::after{
	content:"";
	position:absolute; left:0; bottom:0;
	width:64px; height:2px;
	background: var(--ncs-c1);
}

.woocommerce-result-count,
.woocommerce-ordering select{
	font-family: var(--ncs-font-body);
	font-size: .85rem;
	letter-spacing:.04em;
	color: var(--ncs-c1);
}
.woocommerce-ordering select{
	border: 1px solid #cfc8d8;
	background: transparent;
	padding: 8px 14px;
	border-radius: 2px;
	margin-top: 5px;
}

/* ============================================================
	ARCHIVE / BOUTIQUE — product grid cards
============================================================ */
ul.products{
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 44px 32px;
	list-style: none;
	margin: 0 !important;
	padding-top: 20px !important;
}
ul.products:before, ul.products:after{display: none !important;}
ul.products li.product{
	margin: 0 !important;
	list-style: none;
	width: 100% !important
}

.my-custom-product-card .custom-card-inner-wrapper{
	display:flex;
	flex-direction:column;
}

/* --- Image: moroccan arch crop --- */
.custom-product-thumbnail{
	position: relative;
	overflow: hidden;
	aspect-ratio: 1/1;
	background: var(--ncs-c3);
	isolation: isolate;
}
.custom-product-thumbnail img{
	width:100% !important;
	height:100% !important;
	object-fit:cover;
	display:block;
	transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.my-custom-product-card:hover .custom-product-thumbnail img{
	transform: scale(1.06);
}
/* thin outline echoing the arch */
.custom-product-thumbnail::after{
	content:"";
	position:absolute; inset:8px;
	border: 1px solid rgba(255,255,255,.55);
	pointer-events:none;
}

.custom-onsale-badge{
	position:absolute;
	top:16px; left:16px;
	z-index:2;
	background: var(--ncs-c4);
	color: #FFFFFF;
	font-family: var(--ncs-font-body);
	font-size:.68rem;
	letter-spacing:.12em;
	text-transform:uppercase;
	padding: 5px 12px;
	border-radius: 2px;
}

/* --- Info block --- */
.custom-product-info{
	padding-top: 18px;
	text-align:center;
	border-top: 1px solid #cfc8d8;
	margin-top: 16px;
}
.custom-product-title{
	font-family: var(--ncs-font-heading);
	font-weight:400;
	font-size:1.05rem;
	margin: 0 0 6px;
}
.custom-product-title a{
	color: var(--ncs-c4);
	text-decoration:none;
	transition: color .25s ease;
}
.custom-product-title a:hover{ color: var(--ncs-c1); }

.custom-product-price{
	font-family: var(--ncs-font-body);
	font-weight:500;
	letter-spacing:.06em;
	color: var(--ncs-c1);
	font-size:.95rem;
	margin-bottom: 14px;
}
.custom-product-price del{ color: var(--ncs-c1); opacity:.55; margin-right:6px; }
.custom-product-price ins{ text-decoration:none; color: var(--ncs-c4); }

.custom-add-to-cart-wrapper a.button,
.custom-add-to-cart-wrapper a.add_to_cart_button{
	display:flex !important;
	justify-content: center;
	align-items: center;
	gap: 10px;
	width:100%;
	font-family: var(--ncs-font-body);
	font-size:.78rem;
	letter-spacing:.14em;
	text-transform:uppercase;
	text-align:center;
	color: var(--ncs-c4) !important;
	background: transparent;
	border: 1px solid var(--ncs-c4);
	padding: 11px 16px;
	border-radius: 2px;
	transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.custom-add-to-cart-wrapper a.button:hover{
	background: var(--ncs-c4);
	border-color: var(--ncs-c4);
	color: #FFFFFF !important;
}

/* ============================================================
SINGLE PRODUCT
============================================================ */
.custom-single-product-layout{ background: var(--ncs-c3); }

.custom-product-top-layout{
	display: flex;
	flex-wrap: nowrap;
	align-items:flex-start;
	gap: 20px 4%;
	margin-bottom: 50px;
}

/* --- NEW CUSTOM GALLERY STYLES --- */
.custom-gallery-column {
	flex: 1; 
	min-width: 300px;
	max-width: 50%;	
}

.custom-layout-gallery-wrapper {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	width: 100% !important;
	max-width: 100% !important;
}

.custom-gallery-thumbnails {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 80px;
	flex-shrink: 0;
}

.custom-thumb-item {
	cursor: pointer;
	border: 1px solid transparent;
	opacity: 0.6;
	transition: opacity 0.3s ease, border-color 0.3s ease;
	border-radius: 4px;
	overflow: hidden;
	background: var(--ncs-c2);
}

.custom-thumb-item.active-thumb,
.custom-thumb-item:hover {
	opacity: 1;
	border-color: var(--ncs-c4);
}

.custom-thumb-item img {
	width: 100% !important;
	height: auto !important;
	display: block !important;
	object-fit: cover !important;
	margin: 0 !important;
}

.custom-main-image-container {
	position: relative !important;
	flex-grow: 1;
	overflow: hidden !important;
	background: var(--ncs-c2);
}

#custom-main-display-img {
	width: 100% !important;
	height: auto !important;
	display: block !important;
	object-fit: cover !important;
	margin: 0 !important;
}

#custom-trigger-zoom {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 10;
	background: #fff;
	padding: 0;
	border: none;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0,0,0,0.1);
	transition: transform 0.2s ease, background 0.2s ease;
}

#custom-trigger-zoom:hover {
	transform: scale(1.08);
	background: var(--ncs-c2);
}

.custom-summary-column .summary {
	width: 100% !important;
	margin: 0 !important;
}

/* --- Layout fix for title, price, and cart (WP Armour Issue) --- */
.custom-summary-column {
	flex: 1; 
	min-width: 300px;
}
.custom-summary-stacked {
	display: block !important;
	width: 100%;
}
.custom-summary-stacked .product_title,
.custom-summary-stacked p.price {
	display: block !important;
	width: 100%;
}

/* --- Breadcrumb + nav --- */
.custom-summary-column .woocommerce-breadcrumb{
	font-family: var(--ncs-font-body);
	font-size:.78rem;
	letter-spacing:.05em;
	color: var(--ncs-c1);
	text-transform:uppercase;
	margin: 0;
}
.custom-summary-column .woocommerce-breadcrumb a{ color: var(--ncs-c1); }

/* --- Title / price / meta --- */
.custom-summary-inner .product_title{
	font-family: var(--ncs-font-heading);
	font-weight:400;
	font-size: clamp(1.8rem, 2.4vw, 2.4rem);
	color: var(--ncs-c4);
	margin: 10px 0 14px;
}
.custom-summary-inner p.price{
	font-family: var(--ncs-font-body);
	font-weight:500;
	letter-spacing:.06em;
	font-size:1.25rem;
	color: var(--ncs-c1);
	margin-bottom: 18px;
}
.custom-summary-inner p.price del{ color: var(--ncs-c1); opacity:.55; }
.custom-summary-inner p.price ins{ text-decoration:none; color: var(--ncs-c4); }

.custom-summary-inner .woocommerce-product-rating{ margin-bottom: 16px; }

/* --- Add to cart form --- */
.custom-summary-inner form.cart{
	display:flex;
	align-items:center;
	gap:14px;
	flex-wrap:wrap;
	padding: 20px 0;
	border-top: 1px solid #cfc8d8;
	border-bottom: 1px solid #cfc8d8;
	margin: 20px 0 !important;
	clear: both; /* Ensures it clears the price */
	width: 100%;
}
.custom-summary-inner form.cart:before, .custom-summary-inner form.cart:after {display: none !important;}
.custom-summary-inner .quantity input.qty{
	width:64px;
	padding:12px 10px;
	border:1px solid var(--ncs-c2);
	text-align:center;
	border-radius:2px;
	font-family: var(--ncs-font-body);
}
.custom-summary-inner button.single_add_to_cart_button{
	font-family: var(--ncs-font-body);
	font-size:.8rem;
	letter-spacing:.14em;
	text-transform:uppercase;
	background: var(--ncs-c4);
	color: #FFFFFF !important;
	position: relative;
	border:none;
	padding: 14px 34px;
	border-radius:2px;
	transition: background .25s ease;
}
.custom-summary-inner button.single_add_to_cart_button:after {display: none;}
.custom-summary-inner button.single_add_to_cart_button:hover{
	background: var(--ncs-c1);
}

/* --- Meta / sharing footer --- */
.custom-summary-inner .product_meta{
	font-size:.82rem;
	color: var(--ncs-c1);
}
.custom-summary-inner .product_meta a{ color: var(--ncs-c4); }

/* wishlist / compare buttons row */
.lqd-woo-summary-after-cart{
	display:flex;
	gap:14px;
	margin-top:16px;
}
.lqd-woo-summary-after-cart a{
	font-family: var(--ncs-font-body);
	font-size:.78rem;
	letter-spacing:.08em;
	color: var(--ncs-c1);
	text-decoration:none;
	border-bottom:1px solid transparent;
	transition:border-color .2s ease, color .2s ease;
}
.lqd-woo-summary-after-cart a:hover{
	color: var(--ncs-c4);
	border-color: var(--ncs-c4);
}

/* --- Description / tabs block --- */
.custom-product-bottom-layout{
/* 	margin-top: 50px; 
	border-top: 1px solid #cfc8d8; 
	padding-top: 40px; */
	
}
.custom-product-bottom-layout .woocommerce-tabs ul.tabs{
	display:flex;
	gap:32px;
	border-bottom:1px solid var(--ncs-c2);
	padding:0 !important;
	margin:0 0 28px !important;
	list-style:none !important;
}
.custom-product-bottom-layout .woocommerce-tabs ul.tabs li{ margin:0 !important; }
.custom-product-bottom-layout .woocommerce-tabs ul.tabs li a{
	font-family: var(--ncs-font-heading);
	font-size:1.05rem;
	color: var(--ncs-c1);
	text-decoration:none;
	padding-bottom:14px;
	display:inline-block;
	border-bottom:2px solid transparent;
}
.custom-product-bottom-layout .woocommerce-tabs ul.tabs li.active a{
	color: var(--ncs-c4);
	border-bottom-color: var(--ncs-c4);
}
.custom-product-bottom-layout .woocommerce-Tabs-panel h2{
	font-family: var(--ncs-font-heading);
	font-weight:400;
	color: var(--ncs-c4);
}

/* Related / upsells heading */
.custom-product-bottom-layout .related.products > h2,
.custom-product-bottom-layout .upsells.products > h2{
	font-family: var(--ncs-font-heading);
	font-weight:400;
	font-size:1.6rem;
	color: var(--ncs-c4);
	margin-bottom: 30px;
	position:relative;
	padding-bottom:14px;
}
.custom-product-bottom-layout .related.products > h2::after,
.custom-product-bottom-layout .upsells.products > h2::after{
	content:"";
	position:absolute; left:0; bottom:0;
	width:48px; height:2px;
	background: var(--ncs-c1);
}

/* ============================================================
RESPONSIVE
============================================================ */
@media (max-width: 900px){
	.custom-product-top-layout{flex-direction: column-reverse;margin-bottom: 30px;}
	.custom-gallery-column,
	.custom-summary-column{
		max-width:100% !important;
		flex-basis:100% !important;
		width: 100%;
	}
}

@media (max-width:600px){
	ul.products{
		grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
		gap:20px;
	}
	.custom-summary-inner form.cart{ flex-direction:column; align-items:stretch; }
	.custom-summary-inner button.single_add_to_cart_button{ width:100%; }

	/* Stack custom gallery on mobile */
	.custom-layout-gallery-wrapper {
		flex-direction: column-reverse;
	}
	.custom-gallery-thumbnails {
		flex-direction: row;
		width: 100%;
		overflow-x: auto;
		padding-bottom: 10px;
	}
	.custom-thumb-item {
		width: 70px;
		flex-shrink: 0;
	}
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
	.custom-product-thumbnail img{ transition:none; }
}