/* Shared HPB2B layout repairs. Kept in a separate plugin so theme and product upgrades do not overwrite them. */
.hpb-card,
.hpb-price-card,
.hpb-final {
    box-sizing: border-box;
}

.hpb-card {
    min-width: 0;
}

.hpb-card > :first-child,
.hpb-price-card > :first-child {
    margin-top: 0;
}

.hpb-card > :last-child,
.hpb-price-card > :last-child {
    margin-bottom: 0;
}

.hpb-section-tint .hpb-shell > .wp-block-columns + p:last-child {
    position: relative;
    z-index: 2;
    margin-top: 34px !important;
}

.hpb-section-tint .hpb-shell > .wp-block-columns + p:last-child > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid #2867f0;
    border-radius: 10px;
    background: #2867f0;
    color: #fff;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(40, 103, 240, .2);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.hpb-section-tint .hpb-shell > .wp-block-columns + p:last-child > a:hover {
    transform: translateY(-2px);
    background: #1755d6;
    box-shadow: 0 12px 28px rgba(40, 103, 240, .28);
}

.hpb-final .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px !important;
}

.hpb-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hpbs-promo-bar {
    position: sticky;
    top: 0;
    z-index: 99998;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    background: var(--hpbs-bg, #2867f0);
    color: var(--hpbs-fg, #fff);
    box-shadow: 0 5px 18px rgba(7, 17, 31, .18);
}

.admin-bar .hpbs-promo-bar {
    top: 32px;
}

.hpbs-promo-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 1180px;
    min-height: 46px;
    margin: 0 auto;
    padding: 7px 24px;
    color: inherit;
    font-size: 14px;
    line-height: 1.25;
    text-align: center;
}

.hpbs-promo-message {
    color: inherit;
    font-weight: 800;
}

.hpbs-countdown {
    display: inline-flex;
    gap: 4px;
    align-items: baseline;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

.hpbs-countdown span {
    min-width: 1.55em;
    padding: 3px 5px;
    border-radius: 5px;
    background: rgba(0, 0, 0, .18);
    color: inherit;
}

.hpbs-promo-inner > a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 0 13px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit !important;
    font-weight: 800;
    text-decoration: none !important;
}

.hpbs-promo-inner > a:hover {
    background: rgba(255, 255, 255, .14);
}

.hpbs-price-value {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 7px;
}

.hpbs-price-value del {
    opacity: .55;
    font-size: .58em;
    font-weight: 650;
    text-decoration-thickness: 2px;
}

.hpbs-price-value ins {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.hpbs-price-value small {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
}

.hpbs-inline-offer {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.hpbs-inline-offer del {
    opacity: .62;
}

.hpbs-inline-offer ins {
    color: inherit;
    font-weight: 800;
    text-decoration: none;
}

.hpbs-sale-flash {
    width: auto !important;
    min-width: 0 !important;
    padding-inline: 12px !important;
}

@media (max-width: 782px) {
    .admin-bar .hpbs-promo-bar {
        top: 46px;
    }
}

@media (max-width: 700px) {
    .hpbs-promo-inner {
        flex-wrap: wrap;
        gap: 5px 12px;
        padding: 8px 14px;
    }

    .hpbs-promo-message {
        flex: 1 0 100%;
    }

    .hpbs-promo-inner > a {
        min-height: 28px;
    }

    .hpb-final .wp-block-buttons,
    .hpb-final .wp-block-button,
    .hpb-final .wp-block-button__link {
        width: 100%;
    }

    .hpb-final .wp-block-button__link {
        box-sizing: border-box;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hpb-section-tint .hpb-shell > .wp-block-columns + p:last-child > a {
        transition: none;
    }
}



/* Mobile WooCommerce cart containment. */
@media (max-width: 700px) {
    .wc-block-cart__main,
    .wc-block-cart-items {
        min-width: 0;
        max-width: 100%;
        width: 100% !important;
    }

    .wc-block-cart-items {
        table-layout: fixed;
    }

    .wc-block-cart-items .wc-block-cart-item__product {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}