/* Mamafit · carrito lateral */
html body #astra-mobile-cart-drawer.astra-cart-drawer{ --r:#EB184D; --m:#4B0C7A; width:420px; max-width:92vw; background:#fff; box-shadow:-18px 0 40px rgba(0,0,0,.18); font-family:var(--mf-fuente); }
html body #astra-mobile-cart-drawer .astra-cart-drawer-header{ display:flex; flex-direction:row-reverse; align-items:center; justify-content:space-between; gap:12px; min-height:68px; margin:0; padding:0 20px; border:0; border-bottom:3px solid var(--r); background:#fff; }
html body #astra-mobile-cart-drawer .astra-cart-drawer-title{ position:static; margin:0; padding:0; font-size:22px; line-height:1.2; color:var(--r); text-align:left; }
html body #astra-mobile-cart-drawer button.astra-cart-drawer-close{ position:static; display:flex; align-items:center; justify-content:center; flex:0 0 38px; width:38px; height:38px; min-height:0; margin:0; padding:0; border:0; border-radius:50%; background:#f4f4f5; color:#333; transition:background-color .2s,color .2s; }
html body #astra-mobile-cart-drawer button.astra-cart-drawer-close:hover{ background:var(--m); color:#fff; }
html body #astra-mobile-cart-drawer button.astra-cart-drawer-close svg{ width:14px; height:14px; fill:currentColor; }

/* Estructura: la lista se desplaza; el total y los botones quedan siempre a la vista */
html body #astra-mobile-cart-drawer .astra-cart-drawer-content{ display:flex; flex-direction:column; flex:1; min-height:0; padding:0; overflow:hidden; }
html body #astra-mobile-cart-drawer .astra-cart-drawer-content .widget_shopping_cart,html body #astra-mobile-cart-drawer .widget_shopping_cart_content{ display:flex; flex-direction:column; flex:1; min-height:0; height:100%; margin:0; padding:0; }
html body #astra-mobile-cart-drawer ul.woocommerce-mini-cart{ flex:0 1 auto; min-height:0; max-height:none !important; margin:0 !important; padding:4px 20px !important; overflow-y:auto; overscroll-behavior:contain; list-style:none; }

/* Cada producto: foto, nombre y cantidad × precio */
html body #astra-mobile-cart-drawer ul.woocommerce-mini-cart li.mini_cart_item{ position:relative; display:block; min-height:104px; margin:0 !important; padding:16px 42px 14px 92px !important; border:0; border-bottom:1px solid #eee; }
html body #astra-mobile-cart-drawer li.mini_cart_item:last-child{ border-bottom:0; }
html body #astra-mobile-cart-drawer li.mini_cart_item a:not(.remove){ display:block; margin:0; padding:0; font-size:15px; line-height:1.3; font-weight:400; color:#111 !important; text-decoration:none; }
html body #astra-mobile-cart-drawer li.mini_cart_item a:not(.remove):hover{ color:var(--r) !important; }
html body #astra-mobile-cart-drawer li.mini_cart_item a img{ position:absolute; left:0; top:15px; width:76px !important; height:76px !important; margin:0; border:1px solid #eee; border-radius:6px; object-fit:cover; }
html body #astra-mobile-cart-drawer li.mini_cart_item dl.variation{ margin:4px 0 0; padding:0; border:0; font-size:13px; color:#777; }
html body #astra-mobile-cart-drawer li.mini_cart_item dl.variation dt,html body #astra-mobile-cart-drawer li.mini_cart_item dl.variation dd,html body #astra-mobile-cart-drawer li.mini_cart_item dl.variation p{ display:inline; margin:0 4px 0 0; padding:0; }
html body #astra-mobile-cart-drawer li.mini_cart_item .quantity{ display:block; margin-top:8px; font-size:14px; color:#666 !important; }
html body #astra-mobile-cart-drawer li.mini_cart_item .quantity .amount,html body #astra-mobile-cart-drawer li.mini_cart_item .quantity bdi,html body #astra-mobile-cart-drawer li.mini_cart_item .quantity bdi span{ font-weight:700; color:var(--m) !important; }
html body #astra-mobile-cart-drawer li.mini_cart_item a.remove{ position:absolute; top:16px; right:0; left:auto; display:flex; align-items:center; justify-content:center; width:28px; height:28px; border:1px solid #ddd; border-radius:50%; background:#fff; font-size:18px; font-weight:400; line-height:1; color:#999 !important; text-decoration:none; transition:.2s; }
html body #astra-mobile-cart-drawer li.mini_cart_item a.remove:hover{ border-color:var(--r); background:var(--r); color:#fff !important; }

/* Total y botones, fijos al pie del panel */
html body #astra-mobile-cart-drawer p.woocommerce-mini-cart__total{ display:flex; align-items:baseline; justify-content:space-between; flex:0 0 auto; margin:auto 0 0 !important; padding:18px 20px 4px !important; border:0 !important; border-top:1px solid #e8e8e8 !important; background:#fafafa; text-align:left; }
html body #astra-mobile-cart-drawer p.woocommerce-mini-cart__total strong{ font-size:17px; font-weight:700; color:var(--r) !important; }
html body #astra-mobile-cart-drawer p.woocommerce-mini-cart__total .amount,html body #astra-mobile-cart-drawer p.woocommerce-mini-cart__total .amount *{ font-size:22px; font-weight:700; color:var(--m) !important; }
html body #astra-mobile-cart-drawer p.woocommerce-mini-cart__buttons{ display:flex; flex-direction:column; gap:10px; flex:0 0 auto; margin:0 !important; padding:14px 20px calc(18px + env(safe-area-inset-bottom)) !important; background:#fafafa; }
html body #astra-mobile-cart-drawer p.woocommerce-mini-cart__buttons a.button,html body #astra-mobile-cart-drawer .mf-carrito-vacio a.button{ display:flex; align-items:center; justify-content:center; width:100%; min-height:50px; margin:0 !important; padding:12px 16px !important; border:1px solid var(--r) !important; border-radius:4px; font-family:var(--mf-fuente); font-size:14px; font-weight:700; line-height:1.2; letter-spacing:.04em; text-transform:uppercase; text-decoration:none; transition:background-color .2s,color .2s,border-color .2s; }
html body #astra-mobile-cart-drawer p.woocommerce-mini-cart__buttons a.button:not(.checkout){ background:#fff !important; color:var(--r) !important; }
html body #astra-mobile-cart-drawer p.woocommerce-mini-cart__buttons a.button.checkout,html body #astra-mobile-cart-drawer .mf-carrito-vacio a.button{ background:var(--r) !important; color:#fff !important; }
html body #astra-mobile-cart-drawer p.woocommerce-mini-cart__buttons a.button:hover,html body #astra-mobile-cart-drawer .mf-carrito-vacio a.button:hover{ border-color:var(--m) !important; background:var(--m) !important; color:#fff !important; }

/* Vacío */
html body #astra-mobile-cart-drawer .woocommerce-mini-cart__empty-message{ margin:0; padding:48px 24px 18px; border:0; font-size:16px; text-align:center; color:#555; }
html body #astra-mobile-cart-drawer .mf-carrito-vacio{ margin:0; padding:0 24px; }
html body.admin-bar #astra-mobile-cart-drawer.astra-cart-drawer{ top:32px; height:calc(100% - 32px); }
@media (max-width:782px){ html body.admin-bar #astra-mobile-cart-drawer.astra-cart-drawer{ top:46px; height:calc(100% - 46px); } }
@media (prefers-reduced-motion:reduce){ #astra-mobile-cart-drawer *{ transition:none !important; } }

/* La cabecera ocupa su propio espacio (no tapa el primer producto) */
html body #astra-mobile-cart-drawer.astra-cart-drawer{ display:flex; flex-direction:column; overflow:hidden; }
html body #astra-mobile-cart-drawer .astra-cart-drawer-header{ position:relative !important; top:auto !important; flex:0 0 auto; }
html body #astra-mobile-cart-drawer .astra-cart-drawer-content{ position:relative !important; top:auto !important; left:auto !important; width:100% !important; height:auto !important; margin:0 !important; }
html body #astra-mobile-cart-drawer .astra-cart-drawer-header::before,html body #astra-mobile-cart-drawer .astra-cart-drawer-header::after{ content:none !important; }
html body #astra-mobile-cart-drawer.astra-cart-drawer{ padding-top:0 !important; margin-top:0 !important; }
html body #astra-mobile-cart-drawer li.mini_cart_item a img{ top:15px !important; transform:none !important; }

/* Mientras llega el contenido, el panel nunca se ve en blanco */
html body #astra-mobile-cart-drawer .widget_shopping_cart_content:empty::before{ content:"Cargando tu carrito…"; display:block; padding:48px 24px; font-size:15px; text-align:center; color:#666; }

/* Al quitar un producto: velo claro y un aro de carga limpio (sin el cuadrado de fondo) */
html body #astra-mobile-cart-drawer .blockUI.blockOverlay{ background:#fff !important; opacity:.75 !important; cursor:progress !important; }
html body #astra-mobile-cart-drawer .blockUI.blockOverlay::before{ content:""; position:absolute; top:50%; left:50%; width:28px; height:28px; margin:-14px 0 0 -14px; box-sizing:border-box; border:3px solid rgba(235,24,77,.22); border-top-color:#EB184D; border-radius:50%; background:none !important; font-size:0; animation:mf-giro .7s linear infinite; }
@keyframes mf-giro{ to{ transform:rotate(360deg); } }

/* Carrito vacío: centrado y con aire. Se ocultan los avisos y botones sueltos de Astra y WooCommerce */
html body #astra-mobile-cart-drawer .ast-mini-cart-empty,html body #astra-mobile-cart-drawer .widget_shopping_cart_content > .woocommerce-mini-cart__empty-message:not(.mf-aviso){ display:none !important; }
html body #astra-mobile-cart-drawer .mf-vacio{ display:flex; flex-direction:column; align-items:center; justify-content:center; flex:1; gap:12px; padding:48px 32px 90px; text-align:center; }
html body #astra-mobile-cart-drawer .mf-vacio svg{ color:#EB184D; opacity:.85; margin-bottom:6px; }
html body #astra-mobile-cart-drawer .mf-vacio__titulo{ margin:0; font-size:20px; line-height:1.3; color:#111; }
html body #astra-mobile-cart-drawer .mf-vacio__texto{ max-width:270px; margin:0; font-size:14px; line-height:1.5; color:#666; }
html body #astra-mobile-cart-drawer a.mf-vacio__boton{ display:flex; align-items:center; justify-content:center; width:100%; max-width:300px; min-height:50px; margin-top:14px; padding:12px 18px; border:1px solid #EB184D; border-radius:4px; background:#EB184D; color:#fff !important; font-size:14px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; text-decoration:none; transition:background-color .2s,border-color .2s; }
html body #astra-mobile-cart-drawer a.mf-vacio__boton:hover{ border-color:#4B0C7A; background:#4B0C7A; }
