/* Keep the original mobile boundary and block the complete side drawer. */
#contact-drawer[hidden] {
    display: none !important;
}

@media (max-width: 768px) {
    #open-contact-drawer-btn,
    #contact-drawer {
        display: none !important;
    }
}

/* Provider-managed labels sit outside zoom and Swiper slide clipping. */
.mobile-product-labels {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    overflow: visible;
}

.mobile-product-labels .berocket_better_labels,
.mobile-product-labels .br_alabel {
    pointer-events: auto;
}

.custom-home-slide {
    position: relative;
    overflow: visible;
}

@media (max-width: 767.98px) {
    .single-product .product > .berocket_better_labels,
    .single-product .product > .br_alabel {
        display: none;
    }
}

@media (min-width: 768px) {
    .single-product .mobile-video {
        display: none;
    }
}

/* Keep home labels anchored to the existing product image without clipping. */
.custom-home-image {
    position: relative;
    overflow: visible;
}

/* Preserve the original full-width home wrapper with the newer Bootstrap gutter. */
.home #content.container-fluid.p-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Home labels use the card as their anchor; the product image keeps its size. */
.home .custom-home-carousel .custom-home-image {
    position: static;
}

.home .custom-home-carousel .custom-home-image > .berocket_better_labels_image {
    top: 38px !important;
    bottom: auto !important;
    right: 7px !important;
    left: 7px !important;
    width: auto !important;
    height: auto !important;
    z-index: 4;
}

.home .custom-home-carousel .custom-home-image > .br_alabel_image {
    position: absolute !important;
    top: 38px !important;
    bottom: auto !important;
    right: 7px !important;
    left: auto !important;
    z-index: 4;
    /* Keep its card offset unscaled; only the direct legacy badge is transformed. */
    zoom: 1;
    transform: scale(var(--cl-home-label-scale, 0.72));
    transform-origin: top right;
}

.home .custom-home-carousel .br_alabel {
    --cl-home-label-scale: 0.72;
    zoom: 0.72;
}

/* Compensate the reduced shape size; existing label text stays readable. */
.home .custom-home-carousel .br_alabel > span > b.br-labels-css {
    font-size: 14px !important;
    line-height: 1.2 !important;
}

/* The rotated hot badge needs a smaller shape without reducing its text below 9px. */
.home .custom-home-carousel .berocket_alabel_id_3424 {
    --cl-home-label-scale: 0.54;
    zoom: 0.54;
}

.home .custom-home-carousel .berocket_alabel_id_3424 > span > b.br-labels-css {
    font-size: 20px !important;
}

/* Native CSS-shape pieces only; text/tooltip opacity stays unchanged. */
.home .custom-home-carousel .br_alabel > span > i {
    opacity: 0.58;
}

/* Lower home grids now share the provider's original label/image placement. */
.home .cl-home-grid-product-image {
    position: relative;
    overflow: visible;
}

@media (max-width: 767.98px) {
    .home .custom-home-carousel .br_alabel {
        --cl-home-label-scale: 0.60;
        zoom: 0.60;
    }

    .home .custom-home-carousel .br_alabel > span > b.br-labels-css {
        font-size: 17px !important;
    }

    .home .custom-home-carousel .berocket_alabel_id_3424 {
        --cl-home-label-scale: 0.45;
        zoom: 0.45;
    }

    .home .custom-home-carousel .berocket_alabel_id_3424 > span > b.br-labels-css {
        font-size: 22.3px !important;
    }

    /* Gallery transparency applies only to the mobile overlay. */
    .single-product .mobile-product-labels .br_alabel > span > i {
        opacity: 0.55;
    }
}

/* Keep the native three-payments badge readable in its smaller card placement. */
.home .custom-home-carousel .berocket_alabel_id_4641 {
    --cl-home-label-scale: 0.8;
    zoom: 0.8;
}

.home .custom-home-carousel .berocket_alabel_id_4641 > span > b.br-labels-css {
    font-size: 12px !important;
    line-height: 1.2 !important;
}

.home .custom-home-carousel .berocket_alabel_id_4641 .b_span_text,
.home .custom-home-carousel .berocket_alabel_id_4641 .b_span_after {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .home .custom-home-carousel .berocket_alabel_id_4641 {
        --cl-home-label-scale: 0.75;
        zoom: 0.75;
    }
}

/* Anchor below the cart button through the existing image flow, including rotated pieces. */
.home .custom-home-carousel .custom-home-image {
    position: relative;
}

.home .custom-home-carousel .custom-home-image > .berocket_better_labels_image,
.home .custom-home-carousel .custom-home-image > .br_alabel_image {
    top: 24px !important;
}

.home .custom-home-carousel .br_alabel > span > i {
    opacity: 0.35;
}

/* Lower grids share one image-relative anchor without scaling the wrapper or its offsets. */
.home .cl-home-grid-product-image > .berocket_better_labels_image {
    top: clamp(12px, 10%, 20px) !important;
    bottom: auto !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    height: auto !important;
}

.home .cl-home-grid-product-image .br_alabel {
    zoom: 0.85;
}

.home .cl-home-grid-product-image > .br_alabel {
    position: absolute !important;
    top: clamp(12px, 10%, 20px) !important;
    bottom: auto !important;
    left: auto !important;
    right: 8px !important;
    zoom: 1;
    transform: scale(0.85);
    transform-origin: top right;
}

.home .cl-home-grid-product-image .berocket_alabel_id_4640 > span > b.br-labels-css,
.home .cl-home-grid-product-image .berocket_alabel_id_4641 > span > b.br-labels-css {
    font-size: 14px !important;
    line-height: 1.2 !important;
}

.home .cl-home-grid-product-image .berocket_alabel_id_4640 .b_span_text,
.home .cl-home-grid-product-image .berocket_alabel_id_4640 .b_span_after,
.home .cl-home-grid-product-image .berocket_alabel_id_4641 .b_span_text,
.home .cl-home-grid-product-image .berocket_alabel_id_4641 .b_span_after {
    white-space: nowrap;
}

.home .cl-home-grid-product-image .br_alabel > span > i {
    opacity: 0.38;
}

/* Labels remain decorative; underlying images, links and cart buttons keep their input. */
.home .custom-home-carousel .berocket_better_labels,
.home .custom-home-carousel .berocket_better_labels *,
.home .custom-home-carousel .br_alabel,
.home .custom-home-carousel .br_alabel *,
.home .cl-home-grid-product-image > .berocket_better_labels,
.home .cl-home-grid-product-image > .berocket_better_labels *,
.home .cl-home-grid-product-image > .br_alabel,
.home .cl-home-grid-product-image > .br_alabel * {
    pointer-events: none !important;
}

@media (max-width: 767.98px) {
    .single-product .mobile-product-labels,
    .single-product .mobile-product-labels * {
        pointer-events: none !important;
    }
}

/* Keep plain ID fallbacks separate from :has rules for native template geometry. */
.home .custom-home-carousel .custom-home-image > .berocket_alabel_id_4640,
.home .custom-home-carousel .custom-home-image > .berocket_alabel_id_4641 {
    top: 6px !important;
}

.home .custom-home-carousel .custom-home-image > .br_alabel:has(> span > b.br-labels-css-22) {
    top: 6px !important;
}

/* Move only the best-price label; mixed wrappers keep the rotated hot badge at its safe anchor. */
.home .custom-home-carousel .berocket_better_labels_image .berocket_alabel_id_4198 {
    top: calc(-12px / var(--cl-home-label-scale, 0.72)) !important;
}

.home .custom-home-carousel .berocket_better_labels_image .br_alabel:has(> span > b.br-labels-css-23) {
    top: calc(-12px / var(--cl-home-label-scale, 0.72)) !important;
}

/* Raise only the lower direct payment badge; other native grid placements stay unchanged. */
.home .cl-home-grid-product-image > .berocket_alabel_id_4640,
.home .cl-home-grid-product-image > .berocket_alabel_id_4641 {
    top: clamp(4px, 5%, 10px) !important;
}

.home .cl-home-grid-product-image > .br_alabel:has(> span > b.br-labels-css-22) {
    top: clamp(4px, 5%, 10px) !important;
}

/* Native two-line payment text fits the measured shape without changing its wording. */
.home .custom-home-carousel .berocket_alabel_id_4640 > span > b.br-labels-css,
.home .custom-home-carousel .berocket_alabel_id_4641 > span > b.br-labels-css,
.home .cl-home-grid-product-image .berocket_alabel_id_4640 > span > b.br-labels-css,
.home .cl-home-grid-product-image .berocket_alabel_id_4641 > span > b.br-labels-css,
.home .custom-home-carousel b.br-labels-css-22,
.home .cl-home-grid-product-image b.br-labels-css-22 {
    font-size: 11.5px !important;
    line-height: 1.2 !important;
}

.home .custom-home-carousel .berocket_alabel_id_4640 .b_span_text,
.home .custom-home-carousel .berocket_alabel_id_4640 .b_span_after,
.home .custom-home-carousel b.br-labels-css-22 .b_span_text,
.home .custom-home-carousel b.br-labels-css-22 .b_span_after,
.home .cl-home-grid-product-image b.br-labels-css-22 .b_span_text,
.home .cl-home-grid-product-image b.br-labels-css-22 .b_span_after {
    white-space: nowrap;
}

/* Keep the fixed-size product image centered inside a full-card label anchor. */
.home .custom-home-carousel .custom-home-image {
    width: 100%;
    align-self: stretch;
}

.home .custom-home-carousel .custom-home-image > img {
    margin-inline: auto;
}

@media (max-width: 767.98px) {
    /* Raise direct native image labels without changing shape or horizontal placement. */
    .single-product .mobile-product-labels > .br_alabel_image {
        top: 24px !important;
        bottom: auto !important;
    }

    /* Leave room above the unscaled native rotated template in better-position groups. */
    .single-product .mobile-product-labels > .berocket_better_labels_image {
        top: 40px !important;
        bottom: auto !important;
    }
}

@media (max-width: 767.98px) {
    /* Move the native folded ribbon and its diagonal text together inside its clip. */
    .home .custom-home-carousel .berocket_alabel_id_3424 > span > i,
    .home .custom-home-carousel .berocket_alabel_id_3424 > span > b.br-labels-css-12 {
        translate: -16px 16px;
    }

    /* The existing 0.45 zoom yields 9px text with clearance inside the native ribbon. */
    .home .custom-home-carousel .berocket_alabel_id_3424 > span > b.br-labels-css-12 {
        font-size: 20px !important;
    }
}

/* Align carousel label spans with the card's inner edge, preserving image-flow height. */
.home .custom-home-carousel .custom-home-image > .br_alabel_image {
    right: 0 !important;
}

.home .custom-home-carousel .custom-home-image > .berocket_better_labels_image {
    right: 0 !important;
}

/* Compensate only the measured native span overhang, before the label's own zoom. */
.home .custom-home-carousel .berocket_better_labels_image .berocket_alabel_id_3424 > span {
    translate: -4px 0;
}

.home .custom-home-carousel .berocket_better_labels_image .berocket_alabel_id_4198 > span {
    translate: -8px 0;
}

@media (max-width: 767.98px) {
    /* Raise single native gallery labels while keeping the original group internals. */
    .single-product .mobile-product-labels > .br_alabel_image {
        top: 16px !important;
    }

    .single-product .mobile-product-labels > .berocket_better_labels_image {
        top: 32px !important;
    }

    /* In the observed mixed case, leave space below the direct native payment badge. */
    .single-product .mobile-product-labels:has(> .br_alabel_image) > .berocket_better_labels_image {
        top: 88px !important;
    }
}

/* Move only the clipped native hot badge directly below the cart strip. */
.home .custom-home-carousel .berocket_better_labels_image .berocket_alabel_id_3424 {
    top: calc(-16px / var(--cl-home-label-scale, 0.54)) !important;
}

/* Keep native diagonal hot-badge text and folded ends inside their clip at every width. */
.home .custom-home-carousel .berocket_alabel_id_3424 > span > i,
.home .custom-home-carousel .berocket_alabel_id_3424 > span > b.br-labels-css-12 {
    translate: -16px 16px;
}

@media (max-width: 767.98px) {
    /* Preserve the original mixed gallery order: native better group above the direct badge. */
    .single-product .mobile-product-labels:has(> .br_alabel_image) > .berocket_better_labels_image {
        top: 32px !important;
    }

    /* Leave clearance below the observed advanced group's native painted tail. */
    .single-product .mobile-product-labels:has(> .berocket_better_labels_image) > .br_alabel_image {
        top: 112px !important;
    }
}
@media (max-width: 767.98px) {
    /* Only measured, owned groups skip movement transitions; native anchor/order remain the baseline. */
    .single-product .mobile-product-gallery .mobile-product-labels > .cl-mobile-gallery-label-managed {
        transition: none !important;
    }
}



/* Desktop lower cards reserve the optional offer row and keep content in shared visual rows. */
@media (min-width: 992px) {
    .home .featured-products .wc-block-grid__products {
        align-items: stretch;
    }

    .home .featured-products .wc-block-grid__product > .featured-inn-div {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(76px, max-content) minmax(54px, max-content) minmax(164px, max-content) 1px minmax(78px, max-content);
        row-gap: 6px;
        align-content: start;
        justify-content: stretch;
        flex: 1;
        height: 100%;
        min-height: 480px;
        padding-bottom: 55px;
    }

    .home .featured-products .featured-inn-div > .cl-temp-sale-product-note {
        grid-row: 1;
    }

    .home .featured-products .featured-inn-div > a.wc-block-grid__product-link {
        grid-row: 2;
        align-self: start;
        min-width: 0;
    }

    .home .featured-products .featured-inn-div > .cl-home-grid-product-image {
        grid-row: 3;
        align-self: start;
        min-height: 164px;
    }

    .home .featured-products .cl-home-grid-product-image > a.wc-block-grid__product-link {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 164px;
    }

    .home .featured-products .cl-home-grid-product-image > a > img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 164px;
    }

    .home .featured-products .featured-inn-div > .cl-home-grid-product-image + hr {
        grid-row: 4;
        align-self: start;
        width: 100%;
    }

    .home .featured-products .featured-inn-div > .product-card-excerpt {
        grid-row: 5;
        align-self: start;
        min-width: 0;
        margin-bottom: 0 !important;
    }

    /* Existing SKU markup uses either a direct span or a first paragraph. */
    .home .featured-products .product-card-excerpt > span:first-child:has(small),
    .home .featured-products .product-card-excerpt > p:first-child:has(small) {
        display: block;
        min-height: 22.5px;
        margin: 0;
        font-size: 15px;
        line-height: 22.5px;
    }

    /* A regular price uses the same type size as the existing sale amounts. */
    .home .featured-products .wc-block-grid__product-price > .woocommerce-Price-amount {
        font-size: 20px;
        font-weight: 300;
    }
}


/* Keep the desktop card rows, lower the complete excerpt and remove its legacy bottom gap. */
@media (min-width: 992px) {
    .home .featured-products .wc-block-grid__product > .featured-inn-div {
        grid-template-rows: minmax(78px, max-content) minmax(54px, max-content) minmax(164px, max-content) 1px minmax(78px, max-content);
    }

    .home .featured-products .wc-block-grid__product .featured-inn-div > .product-card-excerpt {
        margin-top: 18px;
        margin-bottom: 0 !important;
    }

    /* Price values and RTL order stay native; regular and sale amounts share a baseline. */
    .home .featured-products .wc-block-grid__product .featured-inn-div > .price {
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
        white-space: nowrap;
    }

    .home .featured-products .wc-block-grid__product .featured-inn-div > .price > del,
    .home .featured-products .wc-block-grid__product .featured-inn-div > .price > ins {
        margin: 0;
        white-space: nowrap;
    }
}


/* Desktop footer prices reserve both action buttons; the description keeps its existing type. */
@media (min-width: 992px) {
    .home .featured-products .wc-block-grid__product > .featured-inn-div {
        container-type: inline-size;
    }

    .home .featured-products .wc-block-grid__product .featured-inn-div > .product-card-excerpt {
        margin-top: 8px;
    }

    .home .featured-products .wc-block-grid__product .featured-inn-div > .price {
        left: 115px;
        right: 7px;
        width: auto;
        min-width: 0;
        justify-content: flex-end;
        font-size: 15px;
        gap: 3px;
        /* The query width excludes the existing 32px side padding and 1px borders. */
        font-size: clamp(15px, calc((100cqi - 62px) * 0.118), 20px);
        gap: clamp(3px, calc((100cqi - 185px) * 0.08 + 3px), 6px);
    }

    .home .featured-products .wc-block-grid__product .featured-inn-div > .price > del,
    .home .featured-products .wc-block-grid__product .featured-inn-div > .price > ins,
    .home .featured-products .wc-block-grid__product .featured-inn-div > .price .woocommerce-Price-amount {
        font-size: inherit !important;
    }

    .home .featured-products .wc-block-grid__product .featured-inn-div > .price .woocommerce-Price-currencySymbol {
        font-size: 0.8em !important;
    }
}

/* Preserve the cart image intrinsic ratio at its existing header height. */
#primary-nav #cart-btn-wrapper #cart-btn > img {
    width: auto;
    max-width: none;
    height: 30px;
}
/* Keep the existing home card palette while making secondary text readable. */
body.home .featured-products .wc-block-grid__product .extra-text-cat,
body.home .featured-products .wc-block-grid__product .wc-block-grid__product-price.price del,
body.home .featured-products .wc-block-grid__product .wc-block-grid__product-price.price del .woocommerce-Price-amount,
body.home .featured-products .wc-block-grid__product .wc-block-grid__product-price.price del .woocommerce-Price-currencySymbol {
    color: #a58866;
}

/* The carousel background is translucent, so its old price needs more contrast. */
body.home .custom-home-carousel .custom-home-price del {
    color: #d4b48c !important;
    opacity: 1;
}
