:root,
body {
    --cpx-shop-accent: var(--e-global-color-secondary, #4d665e);
    --cpx-shop-text: var(--e-global-color-text, #3c3c3b);
    --cpx-shop-surface: var(--e-global-color-aeb64d8, #fbf7f1);
    --cpx-shop-white: #fff;
    --cpx-shop-border: #d8d2c9;
    --cpx-shop-radius: var(--cpx-border-radius, 10px);
    --cpx-shop-space: 1rem;
    --cpx-shop-touch: 44px;
    --cpx-shop-icon: 22px;
    --cpx-label-inset: .75rem;
    --cpx-loading-size: 48px;
    --cpx-loading-duration: .8s;
    --cpx-loading-button-padding: 12px 22px;
    --cpx-loading-button-track: rgb(255 255 255 / 35%);
    --cpx-loading-button-backdrop: rgb(255 250 245 / 20%);
}

.cpx-product-image,
.woocommerce ul.products li.product,
.woocommerce-product-gallery__image,
.woocommerce-product-gallery__image--placeholder {
    position: relative;
}
/* Keep room on the right for sale/colour controls and the gallery zoom button. */
.cpx-product-label {
    position: absolute;
    top: var(--cpx-label-inset);
    left: var(--cpx-label-inset);
    z-index: 3;
    display: block;
    /* max-width: calc(60% - 2 * var(--cpx-label-inset)); */
    max-width: 100%;
    margin: 0;
    text-align: left;
    pointer-events: none;
}
.cpx-product-label__text {
    display: inline-block;
    max-width: 100%;
    padding: .35rem .7rem;
    border-radius: var(--cpx-shop-radius);
    background: var(--cpx-shop-accent);
    color: var(--cpx-shop-white);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.woocommerce div.product:has(.woocommerce-product-gallery .cpx-product-label) > .onsale {
    top: calc(var(--cpx-shop-touch) + 2 * var(--cpx-label-inset));
    right: calc(52% + var(--cpx-label-inset));
    left: auto;
    margin: 0;
}
@media (max-width: 768px) {
    .woocommerce div.product:has(.woocommerce-product-gallery .cpx-product-label) > .onsale {
        right: var(--cpx-label-inset);
    }
}
.cpx-upsell {
    --cpx-upsell-padding: 2rem;
    --cpx-upsell-gap: 1rem;
    --cpx-upsell-image-size: 96px;
    --cpx-upsell-soft-accent: #e6ede8;
    --cpx-upsell-open-duration: 220ms;
    --cpx-upsell-close-duration: 150ms;
    --cpx-upsell-motion-easing: cubic-bezier(.16, 1, .3, 1);
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: min(760px, calc(100% - 2rem));
    max-width: none;
    max-height: calc(100dvh - 3rem);
    margin: auto;
    padding: var(--cpx-upsell-padding);
    overflow: hidden;
    border: 0;
    border-radius: var(--cpx-shop-radius);
    background: var(--cpx-shop-surface);
    color: var(--cpx-shop-text);
    font-family: var(--e-global-typography-text-font-family, inherit);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}
.cpx-upsell:not([open]),
.cpx-upsell [hidden] {
    display: none !important;
}
.cpx-upsell::backdrop {
    background: rgb(30 38 34 / 55%);
}
.cpx-upsell[open] {
    animation: cpx_upsell_open var(--cpx-upsell-open-duration) var(--cpx-upsell-motion-easing) both;
}
.cpx-upsell[open]::backdrop {
    animation: cpx_upsell_backdrop_open var(--cpx-upsell-open-duration) ease-out both;
}
.cpx-upsell[open].cpx-upsell--closing {
    animation: cpx_upsell_close var(--cpx-upsell-close-duration) ease-in both;
}
.cpx-upsell[open].cpx-upsell--closing::backdrop {
    animation: cpx_upsell_backdrop_close var(--cpx-upsell-close-duration) ease-in both;
}
@keyframes cpx_upsell_open {
    from { opacity: 0; transform: scale(.98); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes cpx_upsell_close {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(.98); }
}
@keyframes cpx_upsell_backdrop_open {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes cpx_upsell_backdrop_close {
    from { opacity: 1; }
    to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .cpx-upsell {
        --cpx-upsell-open-duration: 80ms;
        --cpx-upsell-close-duration: 80ms;
    }
    .cpx-upsell[open] {
        animation-name: cpx_upsell_backdrop_open;
    }
    .cpx-upsell[open].cpx-upsell--closing {
        animation-name: cpx_upsell_backdrop_close;
    }
}
.cpx-upsell ::selection {
    background: var(--cpx-upsell-soft-accent);
    color: var(--cpx-shop-text);
}
.cpx-upsell button.cpx-upsell__close {
    position: absolute;
    top: var(--cpx-upsell-gap);
    right: var(--cpx-upsell-gap);
    display: grid;
    place-items: center;
    width: var(--cpx-shop-touch);
    height: var(--cpx-shop-touch);
    min-width: var(--cpx-shop-touch);
    min-height: var(--cpx-shop-touch);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--cpx-shop-radius);
    background: transparent;
    color: var(--cpx-shop-text);
    line-height: 0;
    cursor: pointer;
}
.cpx-upsell .cpx-upsell__close svg {
    display: block;
    flex: none;
    width: var(--cpx-shop-icon);
    height: var(--cpx-shop-icon);
    max-width: none;
    margin: 0;
    padding: 0;
}
.cpx-upsell .cpx-upsell__close:hover,
.cpx-upsell .cpx-upsell__close:focus-visible {
    background: var(--cpx-upsell-soft-accent);
}
.cpx-upsell__header {
    display: grid;
    flex: none;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: .75rem;
    padding-right: 2rem;
}
.cpx-upsell__confirmation-icon {
    display: block;
    margin-top: .5rem;
    color: var(--cpx-shop-accent);
    line-height: 0;
}
.cpx-upsell__confirmation-icon svg {
    display: block;
    width: 24px;
    height: 24px;
}
.cpx-upsell .cpx-upsell__title {
    margin: 0;
    font-family: var(--e-global-typography-primary-font-family, inherit);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 400;
    line-height: 1.15;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.cpx-upsell__title:focus {
    outline: none;
}
.cpx-upsell .cpx-upsell__confirmation {
    margin: .65rem 0 .3rem;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.cpx-upsell__recommendations {
    min-height: 0;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    overflow: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--cpx-shop-border);
    scrollbar-width: thin;
    scrollbar-color: var(--cpx-shop-accent) var(--cpx-shop-surface);
}
.cpx-upsell .cpx-upsell__subtitle {
    margin: 0 0 .5rem;
    font-family: var(--e-global-typography-primary-font-family, inherit);
    font-size: 1.625rem;
    font-weight: 400;
    line-height: 1.2;
}
.cpx-upsell__products {
    display: grid;
}
.cpx-upsell__product {
    display: grid;
    grid-template-columns: var(--cpx-upsell-image-size) minmax(0, 1fr);
    align-items: center;
    gap: var(--cpx-upsell-gap);
    padding: var(--cpx-upsell-gap) 0;
    border-bottom: 1px solid var(--cpx-shop-border);
}
.cpx-upsell__product:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
.cpx-upsell__product__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: var(--cpx-shop-radius);
    background: var(--cpx-shop-white);
}
.cpx-upsell__product__details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .4rem var(--cpx-upsell-gap);
}
.cpx-upsell .cpx-upsell__product__name {
    grid-column: 1;
    margin: 0;
    font-family: var(--e-global-typography-primary-font-family, inherit);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.cpx-upsell__product__name a {
    color: inherit;
    text-decoration: none;
    text-underline-offset: .2em;
}
.cpx-upsell__product__name a:hover {
    text-decoration: underline;
}
.cpx-upsell__product__price {
    grid-column: 1;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}
.cpx-upsell__product__price ins {
    font-weight: 500;
    text-decoration: none;
}
.cpx-upsell__product__price del {
    margin-right: .35rem;
}
.cpx-upsell__product__details > .cpx-upsell__button {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 118px;
}
.cpx-upsell__actions {
    display: grid;
    flex: none;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--cpx-shop-border);
}
.cpx-upsell .cpx-upsell__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: var(--cpx-shop-touch);
    max-width: 100%;
    padding: .7rem 1rem;
    border: 1px solid var(--cpx-shop-accent);
    border-radius: var(--cpx-shop-radius);
    background: var(--cpx-shop-accent);
    color: var(--cpx-shop-white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.cpx-upsell .cpx-upsell__button--outline {
    background: transparent;
    color: var(--cpx-shop-accent);
}
.cpx-upsell .cpx-upsell__button:hover {
    background: var(--cpx-shop-text);
    border-color: var(--cpx-shop-text);
    color: var(--cpx-shop-white);
}
.cpx-upsell .cpx-upsell__button--outline:hover {
    background: var(--cpx-upsell-soft-accent);
    border-color: var(--cpx-shop-accent);
    color: var(--cpx-shop-accent);
}
.cpx-upsell .cpx-upsell__button:disabled {
    opacity: .6;
    cursor: wait;
}
.cpx-upsell :is(a, button):focus-visible {
    outline: 2px solid var(--cpx-shop-accent);
    outline-offset: 3px;
}
.cpx-upsell__status {
    flex: none;
    margin: var(--cpx-upsell-gap) 0 0;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.cpx-upsell__status:empty {
    display: none;
}
@media (max-width: 600px) {
    .cpx-upsell {
        --cpx-upsell-padding: 1.25rem;
        --cpx-upsell-image-size: 76px;
        width: calc(100% - 1rem);
        max-height: calc(100dvh - 1rem);
    }
    .cpx-upsell__header {
        grid-template-columns: 20px minmax(0, 1fr);
        gap: .5rem;
        padding-right: 1.5rem;
    }
    .cpx-upsell__confirmation-icon svg {
        width: 20px;
        height: 20px;
    }
    .cpx-upsell .cpx-upsell__title {
        font-size: 1.875rem;
    }
    .cpx-upsell .cpx-upsell__subtitle {
        font-size: 1.5rem;
    }
    .cpx-upsell__product {
        align-items: start;
    }
    .cpx-upsell__product__details {
        grid-template-columns: minmax(0, 1fr);
        gap: .4rem;
    }
    .cpx-upsell .cpx-upsell__product__name {
        font-size: 1.375rem;
    }
    .cpx-upsell__product__details > .cpx-upsell__button {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        min-width: 0;
        margin-top: .25rem;
        padding: .6rem .8rem;
        font-size: 13px;
    }
    .cpx-upsell__actions {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 1.25rem;
        padding-top: var(--cpx-upsell-gap);
    }
}

/* Native dialog top layer also covers an already-open upsell confirmation. */
.cpx-cart-loading {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cpx-shop-accent);
}
.cpx-cart-loading:not([open]) {
    display: none;
}
.cpx-cart-loading::backdrop {
    background: rgb(255 250 245 / 65%);
}
.cpx-cart-loading__spinner {
    display: block;
    width: var(--cpx-loading-size);
    height: var(--cpx-loading-size);
    border: 3px solid var(--cpx-shop-border);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: cpx_cart_loading var(--cpx-loading-duration) linear infinite;
}
/* An inline loader needs no second, overlapping screen-centre spinner. */
body.cpx-cart-loading--open:has(.single_add_to_cart_button.loading, .add_to_cart_button.loading) .cpx-cart-loading__spinner {
    visibility: hidden;
}
body.cpx-cart-loading--open:has(.single_add_to_cart_button.loading, .add_to_cart_button.loading) .cpx-cart-loading::backdrop {
    background: var(--cpx-loading-button-backdrop);
}
/* Keep the site's green button and its dimensions while WooCommerce disables it. */
body .single_add_to_cart_button.loading,
body .add_to_cart_button.loading {
    position: relative;
    padding: var(--cpx-loading-button-padding) !important;
    background-color: var(--cpx-shop-accent) !important;
    color: transparent !important;
    text-shadow: none !important;
    opacity: 1 !important;
    cursor: wait;
    transition: none !important;
}
/* Keep labels in the accessibility tree and layout; hide only their visual contents. */
body .single_add_to_cart_button.loading > *,
body .add_to_cart_button.loading > * {
    opacity: 0 !important;
}
body .single_add_to_cart_button.loading::before,
body .add_to_cart_button.loading::before {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    box-sizing: border-box;
    width: var(--cpx-shop-icon);
    height: var(--cpx-shop-icon);
    margin: calc(var(--cpx-shop-icon) / -2) 0 0 calc(var(--cpx-shop-icon) / -2);
    padding: 0;
    border: 2px solid var(--cpx-loading-button-track);
    border-top-color: var(--cpx-shop-white);
    border-radius: 50%;
    content: '';
    animation: cpx_cart_loading var(--cpx-loading-duration) linear infinite;
}
body .single_add_to_cart_button.loading::after,
body .add_to_cart_button.loading::after,
.product-card-bottom .product-card-bottom__add-to-cart-button:is(.loading, .added)::after,
.product-card-bottom .product-card-bottom__add-to-cart .added_to_cart {
    display: none !important;
    content: none !important;
}
/* The upsell dialog replaces WooCommerce's generated post-add cart link, on all screens. */
body a.added_to_cart.wc-forward {
    display: none !important;
}
/* Confirmation belongs to the popup, so native success ticks stay off the buttons. */
body .button.added::after,
body .add_to_cart_button.added::after,
body .single_add_to_cart_button.added::after {
    display: none !important;
    content: none !important;
}
@keyframes cpx_cart_loading {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .cpx-cart-loading__spinner,
    body .single_add_to_cart_button.loading::before,
    body .add_to_cart_button.loading::before {
        animation-duration: 2s;
    }
}
