/* ==== Ecuapro Side Cart (sin parpadeos) ==== */

/* Overlay y panel */
.esc-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.45); opacity:0; visibility:hidden; transition:opacity .2s; z-index:999990 !important; }
.esc-panel{ position:fixed; top:0; right:0; width:360px; max-width:85vw; height:100%; background:#fff; transform:translateX(100%); transition:transform .2s; z-index:999999 !important; display:flex; flex-direction:column; box-shadow:-2px 0 12px rgba(0,0,0,.15) }
.esc-open .esc-overlay{opacity:1;visibility:visible}
.esc-open .esc-panel{transform:translateX(0)}

/* Header */
.esc-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #eee}
.esc-title{font-weight:600}
.esc-close{background:none;border:0;font-size:22px;line-height:1;cursor:pointer}

/* Lista de items */
.esc-items{padding:12px;overflow:auto;flex:1}
.esc-item{display:grid;grid-template-columns:74px 1fr auto;gap:10px;align-items:center;border-bottom:1px solid #f2f2f2;padding:10px 0;contain:content}
.esc-thumb img{width:74px;height:auto;display:block}
.esc-name a{color:inherit;text-decoration:none}
.esc-meta{font-size:13px;color:#666;margin-top:2px}

/* Cantidades */
.esc-qty{display:inline-flex;align-items:center;gap:6px;margin-top:6px}
.esc-qty button{width:28px;height:28px;border:1px solid #ddd;background:#f8f8f8;cursor:pointer}
.esc-qty-input{width:48px;height:28px;border:1px solid #ddd;text-align:center}

/* Acciones item */
.esc-remove{background:none;border:0;font-size:22px;cursor:pointer;color:#999}

/* Estados y footer */
.esc-empty{text-align:center;color:#666;padding:24px 0}
.esc-footer{border-top:1px solid #eee;padding:12px}
.esc-subtotal{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-weight:600}
.esc-actions{display:grid;gap:8px}
.esc-actions .button{display:block;text-align:center;padding:10px 12px;border-radius:6px;border:1px solid #ddd;text-decoration:none}
.esc-actions .button-primary{background:#2ea44f;color:#fff;border-color:#2ea44f}

/* Botón flotante */
.esc-fab{
  position:fixed; right:10px;
  bottom:calc(var(--esc-fab-bottom,60px) + var(--esc-fab-extra,0px) + env(safe-area-inset-bottom,0px));
  width:70px;height:70px;border:0;border-radius:50%;
  background:#1247ff; /* azul base */
  color:#fff;box-shadow:0 6px 18px rgba(0,0,0,.2);cursor:pointer;
  z-index:2147483646; will-change:transform; opacity:0; transition:opacity .15s;
}
#esc-fab-wrap:empty .esc-fab{opacity:0}
#esc-fab-wrap .esc-fab{opacity:1}
.esc-fab-icon{font-size:40px;line-height:1}
.esc-badge{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;border-radius:10px;background:#c00;color:#fff;font-size:12px;line-height:20px;text-align:center;padding:0 6px}

/* Ocultar FAB en checkout */
body.woocommerce-checkout .esc-fab{display:none}

/* Móvil: eleva base si hay otros FABs */
@media (max-width: 782px){ :root{ --esc-fab-bottom: 110px; } }

/* Forzar ocultar avisos cuando el JS lo indique */
body.esc-hide-notices .woocommerce-message,
body.esc-hide-notices .woocommerce-error,
body.esc-hide-notices .woocommerce-info,
body.esc-hide-notices .woocommerce-notices-wrapper{display:none !important}

/* === Overrides de especificidad y utilidades === */
#esc-fab-wrap .esc-fab{ background:#1247ff !important; }
#esc-fab-wrap .esc-fab .esc-fab-icon,
#esc-fab-wrap .esc-fab svg{ color:#fff; fill:#fff; }
