/* Keep pricing information together; image ribbons have no dollar claims. */
[data-apollo-product-promotions][hidden],
[data-apollo-sale-ribbon][hidden],
.ap-sb-saving[hidden],
[data-apollo-advertisement][hidden],
[data-apollo-ad-slide][hidden] { display: none !important; }

.apollo-price-saving[data-apollo-product-promotions] {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin: 8px 0 16px;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 1.4;
}
.apollo-price-saving .ap-amt { color: #007db8; font-size: 17px; font-weight: 700; }
.apollo-price-saving .ap-pct { color: #505860; font-size: 14px; font-weight: 600; }
.ap-sb-saving {
    display: block;
    color: #ffdf70 !important;
    font-size: 16px !important;
    font-weight: 750 !important;
    line-height: 1.3;
    margin-top: 3px;
    white-space: nowrap;
}

.apollo-sale-ribbon-host { position: relative; }
.apollo-sale-ribbon-corner[data-apollo-sale-ribbon] {
    position: absolute !important;
    display: block;
    z-index: 3;
    left: var(--apollo-ribbon-x, 0px) !important;
    top: var(--apollo-ribbon-y, 0px) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--apollo-ribbon-size, 88px) !important;
    height: var(--apollo-ribbon-size, 88px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
    background: transparent !important;
    pointer-events: none;
    contain: layout paint;
}
.apollo-sale-ribbon-corner[data-apollo-sale-ribbon] > span {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 144%;
    height: 28%;
    left: -4%;
    top: 20%;
    margin: 0;
    padding: 0;
    color: #fff;
    background: #0088c9;
    font-family: inherit;
    font-size: clamp(10px, 0.9vw, 13px);
    font-weight: 750;
    letter-spacing: 0.045em;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    transform: rotate(45deg);
}
.apollo-sale-ribbon-corner[data-apollo-ribbon-side="left"] > span {
    left: -40%;
    transform: rotate(-45deg);
}

.apollo-product-advertisement[data-apollo-advertisement] {
    width: 100%;
    padding: 0;
    margin: 24px auto;
    background: transparent;
    line-height: 0;
}
.apollo-product-ad-slide { width: 100%; }
.apollo-product-ad-slide a { display: block; }
.apollo-product-ad-slide img { display: block; width: 100%; height: auto; max-width: 100%; margin: 0; }

@media (max-width: 767px) {
    .apollo-price-saving .ap-amt { font-size: 16px; }
    .apollo-price-saving .ap-pct { font-size: 13px; }
    .ap-sb-saving { font-size: 15px !important; }
    /* Keep the saving and price above the full-width cart controls on phones. */
    body.catalog-product-view .apollo-sticky-bar .ap-sb-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px !important;
    }
    body.catalog-product-view .apollo-sticky-bar .ap-sb-meta { grid-column: 1; }
    body.catalog-product-view .apollo-sticky-bar .ap-sb-price {
        grid-column: 2;
        justify-self: end;
    }
    body.catalog-product-view .apollo-sticky-bar .ap-sb-actions {
        grid-column: 1 / -1;
        width: 100% !important;
        min-width: 0;
    }
    body.catalog-product-view .apollo-sticky-bar .ap-sb-cta {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    body.catalog-product-view .page-footer {
        padding-bottom: max(150px, var(--apollo-floating-clearance, 150px)) !important;
    }
    .apollo-sale-ribbon-corner[data-apollo-sale-ribbon] > span { font-size: 10px; }
    .apollo-product-advertisement[data-apollo-advertisement] { margin: 18px auto; }
}

/* Append after the existing Apollo theme rules. No consent/provider UI is hidden. */
:root {
    --apollo-sticky-floor: 0px;
    --apollo-floating-clearance: 12px;
}
body.catalog-product-view .apollo-sticky-bar {
    bottom: var(--apollo-sticky-floor, 0px) !important;
}
body.catalog-product-view .apollo-sticky-bar:not(.is-visible) {
    transform: translateY(calc(100% + var(--apollo-sticky-floor, 0px) + 2px)) !important;
}
body.catalog-product-view .apollo-sticky-bar.is-visible {
    transform: translateY(0) !important;
}
.apollo-mobile-store-link {
    display: none;
}
.apollo-demo-enquiry {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: #00689c;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.apollo-demo-enquiry:focus-visible,
.apollo-mobile-store-link:focus-visible {
    outline: 2px solid #0188cc;
    outline-offset: 3px;
}
@media (max-width: 1023px) {
    #mobi_menu-container .apollo-mobile-store-link {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin: 12px 14px;
        padding: 14px 12px;
        border: 1px solid #dce7ed;
        border-left: 3px solid #0188cc;
        background: #f4f9fc;
        color: #163c50;
        text-decoration: none;
        line-height: 1.45;
        white-space: normal;
    }
    #mobi_menu-container .apollo-mobile-store-heading {
        font-size: 15px;
        font-weight: 700;
    }
    #mobi_menu-container .apollo-mobile-store-address {
        font-size: 13px;
        font-weight: 400;
    }
}
@media (max-width: 767px) {
    :root {
        --apollo-sticky-floor: 48px;
        --apollo-floating-clearance: 60px;
    }
}
