/**
 * Lucilu — Drawer del pedido.
 * Escritorio: panel lateral derecho. Móvil: hoja que sube desde abajo.
 */

.lucilu-drawer {
	position: fixed;
	inset: 0;
	z-index: 999999;
	pointer-events: none;
}
.lucilu-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 10, 14, 0.45);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.lucilu-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: min(400px, 100%);
	background: #fff;
	box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
	transform: translateX(105%);
	transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
	display: flex;
	flex-direction: column;
	padding: 20px;
	box-sizing: border-box;
}
body.lucilu-drawer-open .lucilu-drawer { pointer-events: auto; }
body.lucilu-drawer-open .lucilu-drawer__overlay { opacity: 1; }
body.lucilu-drawer-open .lucilu-drawer__panel { transform: none; }

/* --- Cabecera --- */
.lucilu-drawer__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 14px;
	border-bottom: 1px solid #f2e4dc;
	font-size: 1.05rem;
}
.lucilu-drawer__check {
	flex: 0 0 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--lucilu-brand, #FF2971);
	color: #fff;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
}
.lucilu-drawer__close {
	margin-left: auto;
	background: none;
	border: 0;
	font-size: 1.7rem;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 2px 6px;
}
.lucilu-drawer__close:hover { color: #333; }

/* --- Mini carrito (lo rellena WooCommerce vía fragments) --- */
.lucilu-drawer__cart {
	flex: 1;
	overflow-y: auto;
	padding: 6px 0;
}
.lucilu-drawer__cart ul.product_list_widget,
.lucilu-drawer__cart ul.woocommerce-mini-cart {
	list-style: none;
	margin: 0;
	padding: 0;
}
.lucilu-drawer__cart li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #f5f5f5;
	margin: 0;
	position: relative;
}
.lucilu-drawer__cart li img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
	float: none;
	margin: 0;
	order: -1;
}
.lucilu-drawer__cart li a {
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1.35;
	color: #333;
	text-decoration: none;
}
.lucilu-drawer__cart li a.remove {
	position: absolute;
	right: 0;
	top: 10px;
	font-weight: 400;
	color: #bbb !important;
}
.lucilu-drawer__cart .quantity {
	display: block;
	font-size: 0.85rem;
	color: #777;
	margin-top: 2px;
}
.lucilu-drawer__cart .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	padding: 14px 0 4px;
	font-size: 1rem;
	border-top: 2px solid #f2e4dc;
	margin: 8px 0 0;
}
.lucilu-drawer__cart .woocommerce-mini-cart__total .amount {
	color: var(--lucilu-brand, #FF2971);
	font-weight: 700;
}
/* Los botones del mini-cart estándar sobran: el CTA vive en el pie del panel. */
.lucilu-drawer__cart .woocommerce-mini-cart__buttons,
.lucilu-drawer__cart p.buttons {
	display: none !important;
}
.lucilu-drawer__cart .woocommerce-mini-cart__empty-message {
	text-align: center;
	color: #888;
	padding: 30px 0;
}

/* --- Pie: un solo camino principal --- */
.lucilu-drawer__footer {
	padding-top: 14px;
	border-top: 1px solid #f2e4dc;
}
.lucilu-drawer__checkout {
	display: block;
	background: var(--lucilu-brand, #FF2971);
	color: #fff !important;
	text-align: center;
	padding: 15px 18px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
}
.lucilu-drawer__checkout:hover {
	background: var(--lucilu-brand-dark, #D6165A);
}
.lucilu-drawer__continue {
	display: block;
	width: 100%;
	background: none;
	border: 0;
	margin-top: 10px;
	color: #777;
	font-size: 0.9rem;
	text-decoration: underline;
	cursor: pointer;
}
.lucilu-drawer__continue:hover { color: #333; }
.lucilu-drawer__note {
	margin: 12px 0 0;
	font-size: 0.78rem;
	color: #999;
	text-align: center;
	line-height: 1.45;
}

/* --- Móvil: hoja desde abajo --- */
@media (max-width: 600px) {
	.lucilu-drawer__panel {
		top: auto;
		bottom: 0;
		height: auto;
		max-height: 85vh;
		width: 100%;
		border-radius: 16px 16px 0 0;
		transform: translateY(105%);
		box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
	}
	body.lucilu-drawer-open .lucilu-drawer__panel { transform: none; }
	.lucilu-drawer__cart { max-height: 42vh; }
}
