.xpro-modal-open { overflow: hidden; }
.xpro-overlay[hidden] { display: none !important; }
.xpro-overlay { position: fixed; inset: 0; z-index: 999999; background: rgba(14, 20, 23, .73); display: flex; align-items: center; justify-content: center; padding: 18px; overflow: auto; }
.xpro-modal { background: #fff; color: #151a1d; width: min(720px, 100%); border-radius: 13px; padding: clamp(20px, 4vw, 34px); position: relative; max-height: calc(100vh - 36px); overflow-y: auto; box-shadow: 0 14px 48px rgba(0,0,0,.26); outline: none; }
.xpro-modal * { box-sizing: border-box; }
.xpro-modal h2 { font-size: clamp(23px, 3vw, 30px); line-height: 1.25; margin: 0 36px 10px 0; color: inherit; }
.xpro-popup-intro { line-height: 1.55; margin: 0 0 20px; }
.xpro-popup-intro p { margin: 0 0 10px; }
.xpro-modal-close { position: absolute; right: 15px; top: 10px; width: 40px; height: 40px; border: 0; background: transparent; color: #333; font-size: 33px; line-height: 1; cursor: pointer; }
.xpro-offer-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.xpro-offer-card { border: 1px solid #dde1e4; padding: 15px; border-radius: 10px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.xpro-offer-image { width: 100%; aspect-ratio: 1.3; display: flex; justify-content: center; align-items: center; }
.xpro-offer-image img { max-height: 100%; max-width: 100%; object-fit: contain; width: auto; height: auto; }
.xpro-offer-title { font-size: 17px; font-weight: 700; }
.xpro-offer-price { font-size: 19px; font-weight: 700; margin-top: auto; }
.xpro-offer-add { cursor: pointer; width: 100%; padding: 12px 9px; border-radius: 6px; border: 1px solid #13191c; background: #13191c; color: #fff; font-size: 14px; font-weight: 700; line-height: 1.25; min-height: 46px; }
.xpro-offer-add:hover, .xpro-offer-add:focus-visible { background: #404a4e; color: #fff; }
.xpro-offer-add[disabled] { opacity: .6; cursor: wait; }
.xpro-modal-decline { display: block; margin: 22px auto 0; padding: 8px 12px; font-weight: 500; background: transparent; color: #464a4e; border: 0; cursor: pointer; text-decoration: underline; }
.xpro-popup-error, .xpro-pickup-error { color: #ab2533; font-size: 14px; }
.xpro-pickup-box { box-sizing: border-box; width: 100%; background: #f7f9f9; border: 1px solid #d7dfe0; padding: 20px; margin: 0 0 23px; border-radius: 10px; color: #20272a; }
.xpro-pickup-box * { box-sizing: border-box; }
.xpro-pickup-box h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; }
.xpro-pickup-box > p { margin: 0 0 13px; font-size: 14px; line-height: 1.5; }
.xpro-pickup-option { display: flex !important; flex-flow: row nowrap; align-items: flex-start; gap: 12px; border: 1px solid #c9d2d5; background: white; padding: 13px; margin: 10px 0; cursor: pointer; border-radius: 7px; font-size: 14px; line-height: 1.4; }
.xpro-pickup-option:has(input:checked) { border-color: #1f6d5c; box-shadow: 0 0 0 1px #1f6d5c; }
.xpro-pickup-check { flex: 0 0 auto; appearance: auto !important; display: inline-block !important; width: 18px !important; height: 18px !important; min-width: 18px !important; margin: 2px 0 0 !important; accent-color: #1f6d5c; }
.xpro-pickup-option span { display: flex; flex-flow: column; gap: 3px; min-width: 0; }
.xpro-pickup-option strong { font-weight: 700; }
.xpro-pickup-option small { font-size: 13px; color: #536066; line-height: 1.35; }
.xpro-pickup-option em { font-style: normal; color: #17604e; font-weight: 700; }
.xpro-pickup-help { font-size: 12px !important; color: #566267; margin: 12px 0 0 !important; }
.xpro-pickup-box.xpro-loading { opacity: .6; }
/* Avoid duplicate location rows in classic cart's native shipping-rate list; the standalone cards select the real rates.
   Checkout keeps all native shipping methods visible, including both locations. */
body.woocommerce-cart ul.woocommerce-shipping-methods li:has(input[value^="xpro_pickup_"]) { display: none; }
@media (max-width: 560px) {
 .xpro-modal { padding: 20px 15px; }
 .xpro-offer-grid { gap: 9px; }
 .xpro-offer-card { padding: 10px 7px; }
 .xpro-offer-title { font-size: 14px; }
 .xpro-offer-price { font-size: 16px; }
 .xpro-offer-add { font-size: 12px; }
 .xpro-pickup-box { padding: 14px; }
}

/* Popup layout: self-contained and resilient to theme-wide button/heading rules. */
#xpro-wc-popup .xpro-modal {
    padding-top: 62px;
}
#xpro-wc-popup .xpro-modal .xpro-modal-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    float: none !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 6px;
    background: transparent !important;
    box-shadow: none !important;
    color: #202428 !important;
    font-size: 30px !important;
    font-weight: 400;
    line-height: 1 !important;
    text-align: center !important;
    transform: none !important;
}
#xpro-wc-popup .xpro-modal .xpro-modal-close:hover,
#xpro-wc-popup .xpro-modal .xpro-modal-close:focus-visible {
    background: #f1f2f2 !important;
}
#xpro-wc-popup .xpro-modal h2#xpro-modal-heading {
    margin: 0 0 10px !important;
    padding: 0 !important;
    text-align: center !important;
}
#xpro-wc-popup .xpro-modal .xpro-popup-intro,
#xpro-wc-popup .xpro-modal .xpro-popup-intro p {
    text-align: center !important;
}
#xpro-wc-popup .xpro-modal .xpro-popup-intro {
    margin: 0 0 20px !important;
}
#xpro-wc-popup .xpro-modal .xpro-popup-intro p:last-child {
    margin-bottom: 0 !important;
}
#xpro-wc-popup .xpro-modal .xpro-modal-decline {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    float: none !important;
    clear: both;
    width: fit-content !important;
    max-width: 100%;
    margin: 22px auto 0 !important;
    padding: 9px 14px !important;
    text-align: center !important;
    transform: none !important;
}
@media (max-width: 560px) {
    #xpro-wc-popup .xpro-modal { padding-top: 58px; }
    #xpro-wc-popup .xpro-modal .xpro-offer-add {
        font-size: 10px !important; /* 2px smaller than the previous mobile 12px. */
        line-height: 1.55 !important;
        white-space: normal !important;
        overflow-wrap: break-word;
    }
}
