

:root {
    
    --wpc-orange: #f97316;
    --wpc-orange-hover: #ea580c;
    --wpc-yellow: #facc15;
    --wpc-yellow-hover: #eab308;

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

    
    --wpc-theme-primary: #2271b1;
    --wpc-accent: var(--wpc-theme-primary);
    --wpc-accent-light: color-mix(in srgb, var(--wpc-accent) 6%, white 94%);
    --wpc-success: #16a34a;
    --wpc-success-green: #22c55e;
    --wpc-danger: #dc2626;

    
    --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;
}

#popup-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    /* Use dynamic viewport height to avoid mobile browser address-bar issues */
    height: calc(var(--wpc-vh, 1vh) * 100);
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    
    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-checkout-content {
    background: var(--wpc-white);
    border-radius: var(--wpc-radius-lg);
    min-width: 340px;
    max-width: 440px;
    width: 100%;
    max-height: calc(var(--wpc-vh, 1vh) * 90);
    max-height: 90dvh;
    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);
    }
}

.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);
}

.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);
}

#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;
}

.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);
    }
}

#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;
}

#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;
}

.popup-product-summary {
    margin: 0 0 18px 0 !important;
    border-top: none !important;
    padding-top: 0 !important;
}

/* Cart summary header (match reference UI) */
.wpc-cart-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--wpc-white) !important;
    border: 1px solid #d1d5db !important; /* gray-300 */
    border-radius: 6px !important;        /* rounded-md */
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
}

.wpc-cart-summary-title,
.wpc-cart-summary-total {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--wpc-text) !important;
}

.wpc-cart-summary-total {
    text-align: right;
    white-space: nowrap;
}

.wpc-cart-items {
    margin: 0;
}

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

.popup-product-item:hover {
    border-color: #d1d5db !important; /* gray-300 */
}

.wpc-cart-item-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.wpc-cart-item-thumb {
    flex-shrink: 0;
}

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

.popup-product-info {
    flex: 1;
    min-width: 0;
    padding-right: 52px; /* space for the remove button */
}

.popup-product-name {
    display: block;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--wpc-text) !important;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpc-product-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-top: 6px;
    font-weight: 700;
}

.wpc-sale-price {
    color: #ef4444 !important;
    font-size: 18px !important;
}

.wpc-regular-price {
    color: #64748b !important;
    font-size: 14px !important;
    text-decoration: line-through;
    font-weight: 600;
}

.wpc-discount {
    color: #EE741F !important;
    font-size: 14px !important;
    font-weight: 700;
}

.wpc-qty-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: 1px solid #9ca3af; /* gray-400 */
    border-radius: 4px;        /* rounded */
    /* Smaller (about ~30%) as requested */
    padding: 0px 4px;
    margin-top: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    background: var(--wpc-white);
    width: max-content;
}

.wpc-qty-wrap button {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wpc-qty-icon {
    width: 12px;
    height: 12px;
    color: #374151;
}

.popup-cart-qty {
    width: 16px !important;
    max-width: 16px !important;
    border: 0 !important;
    padding: 0 !important;
    text-align: center;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #374151 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    -moz-appearance: textfield;
}

/* Hide number input spinners (WebKit) */
.popup-cart-qty::-webkit-outer-spin-button,
.popup-cart-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.popup-product-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fee2e2 !important;
    border: 0 !important;
    padding: 0 !important;
    color: var(--wpc-danger) !important;
    cursor: pointer;
    opacity: 0.95;
    transition: all var(--wpc-transition);
}

.popup-product-remove svg {
    width: 22px;
    height: 22px;
}

.popup-product-remove:hover {
    background: #fecaca !important;
    opacity: 1;
}

#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;
    
}

#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;
    
    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;
    
    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);
    
    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;
}

#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;
}

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

#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;
}

#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;
}

#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;
}

#popup-checkout-modal .blockUI.blockOverlay {
    display: none !important;
}

#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;
}

.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;
}

#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;
}

.popup-total-row span:last-child,
.popup-total-value,
.popup-final-total span:last-child {
    white-space: nowrap !important;
    text-align: right;
}

@media (max-width: 480px) {
    .popup-order-totals {
        padding: 10px !important;
    }

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

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

#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;
}

#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;
}

#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;
}

#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);
}

#popup-checkout-modal #place_order.wpc-shake-button {
    animation: wpc-shake 3s infinite cubic-bezier(.36, .07, .19, .97) both !important;
    will-change: transform;
}

@keyframes wpc-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    2%,
    6%,
    10%,
    14% {
        transform: translateX(-4px);
    }

    4%,
    8%,
    12%,
    16% {
        transform: translateX(4px);
    }

    18%,
    98% {
        transform: translateX(0);
    }
}

#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;
}

.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);
}

.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;
}

/* Bookstore Core v2.5.30 - Sticky bar equal 33.33% layout */
.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: clamp(8px, 2.6vw, 10px) clamp(8px, 3.5vw, 15px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    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 {
    min-width: 0;
    width: 100%;
    padding-right: clamp(4px, 1.4vw, 7px);
    box-sizing: border-box;
}

.wpc-sticky-product-name {
    display: block;
    width: 100%;
    font-size: clamp(10px, 3.1vw, 13px);
    line-height: 1.15;
    font-weight: 600;
    color: var(--wpc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpc-sticky-product-price {
    width: 100%;
    margin-top: 2px;
    font-size: clamp(11px, 3.2vw, 15px);
    line-height: 1.15;
    font-weight: 800;
    color: var(--wpc-accent);
    display: flex;
    align-items: center;
    gap: clamp(2px, 1.1vw, 5px);
    flex-wrap: wrap;
    overflow: hidden;
}

.wpc-sticky-regular-price {
    color: #777;
    font-size: clamp(9px, 2.7vw, 12px);
    font-weight: 600;
    text-decoration: line-through;
}

.wpc-sticky-sale-price {
    color: var(--wpc-accent);
    font-size: clamp(11px, 3.2vw, 15px);
    font-weight: 800;
}

.wpc-sticky-discount {
    display: inline-flex;
    align-items: center;
    padding: 1px clamp(3px, 1.2vw, 5px);
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: clamp(8px, 2.4vw, 10px);
    font-weight: 800;
    line-height: 1.3;
}

.wpc-sticky-button-wrap {
    display: grid;
    grid-column: 2 / 4;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(5px, 1.5vw, 8px);
    width: 100%;
    min-width: 0;
}

.wpc-sticky-add-cart-btn,
.wpc-sticky-buy-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: clamp(40px, 10.5vw, 46px);
    margin: 0;
    padding: clamp(6px, 2.2vw, 10px) clamp(4px, 2.4vw, 12px);
    border-radius: 6px;
    border: none;
    font-size: clamp(9px, 3.1vw, 14px);
    font-weight: 700;
    line-height: 1.18;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
    color: #fff;
}

.wpc-sticky-add-cart-btn {
    background: var(--primary-color, #006a4e);
}

.wpc-sticky-buy-btn {
    background: var(--buy-now-color, #ff6600);
}

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

@media only screen and (max-width: 360px) {
    .wpc-sticky-buy-now-bar {
        padding-left: 6px;
        padding-right: 6px;
    }

    .wpc-sticky-product-info {
        padding-right: 4px;
    }

    .wpc-sticky-button-wrap {
        gap: 5px;
    }

    .wpc-sticky-add-cart-btn,
    .wpc-sticky-buy-btn {
        min-height: 39px;
        line-height: 1.12;
    }
}

.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;
}

.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: 34px !important;
    height: auto !important;
    text-align: center;
    border: none !important;
    background: transparent !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--wpc-text) !important;
    padding: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

#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);
}

.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;
}

.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);
}

@media (max-width: 768px) {

    
    #popup-checkout-modal {
        align-items: flex-end;
    }

    .popup-checkout-content {
        max-width: 100%;
        width: 100%;
        max-height: calc(var(--wpc-vh, 1vh) * 95);
        max-height: 95dvh;
        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;
        
    }

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

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

    /* Product summary spacing on mobile (match reference UI) */
    .popup-product-item {
        padding: 8px !important;
    }

    .popup-product-name {
        font-size: 14px !important;
    }

    
    #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;
    }

    
    #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;
    }

    
    .popup-product-item img {
        width: 80px !important;
        height: 80px !important;
    }
}

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

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

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

@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;
    }
}

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

.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;
}

.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;
}

.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);
}

#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;
}

#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;
}

#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;
}

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

#popup-checkout-modal .woocommerce-billing-fields__field-wrapper::after,
#popup-checkout-modal .woocommerce-shipping-fields__field-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

#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);
}

#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 summary layout (override any legacy flex rules) */
#popup-checkout-modal .popup-product-info {
    flex: 1;
    min-width: 0;
}

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

#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);
}

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

#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);
}

.wpc-bump-container {
    margin: 15px 0 !important;
    background: #fffcf5 !important;
    border: 2px dashed #f59e0b !important;
    border-radius: 8px !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    overflow: hidden !important;
}

.wpc-bump-container:hover {
    border-color: #d97706 !important;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.1) !important;
}

.wpc-bump-badge {
    background: #f59e0b !important;
    color: white !important;
    text-align: center !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.wpc-bump-label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 15px !important;
}

.wpc-bump-checkbox-wrapper {
    flex-shrink: 0 !important;
}

.wpc-bump-checkbox {
    width: 20px !important;
    height: 20px !important;
    cursor: pointer !important;
    accent-color: #f59e0b !important;
}

.wpc-bump-content {
    flex: 1 !important;
}

.wpc-bump-main {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 4px !important;
}

.wpc-bump-image img {
    border-radius: 4px !important;
    width: 45px !important;
    height: 45px !important;
    object-fit: cover !important;
}

.wpc-bump-title {
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #1f2937 !important;
    line-height: 1.3 !important;
}

.wpc-bump-desc {
    font-size: 12px !important;
    color: #4b5563 !important;
    margin-left: 57px !important;
    
}

@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;
    }
}

@media (max-width: 768px) {
    #popup-checkout-modal.wpc-fullscreen-active .popup-checkout-content {
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: calc(var(--wpc-vh, 1vh) * 100) !important;
        min-height: 100dvh !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.popup-coupon-row span:last-child{color:var(--wpc-accent)!important;font-weight:700;}

.popup-checkout-promotion-group .wpc-bump-item-row{padding:10px 4px;border-top:1px dashed rgba(0,0,0,.06)}
.popup-checkout-promotion-group .wpc-bump-item-row:first-of-type{border-top:none;padding-top:6px}
.wpc-bump-desc-group{text-align:center;margin-top:8px}
#popup-checkout-modal .popup-coupon-btn.is-remove-mode{background:#dc2626!important}

.wpc-popup-checkout-notices {
    margin: 0 0 16px;
    padding: 0;
}
.wpc-popup-checkout-notices .woocommerce-error,
.wpc-popup-checkout-notices .woocommerce-message,
.wpc-popup-checkout-notices .woocommerce-info {
    margin: 0 0 12px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
#popup-checkout-modal .wpc-popup-checkout-notices ul {
    margin: 0;
    padding-left: 18px;
}
#popup-checkout-modal form.checkout.wpc-is-submitting #place_order {
    opacity: 0.7;
    pointer-events: none;
}


/* Bookstore Core v2.5.6: popup UX refinements */
html.wpc-popup-scroll-locked,
body.wpc-popup-scroll-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
}

body.wpc-popup-body-fixed {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
}

#popup-checkout-modal {
    overscroll-behavior: contain !important;
    touch-action: none !important;
}

#popup-checkout-modal .popup-checkout-content,
#popup-checkout-modal #popup-checkout-form {
    touch-action: auto !important;
    overscroll-behavior: contain !important;
}

/* More minimal cart/product option layout inside checkout popup */
#popup-checkout-modal .popup-product-summary {
    margin-bottom: 14px !important;
}

#popup-checkout-modal .wpc-cart-summary-bar {
    padding: 9px 12px !important;
    margin-bottom: 10px !important;
    gap: 8px !important;
}

#popup-checkout-modal .wpc-cart-summary-title,
#popup-checkout-modal .wpc-cart-summary-total {
    font-size: 14px !important;
    line-height: 1.25 !important;
}

#popup-checkout-modal .popup-product-item {
    padding: 10px 12px !important;
    min-height: 88px !important;
    margin-bottom: 10px !important;
    gap: 10px !important;
}

#popup-checkout-modal .wpc-cart-item-main {
    gap: 10px !important;
    align-items: center !important;
}

#popup-checkout-modal .popup-product-item img {
    width: 62px !important;
    height: 62px !important;
    border-radius: 6px !important;
}

#popup-checkout-modal .popup-product-info {
    padding-right: 38px !important;
}

#popup-checkout-modal .popup-product-name {
    font-size: 14px !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
}

#popup-checkout-modal .wpc-product-prices {
    gap: 7px !important;
    margin-top: 3px !important;
    line-height: 1.2 !important;
}

#popup-checkout-modal .wpc-sale-price {
    font-size: 15px !important;
}

#popup-checkout-modal .wpc-regular-price,
#popup-checkout-modal .wpc-discount {
    font-size: 12px !important;
}

#popup-checkout-modal .wpc-qty-wrap {
    margin-top: 6px !important;
    padding: 0 4px !important;
    gap: 2px !important;
    min-height: 28px !important;
}

#popup-checkout-modal .wpc-qty-wrap button {
    width: 22px !important;
    height: 24px !important;
}

#popup-checkout-modal .wpc-qty-icon {
    width: 10px !important;
    height: 10px !important;
}

#popup-checkout-modal .popup-cart-qty {
    width: 18px !important;
    max-width: 18px !important;
    min-height: 24px !important;
    font-size: 13px !important;
}

#popup-checkout-modal .popup-product-remove {
    top: 50% !important;
    right: 12px !important;
    transform: translateY(-50%) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
}

#popup-checkout-modal .popup-product-remove svg {
    width: 18px !important;
    height: 18px !important;
}

/* Payment/shipping radio spacing and tap target padding */
#popup-checkout-modal .popup-shipping-methods li,
#popup-checkout-modal .popup-payment-methods li,
#popup-checkout-modal .popup-shipping-methods li.selected,
#popup-checkout-modal .popup-payment-methods li.selected {
    padding: 12px 16px !important;
}

#popup-checkout-modal .popup-shipping-methods label,
#popup-checkout-modal .popup-payment-methods label,
#popup-checkout-modal .wc_payment_methods label,
#popup-checkout-modal .woocommerce-checkout .wc_payment_methods label {
    gap: 10px !important;
    padding: 4px 0 !important;
    line-height: 1.35 !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,
#popup-checkout-modal .wc_payment_methods input[type="radio"] {
    margin: 0 8px 0 0 !important;
    flex: 0 0 18px !important;
}

#popup-checkout-modal .popup-payment-methods .payment_box {
    padding-left: 28px !important;
}

@media (max-width: 480px) {
    #popup-checkout-modal .popup-checkout-content {
        max-width: calc(100vw - 24px) !important;
        min-width: 0 !important;
    }
    #popup-checkout-modal #popup-checkout-form {
        padding: 14px 16px 18px !important;
    }
    #popup-checkout-modal .popup-product-item img {
        width: 56px !important;
        height: 56px !important;
    }
    #popup-checkout-modal .popup-product-item {
        padding: 9px 10px !important;
    }
}


/* Bookstore Core v2.5.10 - popup button feedback */
.popup-checkout-modal button,
.popup-checkout-modal .button,
.popup-checkout-modal input[type="submit"],
.popup-checkout-modal .wpc-qty-btn,
.popup-checkout-modal .wpc-remove-item,
#wpc-sticky-buy-bar .wpc-sticky-add-cart-btn,
#wpc-sticky-buy-bar .wpc-sticky-buy-btn,
.wpc-sticky-buy-now-bar button,
.popup-buy-now,
.wpc-buy-now-button {
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, opacity .16s ease, background-color .16s ease, border-color .16s ease !important;
}
.popup-checkout-modal button:hover,
.popup-checkout-modal .button:hover,
.popup-checkout-modal input[type="submit"]:hover,
.popup-checkout-modal .wpc-qty-btn:hover,
#wpc-sticky-buy-bar .wpc-sticky-add-cart-btn:hover,
#wpc-sticky-buy-bar .wpc-sticky-buy-btn:hover,
.wpc-sticky-buy-now-bar button:hover,
.popup-buy-now:hover,
.wpc-buy-now-button:hover {
    transform: translateY(-1px) !important;
    filter: brightness(1.06) !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.14) !important;
}
.popup-checkout-modal button:active,
.popup-checkout-modal .button:active,
.popup-checkout-modal input[type="submit"]:active,
.popup-checkout-modal .wpc-qty-btn:active,
.popup-checkout-modal .wpc-remove-item:active,
#wpc-sticky-buy-bar .wpc-sticky-add-cart-btn:active,
#wpc-sticky-buy-bar .wpc-sticky-buy-btn:active,
.wpc-sticky-buy-now-bar button:active,
.popup-buy-now:active,
.wpc-buy-now-button:active {
    transform: translateY(1px) scale(.98) !important;
    filter: brightness(.95) !important;
    box-shadow: inset 0 2px 6px rgba(0,0,0,.18) !important;
}
.popup-checkout-modal button:focus-visible,
.popup-checkout-modal .button:focus-visible,
.popup-checkout-modal input[type="submit"]:focus-visible,
#wpc-sticky-buy-bar .wpc-sticky-add-cart-btn:focus-visible,
#wpc-sticky-buy-bar .wpc-sticky-buy-btn:focus-visible,
.popup-buy-now:focus-visible,
.wpc-buy-now-button:focus-visible {
    outline: 2px solid currentColor !important;
    outline-offset: 3px !important;
}


/* Bookstore Core v2.5.11 - Place Order loading feedback */
#popup-checkout-modal #place_order.wpc-place-order-loading,
#popup-checkout-modal button[name="woocommerce_checkout_place_order"].wpc-place-order-loading {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: wait !important;
    opacity: .92 !important;
    filter: none !important;
    pointer-events: none !important;
}
#popup-checkout-modal #place_order.wpc-place-order-loading:hover,
#popup-checkout-modal button[name="woocommerce_checkout_place_order"].wpc-place-order-loading:hover {
    transform: none !important;
    box-shadow: none !important;
}
#popup-checkout-modal .wpc-btn-spinner {
    width: 18px !important;
    height: 18px !important;
    border: 2px solid rgba(255,255,255,.45) !important;
    border-top-color: #fff !important;
    border-radius: 999px !important;
    display: inline-block !important;
    flex: 0 0 18px !important;
    animation: wpc-place-order-spin .75s linear infinite !important;
}
#popup-checkout-modal .wpc-btn-loading-text {
    display: inline-block !important;
    line-height: 1 !important;
}
@keyframes wpc-place-order-spin {
    to { transform: rotate(360deg); }
}


/* Bookstore Core v2.5.12 - Popup checkout compact quantity and instant update feedback */
.wpc-qty-wrap {
    width: 96px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    margin-top: 4px !important;
    gap: 0 !important;
    display: inline-flex !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    border: 1px solid #9ca3af !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
.wpc-qty-wrap button.popup-qty-minus,
.wpc-qty-wrap button.popup-qty-plus,
.wpc-qty-wrap .popup-qty-minus,
.wpc-qty-wrap .popup-qty-plus {
    width: 26px !important;
    height: 100% !important;
    min-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background: var(--primary-color, #006a4e) !important;
    background-color: var(--primary-color, #006a4e) !important;
    background-image: none !important;
    color: #ffffff !important;
    box-shadow: none !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}
.wpc-qty-wrap button.popup-qty-minus,
.wpc-qty-wrap .popup-qty-minus { border-radius: 3px 0 0 3px !important; }
.wpc-qty-wrap button.popup-qty-plus,
.wpc-qty-wrap .popup-qty-plus { border-radius: 0 3px 3px 0 !important; }
.wpc-qty-wrap .popup-cart-qty {
    flex: 1 !important;
    width: auto !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center !important;
    line-height: 22px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    appearance: textfield !important;
    -moz-appearance: textfield !important;
    box-sizing: border-box !important;
}
.wpc-qty-wrap .popup-cart-qty::-webkit-inner-spin-button,
.wpc-qty-wrap .popup-cart-qty::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.wpc-qty-wrap .wpc-qty-icon,
.wpc-qty-wrap button.popup-qty-minus svg,
.wpc-qty-wrap button.popup-qty-plus svg,
.wpc-qty-wrap .popup-qty-minus svg,
.wpc-qty-wrap .popup-qty-plus svg {
    width: 12px !important;
    height: 12px !important;
    display: block !important;
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
}
.wpc-qty-wrap button.popup-qty-minus svg path,
.wpc-qty-wrap button.popup-qty-plus svg path,
.wpc-qty-wrap .popup-qty-minus svg path,
.wpc-qty-wrap .popup-qty-plus svg path { stroke: #ffffff !important; }
.wpc-qty-wrap button.popup-qty-minus:hover,
.wpc-qty-wrap button.popup-qty-plus:hover,
.wpc-qty-wrap button.popup-qty-minus:focus,
.wpc-qty-wrap button.popup-qty-plus:focus,
.wpc-qty-wrap .popup-qty-minus:hover,
.wpc-qty-wrap .popup-qty-plus:hover,
.wpc-qty-wrap .popup-qty-minus:focus,
.wpc-qty-wrap .popup-qty-plus:focus {
    background: var(--primary-color, #006a4e) !important;
    background-color: var(--primary-color, #006a4e) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}
.wpc-qty-wrap button.popup-qty-minus:active,
.wpc-qty-wrap button.popup-qty-plus:active,
.wpc-qty-wrap .popup-qty-minus:active,
.wpc-qty-wrap .popup-qty-plus:active { transform: none !important; }
#popup-checkout-modal .wpc-qty-wrap {
    padding: 0 !important;
    gap: 0 !important;
    min-height: 24px !important;
    height: 24px !important;
    align-items: stretch !important;
    overflow: hidden !important;
}
#popup-checkout-modal .wpc-qty-wrap button.popup-qty-minus,
#popup-checkout-modal .wpc-qty-wrap button.popup-qty-plus {
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
#popup-checkout-modal .wpc-qty-wrap button.popup-qty-minus { border-radius: 3px 0 0 3px !important; }
#popup-checkout-modal .wpc-qty-wrap button.popup-qty-plus { border-radius: 0 3px 3px 0 !important; }
#popup-checkout-modal .wpc-qty-wrap.is-wpc-updating,
#popup-checkout-modal .wpc-bump-label.is-wpc-updating {
    opacity: .72;
    pointer-events: auto;
}
#popup-checkout-modal .wpc-qty-wrap.is-wpc-updating:after,

/* Bookstore Core v2.5.32 - Order bump stays visible and shows selected state */
#popup-checkout-modal .wpc-bump-label.is-wpc-selected {
    background: rgba(0, 106, 78, 0.06) !important;
}
#popup-checkout-modal .wpc-bump-label.is-wpc-selected .wpc-bump-checkbox {
    accent-color: var(--primary-color, #006a4e) !important;
}
#popup-checkout-modal .wpc-bump-selected-mark {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    margin-left: auto;
    background: var(--primary-color, #006a4e);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}
#popup-checkout-modal .wpc-bump-label.is-wpc-selected .wpc-bump-selected-mark {
    display: inline-flex;
}

#popup-checkout-modal .wpc-bump-label.is-wpc-updating:after {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0,106,78,.22);
    border-top-color: var(--primary-color, #006a4e);
    border-radius: 50%;
    display: inline-block;
    animation: wpcQtySpin .65s linear infinite;
    margin-left: 6px;
}
@keyframes wpcQtySpin { to { transform: rotate(360deg); } }


/* v2.5.18: stable Order Bump slot - keeps position during AJAX refresh */
#popup-checkout-modal .popup-checkout-promotion-slot {
    width: 100%;
    display: block;
    order: initial;
}
#popup-checkout-modal .popup-checkout-promotion-slot[style*="display:none"] {
    margin: 0 !important;
    padding: 0 !important;
}


/* Bookstore Core v2.5.19 - Mobile popup checkout sticky Place Order button only */
@media screen and (max-width: 768px) {
    #popup-checkout-modal #popup-checkout-form {
        padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap {
        position: static !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        border-top: 0 !important;
        padding: 12px 16px 12px !important;
        margin: 0 !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap #place_order,
    #popup-checkout-modal .wpc-mobile-place-order-wrap button[name="woocommerce_checkout_place_order"] {
        position: fixed !important;
        left: 20px !important;
        right: 20px !important;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        width: calc(100% - 40px) !important;
        max-width: calc(100vw - 40px) !important;
        min-height: 56px !important;
        z-index: 100010 !important;
        border-radius: 12px !important;
        box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.16) !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap::after,
    #popup-checkout-modal .wpc-trust-text {
        position: static !important;
        display: block !important;
    }
}

@media screen and (min-width: 769px) {
    #popup-checkout-modal .wpc-mobile-place-order-wrap #place_order,
    #popup-checkout-modal .wpc-mobile-place-order-wrap button[name="woocommerce_checkout_place_order"] {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
    }
}


/* Bookstore Core v2.5.20 - Mobile Place Order sticky button without background overlay */
@media screen and (max-width: 768px) {
    #popup-checkout-modal #popup-checkout-form {
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap {
        position: sticky !important;
        bottom: 0 !important;
        left: auto !important;
        right: auto !important;
        z-index: 100010 !important;
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
        border-top: 0 !important;
        border-radius: 0 !important;
        padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        margin: 14px 0 0 !important;
        pointer-events: none !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap #place_order,
    #popup-checkout-modal .wpc-mobile-place-order-wrap button[name="woocommerce_checkout_place_order"] {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 56px !important;
        z-index: 1 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18) !important;
        pointer-events: auto !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap::after {
        display: none !important;
        content: none !important;
    }

    #popup-checkout-modal .wpc-secure-text {
        display: block !important;
        position: static !important;
        text-align: center !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        color: var(--wpc-text-secondary) !important;
        margin: 8px 0 12px !important;
    }

    #popup-checkout-modal .wpc-trust-text {
        position: static !important;
        display: block !important;
        margin-top: 0 !important;
    }
}


/* Bookstore Core v2.5.21 - Mobile sticky Place Order on white footer bar */
@media screen and (max-width: 768px) {
    #popup-checkout-modal .wpc-mobile-place-order-wrap {
        position: sticky !important;
        bottom: 0 !important;
        left: auto !important;
        right: auto !important;
        z-index: 100010 !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
        border-top: 1px solid rgba(226, 232, 240, 0.95) !important;
        box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.10) !important;
        border-radius: 0 !important;
        padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        margin: 14px 0 0 !important;
        pointer-events: auto !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap #place_order,
    #popup-checkout-modal .wpc-mobile-place-order-wrap button[name="woocommerce_checkout_place_order"] {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 56px !important;
        z-index: 1 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18) !important;
        pointer-events: auto !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap::after {
        display: none !important;
        content: none !important;
    }
}


/* Bookstore Core v2.5.22 - Mobile sticky Place Order full-width white footer bar */
@media screen and (max-width: 768px) {
    #popup-checkout-modal .wpc-mobile-place-order-wrap {
        position: sticky !important;
        bottom: 0 !important;
        left: auto !important;
        right: auto !important;
        z-index: 100010 !important;
        width: calc(100% + 32px) !important;
        max-width: none !important;
        margin: 14px -16px 0 -16px !important;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
        border-top: 1px solid rgba(226, 232, 240, 0.95) !important;
        box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.10) !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        pointer-events: auto !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap #place_order,
    #popup-checkout-modal .wpc-mobile-place-order-wrap button[name="woocommerce_checkout_place_order"] {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 56px !important;
        z-index: 1 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18) !important;
        pointer-events: auto !important;
    }

    #popup-checkout-modal .wpc-mobile-place-order-wrap::after {
        display: none !important;
        content: none !important;
    }
}

@media screen and (max-width: 480px) {
    #popup-checkout-modal .wpc-mobile-place-order-wrap {
        width: calc(100% + 24px) !important;
        margin-left: -12px !important;
        margin-right: -12px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}
