/* =====================================================
   NEETACHA CART v4-FINAL
   Every rule uses !important to beat theme overrides
   ===================================================== */

/* Hide original Add to Cart buttons */
a[href*="add-to-cart="],
a.add_to_cart_button,
a.button.product_type_simple,
a.button.add_to_cart,
.ncf-hidden { display: none !important; }

/* Quantity wrapper */
.ncf-qty {
    display:         flex   !important;
    align-items:     center !important;
    justify-content: center !important;
    margin:          10px auto 6px auto !important;
    gap:             6px    !important;
    width:           auto   !important;
    padding:         0      !important;
    background:      transparent !important;
    border:          none   !important;
}

/* MINUS button */
.ncf-qty button.ncf-minus {
    all: unset !important;
    display:         flex    !important;
    align-items:     center  !important;
    justify-content: center  !important;
    width:           36px    !important;
    height:          36px    !important;
    min-width:       36px    !important;
    min-height:      36px    !important;
    background:      #c0392b !important;
    border-radius:   8px     !important;
    cursor:          pointer !important;
    box-sizing:      border-box !important;
    border:          none    !important;
    outline:         none    !important;
    padding:         0       !important;
    margin:          0       !important;
    box-shadow:      0 2px 8px rgba(192,57,43,0.4) !important;
    -webkit-appearance: none !important;
    appearance:      none    !important;
}

/* PLUS button */
.ncf-qty button.ncf-plus {
    all: unset !important;
    display:         flex    !important;
    align-items:     center  !important;
    justify-content: center  !important;
    width:           36px    !important;
    height:          36px    !important;
    min-width:       36px    !important;
    min-height:      36px    !important;
    background:      #c0392b !important;
    border-radius:   8px     !important;
    cursor:          pointer !important;
    box-sizing:      border-box !important;
    border:          none    !important;
    outline:         none    !important;
    padding:         0       !important;
    margin:          0       !important;
    box-shadow:      0 2px 8px rgba(192,57,43,0.4) !important;
    -webkit-appearance: none !important;
    appearance:      none    !important;
}

/* SVG icons inside buttons */
.ncf-qty button.ncf-minus svg,
.ncf-qty button.ncf-plus  svg {
    display:  block   !important;
    width:    18px    !important;
    height:   18px    !important;
    fill:     none    !important;
    stroke:   #ffffff !important;
    overflow: visible !important;
}

/* Hover / active */
.ncf-qty button.ncf-minus:hover,
.ncf-qty button.ncf-plus:hover  { background: #a93226 !important; }
.ncf-qty button.ncf-minus:active,
.ncf-qty button.ncf-plus:active { opacity: .8 !important; }

/* Busy state */
.ncf-qty.ncf-busy button.ncf-minus,
.ncf-qty.ncf-busy button.ncf-plus {
    opacity:        .4  !important;
    pointer-events: none !important;
    cursor:         wait !important;
}

/* Number input */
.ncf-qty input.ncf-num {
    all: unset !important;
    display:         block   !important;
    width:           44px    !important;
    height:          36px    !important;
    min-width:       44px    !important;
    text-align:      center  !important;
    border:          2px solid #c0392b !important;
    border-radius:   8px     !important;
    font-size:       15px    !important;
    font-weight:     700     !important;
    color:           #c0392b !important;
    background:      #ffffff !important;
    box-sizing:      border-box !important;
    pointer-events:  none    !important;
    -moz-appearance: textfield !important;
    appearance:      textfield !important;
    padding:         0       !important;
    margin:          0       !important;
    line-height:     36px    !important;
}
.ncf-qty input.ncf-num::-webkit-inner-spin-button,
.ncf-qty input.ncf-num::-webkit-outer-spin-button { -webkit-appearance: none !important; display: none !important; }

/* =====================================================
   FLOATING CART BAR
   ===================================================== */
#ncf-bar {
    display:         none;
    position:        fixed   !important;
    bottom:          18px    !important;
    left:            12px    !important;
    right:           72px    !important;   /* clears 60px WhatsApp btn */
    z-index:         9999999 !important;
    align-items:     center  !important;
    justify-content: space-between !important;
    gap:             8px     !important;
    background:      #c0392b !important;
    border-radius:   50px    !important;
    padding:         10px 10px 10px 16px !important;
    box-sizing:      border-box !important;
    box-shadow:      0 6px 24px rgba(0,0,0,.32) !important;
}
#ncf-bar.ncf-show {
    display: flex !important;
    animation: ncfUp .3s ease;
}
@keyframes ncfUp {
    from { opacity:0; transform:translateY(16px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Desktop: centre it */
@media (min-width: 560px) {
    #ncf-bar {
        left:      50%   !important;
        right:     auto  !important;
        transform: translateX(-50%) !important;
        width:     460px !important;
        max-width: calc(100vw - 24px) !important;
    }
    #ncf-bar.ncf-show { transform: translateX(-50%) !important; }
}

.ncf-left {
    display:     flex   !important;
    align-items: center !important;
    gap:         9px    !important;
    flex:        1      !important;
    min-width:   0      !important;
    overflow:    hidden !important;
}
.ncf-info {
    display:        flex            !important;
    flex-direction: column          !important;
    gap:            0               !important;
    min-width:      0               !important;
}
.ncf-count {
    font-size:   11px   !important;
    font-weight: 600    !important;
    color:       #fff   !important;
    opacity:     .88    !important;
    white-space: nowrap !important;
    line-height: 1.3    !important;
}
.ncf-total {
    font-size:   17px   !important;
    font-weight: 800    !important;
    color:       #fff   !important;
    white-space: nowrap !important;
    line-height: 1.2    !important;
}
.ncf-btn {
    display:         block          !important;
    background:      #ffffff        !important;
    color:           #c0392b        !important;
    font-weight:     700            !important;
    font-size:       13px           !important;
    padding:         9px 16px       !important;
    border-radius:   50px           !important;
    text-decoration: none           !important;
    white-space:     nowrap         !important;
    flex-shrink:     0              !important;
    line-height:     1.2            !important;
    border:          none           !important;
}
.ncf-btn:hover { background: #f0f0f0 !important; color: #a93226 !important; }

/* Tiny phones */
@media (max-width: 360px) {
    #ncf-bar   { padding: 8px 8px 8px 12px !important; bottom: 10px !important; }
    .ncf-total { font-size: 14px !important; }
    .ncf-btn   { font-size: 11px !important; padding: 7px 11px !important; }
}
