#sbnp-modal-overlay {
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    background: rgba(0,0,0,0.5);
    overflow-y: auto;
}

#sbnp-modal {
    position: relative;
    max-width: 720px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

.sbnp-modal-header {
    position: relative;
    background: #000;
    color: #fff;
    padding: 16px 56px 16px 20px;
}

.sbnp-modal-intro {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

.sbnp-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: #fff;
    color: #000;
    border-radius: 999px;
    width: 28px;
    height: 28px;
    font-size: 18px;
    cursor: pointer;
}

.sbnp-modal-body {
    padding: 20px;
    background: #f7f7ff;
}

.sbnp-customer-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.sbnp-input-group {
    background: #fff;
    border-radius: 999px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border: 1px solid #eee;
}

.sbnp-input-group input,
.sbnp-input-group textarea {
    border: none;
    background: transparent;
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
    outline: none;
    resize: none;
}

.sbnp-input-group textarea {
    min-height: 48px;
}

/* Cart section */

.sbnp-cart-section {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 18px;
}

.sbnp-cart-header-row,
.sbnp-cart-row {
    display: grid;
    grid-template-columns: 90px 1fr 70px;
    align-items: center;
}

.sbnp-cart-header-row {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #888;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.sbnp-cart-row {
    padding: 8px 0;
}

.sbnp-product-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.sbnp-product-title {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #222;
}

.sbnp-product-title:hover {
    text-decoration: underline;
}

.sbnp-product-price {
    font-size: 13px;
    margin-top: 4px;
    margin-bottom: 6px;
}

.sbnp-price-regular {
    text-decoration: line-through;
    color: #999;
    margin-right: 4px;
    font-size: 12px;
}

.sbnp-price-sale {
    color: #00a651;
    font-weight: 600;
}

.sbnp-qty-control {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #eee;
    overflow: hidden;
    font-size: 13px;
}

.sbnp-qty-control button {
    border: none;
    background: #fafafa;
    padding: 4px 10px;
    cursor: pointer;
}

.sbnp-qty-control .sbnp-qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: #fff;
    padding: 4px 0;
    font-size: 13px;
}

.sbnp-col-delete {
    text-align: center;
}

.sbnp-delete-btn {
    border: none;
    background: #ffe5e5;
    color: #e53935;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

/* Extra sections */

.sbnp-extra-section {
    margin-top: 16px;
}

.sbnp-extra-inner {
    display: grid;
    grid-template-columns: 1.6fr 1.2fr;
    gap: 16px;
}

.sbnp-extra-left > .sbnp-summary-section {
    margin-bottom: 12px;
}

.sbnp-section-title {
    margin: 0 0 8px;
    font-size: 14px;
}


.sbnp-radio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #eee;
    padding: 6px 10px;
    margin-bottom: 8px;
    font-size: 13px;
    cursor: pointer;
}

.sbnp-radio input {
    margin-right: 6px;
}

.sbnp-radio-amount {
    font-weight: 600;
}

.sbnp-cod-box {
    border-radius: 16px;
    border: 1px solid #eee;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    font-size: 13px;
}

.sbnp-radio-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #ff0080;
    margin-right: 8px;
    position: relative;
}

.sbnp-radio-dot::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: #ff0080;
    border-radius: 50%;
}

.sbnp-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
}

.sbnp-summary-total-row {
    margin-top: 6px;
    border-top: 1px solid #f0f0f0;
    padding-top: 6px;
    font-weight: 600;
}

/* Footer */

.sbnp-modal-footer {
    padding: 14px 20px 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    border-top: 1px solid #f0f0f0;
}

.sbnp-place-order-btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: #ff0080;
    color: #fff;
    box-shadow: 0 8px 16px rgba(255,0,128,0.35);
}


.sbnp-loader {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #999;
    border-top-color: transparent;
    animation: sbnp-spinner 0.6s linear infinite;
}

.sbnp-message {
    font-size: 13px;
}

/* Responsive */

@media (max-width: 992px) {
    #sbnp-modal {
        width: calc(100% - 24px);
        margin: 12px auto;
        border-radius: 14px;
    }

    .sbnp-modal-body {
        padding: 14px;
    }

    .sbnp-modal-header {
        padding: 14px 48px 14px 16px;
    }

    .sbnp-modal-intro {
        font-size: 14px;
    }

    /* Top form */
    .sbnp-customer-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sbnp-delivery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* 2x2 cards become stacked */
    .sbnp-grid-2x2 {
        grid-template-columns: 1fr !important;
    }

    /* Shipping radio alignment */
    .sbnp-radio {
        gap: 10px;
    }
    .sbnp-radio-label {
        flex: 1;
        min-width: 0;
    }
    .sbnp-radio-amount {
        white-space: nowrap;
    }

    /* Payment box full width */
    .sbnp-payment-grid {
        grid-template-columns: 1fr;
    }
    .sbnp-cod-box {
        width: 100%;
    }

    /* Cart on mobile */
    .sbnp-cart-header-row {
        display: none;
    }
    .sbnp-cart-row {
        grid-template-columns: 70px 1fr 44px;
        gap: 10px;
        align-items: start;
    }
    .sbnp-product-image {
        width: 56px;
        height: 56px;
    }

    /* Footer */
    .sbnp-modal-footer {
        padding: 12px 14px 14px;
    }
    .sbnp-place-order-btn {
        width: 100%;
        padding: 12px 18px;
    }
}


@keyframes sbnp-spinner {
    to {
        transform: rotate(360deg);
    }
}


.sbnp-loading-row {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #777;
}


/* Delivery address section */
.sbnp-delivery-section {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 18px;
}

.sbnp-delivery-heading {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
}

.sbnp-delivery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.sbnp-field .sbnp-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.sbnp-field input,
.sbnp-field select {
    width: 100%;
    border: 1px solid #e9e9ee;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    background: #fff;
}

.sbnp-field select {
    appearance: none;
}



.sbnp-payment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: center;
}

.sbnp-promo-text {
    font-size: 12px;
    color: #666;
    line-height: 1.35;
}

.sbnp-promo-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid #eee;
}

.sbnp-promo-title {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 14px;
}

.sbnp-promo-desc {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}


/* 2x2 layout for Summary/Shipping/Payment/Promo */
.sbnp-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sbnp-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
}

