/* ========================================
   POPUP CHECKOUT - CLEAN MODERN DESIGN
   Matching the screenshot style
   ======================================== */

/* ===== CSS VARIABLES ===== */
:root {
    /* Brand accents (used for main CTA colors) */
    --wpc-orange: #f97316;
    --wpc-orange-hover: #ea580c;
    --wpc-yellow: #facc15;
    --wpc-yellow-hover: #eab308;

    /* Core palette */
    --wpc-white: #ffffff;
    --wpc-bg: #f9fafb;
    --wpc-bg-light: #f9fafb;
    --wpc-text: #111827;
    --wpc-text-secondary: #6b7280;
    --wpc-border: #e5e7eb;
    --wpc-border-color: #e5e7eb;

    /* Accent + semantic colors */
    --wpc-accent: #7c3aed;
    --wpc-accent-light: rgba(124, 58, 237, 0.04);
    --wpc-success: #16a34a;
    --wpc-success-green: #22c55e;
    --wpc-danger: #dc2626;

    /* Radii, shadows, transitions */
    --wpc-radius: 8px;
    --wpc-radius-lg: 14px;
    --wpc-shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.18);
    --wpc-transition: 0.2s ease-in-out;
}

/* ===== MODAL BACKDROP ===== */
#popup-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    /* Hidden by default; JS will open with flex centering */
    display: none;
    align-items: center;
    justify-content: center;
    animation: wpcFadeIn 0.25s ease;
}

#popup-checkout-modal.wpc-modal-open {
    display: flex;
}

@keyframes wpcFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== POPUP CONTAINER (Desktop) ===== */
.popup-checkout-content {
    background: var(--wpc-white);
    border-radius: var(--wpc-radius-lg);
    min-width: 340px;
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--wpc-shadow-lg);
    animation: wpcSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes wpcSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== POPUP HEADER (Fixed top) ===== */
.wpc-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: var(--wpc-white);
    border-bottom: 1px solid var(--wpc-border);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.wpc-popup-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--wpc-text);
}

.wpc-popup-header-title svg {
    color: var(--wpc-accent);
}

/* ===== CLOSE BUTTON ===== */
.popup-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: var(--wpc-bg);
    color: var(--wpc-text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--wpc-transition);
    line-height: 1;
    flex-shrink: 0;
    z-index: 20;
}

.popup-close:hover {
    background: #fee2e2;
    color: var(--wpc-danger);
    transform: rotate(90deg);
}

/* ===== SCROLLABLE FORM AREA ===== */
#popup-checkout-form {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 22px 22px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.3) transparent;
}

#popup-checkout-form::-webkit-scrollbar {
    width: 4px;
}

#popup-checkout-form::-webkit-scrollbar-track {
    background: transparent;
}

#popup-checkout-form::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 4px;
}

/* ===== LOADING SPINNER ===== */
.popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.popup-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--wpc-border);
    border-top-color: var(--wpc-accent);
    border-radius: 50%;
    animation: wpcSpin 0.8s linear infinite;
}

@keyframes wpcSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== UNIVERSAL RESETS ===== */
#popup-checkout-modal input[type="text"],
#popup-checkout-modal input[type="email"],
#popup-checkout-modal input[type="tel"],
#popup-checkout-modal input[type="password"],
#popup-checkout-modal textarea,
#popup-checkout-modal select {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 46px;
    background: transparent !important;
    border: none !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    color: var(--wpc-text) !important;
    transition: all var(--wpc-transition) !important;
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
}

#popup-checkout-modal input[type="text"]:focus,
#popup-checkout-modal input[type="email"]:focus,
#popup-checkout-modal input[type="tel"]:focus,
#popup-checkout-modal input[type="password"]:focus,
#popup-checkout-modal textarea:focus,
#popup-checkout-modal select:focus {
    outline: none !important;
    box-shadow: none !important;
}

.wpc-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--wpc-border) !important;
    border-radius: 8px;
    background: var(--wpc-bg) !important;
    overflow: hidden;
    transition: all var(--wpc-transition);
}

.wpc-input-wrapper:focus-within {
    border-color: #64748b !important;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1) !important;
    background: var(--wpc-white) !important;
}

.wpc-input-addon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: #f1f5f9;
    border-right: 1px solid var(--wpc-border);
    color: #475569;
    height: 46px;
}

/* ===== FORM FIELD ROWS ===== */
#popup-checkout-modal .woocommerce-billing-fields {
    display: none !important;
}

#popup-checkout-modal .woocommerce-shipping-fields {
    display: none !important;
}

#popup-checkout-modal .woocommerce-additional-fields {
    display: none !important;
}

#popup-checkout-modal .woocommerce-billing-fields__field-wrapper,
#popup-checkout-modal .woocommerce-shipping-fields__field-wrapper,
#popup-checkout-modal p#order_comments_field {
    width: 100% !important;
    max-width: 100% !important;
}

#popup-checkout-modal .woocommerce-billing-fields__field-wrapper .form-row {
    margin-bottom: 14px;
}

#popup-checkout-modal .woocommerce-billing-fields__field-wrapper label,
#popup-checkout-modal .woocommerce-shipping-fields__field-wrapper label {
    font-size: 13px;
    font-weight: 600;
    color: var(--wpc-text-secondary);
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== PRODUCT SUMMARY (Cart Items) ===== */
.popup-product-summary {
    margin: 0 0 18px 0 !important;
    border-top: none !important;
    padding-top: 0 !important;
}

.popup-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px !important;
    background: var(--wpc-bg) !important;
    border-radius: var(--wpc-radius) !important;
    border: 1px solid var(--wpc-border) !important;
    margin-bottom: 10px !important;
    gap: 12px;
}

.popup-product-item img {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.popup-product-price {
    color: var(--wpc-accent) !important;
    font-weight: 700 !important;
}

.popup-product-remove {
    background: none !important;
    border: none !important;
    color: var(--wpc-danger) !important;
    font-size: 18px !important;
    cursor: pointer;
    padding: 4px !important;
    line-height: 1 !important;
    opacity: 0.6;
    transition: opacity var(--wpc-transition);
}

.popup-product-remove:hover {
    color: #ef4444 !important;
}

#popup-checkout-modal h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--wpc-text) !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px !important;
}

#popup-checkout-modal h4 svg {
    color: var(--wpc-accent) !important;
    /* Added to match admin accent */
}

/* ===== SHIPPING AND PAYMENT SECTIONS ===== */
#popup-checkout-modal .popup-shipping-section,
#popup-checkout-modal .popup-payment-section {
    background: var(--wpc-white) !important;
    border-radius: var(--wpc-radius) !important;
    border: 1px solid var(--wpc-border) !important;
    margin: 16px 0 !important;
    padding: 16px !important;
    display: block !important;
    visibility: visible !important;
}

#popup-checkout-modal .popup-shipping-section:empty,
#popup-checkout-modal .popup-payment-section:empty {
    display: none !important;
}

#popup-checkout-modal .popup-shipping-methods,
#popup-checkout-modal .popup-payment-methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#popup-checkout-modal .popup-shipping-methods li,
#popup-checkout-modal .popup-payment-methods li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 14px !important;
    border: 1px solid var(--wpc-border) !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    transition: all var(--wpc-transition);
    cursor: pointer;
    background: var(--wpc-white) !important;
}

#popup-checkout-modal .popup-shipping-methods li:last-child,
#popup-checkout-modal .popup-payment-methods li:last-child {
    margin-bottom: 0 !important;
}

#popup-checkout-modal .popup-shipping-methods li:hover,
#popup-checkout-modal .popup-payment-methods li:hover {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
}

#popup-checkout-modal .popup-shipping-methods li.selected,
#popup-checkout-modal .popup-payment-methods li.selected {
    background: #ffffff !important;
    border-color: var(--wpc-accent) !important;
    /* Accent color border */
    border-width: 1px !important;
    padding: 12px 14px !important;
    margin: 0 0 8px 0 !important;
    box-shadow: none !important;
}

#popup-checkout-modal .popup-shipping-methods li.selected .shipping-name,
#popup-checkout-modal .popup-payment-methods li.selected .payment-name {
    color: #1e293b !important;
    font-weight: 600 !important;
}

#popup-checkout-modal .popup-shipping-methods li.selected .shipping-price {
    color: var(--wpc-accent) !important;
    /* Content text for selected price */
    font-weight: 700 !important;
}

#popup-checkout-modal .popup-shipping-methods label,
#popup-checkout-modal .popup-payment-methods label {
    display: flex;
    flex: 1 1 100%;
    align-items: center;
    cursor: pointer;
    gap: 12px;
    margin: 0 !important;
}

#popup-checkout-modal .popup-shipping-methods input[type="radio"],
#popup-checkout-modal .popup-shipping-methods input.popup-shipping-radio,
#popup-checkout-modal .popup-payment-methods input[type="radio"],
#popup-checkout-modal .popup-payment-methods input.popup-payment-radio {
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    opacity: 1 !important;
    position: relative !important;
    accent-color: var(--wpc-accent);
    /* Accent selection circle */
    margin: 0 !important;
    cursor: pointer;
}

#popup-checkout-modal .popup-shipping-methods .shipping-name,
#popup-checkout-modal .popup-payment-methods .payment-name {
    flex: 1;
    font-size: 14px;
    color: var(--wpc-text);
    font-weight: 500;
}

#popup-checkout-modal .popup-shipping-methods .shipping-price {
    font-weight: 700;
    font-size: 14px;
    color: #334155;
}

/* WooCommerce default shipping hide */
#popup-checkout-modal .woocommerce-shipping-methods li {
    list-style: none !important;
    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;
}

/* Hidden WooCommerce shipping radio within popup */
#popup-checkout-modal .woocommerce-shipping-methods input[type="radio"] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    position: absolute !important;
}

/* ===== PAYMENT METHODS ===== */
#popup-checkout-modal .popup-payment-section {
    margin: 16px 0 !important;
}

#popup-checkout-modal .popup-payment-methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}



/* Gateway section - WooCommerce default */
#popup-checkout-modal .wc_payment_methods {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

#popup-checkout-modal .wc_payment_methods .payment_method {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}



#popup-checkout-modal .popup-payment-methods .payment_box {
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 16px 0 4px 30px;
    margin: 12px 0 0 0;
    font-size: 13px;
    color: var(--wpc-text-secondary);
    border: none;
    border-top: 1px solid var(--wpc-border);
    box-shadow: none;
    width: 100%;
}

#popup-checkout-modal .popup-payment-methods .payment_box input[type="text"],
#popup-checkout-modal .popup-payment-methods .payment_box input[type="number"],
#popup-checkout-modal .popup-payment-methods .payment_box input[type="tel"],
#popup-checkout-modal .popup-payment-methods .payment_box input[type="password"],
#popup-checkout-modal .popup-payment-methods .payment_box input[type="email"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#popup-checkout-modal .popup-payment-methods .payment_box p {
    margin-bottom: 10px;
}

#popup-checkout-modal .popup-payment-methods .payment_box p:last-child {
    margin-bottom: 0;
}

/* Gateway image */
#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;
}

/* Hide ALL WooCommerce native blockUI overlays within the popup to prevent double loaders */
#popup-checkout-modal .blockUI.blockOverlay {
    display: none !important;
}

/* Gateway list cleanup */
#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;
    padding-left: 0 !important;
}

#popup-checkout-modal .wc_payment_methods li::before,
#popup-checkout-modal .wc_payment_methods li::after {
    display: none !important;
    content: none !important;
}

/* ===== ORDER TOTALS ===== */
.popup-order-totals {
    background: #ffffff !important;
    padding: 0 !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
    margin-top: 10px !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden;
}

.popup-order-totals .wpc-section-title {
    padding: 12px 16px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.popup-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.popup-total-row:last-child {
    border-bottom: none !important;
}

.popup-total-value {
    font-weight: 600;
}

.popup-final-total {
    border-top: 1px solid #e2e8f0 !important;
    font-size: 15px;
    font-weight: 700;
    border-bottom: none !important;
}

/* Force currency symbol to stay inline with price (not stacked on top) */
#popup-checkout-modal .woocommerce-Price-amount,
#popup-checkout-modal .woocommerce-Price-amount bdi {
    white-space: nowrap !important;
    display: inline !important;
}

#popup-checkout-modal .woocommerce-Price-currencySymbol {
    display: inline !important;
    margin-right: 2px;
}

/* Ensure total row values don't wrap on mobile */
.popup-total-row span:last-child,
.popup-total-value,
.popup-final-total span:last-child {
    white-space: nowrap !important;
    text-align: right;
}

/* Order summary responsive tweaks */
@media (max-width: 480px) {
    .popup-order-totals {
        padding: 10px !important;
    }

    .popup-total-row {
        font-size: 13px;
    }

    .popup-final-total {
        font-size: 14px;
    }
}

/* ===== COUPON SECTION ===== */
#popup-checkout-modal .custom-coupon-section {
    background: var(--wpc-white) !important;
    border-radius: var(--wpc-radius) !important;
    border: 1px solid var(--wpc-border) !important;
    padding: 12px !important;
    margin: 16px 0 !important;
}

#popup-checkout-modal .custom-coupon-section>div {
    display: flex;
    gap: 8px;
    align-items: center;
}

#popup-checkout-modal .custom-coupon-section input[type="text"] {
    min-height: 40px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    flex: 1 !important;
}

input#popup_coupon_code {
    width: 100% !important;
    flex: 1 1 auto;
    min-width: 0;
}

#popup-checkout-modal .popup-coupon-btn {
    font-size: 13px !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    border: none !important;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--wpc-transition);
    white-space: nowrap;
    min-height: 40px;
}

button#popup_apply_coupon {
    padding: 10px 16px !important;
    width: auto !important;
}

/* ===== HIDE WOOCOMMERCE DEFAULTS ===== */
#popup-checkout-modal .woocommerce-form-coupon-toggle,
#popup-checkout-modal .checkout_coupon {
    display: none !important;
}

#popup-checkout-modal .woocommerce-checkout-review-order-table {
    display: none !important;
}

#popup-checkout-modal #order_review_heading {
    display: none !important;
}

#popup-checkout-modal .woocommerce-shipping-totals,
#popup-checkout-modal tr.shipping,
#popup-checkout-modal .woocommerce-checkout-review-order-table .shipping {
    display: none !important;
}

/* Hide WooCommerce payment elements (we use custom) */
#popup-checkout-modal .woocommerce-checkout-payment ul:not(.popup-payment-methods),
#popup-checkout-modal .wc_payment_methods:not(.popup-payment-methods),
#popup-checkout-modal .payment_methods:not(.popup-payment-methods),
#popup-checkout-modal .payment_box:not(.payment_method_box),
#popup-checkout-modal .woocommerce-checkout-payment .woocommerce-terms-and-conditions-wrapper,
#popup-checkout-modal .woocommerce-checkout-payment .woocommerce-privacy-policy-text,
#popup-checkout-modal .woocommerce-checkout-payment .woocommerce-terms-and-conditions,
#popup-checkout-modal .woocommerce-checkout-payment .woocommerce-privacy-policy-link {
    display: none !important;
}

.popup-payment-methods {
    display: block !important;
    visibility: visible !important;
}

#popup-checkout-modal .woocommerce-checkout-payment {
    display: block !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ===== PLACE ORDER BUTTON ===== */
#popup-checkout-modal #place_order,
#popup-checkout-modal .woocommerce-checkout-payment #place_order,
#popup-checkout-modal button[name="woocommerce_checkout_place_order"] {
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    margin: 0 !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    border: none !important;
    cursor: pointer;
    transition: all var(--wpc-transition) !important;
    text-transform: none;
    letter-spacing: 0;
}

#popup-checkout-modal #place_order:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

#popup-checkout-modal #place_order:active {
    transform: translateY(0);
}

/* Pay Online button */
#popup-checkout-modal .popup-pay-online-btn {
    background: #fef3c7 !important;
    color: #92400e !important;
    text-decoration: none !important;
    display: block;
    width: 100%;
    padding: 12px 14px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border-radius: 12px;
    border: 2px solid #fde68a;
    cursor: pointer;
    transition: all var(--wpc-transition);
}

#popup-checkout-modal .popup-pay-online-btn:hover {
    background: #fde68a !important;
}

/* ===== SECURE CHECKOUT FOOTER ===== */
.wpc-secure-footer {
    text-align: center;
    padding: 12px 0 0;
    font-size: 11px;
    color: var(--wpc-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.wpc-secure-footer svg {
    width: 12px;
    height: 12px;
    color: var(--wpc-success);
}

/* ===== BUY NOW BUTTON ===== */
.popup-buy-now {
    min-width: 120px;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    display: inline-block;
    cursor: pointer;
    transition: all var(--wpc-transition);
    font-weight: 600;
}

.popup-buy-now:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.popup-buy-now:active {
    transform: translateY(0);
}

.popup-buy-now[disabled],
.popup-buy-now.popup-buy-now-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== STICKY BUY NOW (Mobile Product Page) ===== */
.wpc-sticky-buy-now-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    background: var(--wpc-white);
    border-top: 1px solid var(--wpc-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpc-sticky-buy-now-bar.visible {
    transform: translateY(0);
}

.wpc-sticky-product-info {
    flex: 1;
    min-width: 0;
}

.wpc-sticky-product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--wpc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpc-sticky-product-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--wpc-accent);
}

.wpc-sticky-buy-btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    min-width: 110px;
    text-align: center;
    transition: all var(--wpc-transition);
}

.wpc-sticky-buy-btn:hover {
    filter: brightness(1.1);
}

/* ===== CHECKOUT PROMOTION ===== */
.popup-checkout-promotion {
    border-radius: var(--wpc-radius) !important;
    padding: 14px !important;
}

#popup-checkout-modal .popup-checkout-promotion .wpc-promo-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

#popup-checkout-modal .popup-checkout-promotion input#popup-promotion-checkbox {
    width: 18px !important;
    height: 18px !important;
    margin-top: 2px;
    flex: 0 0 auto;
}

#popup-checkout-modal .popup-checkout-promotion .wpc-promo-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

#popup-checkout-modal .popup-checkout-promotion .wpc-promo-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

#popup-checkout-modal .popup-checkout-promotion .wpc-promo-image img {
    width: 42px !important;
    height: 42px !important;
    object-fit: cover;
    border-radius: 8px;
}

#popup-checkout-modal .popup-checkout-promotion .wpc-promo-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--wpc-text);
    line-height: 1.3;
}

#popup-checkout-modal .popup-checkout-promotion .wpc-promo-sub {
    font-size: 12px;
    color: var(--wpc-text-secondary);
    line-height: 1.35;
}

/* ===== QUANTITY CONTROLS ===== */
.popup-qty-minus,
.popup-qty-plus {
    width: 20px !important;
    height: 24px !important;
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0 !important;
}

.popup-qty-minus:hover,
.popup-qty-plus:hover {
    background: var(--wpc-accent);
    color: var(--wpc-white);
    border-color: var(--wpc-accent);
}

.popup-qty-minus:hover,
.popup-qty-plus:hover {
    color: var(--wpc-text) !important;
}

.popup-cart-qty {
    width: 24px !important;
    height: 24px !important;
    text-align: center;
    border: none !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--wpc-text) !important;
    padding: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ===== URGENCY TIMER ===== */
#wpc-urgency-timer {
    margin: 16px 0;
    padding: 16px;
    border-radius: var(--wpc-radius);
    text-align: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid var(--wpc-warning);
}

.wpc-timer-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.wpc-timer-text {
    font-weight: 700;
    color: #92400e;
    font-size: 14px;
}

.wpc-timer-display {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.wpc-timer-box {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    min-width: 60px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.wpc-timer-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.wpc-timer-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    opacity: 0.9;
}

.wpc-timer-separator {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--wpc-warning);
}

/* ===== ORDER BUMP ===== */
.wpc-order-bump {
    margin: 16px 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px dashed #22c55e;
    border-radius: var(--wpc-radius);
    padding: 16px;
    transition: all var(--wpc-transition);
}

.wpc-order-bump label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
}

.wpc-order-bump input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #22c55e;
    margin-top: 2px;
    cursor: pointer;
}

.wpc-order-bump-text {
    font-weight: 700;
    color: #166534;
    font-size: 14px;
}

.wpc-order-bump-sub {
    font-size: 12px;
    color: #16a34a;
}

/* ===== TRUST BADGES ===== */
.wpc-trust-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
    padding: 12px;
    background: var(--wpc-bg);
    border-radius: 10px;
}

.wpc-trust-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--wpc-text-secondary);
    font-weight: 500;
}

.wpc-trust-badge svg {
    width: 14px;
    height: 14px;
    color: var(--wpc-success);
}

/* ========================================
   MOBILE RESPONSIVE (Bottom Sheet Pattern)
   ======================================== */

@media (max-width: 768px) {

    /* Mobile: Bottom sheet popup */
    #popup-checkout-modal {
        align-items: flex-end;
    }

    .popup-checkout-content {
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        animation: wpcSlideFromBottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes wpcSlideFromBottom {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    #popup-checkout-form {
        padding: 16px;
        padding-bottom: 100px;
        /* Space for sticky button */
    }

    .wpc-popup-header {
        padding: 14px 16px;
    }

    .wpc-popup-header-title {
        font-size: 15px;
    }

    /* Mobile place order section parent element */
    #popup-checkout-modal .wpc-mobile-place-order-wrap {
        margin: 0 !important;
        padding: 12px 16px !important;
        background: var(--wpc-white) !important;
        border-top: 1px solid var(--wpc-border) !important;
        border-radius: 0 !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap #place_order {
        font-size: 15px !important;
        padding: 14px 20px !important;
        border-radius: 10px !important;
        width: 100% !important;
    }

    /* Secure checkout text on mobile */
    #popup-checkout-modal .wpc-mobile-place-order-wrap::after {
        content: "🔒 Secure checkout powered by WooCommerce";
        display: block;
        text-align: center;
        font-size: 10px;
        color: var(--wpc-text-secondary);
        margin-top: 8px;
    }

    .popup-buy-now {
        min-width: 80px;
        font-size: 14px;
    }

    /* Product summary compact */
    .popup-product-item img {
        width: 40px !important;
        height: 40px !important;
    }
}

@media (max-width: 480px) {
    #popup-checkout-form {
        padding: 12px;
        padding-bottom: 100px;
    }

    .wpc-popup-header {
        padding: 12px 14px;
    }

    /* Hide WooCommerce form coupon */
    #popup-checkout-modal .woocommerce-form-coupon-toggle,
    #popup-checkout-modal .checkout_coupon.woocommerce-form-coupon {
        display: none !important;
    }
}

/* Desktop: Centered modal */
@media (min-width: 769px) {
    .popup-checkout-content {
        max-width: 520px;
    }

    #popup-checkout-modal form.checkout {
        display: block;
    }

    #popup-checkout-modal #customer_details,
    #popup-checkout-modal .col2-set,
    #popup-checkout-modal #order_review,
    #popup-checkout-modal #order_review_heading,
    #popup-checkout-modal .woocommerce-checkout-review-order {
        width: 100%;
        float: none;
        clear: both;
        margin: 0 0 16px 0;
    }

    #popup-checkout-modal .woocommerce-checkout .form-row.place-order {
        position: relative;
    }
}

/* ===== WOOCOMMERCE FORM OVERRIDES ===== */
#popup-checkout-modal .woocommerce-checkout .button,
#popup-checkout-modal .woocommerce-checkout button.button {
    width: 100% !important;
    display: block !important;
}


/* ===== CHECKOUT FIELD ICONS ===== */
.checkout-field-icon-wrap {
    display: flex !important;
    align-items: center !important;
    background: var(--wpc-white) !important;
    border: 2px solid var(--wpc-border) !important;
    border-radius: 10px !important;
    margin-bottom: 14px !important;
    overflow: hidden !important;
    transition: all var(--wpc-transition) !important;
}

.checkout-field-icon-wrap:focus-within {
    border-color: var(--wpc-accent) !important;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1) !important;
}

.checkout-field-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 12px !important;
    color: var(--wpc-text-secondary) !important;
    border-right: 1px solid var(--wpc-border) !important;
    background: var(--wpc-bg) !important;
    min-width: 44px !important;
    flex-shrink: 0 !important;
}

.checkout-field-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}

.checkout-field-icon-wrap input,
.checkout-field-icon-wrap textarea,
.checkout-field-icon-wrap select {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    flex: 1 !important;
}

/* Coupon with icons */
.popup-custom-coupon {
    display: flex !important;
    gap: 10px !important;
    margin: 16px 0 !important;
}

.popup-custom-coupon .checkout-field-icon-wrap {
    margin-bottom: 0 !important;
    flex: 1 !important;
}

.popup-custom-coupon input#popup_coupon_code {
    min-width: 100px !important;
}

/* Cart table */
.popup-cart-table th,
.popup-cart-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.popup-cart-table th {
    background: var(--wpc-bg);
}

.popup-cart-table input[type="number"] {
    width: 50px;
}

.popup-cart-remove {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--wpc-danger);
}

/* ===== FIELD LAYOUT STYLES ===== */
/* Two Column Layout */
#popup-checkout-modal .wpc-fields-two_column .form-row {
    width: 48% !important;
    float: left !important;
    clear: none !important;
    margin-right: 4% !important;
}

#popup-checkout-modal .wpc-fields-two_column .form-row:nth-child(2n) {
    margin-right: 0 !important;
}

#popup-checkout-modal .wpc-fields-two_column .form-row:nth-child(2n+1) {
    clear: left !important;
}

/* Specific fields that should be full width in two_column mode */
#popup-checkout-modal .wpc-fields-two_column .form-row#billing_address_1_field,
#popup-checkout-modal .wpc-fields-two_column .form-row#billing_address_2_field,
#popup-checkout-modal .wpc-fields-two_column .form-row#billing_email_field,
#popup-checkout-modal .wpc-fields-two_column .form-row#billing_phone_field {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
}

/* Compact Layout - All fields half width */
#popup-checkout-modal .wpc-fields-compact .form-row {
    width: 48% !important;
    float: left !important;
    clear: none !important;
    margin-right: 4% !important;
}

#popup-checkout-modal .wpc-fields-compact .form-row:nth-child(2n) {
    margin-right: 0 !important;
}

#popup-checkout-modal .wpc-fields-compact .form-row:nth-child(2n+1) {
    clear: left !important;
}

/* Standard Layout - Full width */
#popup-checkout-modal .wpc-fields-standard .form-row {
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

/* Clearfix for field wrappers */
#popup-checkout-modal .woocommerce-billing-fields__field-wrapper::after,
#popup-checkout-modal .woocommerce-shipping-fields__field-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== IMPROVED SECTION STYLING ===== */
#popup-checkout-modal .popup-billing-section,
#popup-checkout-modal .popup-shipping-section,
#popup-checkout-modal .popup-payment-section,
#popup-checkout-modal .popup-order-totals {
    background: var(--wpc-white) !important;
    border-radius: var(--wpc-radius) !important;
    border: 1px solid var(--wpc-border) !important;
    margin: 16px 0 !important;
    padding: 16px !important;
}

#popup-checkout-modal .popup-billing-section h4,
#popup-checkout-modal .popup-shipping-section h4,
#popup-checkout-modal .popup-payment-section h4,
#popup-checkout-modal .popup-order-totals h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--wpc-text) !important;
    margin: 0 0 16px 0 !important;
    padding: 0 0 12px 0 !important;
    border-bottom: 1px solid var(--wpc-border);
}

/* ===== ORDER TOTALS ROWS ===== */
#popup-checkout-modal .popup-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--wpc-border);
}

#popup-checkout-modal .popup-total-row:last-child {
    border-bottom: none;
}

#popup-checkout-modal .popup-total-row span:first-child {
    color: var(--wpc-text-secondary);
}

#popup-checkout-modal .popup-total-row span:last-child {
    font-weight: 600;
    color: var(--wpc-text);
}

#popup-checkout-modal .popup-total-final {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid var(--wpc-border);
    font-size: 16px !important;
    font-weight: 700 !important;
}

#popup-checkout-modal .popup-total-final span:last-child {
    color: var(--wpc-accent) !important;
    font-size: 18px;
}

/* ===== PRODUCT INFO AND ACTIONS ===== */
#popup-checkout-modal .popup-product-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

#popup-checkout-modal .popup-product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== PAYMENT METHOD ICONS AND SIZING ===== */
#popup-checkout-modal .popup-payment-methods .payment-icon {
    margin-left: auto;
    display: flex;
    align-items: center;
}

#popup-checkout-modal .popup-payment-methods .payment-icon img {
    max-height: 26px !important;
    max-width: 80px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px;
    box-shadow: none;
    vertical-align: middle;
}

#popup-checkout-modal .popup-payment-methods label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0 !important;
}

#popup-checkout-modal .popup-payment-methods .payment-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

#popup-checkout-modal .popup-payment-methods .payment-name svg {
    color: var(--wpc-accent);
}

/* Payment box styling */
#popup-checkout-modal .payment_box {
    margin-top: 12px;
    padding: 12px;
    background: var(--wpc-bg);
    border-radius: 8px;
    font-size: 13px;
}

/* ===== PRIMARY & SECONDARY BUTTONS ===== */
#popup-checkout-modal .wpc-btn-place-order {
    display: block;
    width: 100%;
    margin-top: 18px;
    background: var(--wpc-orange);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background var(--wpc-transition), transform var(--wpc-transition);
}

#popup-checkout-modal .wpc-btn-place-order:hover {
    background: var(--wpc-orange-hover);
    transform: translateY(-1px);
}

#popup-checkout-modal .wpc-btn-pay-online {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    background: var(--wpc-yellow);
    color: #1f2937;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    gap: 6px;
    cursor: pointer;
    transition: background var(--wpc-transition), transform var(--wpc-transition);
}

#popup-checkout-modal .wpc-btn-pay-online:hover {
    background: var(--wpc-yellow-hover);
    transform: translateY(-1px);
}

/* ===== MOBILE FIELD LAYOUT ===== */
@media (max-width: 480px) {

    #popup-checkout-modal .wpc-fields-two_column .form-row,
    #popup-checkout-modal .wpc-fields-compact .form-row {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
}