/* Floating cart button — colour via --nfcc-fc-color, side via --left modifier */
.nfcc-float-cart{
  position:fixed; right:22px; bottom:22px; left:auto; z-index:99990;
  width:56px; height:56px; border-radius:50%;
  background:var(--nfcc-fc-color,#c0612a); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 6px 20px rgba(0,0,0,.25); text-decoration:none;
  transition:transform .15s ease, filter .15s ease;
}
.nfcc-float-cart:hover{ filter:brightness(.92); transform:translateY(-2px); color:#fff; }
.nfcc-float-cart svg{ width:26px; height:26px; }
.nfcc-float-cart--left{ left:22px; right:auto; }
.nfcc-float-cart__count{
  position:absolute; top:-5px; right:-5px; min-width:22px; height:22px; padding:0 6px;
  border-radius:11px; background:#fff; color:var(--nfcc-fc-color,#c0612a);
  font-size:12px; font-weight:700; line-height:22px; text-align:center;
  box-shadow:0 1px 4px rgba(0,0,0,.2);
}
.nfcc-float-cart--left .nfcc-float-cart__count{ right:auto; left:-5px; }
.nfcc-float-cart--empty .nfcc-float-cart__count{ display:none; }
.nfcc-float-cart--hideempty.nfcc-float-cart--empty{ display:none; }
@media(max-width:600px){
  .nfcc-float-cart{ right:16px; bottom:16px; width:52px; height:52px; }
  .nfcc-float-cart--left{ left:16px; right:auto; }
}

/* ---- Cart popup (mini cart) ---- */
body.nfcc-noscroll{ overflow:hidden; }
.nfcc-cart-popup-overlay{
  position:fixed; inset:0; z-index:100000; background:rgba(0,0,0,.5);
  opacity:0; visibility:hidden; transition:opacity .3s ease, visibility .3s ease;
  display:flex; align-items:flex-end; justify-content:flex-end; padding:22px;
}
.nfcc-cart-popup-overlay.nfcc-pos-left{ justify-content:flex-start; }
.nfcc-cart-popup-overlay.is-open{ opacity:1; visibility:visible; }
.nfcc-cart-popup{
  width:min(360px,92vw); max-height:72vh; background:#fff; border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.3); display:flex; flex-direction:column; overflow:hidden;
  transform:translateY(14px); transition:transform .3s ease;
}
.nfcc-cart-popup-overlay.is-open .nfcc-cart-popup{ transform:none; }
.nfcc-cart-popup__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; border-bottom:1px solid #eee;
}
.nfcc-cart-popup__title{ font-weight:700; font-size:15px; text-transform:uppercase; letter-spacing:.6px; color:#333; }
.nfcc-cart-popup__close{
  background:none; border:none; font-size:26px; line-height:1; color:#999; cursor:pointer; padding:0 4px;
}
.nfcc-cart-popup__close:hover{ color:#333; }
.nfcc-cart-popup__body{ padding:6px 18px 10px; overflow:auto; flex:1 1 auto; }
.nfcc-cart-popup__foot{ display:flex; flex-direction:column; gap:10px; padding:14px 18px; border-top:1px solid #eee; }
.nfcc-cart-popup__foot-row{ display:flex; gap:10px; }

.nfcc-btn{
  flex:1; text-align:center; padding:12px 14px; border-radius:6px; text-decoration:none;
  font-weight:700; text-transform:uppercase; letter-spacing:.5px; font-size:13px; transition:filter .15s ease;
}
.nfcc-btn--ghost{ border:1px solid #ddd; color:#333; background:#fff; }
.nfcc-btn--ghost:hover{ border-color:var(--nfcc-fc-color,#c0612a); color:var(--nfcc-fc-color,#c0612a); }
.nfcc-btn--solid{ background:var(--nfcc-fc-color,#c0612a); color:#fff; }
.nfcc-btn--solid:hover{ filter:brightness(.92); color:#fff; }

/* Kemas isi mini-cart WooCommerce di dalam popup */
.nfcc-cart-popup ul.woocommerce-mini-cart{ list-style:none; margin:0; padding:0; }
.nfcc-cart-popup .woocommerce-mini-cart__buttons{ display:none; } /* guna butang foot kita */
.nfcc-cart-popup .woocommerce-mini-cart__total{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 0 4px; margin-top:8px; border-top:1px solid #eee; font-size:15px;
}
@media(max-width:600px){
  .nfcc-cart-popup-overlay{ justify-content:center; align-items:flex-end; padding:12px; }
  .nfcc-cart-popup{ width:100%; }
}

/* ---- Mini-cart items + remove button (popup) — clean layout ---- */
.nfcc-cart-popup.is-loading{ opacity:.55; pointer-events:none; }

.nfcc-cart-popup ul.woocommerce-mini-cart li.woocommerce-mini-cart-item{
  position:relative !important; list-style:none; margin:0;
  padding:14px 32px 14px 64px !important; min-height:64px;
  border:none !important; border-bottom:1px solid #f0f0f0 !important;
  font-size:13px; line-height:1.45;
}
/* thumbnail — pinned left, out of text flow */
.nfcc-cart-popup ul.woocommerce-mini-cart li.woocommerce-mini-cart-item img{
  position:absolute !important; left:0 !important; top:14px !important; right:auto !important;
  float:none !important; margin:0 !important;
  width:48px !important; height:auto !important; border-radius:4px;
}
/* product name */
.nfcc-cart-popup ul.woocommerce-mini-cart li.woocommerce-mini-cart-item > a:not(.remove){
  display:block !important; margin:0 0 2px !important; padding:0 !important;
  color:#333 !important; text-decoration:none; font-weight:600;
}
/* remove — top right, never overlaps text */
.nfcc-cart-popup ul.woocommerce-mini-cart li.woocommerce-mini-cart-item a.remove{
  position:absolute !important; right:0 !important; top:14px !important; left:auto !important; margin:0 !important;
  width:22px; height:22px; line-height:20px; text-align:center;
  border:1px solid #ddd; border-radius:50%;
  color:#bbb !important; font-size:15px; text-decoration:none;
}
.nfcc-cart-popup ul.woocommerce-mini-cart li.woocommerce-mini-cart-item a.remove:hover{
  background:var(--nfcc-fc-color,#c0612a); border-color:var(--nfcc-fc-color,#c0612a); color:#fff !important;
}
/* hide the long variation meta — keeps the popup tidy */
.nfcc-cart-popup ul.woocommerce-mini-cart li.woocommerce-mini-cart-item dl.variation{ display:none !important; }
/* quantity x price */
.nfcc-cart-popup ul.woocommerce-mini-cart li.woocommerce-mini-cart-item .quantity{
  display:block !important; margin-top:2px !important; color:#777; font-size:12px;
}
.nfcc-cart-popup .woocommerce-mini-cart__empty-message{ padding:24px 0; text-align:center; color:#888; }
