/* =========================================================
   Carrito lateral (se abre al anadir un producto)
   Metas Golf Academy. Usa los colores del Kit de Elementor.
   ========================================================= */

.mt-drawer {
	--d-ink: var(--e-global-color-primary, #000);
	--d-cream: var(--e-global-color-accentsecondary, #FCFBF5);
	--d-sand: var(--e-global-color-secondary, #F9F7EA);
	--d-yellow: var(--e-global-color-accent, #FDF567);
	--d-muted: var(--e-global-color-text, #8B8B8B);
	--d-line: var(--e-global-color-divider, #0000001A);
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}
.mt-drawer.is-open { visibility: visible; pointer-events: auto; }
.mt-drawer *, .mt-drawer *::before, .mt-drawer *::after { box-sizing: border-box; }

.mt-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 0.3s ease;
}
.mt-drawer.is-open .mt-drawer__overlay { opacity: 1; }

.mt-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(440px, 100%);
	background: #fff;
	color: var(--d-ink);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
}
.mt-drawer.is-open .mt-drawer__panel { transform: translateX(0); }

.mt-drawer__inner { display: flex; flex-direction: column; width: 100%; height: 100%; }

.mt-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 22px 24px;
	border-bottom: 1px solid var(--d-line);
}
.mt-drawer .mt-drawer__title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--d-ink); }
.mt-drawer .mt-drawer__close {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	background: none;
	padding: 6px 0 6px 6px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--d-ink);
	cursor: pointer;
}
.mt-drawer__close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

.mt-drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.mt-drawer__empty { padding: 28px 0; color: var(--d-muted); font-size: 15px; }
.mt-drawer .mt-drawer__list { list-style: none; margin: 0; padding: 0; }
.mt-drawer__item { position: relative; display: flex; gap: 16px; padding: 18px 28px 18px 0; border-bottom: 1px solid var(--d-line); }
.mt-drawer__item:last-child { border-bottom: 0; }
.mt-drawer__thumb { flex: none; width: 72px; height: 72px; overflow: hidden; border-radius: 10px; background: var(--d-sand); }
.mt-drawer__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-drawer__info { min-width: 0; }
.mt-drawer__name { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--d-ink); text-decoration: none; }
.mt-drawer__qty { display: block; margin-top: 6px; font-size: 13px; color: var(--d-muted); }
.mt-drawer__qty strong { color: var(--d-ink); font-weight: 700; }
.mt-drawer .mt-drawer__remove {
	position: absolute;
	top: 16px;
	right: 0;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	color: var(--d-muted);
	text-decoration: none;
	font-size: 18px;
	line-height: 1;
}
.mt-drawer .mt-drawer__remove:hover { background: var(--d-sand); color: var(--d-ink); }
.mt-drawer__item.is-loading { opacity: 0.45; pointer-events: none; }

.mt-drawer__foot { padding: 0 24px 24px; border-top: 1px solid var(--d-line); }
.mt-drawer__subtotal { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 16px; font-size: 18px; font-weight: 700; }
.mt-drawer__ship { padding-top: 16px; border-top: 1px solid var(--d-line); font-size: 14px; line-height: 1.45; color: #555; }
.mt-drawer__ship strong { color: var(--d-ink); }
.mt-drawer__bar { height: 8px; margin: 12px 0 18px; overflow: hidden; border-radius: 100px; background: var(--d-sand); }
.mt-drawer__bar span { display: block; height: 100%; border-radius: 100px; background: var(--d-yellow); transition: width 0.4s ease; }
.mt-drawer__actions { display: grid; gap: 10px; }
.mt-drawer .mt-drawer__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	border-radius: 100px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease;
}
.mt-drawer .mt-drawer__btn--ghost { background: var(--d-cream); color: var(--d-ink); border: 1px solid var(--d-line); }
.mt-drawer .mt-drawer__btn--ghost:hover { background: var(--d-sand); }
.mt-drawer .mt-drawer__btn--main { background: var(--d-yellow); color: var(--d-ink); }
.mt-drawer .mt-drawer__btn--main:hover { background: var(--d-ink); color: #fff; }

html.mt-drawer-lock, html.mt-drawer-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.mt-drawer__overlay, .mt-drawer__panel, .mt-drawer__bar span, .mt-drawer .mt-drawer__btn { transition: none; }
}

/* El tema pinta los botones en blanco/amarillo: se fuerza el estilo del cajon */
.mt-drawer .mt-drawer__close { color: var(--d-ink) !important; background: none !important; padding: 6px 0 6px 6px !important; min-height: 0 !important; border: 0 !important; }
.mt-drawer .mt-drawer__close:hover { color: var(--d-muted) !important; }
.mt-drawer .mt-drawer__title { color: var(--d-ink) !important; }

/* El boton flotante de WhatsApp (z-index muy alto) tapaba los botones del carrito lateral */
html.mt-drawer-lock .qlwapp__container, html.mt-drawer-lock .qlwapp { display: none !important; }
