.cpbs-hero {
    background-size: cover;
    background-position: center center;
    position: relative;
    margin: 0 0 25px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.cpbs-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    color: inherit;
    text-align: center;
    margin: 0 auto;
}

.cpbs-hero-title {
    margin: 0 0 10px;
    font-size: 2rem;
    line-height: 1.1;
    color: inherit;
}

.cpbs-hero-text {
    margin: 0 0 14px;
    line-height: 1.5;
    color: inherit;
}

.cpbs-hero-button.button {
    text-decoration: none;
    border: none;
}

/* Progress panel */
.cpbs-progress-block {
    border: 1px solid #e2e2e2;
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    margin: 0 0 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    text-align: center;
}

.cpbs-progress-header {
    display: block;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 0 0 10px;
    font-size: 1.5rem;
    text-align: center;
}

.cpbs-progress-title {
    font-weight: 700;
    color: #222;
    width: 100%;
    text-align: center;
}

.cpbs-progress-count {
    color: #555;
}

.cpbs-set-summary {
    margin: 0 0 10px;
    color: #444;
}

.cpbs-set-summary-description {
    margin-top: 4px;
    line-height: 1.45;
    color: #555;
}

.cpbs-progress-list {
    display: block;
    margin: 10px 0 14px 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

.cpbs-progress-list li {
    margin: 0 0 8px;
    color: #222;
    text-align: center;
}

.cpbs-item-symbol {
    display: inline-block;
    width: 20px;
    font-weight: 700;
}

.cpbs-item-complete .cpbs-item-symbol {
    color: #2f6b2f;
}

.cpbs-item-missing .cpbs-item-symbol {
    color: #7a1f1f;
}

.cpbs-item-link {
    margin-left: 8px;
}

.cpbs-missing-prompt {
    margin: 0 0 10px;
    color: #444;
}

.cpbs-progress-actions {
    margin: 0;
    color: #444;
}

.single-product .cpbs-progress-block,
.tax-product_cat .cpbs-progress-block {
    margin-top: 24px;
}

.cpbs-progress-list li,
.cpbs-item-missing,
.cpbs-item-complete {
    text-align: center;
}

.cpbs-item-complete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #eef7ee;
    border: 1px solid #c9e3c9;
    border-radius: 999px;
    padding: 6px 12px;
    margin: 4px auto;
}

.cpbs-item-complete .cpbs-item-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2f6b2f;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
}

.cpbs-item-complete .cpbs-item-text {
    color: #245424 !important;
    font-weight: 600;
}

/* Box set selector cards: centred, three-across desktop layout */
.cpbs-selector-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 24px;

    max-width: 1040px;
    width: calc(100% - 32px);

    margin: 20px auto 40px auto;
    padding: 20px 0 40px;
    background: transparent;
    box-sizing: border-box;
}

.cpbs-selector-card {
    flex: 0 1 calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);
    min-width: 260px;

    border: 1px solid #e2e2e2;
    padding: 18px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: transform .18s ease, box-shadow .18s ease;
    box-sizing: border-box;
}

.cpbs-selector-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,.10);
}

.cpbs-selector-card h3,
.cpbs-selector-card .cpbs-price,
.cpbs-selector-card .cpbs-set-items,
.cpbs-selector-card .cpbs-set-items li {
    color: #222;
}

.cpbs-selector-card .cpbs-description {
    margin: 0 0 10px;
    line-height: 1.45;
    color: #444;
}

.cpbs-selector-media {
    margin-bottom: 12px;
}

.cpbs-selector-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    transition: transform .18s ease;
}

.cpbs-selector-card:hover .cpbs-selector-image {
    transform: scale(1.015);
}

.cpbs-price {
    font-size: 1.1em;
    margin: 0 0 6px;
}

.cpbs-saving {
    margin: 0 0 10px;
    color: #2f6b2f;
    font-weight: 600;
}

.cpbs-set-items {
    margin: 0 0 14px 18px;
    padding: 0;
}

.cpbs-set-items li {
    margin: 0 0 4px;
}

.cpbs-select-button.button,
.cpbs-hero-button.button {
    display: inline-block;
}

/* Basket / checkout shared styling */
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.cpbs-disabled {
    pointer-events: none;
    opacity: .5;
    cursor: not-allowed;
}

.woocommerce-cart .wc-item-meta {
    font-size: .9em;
    color: #666;
}

.woocommerce-cart .wc-item-meta li {
    margin: 2px 0;
}

.woocommerce-cart tr.cpbs-helper-cart-row,
.woocommerce-checkout-review-order-table tr.cpbs-helper-cart-row {
    border-top: 2px solid rgba(221,180,54,.95);
    border-bottom: 1px solid rgba(221,180,54,.55);
}

.woocommerce-cart tr.cpbs-linked-cart-row .product-name,
.woocommerce-checkout-review-order-table tr.cpbs-linked-cart-row .product-name {
    border-left: 4px solid rgba(221,180,54,.85);
    padding-left: 20px;
}

.cpbs-helper-title {
    font-weight: 700;
}

.cpbs-helper-note {
    display: block;
    margin-top: 4px;
    font-size: .92em;
    line-height: 1.35;
    opacity: .88;
}

.cpbs-helper-saving-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
    font-size: .88em;
    line-height: 1.35;
    opacity: .96;
}

.cpbs-helper-saving-summary span {
    white-space: nowrap;
}

.cpbs-placeholder-price,
.cpbs-helper-quantity,
.cpbs-mini-helper-quantity {
    display: inline-block;
    font-size: .92em;
    line-height: 1.35;
    opacity: .88;
    white-space: normal;
}

.cpbs-helper-quantity {
    min-width: 2em;
    text-align: center;
}

/* Checkout: refine selected-box spacing in the Your Order table */
.woocommerce-checkout-review-order-table tr.cpbs-linked-cart-row .product-name {
    padding-top: 8px;
    padding-right: 12px;
    padding-bottom: 8px;
    padding-left: 14px;
}

.woocommerce-checkout-review-order-table tr.cpbs-linked-cart-row .product-total {
    padding-left: 10px;
}

.woocommerce-checkout-review-order-table tr.cpbs-linked-cart-row .wc-item-meta {
    margin-top: 6px;
    margin-left: 6px;
    padding-left: 8px;
}

.woocommerce-checkout-review-order-table tr.cpbs-linked-cart-row .wc-item-meta li {
    margin: 4px 0 0;
    line-height: 1.38;
}

.woocommerce-checkout-review-order-table tr.cpbs-helper-cart-row .product-name {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Checkout: tighten the Astra/WooCommerce "Your order" frame without crowding the box-set contents */
body.woocommerce-checkout form #order_review:not(.elementor-widget-woocommerce-checkout-page #order_review) {
    padding-left: 1.25em !important;
    padding-right: 1.25em !important;
}

/* Checkout: give linked box-set metadata a small inset away from the vertical marker line */
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.cpbs-linked-cart-row .product-name {
    padding-left: 18px !important;
    padding-right: 10px !important;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.cpbs-linked-cart-row .wc-item-meta {
    margin-left: 12px !important;
    padding-left: 0 !important;
}

/* Compact progress actions and remove-selection link */
.cpbs-item-actions {
    display: inline-block;
    margin-left: 8px;
    font-size: .88em;
    white-space: nowrap;
}

.cpbs-remove-item-link {
    opacity: .82;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cpbs-remove-item-link:hover {
    opacity: 1;
}

.cpbs-order-helper-title {
    display: inline-block;
}

/* Order-received / email display refinements for box-set rows */
.woocommerce-order-details tr.cpbs-helper-order-row td,
.woocommerce-table--order-details tr.cpbs-helper-order-row td {
    padding-bottom: 8px;
}

.woocommerce-order-details tr.cpbs-linked-order-row td,
.woocommerce-table--order-details tr.cpbs-linked-order-row td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.woocommerce-order-details tr.cpbs-linked-order-row .wc-item-meta,
.woocommerce-table--order-details tr.cpbs-linked-order-row .wc-item-meta {
    margin-top: 3px;
    margin-bottom: 0;
}

.woocommerce-order-details tr.cpbs-linked-order-row .wc-item-meta li,
.woocommerce-table--order-details tr.cpbs-linked-order-row .wc-item-meta li {
    margin-top: 2px;
    margin-bottom: 0;
    line-height: 1.28;
}

.cpbs-order-helper-subtotal {
    display: inline-block;
    font-size: .92em;
    line-height: 1.3;
    opacity: .9;
}

/* Tablet: two-across selector cards */
@media (max-width: 900px) {
    .cpbs-selector-grid {
        max-width: 700px;
    }

    .cpbs-selector-card {
        flex-basis: calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
    }
}

/* Mobile: one-across selector cards */
@media (max-width: 600px) {
    .cpbs-selector-grid {
        max-width: 360px;
        width: calc(100% - 24px);
        gap: 16px;
    }

    .cpbs-selector-card {
        flex-basis: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

/* General mobile refinements */
@media (max-width: 768px) {
    .cpbs-progress-block {
        padding: 12px 12px;
    }

    .cpbs-progress-header {
        font-size: 1.2rem;
    }

    .cpbs-item-complete {
        border-radius: 14px;
        flex-wrap: wrap;
        gap: 5px 7px;
    }

    .cpbs-item-actions {
        display: block;
        width: 100%;
        margin-left: 0;
    }

    .cpbs-selector-grid {
        gap: 14px;
    }
}

/* Force the box set selector grid to centre inside Astra/WordPress content wrappers */
body .entry-content .cpbs-selector-grid,
body .site-content .cpbs-selector-grid,
body .woocommerce .cpbs-selector-grid,
body .cpbs-selector-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 24px !important;

    max-width: 1040px !important;
    width: calc(100% - 32px) !important;

    margin-top: 20px !important;
    margin-right: auto !important;
    margin-bottom: 40px !important;
    margin-left: auto !important;

    padding: 20px 0 40px !important;
    box-sizing: border-box !important;
}

body .entry-content .cpbs-selector-card,
body .site-content .cpbs-selector-card,
body .woocommerce .cpbs-selector-card,
body .cpbs-selector-card {
    flex: 0 1 calc((100% - 48px) / 3) !important;
    max-width: calc((100% - 48px) / 3) !important;
    min-width: 260px !important;
    box-sizing: border-box !important;
}

/* Tablet */
@media (max-width: 900px) {
    body .entry-content .cpbs-selector-grid,
    body .site-content .cpbs-selector-grid,
    body .woocommerce .cpbs-selector-grid,
    body .cpbs-selector-grid {
        max-width: 700px !important;
    }

    body .entry-content .cpbs-selector-card,
    body .site-content .cpbs-selector-card,
    body .woocommerce .cpbs-selector-card,
    body .cpbs-selector-card {
        flex-basis: calc((100% - 24px) / 2) !important;
        max-width: calc((100% - 24px) / 2) !important;
    }
}

/* Mobile */
@media (max-width: 600px) {
    body .entry-content .cpbs-selector-grid,
    body .site-content .cpbs-selector-grid,
    body .woocommerce .cpbs-selector-grid,
    body .cpbs-selector-grid {
        width: calc(100% - 24px) !important;
        max-width: 360px !important;
        gap: 16px !important;
    }

    body .entry-content .cpbs-selector-card,
    body .site-content .cpbs-selector-card,
    body .woocommerce .cpbs-selector-card,
    body .cpbs-selector-card {
        flex-basis: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}