#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: 30px;
    border-radius: 8px;
    min-width: 320px;
    max-width: 500px;
    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+ */
}
.popup-checkout-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

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

/* Inline label + input layout */
#popup-checkout-modal .woocommerce .col2-set,
#popup-checkout-modal .woocommerce .col2-set:after {
    display: block !important;
    content: '' !important;
}
#popup-checkout-modal .woocommerce .col2-set .col-1,
#popup-checkout-modal .woocommerce .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
    box-sizing: border-box;
}
#popup-checkout-modal #customer_details {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 20px 10px;
    border-radius: 14px;
    box-shadow: 0 5px 24px rgba(15,34,58,.08);
    margin-bottom: 18px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
#popup-checkout-modal .popup-section-heading {
    text-align: center;
    margin: 0 0 16px;
}
#popup-checkout-modal .popup-section-heading h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}
#popup-checkout-modal #customer_details::after {
    content: '';
    display: table;
    clear: both;
}
#popup-checkout-modal #order_review,
#popup-checkout-modal .woocommerce-checkout-review-order {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 5px 24px rgba(15,34,58,.08);
    box-sizing: border-box;
}
#popup-checkout-modal .woocommerce-checkout-review-order-table tr.shipping {
    display: none !important;
}
.popup-section-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 5px 24px rgba(15,34,58,.08);
}
#popup-checkout-modal #order_review_heading,
#popup-checkout-modal .woocommerce .woocommerce-billing-fields > h3 {
    display: none !important;
}
.popup-section-header h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
}

#popup-checkout-modal form.checkout .popup-inline-field {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    width: 100% !important;
    float: none !important;
}
#popup-checkout-modal form.checkout .popup-inline-field.form-row-first,
#popup-checkout-modal form.checkout .popup-inline-field.form-row-last,
#popup-checkout-modal form.checkout .popup-inline-field.form-row-wide {
    width: 100% !important;
    float: none !important;
}
#popup-checkout-modal form.checkout .popup-inline-field label {
    flex: 0 0 110px;
    font-weight: 700;
    color: #111;
    margin: 0;
    font-size: 15px;
}
#popup-checkout-modal form.checkout .popup-inline-field label .required {
    color: #ff3c3c;
    margin-left: 4px;
}
#popup-checkout-modal form.checkout .popup-inline-field .woocommerce-input-wrapper {
    flex: 1;
    width: 100%;
}

/* Hide shipping address fields in popup */
#popup-checkout-modal .woocommerce-shipping-fields,
#popup-checkout-modal .shipping_address,
#popup-checkout-modal #ship-to-different-address,
#popup-checkout-modal #shipping_first_name_field,
#popup-checkout-modal #shipping_last_name_field,
#popup-checkout-modal #shipping_company_field,
#popup-checkout-modal #shipping_address_1_field,
#popup-checkout-modal #shipping_address_2_field,
#popup-checkout-modal #shipping_city_field,
#popup-checkout-modal #shipping_state_field,
#popup-checkout-modal #shipping_postcode_field,
#popup-checkout-modal #shipping_country_field {
    display: none !important;
}

/* Hide privacy policy text before order button */
#popup-checkout-modal .woocommerce-privacy-policy-text,
#popup-checkout-modal .woocommerce-privacy-policy-text p,
#popup-checkout-modal .woocommerce-terms-and-conditions-wrapper,
#popup-checkout-modal p.woocommerce-privacy-policy-text {
    display: none !important;
}

/* Order note styling */
#popup-checkout-modal .woocommerce-additional-fields > h3 {
    display: none !important;
}
#popup-checkout-modal .woocommerce-additional-fields .form-row {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
#popup-checkout-modal .woocommerce-additional-fields .woocommerce-input-wrapper {
    flex: 1;
    width: 100%;
}
#popup-checkout-modal .woocommerce-additional-fields label {
    font-weight: 500;
    color: #111;
    margin: 0;
    display: inline-block;
    flex: 0 0 85px;
    font-size: 15px;
}
#popup-checkout-modal textarea#order_comments {
    width: 100%;
    max-width: 100%;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 10px 14px;
    min-height: 42px;
    max-height: 80px;
    resize: vertical;
    font-size: 15px;
    box-shadow: none;
}
#popup-checkout-modal textarea#order_comments:focus {
    border-color: #ff6600;
    box-shadow: 0 0 0 1px rgba(255,102,0,0.2);
    outline: none;
}

/* Your order (review) font sizing */
#popup-checkout-modal .woocommerce-checkout-review-order table.shop_table,
#popup-checkout-modal .woocommerce-checkout-review-order table.shop_table th,
#popup-checkout-modal .woocommerce-checkout-review-order table.shop_table td {
    font-size: 14px !important;
}
#popup-checkout-modal .woocommerce-checkout-review-order table.shop_table td {
    color: #333;
}
#popup-checkout-modal .popup-field-icon {
    position: relative;
    display: flex;
    align-items: center;
}
#popup-checkout-modal .popup-field-icon input[type="text"],
#popup-checkout-modal .popup-field-icon input[type="tel"],
#popup-checkout-modal .popup-field-icon input[type="email"] {
    width: 100%;
    padding-left: 60px !important;
    height: 48px;
    border-radius: 8px !important;
}
#popup-checkout-modal .popup-field-icon::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 100%;
    background: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-right: none;
    border-radius: 8px 0 0 8px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
}
#popup-checkout-modal .popup-field-icon input {
    border: 1px solid #e3e3e3;
    box-shadow: none;
}
#popup-checkout-modal .popup-field-icon input:focus {
    border-color: #ff6600;
    box-shadow: 0 0 0 1px rgba(255,102,0,0.2);
}
#popup-checkout-modal .popup-field-icon-name::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='6' r='3'/%3E%3Cpath d='M4 17c0-3 2.5-5 6-5s6 2 6 5'/%3E%3C/svg%3E");
}
#popup-checkout-modal .popup-field-icon-phone::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h4l1 5-2 .5a9 9 0 0 0 3.5 3.5L13 9l5 1v4c0 1-1 2-2 2A13 13 0 0 1 3 7c0-1 1-2 2-2z'/%3E%3C/svg%3E");
}
#popup-checkout-modal .popup-field-icon-address::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 2a5 5 0 0 1 5 5c0 3.5-5 9-5 9S5 10.5 5 7a5 5 0 0 1 5-5z'/%3E%3Ccircle cx='10' cy='7' r='1.8'/%3E%3C/svg%3E");
}

/* Coupon form */
.popup-custom-coupon .popup-coupon-form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.popup-coupon-input {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: #fdfdfd;
    padding-left: 40px;
}
.popup-coupon-input input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 12px 14px;
    font-size: 15px;
}
.popup-coupon-input input:focus {
    outline: none;
}
.popup-coupon-input .coupon-icon {
    position: absolute;
    left: 12px;
    font-weight: 700;
    color: #ff6600;
    font-size: 16px;
}
.popup-custom-coupon .popup-coupon-btn {
    padding: 12px 20px;
}
.popup-coupon-msg {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #e00;
}

/* Shipping methods standalone section - Modern Design */
#popup-shipping-methods {
    margin: 20px 0;
    padding: 24px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    box-shadow: 0 5px 24px rgba(15,34,58,.08);
}
#popup-shipping-methods .popup-shipping-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #111;
}
#popup-shipping-methods .woocommerce-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
#popup-shipping-methods .woocommerce-shipping-methods li {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
#popup-shipping-methods .woocommerce-shipping-methods li:hover {
    border-color: #ff6600;
    background: #fffaf7;
    box-shadow: 0 4px 12px rgba(255,102,0,0.1);
    transform: translateY(-1px);
}
/* Selected state - using class for browser compatibility */
#popup-shipping-methods .woocommerce-shipping-methods li.selected {
    border-color: #ff6600;
    background: #fffaf7;
    box-shadow: 0 4px 16px rgba(255,102,0,0.15);
}
/* Modern browser support using :has() */
@supports selector(:has(*)) {
    #popup-shipping-methods .woocommerce-shipping-methods li:has(input[type="radio"]:checked) {
        border-color: #ff6600;
        background: #fffaf7;
        box-shadow: 0 4px 16px rgba(255,102,0,0.15);
    }
}
#popup-shipping-methods .woocommerce-shipping-methods input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
    margin: 0;
}
#popup-shipping-methods .woocommerce-shipping-methods label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 15px;
    margin: 0;
    cursor: pointer;
    color: #333;
    position: relative;
    padding-left: 36px;
}
/* Custom radio button design */
#popup-shipping-methods .woocommerce-shipping-methods label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid #d0d0d0;
    border-radius: 50%;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
#popup-shipping-methods .woocommerce-shipping-methods label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff6600;
    transition: transform 0.3s ease;
}
/* Checked state for radio button - browser compatible */
#popup-shipping-methods .woocommerce-shipping-methods input[type="radio"]:checked + label::before,
#popup-shipping-methods .woocommerce-shipping-methods li.selected label::before {
    border-color: #ff6600;
    background: #fff;
}
#popup-shipping-methods .woocommerce-shipping-methods input[type="radio"]:checked + label::after,
#popup-shipping-methods .woocommerce-shipping-methods li.selected label::after {
    transform: translateY(-50%) scale(1);
}
/* Modern browser support using :has() */
@supports selector(:has(*)) {
    #popup-shipping-methods .woocommerce-shipping-methods li:has(input[type="radio"]:checked) label::before {
        border-color: #ff6600;
        background: #fff;
    }
    #popup-shipping-methods .woocommerce-shipping-methods li:has(input[type="radio"]:checked) label::after {
        transform: translateY(-50%) scale(1);
    }
}
#popup-shipping-methods .woocommerce-shipping-methods .shipping-method-name {
    flex: 1;
    font-weight: 600;
    color: #333;
}
#popup-shipping-methods .woocommerce-Price-amount {
    font-weight: 700;
    font-size: 16px;
    color: #ff6600;
    white-space: nowrap;
    margin-left: 12px;
}
#popup-shipping-methods .woocommerce-shipping-methods li:hover .woocommerce-Price-amount {
    color: #e55a00;
}

/* 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;
}
.popup-cart-table th, .popup-cart-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #eee;
    text-align: left;
    word-break: break-word;
}
.popup-cart-table th {
    background: #f8f8f8;
    font-size: 14px;
    white-space: nowrap;
}
.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: 10px; right: 15px;
    font-size: 28px;
    color: #ff6600;
    background: #fff;
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; 
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    z-index: 10001;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.popup-close:hover {
    background: #ff6600;
    color: #fff;
}


/* 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: 10px;
    }
    .popup-cart-table {
        min-width: 0;
        table-layout: fixed;
    }

}
