#popup-checkout-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-checkout-content {
    background: #fff;
    padding: 0;
    border-radius: 12px;
    min-width: 320px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.popup-checkout-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Popup Header */
.popup-checkout-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}
.popup-header-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

/* Inner content padding */
#popup-checkout-form {
    padding: 20px 25px 25px;
}

/* Gateway image size */
#popup-checkout-modal .payment_methods img {
    max-width: 60px !important;
    height: auto !important;
    vertical-align: middle;
}

/* Place Order button full width */
#popup-checkout-modal .woocommerce-checkout .button, 
#popup-checkout-modal .woocommerce-checkout button.button {
    width: 100% !important;
    display: block !important;
}

/* Extra Dot Hide from Shipping Section */
#popup-checkout-modal .woocommerce-shipping-methods li {
    list-style: none !important;
    position: relative;
    padding-left: 0 !important;
}
#popup-checkout-modal .woocommerce-shipping-methods li::before,
#popup-checkout-modal .woocommerce-shipping-methods li::after {
    display: none !important;
    content: none !important;
}

/* Cart table responsive wrapper */
.popup-cart-table-wrapper {
    width: 100%;
    overflow-x: hidden;
}

/* Cart table style */
.popup-cart-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    font-size: 15px;
    table-layout: fixed;
    margin-bottom: 20px;
    background: #fff;
}
.popup-cart-table th, .popup-cart-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
    word-break: break-word;
}
.popup-cart-table th {
    background: #f8f8f8;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #555;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.popup-cart-table tbody tr:hover {
    background: #fafafa;
}
.popup-cart-table input[type="number"] {
    width: 50px;
    font-size: 15px;
    padding: 2px 4px;
}
.popup-cart-remove {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #e00;
    padding: 0;
    margin: 0;
    float: right;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

/* cart remove button background hide */
.popup-cart-remove,
.popup-cart-remove:active,
.popup-cart-remove:focus,
.popup-cart-remove:visited,
.popup-cart-remove:hover {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.popup-cart-remove {
    border: none !important;
    outline: none !important;
}

.popup-cart-remove::after,
.popup-cart-remove::before {
    display: none !important;
    content: none !important;
    background: none !important;
    box-shadow: none !important;
}




.popup-cart-table td:last-child {
    width: 24px;
    min-width: 24px;
    text-align: right;
    padding-right: 2px;
}
.popup-cart-table td img {
    width: 40px !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
}

/* Loading spinner */
.popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #ff6600;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.5s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

.popup-close {
    position: absolute;
    top: 15px; right: 15px;
    font-size: 20px;
    color: #fff;
    background: #ff6600;
    border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; 
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255,102,0,0.3);
    border: none;
    z-index: 10001;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    font-weight: bold;
    line-height: 1;
}
.popup-close:hover {
    background: #e55a00;
    transform: scale(1.1);
}


/* Cart Table Section */
.popup-cart-table th.image-col, .popup-cart-table td.image-col {
    width: 15%;
    min-width: 32px;
    max-width: 48px;
    text-align: center;
}
.popup-cart-table th.product-col, .popup-cart-table td.product-col {
    width: 35%;
    min-width: 80px;
    max-width: 200px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
}
.popup-cart-table th.qty-col, .popup-cart-table td.qty-col {
    width: 20%;
    min-width: 36px;
    max-width: 60px;
    text-align: center;
}
.popup-cart-table th.total-col, .popup-cart-table td.total-col {
    width: 20%;
    min-width: 40px;
    max-width: 80px;
    text-align: right;
}
.popup-cart-table th.remove-col, .popup-cart-table td.remove-col {
    width: 10%;
    min-width: 20px;
    max-width: 32px;
    text-align: center;
    padding-right: 0;
    padding-left: 0;
}

/* Buy now button disable for variation product */
.popup-buy-now[disabled], .popup-buy-now.popup-buy-now-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}




/* Gateway section container */
#popup-checkout-modal .wc_payment_methods {
    background: #f7f7fb;
    border-radius: 10px;
    padding: 18px 16px 10px 16px;
    margin-bottom: 18px;
}

/* Gateway radio */
#popup-checkout-modal .wc_payment_methods .payment_method {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

#popup-checkout-modal .wc_payment_methods input[type="radio"] {
    accent-color: #ff3c3c; /* Modern browsers */
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

#popup-checkout-modal .wc_payment_methods label {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 0;
    cursor: pointer;
}

#popup-checkout-modal .wc_payment_methods .payment_box {
    background: #ededf7;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 8px 0 0 26px;
    font-size: 14px;
    color: #444;
    border: none;
    box-shadow: none;
}



/* Gateway List - Dot/Bullet Hide */
#popup-checkout-modal .wc_payment_methods,
#popup-checkout-modal .woocommerce-checkout .wc_payment_methods {
    padding-left: 0 !important;
}
#popup-checkout-modal .wc_payment_methods li,
#popup-checkout-modal .woocommerce-checkout .wc_payment_methods li {
    list-style: none !important;
    position: relative;
    padding-left: 0 !important;
}
#popup-checkout-modal .wc_payment_methods li::before,
#popup-checkout-modal .wc_payment_methods li::after,
#popup-checkout-modal .woocommerce-checkout .wc_payment_methods li::before,
#popup-checkout-modal .woocommerce-checkout .wc_payment_methods li::after {
    display: none !important;
    content: none !important;
}


/*Gateway Image Size Control */
#popup-checkout-modal .payment_methods img,
#popup-checkout-modal .wc_payment_methods img {
    max-width: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    height: auto !important;
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 6px;
    box-shadow: none;
}

/* Gateway Image Label Align */
#popup-checkout-modal .payment_methods label,
#popup-checkout-modal .wc_payment_methods label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
}




/* Quantity Update Inline */
.popup-cart-table input[type="number"] {
    width: 34px !important;
}

.popup-qty-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    width: 90px;
    background: #f8f8f8;
    flex-direction: row; /* horizontal */
    justify-content: center;
    gap: 0;
}
.popup-qty-wrap.horizontal {
    flex-direction: row;
}
.popup-qty-btn {
    width: 25px !important;
    height: 32px;
    background: #f3f3f3;
    border: none;
    color: #222;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.popup-qty-btn:hover {
    background: #ff6600;
    color: #fff;
}
.popup-cart-qty {
    width: 25px;
    height: 30px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    -moz-appearance: textfield;
}
.popup-cart-qty::-webkit-outer-spin-button,
.popup-cart-qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.popup-cart-qty[type=number] {
    -moz-appearance: textfield !important;
}

    button.popup-qty-btn.popup-qty-minus{
      font-size: 16px;
    }
    
    button.popup-qty-btn.popup-qty-plus{
        font-size: 16px;
    }


@media (max-width: 600px) {

    .popup-qty-wrap {
        width: 65px !important;
        font-size: 13px !important;
    }
    
    .popup-cart-table input[type="number"] {
    width: 32px !important;
}
    
    button.popup-qty-btn.popup-qty-minus{
        padding: 5px;
        margin-left: 25px;
        font-size: 13px;
    }
    
    button.popup-qty-btn.popup-qty-plus{
        margin-right: 25px !important;
        padding: 5px !important;
        font-size: 13px;
    }
    
}




/* Responsive for mobile */
@media (max-width: 600px) {
    
    .popup-cart-table th.image-col, .popup-cart-table td.image-col {
        width: 22px;
        min-width: 18px;
        max-width: 28px;
    }
    .popup-cart-table th.product-col, .popup-cart-table td.product-col {
        max-width: 70px;
    }
    .popup-cart-table th.qty-col, .popup-cart-table td.qty-col {
        width: 28px;
        min-width: 18px;
        max-width: 32px;
    }
    .popup-cart-table th.total-col, .popup-cart-table td.total-col {
        width: 32px;
        min-width: 20px;
        max-width: 40px;
    }
    .popup-cart-table th.remove-col, .popup-cart-table td.remove-col {
        width: 14px;
        min-width: 12px;
        max-width: 18px;
    }
    
    
    
    .popup-checkout-content {
        min-width: 0;
        max-width: 95vw;
        padding: 0;
    }
    #popup-checkout-form {
        padding: 15px;
    }
    .popup-checkout-header {
        padding: 15px;
    }
    .popup-cart-table {
        min-width: 0;
        table-layout: fixed;
    }

    /* Responsive inline form - stack on mobile */
    #popup-checkout-modal .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    #popup-checkout-modal .form-row label {
        min-width: auto;
        width: 100%;
        margin-bottom: 4px;
    }
    #popup-checkout-modal .form-row input[type="text"],
    #popup-checkout-modal .form-row input[type="email"],
    #popup-checkout-modal .form-row input[type="tel"],
    #popup-checkout-modal .form-row input[type="number"],
    #popup-checkout-modal .form-row textarea,
    #popup-checkout-modal .form-row select {
        width: 100%;
    }

}

/* Coupon Section */
.popup-custom-coupon {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.popup-coupon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 180px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}
.popup-coupon-icon {
    padding: 8px 12px;
    color: #666;
    font-size: 18px;
    font-weight: 600;
    background: #f8f8f8;
    border-right: 1px solid #ddd;
    display: flex;
    align-items: center;
}
.popup-coupon-input {
    flex: 1;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    background: transparent;
}
.popup-coupon-divider {
    padding: 0 8px;
    color: #ddd;
    font-size: 18px;
    font-weight: 300;
}
.popup-coupon-message {
    margin-left: 0;
    font-size: 13px;
    color: #e00;
    flex-basis: 100%;
    margin-top: 5px;
}

/* Billing Details Section Header */
.popup-billing-heading {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}
.billing-details-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    padding: 0;
}

/* Input Fields Styling - Inline Layout */
#popup-checkout-modal .form-row {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}
#popup-checkout-modal .form-row label {
    display: inline-block;
    margin-bottom: 0;
    font-weight: 500;
    color: #333;
    font-size: 14px;
    min-width: 140px;
    flex-shrink: 0;
    white-space: nowrap;
}
#popup-checkout-modal .form-row label .required {
    color: #e00;
    margin-left: 2px;
}
#popup-checkout-modal .form-row input[type="text"],
#popup-checkout-modal .form-row input[type="email"],
#popup-checkout-modal .form-row input[type="tel"],
#popup-checkout-modal .form-row input[type="number"],
#popup-checkout-modal .form-row textarea,
#popup-checkout-modal .form-row select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fff;
    box-sizing: border-box;
    min-width: 0;
}
#popup-checkout-modal .form-row input:focus,
#popup-checkout-modal .form-row textarea:focus,
#popup-checkout-modal .form-row select:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 2px rgba(255,102,0,0.1);
}
/* Make textarea full width when inline */
#popup-checkout-modal .form-row textarea {
    min-height: 60px;
    resize: vertical;
}

/* Billing Details Section Styling */
#popup-checkout-modal .woocommerce-billing-fields {
    margin-bottom: 20px;
}

/* Shipping Method Section */
#popup-checkout-modal .woocommerce-checkout-review-order {
    margin-bottom: 20px;
}
#popup-checkout-modal .woocommerce-checkout-review-order-table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}
#popup-checkout-modal h3#order_review_heading,
#popup-checkout-modal h3#ship-to-different-address-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    padding: 15px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    margin: 0 0 15px 0;
}
#popup-checkout-modal .shipping {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}
#popup-checkout-modal .shipping h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
    padding: 0;
    background: transparent;
    border: none;
}
#popup-checkout-modal .shipping .woocommerce-shipping-methods {
    margin: 0;
}
#popup-checkout-modal .woocommerce-shipping-methods li {
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 8px;
}
#popup-checkout-modal .woocommerce-shipping-methods li:last-child {
    margin-bottom: 0;
}
#popup-checkout-modal .woocommerce-shipping-methods input[type="radio"] {
    margin-right: 8px;
    accent-color: #ff6600;
}
#popup-checkout-modal .woocommerce-shipping-methods label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
}
