/* ============================================================
   NYRIX — Side cart (panier latéral)
   Glisse depuis la droite (gauche en RTL) à l'ajout AJAX desktop.
   ============================================================ */

/* Overlay (fondu) */
.nyrix-cart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 99998;
}
.nyrix-cart-overlay.open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Panneau */
.nyrix-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(380px, 90vw);
	background: #111114;
	border-left: 1px solid rgba(201, 204, 209, 0.12);
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 99999;
	display: flex;
	flex-direction: column;
	color: #f4f4f6;
}
.nyrix-cart-drawer.open {
	transform: none;
}

/* En-tête / pied */
.nyrix-cart-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.1rem 1.25rem;
	border-bottom: 1px solid rgba(201, 204, 209, 0.12);
}
.nyrix-cart-title {
	font-weight: 700;
	letter-spacing: 0.02em;
	font-size: 1.05rem;
}
.nyrix-cart-close {
	background: none;
	border: 0;
	color: #c9ccd1;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.2rem 0.45rem;
	transition: color 0.2s ease;
}
.nyrix-cart-close:hover {
	color: #fff;
}
.nyrix-cart-foot {
	padding: 1rem 1.25rem;
	border-top: 1px solid rgba(201, 204, 209, 0.12);
	display: grid;
	gap: 0.6rem;
}

/* Corps + contenu mini-cart WooCommerce (lisible sur fond sombre) */
.nyrix-cart-body {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 1.25rem;
}
.nyrix-cart-body,
.nyrix-cart-body a {
	color: #f4f4f6;
}
.nyrix-cart-body ul.cart_list,
.nyrix-cart-body ul.product_list_widget {
	list-style: none;
	margin: 0;
	padding: 0;
}
.nyrix-cart-body li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.2rem 0.5rem;
	padding: 0.8rem 0;
	border-bottom: 1px solid rgba(201, 204, 209, 0.08);
}
.nyrix-cart-body img {
	width: 48px;
	height: auto;
	border-radius: 6px;
	margin-inline-start: auto;
	order: 2;
}
.nyrix-cart-body a.remove {
	color: #e8632c !important;
	font-size: 1.1rem;
	line-height: 1;
}
.nyrix-cart-body .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	padding-top: 0.9rem;
	font-weight: 700;
	border-top: 0;
}
.nyrix-cart-body .woocommerce-mini-cart__empty-message {
	color: #c9ccd1;
	padding: 1.5rem 0;
	text-align: center;
}
/* On fournit nos propres boutons (foot) → masquer ceux du mini-cart Woo. */
.nyrix-cart-body .woocommerce-mini-cart__buttons {
	display: none;
}

/* Verrouille le scroll de fond quand le panneau est ouvert */
body.nyrix-cart-open {
	overflow: hidden;
}

/* Fondu doux avant navigation (mobile → page panier) */
body.nyrix-page-leaving {
	opacity: 0;
	transition: opacity 0.26s ease;
}

/* ============ ARABE (RTL) : glisse depuis la gauche ============ */
body.rtl .nyrix-cart-drawer {
	right: auto;
	left: 0;
	border-left: 0;
	border-right: 1px solid rgba(201, 204, 209, 0.12);
	box-shadow: 12px 0 40px rgba(0, 0, 0, 0.5);
	transform: translateX(-100%);
}
body.rtl .nyrix-cart-drawer.open {
	transform: none;
}
body.rtl .nyrix-cart-body img {
	margin-inline-start: auto;
}

/* ============ Mouvement réduit ============ */
@media (prefers-reduced-motion: reduce) {
	.nyrix-cart-overlay,
	.nyrix-cart-drawer,
	body.nyrix-page-leaving {
		transition: none;
	}
}
