/* =============================================
   PRYMAC WINE — Drawer panier
   ============================================= */

.cart-drawer-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(26, 5, 9, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility 0s linear .3s;
	z-index: 9998;
}

.cart-drawer-backdrop.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity .3s ease;
}

.cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100dvh;
	width: 420px;
	max-width: 100vw;
	background: #fff;
	box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.4, 0, .2, 1);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	font-family: Inter, sans-serif;
}

.cart-drawer.is-open {
	transform: translateX(0);
}

.cart-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 24px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.cart-drawer__title {
	margin: 0;
	font-family: "ivyora-display", serif;
	font-size: 22px;
	font-weight: 500;
	color: var(--e-global-color-primary, #4E0F21);
}

.cart-drawer .cart-drawer__close {
	background: none !important;
	border: none !important;
	cursor: pointer;
	padding: 6px !important;
	color: var(--e-global-color-primary, #4E0F21) !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border-radius: 50% !important;
	box-shadow: none !important;
	width: 32px;
	height: 32px;
	transition: background .2s, color .2s;
}

.cart-drawer .cart-drawer__close:hover,
.cart-drawer .cart-drawer__close:focus {
	background: #f5efe9 !important;
	color: var(--e-global-color-primary, #4E0F21) !important;
	outline: none !important;
}

.cart-drawer .cart-drawer__close svg {
	display: block;
}

.cart-drawer__body {
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.cart-drawer__loader {
	padding: 40px 24px;
	text-align: center;
	color: #888;
	font-size: 14px;
}

/* Empty state */
.cart-drawer__empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
	text-align: center;
	gap: 12px;
}

.cart-drawer__empty svg {
	opacity: 0.5;
	margin-bottom: 8px;
}

.cart-drawer__empty-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--e-global-color-text, #242424);
}

.cart-drawer__empty-text {
	margin: 0 0 12px;
	font-size: 14px;
	color: #666;
	max-width: 280px;
}

/* Items */
.cart-drawer__items {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
}

.cart-drawer__item {
	display: flex;
	gap: 14px;
	padding: 18px 24px;
	border-bottom: 1px solid #f0f0f0;
}

.cart-drawer__item-thumb {
	display: block !important;
	width: 72px !important;
	height: 72px !important;
	overflow: hidden;
	background: #f8f4ef;
	flex-shrink: 0;
	box-shadow: none !important;
}

.cart-drawer__item-thumb img {
	display: block !important;
	width: 72px !important;
	height: 72px !important;
	max-width: 72px !important;
	object-fit: cover !important;
	border-radius: 0;
}

.cart-drawer__item-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cart-drawer__item-top {
	display: flex;
	gap: 8px;
	justify-content: space-between;
}

.cart-drawer__item-name {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--e-global-color-text, #242424);
	flex: 1;
}

.cart-drawer__item-name a {
	color: inherit;
	text-decoration: none;
}

.cart-drawer__item-name a:hover {
	color: var(--e-global-color-primary, #4E0F21);
}

.cart-drawer .cart-drawer__remove {
	background: none !important;
	border: none !important;
	cursor: pointer;
	padding: 4px !important;
	color: #999 !important;
	display: inline-flex !important;
	flex-shrink: 0;
	box-shadow: none !important;
	border-radius: 0 !important;
	transition: color .2s;
}

.cart-drawer .cart-drawer__remove:hover {
	color: var(--e-global-color-primary, #4E0F21) !important;
	background: none !important;
}

.cart-drawer__item-meta {
	font-size: 12px;
	color: #888;
}

.cart-drawer__item-meta:empty {
	display: none;
}

.cart-drawer__item-meta p {
	margin: 0;
}

.cart-drawer__item-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 4px;
}

.cart-drawer .cart-drawer__qty {
	display: inline-flex !important;
	align-items: center;
	border: 1px solid #d4d4d4 !important;
	border-radius: 0 !important;
	overflow: hidden;
	background: #fff !important;
}

.cart-drawer .cart-drawer__qty-btn {
	background: none !important;
	border: none !important;
	width: 30px !important;
	height: 30px !important;
	padding: 0 !important;
	cursor: pointer;
	font-size: 16px !important;
	line-height: 1 !important;
	color: var(--e-global-color-text, #242424) !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-shadow: none !important;
	border-radius: 0 !important;
	transition: background .2s;
}

.cart-drawer .cart-drawer__qty-btn:hover {
	background: #f5efe9 !important;
}

.cart-drawer .cart-drawer__qty-input {
	width: 36px !important;
	min-width: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	text-align: center !important;
	font-size: 13px !important;
	height: 30px !important;
	padding: 0 !important;
	background: transparent !important;
	color: var(--e-global-color-text, #242424) !important;
	font-family: inherit !important;
	box-shadow: none !important;
}

.cart-drawer .cart-drawer__qty-input:focus {
	outline: none !important;
	box-shadow: none !important;
}

.cart-drawer__item-price {
	font-size: 14px;
	font-weight: 600;
	color: var(--e-global-color-primary, #4E0F21);
	white-space: nowrap;
}

.cart-drawer__item-price .amount,
.cart-drawer__item-price bdi {
	color: inherit;
}

/* Footer */
.cart-drawer__footer {
	padding: 20px 24px 24px;
	border-top: 1px solid #eee;
	background: #faf7f3;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cart-drawer__subtotal {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 15px;
	color: var(--e-global-color-text, #242424);
}

.cart-drawer__subtotal-amount {
	font-size: 18px;
	font-weight: 700;
	color: var(--e-global-color-primary, #4E0F21);
}

.cart-drawer__subtotal-amount .amount,
.cart-drawer__subtotal-amount bdi {
	color: inherit;
}

.cart-drawer__tax {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 12px;
	color: #888;
	margin-top: -4px;
}

.cart-drawer__tax .amount,
.cart-drawer__tax bdi {
	color: inherit;
}

.cart-drawer__note {
	margin: 0 0 6px;
	font-size: 12px;
	color: #888;
}

.cart-drawer .cart-drawer__cta {
	display: block !important;
	width: 100% !important;
	text-align: center !important;
	padding: 14px 20px !important;
	border-radius: 0 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	letter-spacing: 0.5px !important;
	text-transform: uppercase !important;
	box-shadow: none !important;
	border: 1px solid transparent !important;
	transition: background .2s, color .2s, border-color .2s;
	box-sizing: border-box !important;
}

.cart-drawer .cart-drawer__cta--primary {
	background: var(--e-global-color-primary, #4E0F21) !important;
	color: #fff !important;
	border-color: var(--e-global-color-primary, #4E0F21) !important;
}

.cart-drawer .cart-drawer__cta--primary:hover {
	background: #6a1530 !important;
	color: #fff !important;
	border-color: #6a1530 !important;
}

.cart-drawer .cart-drawer__cta--secondary {
	background: transparent !important;
	color: var(--e-global-color-primary, #4E0F21) !important;
	border-color: var(--e-global-color-primary, #4E0F21) !important;
}

.cart-drawer .cart-drawer__cta--secondary:hover {
	background: var(--e-global-color-primary, #4E0F21) !important;
	color: #fff !important;
}

/* Body lock when open */
body.cart-drawer-open {
	overflow: hidden;
}

/* Loading state */
.cart-drawer.is-loading .cart-drawer__body {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity .15s;
}

/* Mobile */
@media (max-width: 480px) {
	.cart-drawer {
		width: 100vw;
	}
}

/* Neutralise les notices WooCommerce (border coloré par défaut) */
.woocommerce-notices-wrapper,
.woocommerce-notices-wrapper:focus,
.woocommerce-notices-wrapper *:focus,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
ul.woocommerce-error,
.woocommerce-NoticeGroup,
.woocommerce-NoticeGroup * {
	outline: none !important;
	box-shadow: none !important;
	border: none !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	border-bottom: none !important;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	background-color: #faf7f3 !important;
	color: var(--e-global-color-text, #242424) !important;
	padding: 14px 20px !important;
	border-radius: 0 !important;
	list-style: none !important;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none !important;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
	color: var(--e-global-color-primary, #4E0F21) !important;
}
