.neo-hidden-qs,
.product-thumb .qty-switch,
.product-thumb-related .qty-switch,
.product-page__cart .qty-switch,
.product-page .qty-switch,
.product-page__cart ~ .qty-switch,
.neo-btn-wrap ~ .qty-switch {
    display: none !important;
}

.neo-btn-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.add_to_cart.neo-enhanced {
    display: inline-flex !important;
    align-items: center;
    justify-content: space-between;
    padding-right: 5px !important;
    gap: 0;
    position: relative;
    overflow: visible !important;
}

.add_to_cart.neo-enhanced > span:not(.neo-plus-icon):not(.neo-incart-badge) {
    flex: 1 1 auto;
    text-align: center;
    pointer-events: none;
}

b.neo-plus-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    font-size: 0 !important;
    font-weight: 300;
    font-style: normal;
    line-height: 1;
    margin-left: 6px;
    pointer-events: none;
    transition: background .2s;
    flex-shrink: 0;
    font-family: inherit;
    text-decoration: none;
}
b.neo-plus-icon::before {
    content: "+";
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
}

.add_to_cart.neo-enhanced:hover b.neo-plus-icon {
    background: rgba(255,255,255,0.4);
}

b.neo-incart-badge {
    position: absolute !important;
    top: -7px;
    right: -7px;
    background: #e53935;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0 !important;
    font-weight: 700;
    display: flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
    line-height: 1;
    border: 2px solid #fff;
    font-family: inherit;
    text-decoration: none;
}
b.neo-incart-badge::before {
    content: attr(data-qty);
    font-size: 11px;
}

.neo-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: transparent;
}
.neo-overlay.active { display: block; }

.neo-qty-popup {
    display: none;
    position: fixed;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 2px 10px rgba(0,0,0,0.10);
    padding: 16px 14px 14px;
    z-index: 9999;
    width: 300px;
    box-sizing: border-box;
}
.neo-qty-popup.active {
    display: block;
    animation: neoPopupIn .16s ease;
}

@keyframes neoPopupIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0);   }
}

.neo-qty-popup__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    transition: background .15s;
    padding: 0;
    z-index: 2;
    line-height: 1;
}
.neo-qty-popup__close:hover { background: #e0e0e0; }

.neo-qty-popup__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
    margin-bottom: 10px;
    /* padding-right: 28px; */
}

.neo-qty-popup__num {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    user-select: none;
}
.neo-qty-popup__num:hover {
    border-color: #4a7c59;
    background: #f0f7f2;
    color: #4a7c59;
}
.neo-qty-popup__num.selected {
    background: #4a7c59;
    border-color: #4a7c59;
    color: #fff;
}

.neo-qty-popup__custom {
    display: flex;
    align-items: center;
    gap: 8px;
}
.neo-qty-popup__input {
    flex: 1 1 auto;
    height: 44px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
    -moz-appearance: textfield;
}
.neo-qty-popup__input::-webkit-outer-spin-button,
.neo-qty-popup__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.neo-qty-popup__input:focus { border-color: #4a7c59; }
.neo-qty-popup__input::placeholder { color: #aaa; }

.neo-qty-popup__confirm {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: #4a7c59;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    padding: 0;
}
.neo-qty-popup__confirm:hover { background: #3a6347; }
