.promo-stock-inline {
    display: none;
}

.promo-installments-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 3px 0 10px;
    color: #657184;
    font-size: 11px;
    font-style: italic;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.promo-installments-icon {
    top: 1.5px;
    position: relative;
}

.promo-installments-inline--placeholder {
    visibility: hidden;
}



.cms-bf-promo-home .block-products-list .price-box .old-price {
    margin-right: 0 !important;
}

.cms-bf-promo-home .block-products-list .old-price span.price-container.price-final_price,
.cms-bf-promo-home .block-products-list .old-price span.price-container.price-final_price .price {
    text-decoration-color: #B9BED1 !important;
}

.promo-installments-text {
    min-width: 0;
}

/* Keep promo headers below Magento's modal backdrop (base z-index 900). */
body.cms-bf-promo-home._has-modal .header-style-07,
body.cms-bf-promo-home._has-modal #mobi_vertcial-menu-container,
body.cms-bf-promo-home.cart-informed-modal-opened .header-style-07,
body.cms-bf-promo-home.cart-informed-modal-opened #mobi_vertcial-menu-container {
    z-index: 899 !important;
}

/* Promo page skin migrated from the Page Builder inline block. */
.cms-index-index.cms-bf-promo-home .cdz-main-content.widget.block.block-static-block,
.cms-index-index.cms-bf-promo-home div#mobi_vertcial-menu-container,
.cms-index-index.cms-bf-promo-home .page-main.page-main-full,
.cms-index-index.cms-bf-promo-home main#maincontent,
body.cms-bf-promo-home {
    background-color: #1C010C !important;
}

body.cms-bf-promo-home .mst-searchautocomplete__autocomplete.etele-searchsuggestions__autocomplete,
body.cms-bf-promo-home .mst-searchautocomplete__autocomplete.etele-searchsuggestions__autocomplete._active {
    z-index: 10050 !important;
}

.cms-bf-promo-home .magento-hero-buttons {
    background: rgb(28 1 12) !important;
}

.cms-bf-promo-home ul.tabs-navigation {
    background: #E0DFDB !important;
}

.cms-bf-promo-home .header-vertical-menu-wrap .menu-container li.item.level0.level-top.parent a.menu-link,
.cms-bf-promo-home .cdz-vertical-menu .item.level0.parent:hover > a.menu-link {
    pointer-events: none;
}

.cms-bf-promo-home .tab-align-center .tabs-navigation li.tab-header.ui-tabs-active a.tab-title {
    color: #FFFFFF !important;
    background-color: #EA2776 !important;
}

.cms-bf-promo-home .tabs-navigation li.tab-header a.tab-title.ui-tabs-anchor {
    color: #000000 !important;
    background-color: #E0DFDB !important;
}

.cms-bf-promo-home .tabs-navigation li.tab-header:not(.ui-tabs-active) a.tab-title:hover {
    background: #FFF !important;
    color: #000 !important;
}

.cms-bf-promo-home .cdz-horizontal-menu:where(:not(.nav-sections *)) .groupmenu li.level0 > a.menu-link,
.cms-bf-promo-home .page-header.header-style-07 .header-menu-wrap .knavihor .groupmenu,
.cms-bf-promo-home .page-header .header-panel-bottom {
    background-color: #E0DFDB !important;
}

.cms-bf-promo-home .cdz-horizontal-menu:where(:not(.nav-sections *)) .groupmenu li.level0 > a.menu-link:visited,
.cms-bf-promo-home .cdz-horizontal-menu:where(:not(.nav-sections *)) .groupmenu li.level0 > a.menu-link {
    color: #000000 !important;
}

.cms-bf-promo-home .col-sm-12.header-menu-wrap .menu-link,
.cms-bf-promo-home .col-sm-12.header-menu-wrap .menu-link:visited {
    color: #000000 !important;
}

.cms-bf-promo-home .col-sm-12.header-menu-wrap .groupmenu .item.eco > a.menu-link,
.cms-bf-promo-home .col-sm-12.header-menu-wrap .groupmenu .item.eco > a.menu-link:visited,
.cms-bf-promo-home .col-sm-12.header-menu-wrap .groupmenu .item.eco > a.menu-link span,
.cms-bf-promo-home .col-sm-12.header-menu-wrap .groupmenu .item.eco > a.menu-link i,
.cms-bf-promo-home .col-sm-12.header-menu-wrap .groupmenu .item.phone > a.menu-link,
.cms-bf-promo-home .col-sm-12.header-menu-wrap .groupmenu .item.phone > a.menu-link:visited,
.cms-bf-promo-home .col-sm-12.header-menu-wrap .groupmenu .item.phone > a.menu-link span,
.cms-bf-promo-home .col-sm-12.header-menu-wrap .groupmenu .item.phone > a.menu-link i {
    color: #000000 !important;
}

.cms-bf-promo-home .main-content-top-left .menu-title {
    background: #EA2776 !important;
    color: #FFFFFF !important;
}

body.cms-bf-promo-home .page-footer .footer-content-middle,
body.cms-bf-promo-home .page-footer .footer-content-bottom {
    background-color: #282828 !important;
}

.cms-bf-promo-home span.savepercentage {
    background-color: #EA2776 !important;
    color: #FFFFFF !important;
}

body.cms-bf-promo-home .phone:where(:not(.nav-sections *)) a span,
body.cms-bf-promo-home .phone:where(:not(.nav-sections *)) a i,
body.cms-bf-promo-home .eco:where(:not(.nav-sections *)) a span {
    color: #000000 !important;
}

.cms-index-index.cms-bf-promo-home button.action.tocart.primary,
.cms-bf-promo-home button.action.tocart.primary,
body.cms-bf-promo-home button.action.tocart.primary {
    background-color: #EA2776 !important;
    border-color: #EA2776 !important;
    color: #FFFFFF !important;
}

.cms-index-index.cms-bf-promo-home button.action.tocart.primary:hover,
.cms-index-index.cms-bf-promo-home button.action.tocart.primary:focus,
.cms-bf-promo-home button.action.tocart.primary:hover,
.cms-bf-promo-home button.action.tocart.primary:focus,
body.cms-bf-promo-home button.action.tocart.primary:hover,
body.cms-bf-promo-home button.action.tocart.primary:focus {
    background: #B91E5D !important;
    border-color: #B91E5D !important;
    color: #FFFFFF !important;
}

@media (min-width: 320px) and (max-width: 480px) {
    .cms-bf-promo-home .main-content-top-left .menu-title {
        color: #FFFFFF !important;
        background: #EA2776 !important;
    }
}

/* Additional mobile adjustments for the promo page, migrated from the Page Builder inline block. */
@media (max-width: 767px) {
  /* Outrank Codazon's later icon-only product-card rules. */
  /* Stock text is desktop-only; keep just the stars on reviewed cards. */
  .cms-bf-promo-home .promo-stock-inline:has(.product-reviews-summary) {
    display: flex;
    justify-content: center;
    margin: 4px 0;
  }

  .cms-bf-promo-home .promo-stock-inline .promo-stock-mark,
  .cms-bf-promo-home .promo-stock-inline .promo-stock-text {
    display: none;
  }

  .cms-bf-promo-home .promo-stock-inline .product-reviews-summary {
    margin: 0;
  }

  .cms-bf-promo-home .block-products-list .actions-primary .tocart {
    width: 100%;
    height: auto;
    min-height: 40px;
    margin-right: 0;
    padding: 0;
  }

  .cms-bf-promo-home .block-products-list .actions-primary .tocart > span {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    text-indent: 0;
    text-align: center;
    overflow: visible;
    padding: 6px 12px;
  }

  body.cms-bf-promo-home .magento-hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px;
    margin: 20px 0 20px 0;
    background: transparent;
    width: 100%;
  }

  /* Resetting the <a> tags */
  body.cms-bf-promo-home .magento-hero-buttons a {
    text-decoration: none !important;
    display: block;
  }

  body.cms-bf-promo-home .magento-hero-buttons .btn-top {
    color: white;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 20px;
    line-height: 1.1;
    box-shadow: none;
  }

  body.cms-bf-promo-home .magento-hero-buttons .btn-bottom {
    color: #000033;
    background: white;
    border: none;
    padding: 6px 30px;
    cursor: pointer;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.1;
    box-shadow: none;
  }
  body.cms-bf-promo-home .magento-hero-buttons button {
    box-shadow: none;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* Keeps it clean on mobile taps */
  }
}


/*======================================================*/
@media (min-width: 768px) {
    .cms-bf-promo-home .block-products-list .products-grid .product-item {
        transition: box-shadow 0.25s ease;
        border-radius: 0;
        position: relative;
        isolation: isolate;
        overflow: visible;
    }

    .cms-bf-promo-home .block-products-list .products-grid .product-item:hover {
        box-shadow: 0 0 16px 3px rgba(255, 255, 255, 0.40);
        position: relative;
        z-index: 2;
    }

    .cms-bf-promo-home .block-products-list .products-grid .product-item.is-best-promo {
        z-index: 1;
    }

    .cms-bf-promo-home .block-products-list .products-grid .product-item.is-best-promo::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        border: 8px solid #EA2776;
        box-sizing: border-box;
        z-index: 5;
        pointer-events: none;
    }

    /* Homepage-only micro-adjustment: shift border 1px left and 1px down */
    .cms-index-index.cms-bf-promo-home .block-products-list .products-grid .product-item.is-best-promo::after {
        top: -1px;
        right: -1px;
        bottom: -1px;
        left: -1px;
        transform: none;
    }

    /* The border above reaches 1px past the item top, so grow the discount badge
       1px upward to cover it; padding keeps the text where it was. */
    .cms-index-index.cms-bf-promo-home .block-products-list .products-grid .product-item.is-best-promo span.savepercentage {
        top: -1px;
        height: calc(2.2em + 1px);
        padding-top: 1px;
    }

    /*.cms-bf-promo-home .block-products-list .products-grid .product-item.is-best-promo:hover {
        box-shadow: inset 0 0 0 7px #EA2776, 0 0 16px 3px rgba(255, 255, 255, 0.58);
    }*/

    .cms-bf-promo-home .promo-stock-inline {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 6px;
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.2;
    }

    .cms-bf-promo-home .promo-stock-inline.in-stock {
        color: #74B208;
    }

    .cms-bf-promo-home .promo-stock-inline.out-of-stock {
        color: #b71c1c;
    }

    .cms-bf-promo-home .promo-stock-inline .promo-stock-mark {
        font-size: 14px;
        line-height: 1;
    }

    .cms-bf-promo-home .promo-stock-inline .promo-stock-text {
        white-space: nowrap;
    }

    .cms-bf-promo-home .promo-stock-inline .product-reviews-summary {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        width: auto;
        margin: 0 0 0 4px;
        padding-left: 10px;
        border-left: 1px solid #d5d9e0;
    }
}


.catalog-product-view .product-info-main .price-box.price-final_price .old-price .price-wrapper::after, .cms-index-index .price-box .old-price .price-wrapper::after, .catalog-category-view .price-box .old-price .price-wrapper::after, .catalogsearch-result-index .price-box .old-price .price-wrapper::after, .cms-bf-promo-home .price-box .old-price .price-wrapper::after{
    border-top: 1px solid #B9BED1 ;
}

/* Promo color declarations migrated from generic/theme promo CSS. */
.cms-bfhome .container.sapce-base .cdz-blog-wrap.base-slider.post-list-style05 p.b-title.h2 span {
    color: #ffffff;
}

.cms-bf-promo-home .tabs-navigation li.tab-header a.tab-title {
    color: #000000;
    background-color: #E0DFDB;
}

.cms-bf-promo-home .tabs-navigation li.tab-header:not(.ui-tabs-active) a.tab-title:hover {
    background: #FFFFFF;
    color: #000000;
}

.cms-bf-promo-home .btn-more-product a.pagebuilder-button-primary {
    background: #EA2776;
    color: #FFFFFF!important;
}

.cms-bf-promo-home a.pagebuilder-button-primary {
    border-color: #EA2776!important;
}

.cms-bf-promo-home a.pagebuilder-button-primary:hover {
    border-color: #B91E5D!important;
    background: #B91E5D!important;
}

.cms-bf-promo-home a.pagebuilder-button-primary:hover span {
    color: #FFFFFF!important;
}

@media screen and (max-width: 480px) {
    .cms-bfhome .menu-title {
        background: #eb5800!important;
    }
}

@media screen and (min-width: 480px) and (max-width: 767px) {
    .cms-bfhome .menu-title {
        background: #eb5800!important;
    }

    .cms-bf-promo-home .actions-primary .tocart {
        color: #fff;
        border-color: #EA2776;
        background: #EA2776;
    }
}

@media (min-width: 220px) and (max-width: 480px) {
    .cms-bf-promo-home i.fa-solid.fa-chevron-left,
    .cms-bf-promo-home i.fa-solid.fa-chevron-right {
        color: #fff;
    }

    .cms-bf-promo-home button.left,
    .cms-bf-promo-home button.right {
        background-color: #E0DFDB;
    }

    .cms-bf-promo-home .actions-primary .tocart {
        color: #FFFFFF!important;
        border-color: #EA2776!important;
        background: #EA2776!important;
    }

    .cms-bf-promo-home .cdz-horizontal-menu:where(:not(.nav-sections *)) .groupmenu li.level0 > a.menu-link,
    .cms-bf-promo-home .page-header.header-style-07 .header-menu-wrap .knavihor .groupmenu,
    .cms-bf-promo-home .page-header .header-panel-bottom {
        background-color: transparent;
    }

    .cms-bf-promo-home .cdz-horizontal-menu:where(:not(.nav-sections *)) .groupmenu li.level0 > a.menu-link:visited,
    .cms-bf-promo-home .cdz-horizontal-menu:where(:not(.nav-sections *)) .groupmenu li.level0 > a.menu-link {
        color: #444;
    }
}

/* Palette enforcement: outrank older promo colors still present in theme CSS. */
html body.cms-bf-promo-home,
body.cms-bf-promo-home .cdz-main-content.widget.block.block-static-block,
body.cms-bf-promo-home div#mobi_vertcial-menu-container,
body.cms-bf-promo-home .page-main.page-main-full,
body.cms-bf-promo-home main#maincontent {
    background-color: #1C010C !important;
}

@media (min-width: 768px) {
    body.cms-bf-promo-home .magento-hero-buttons {
        background: rgb(28 1 12) !important;
    }
}

body.cms-bf-promo-home .product-nav-bar,
body.cms-bf-promo-home ul.tabs-navigation,
body.cms-bf-promo-home ul.tabs-navigation.ui-tabs-nav.ui-helper-reset.ui-helper-clearfix.ui-widget-header.ui-corner-all {
    background: #E0DFDB !important;
}

body.cms-bf-promo-home .tabs-navigation li.tab-header:not(.ui-tabs-active) a.tab-title:hover,
body.cms-bf-promo-home .product-nav-bar .nav-jump-btn:hover {
    background: #FFF !important;
    color: #000 !important;
}

body.cms-bf-promo-home .product-nav-bar .nav-jump-btn.is-active,
body.cms-bf-promo-home .product-nav-bar .tab-header.ui-tabs-active .nav-jump-btn,
body.cms-bf-promo-home .tab-align-center .tabs-navigation li.tab-header.ui-tabs-active a.tab-title {
    color: #FFFFFF !important;
    background: #EA2776 !important;
}

body.cms-bf-promo-home div#mobi_vertcial-menu-container .menu-title {
    background: #EA2776 !important;
    color: #FFFFFF !important;
}

body.cms-bf-promo-home span.savepercentage {
    background-color: #EA2776 !important;
    color: #FFFFFF !important;
}

body.cms-bf-promo-home button.action.tocart.primary {
    background: #EA2776 !important;
    border-color: #EA2776 !important;
    color: #FFFFFF !important;
}

body.cms-bf-promo-home button.action.tocart.primary:hover,
body.cms-bf-promo-home button.action.tocart.primary:focus {
    background: #B91E5D !important;
    border-color: #B91E5D !important;
    color: #FFFFFF !important;
}
/* transition: background-color 0.2s ease, color 0.2s ease; */

/* Product sort (promo-sort.js): a compact button + drawn listbox in the
   colours the theme gives a hovered nav tab (the script reads them into
   --promo-sort-tab-*, the active tab's into --promo-sort-accent). Desktop: in
   the promo nav bar at its right content edge, outside the tabs' flow.
   Mobile: the same picker, right-aligned above the mobile grid. */
body.cms-bf-promo-home .promo-sort .promo-sort__chevron {
    flex: none;
    width: 9px;
    height: 6px;
    pointer-events: none;
}

/* The script lines the picker up with the grid's right edge; 1400px (the widest
   promo container) is the fallback. */
body.cms-bf-promo-home #stickyNav .nav-tabs-container > li.promo-sort--nav {
    position: absolute;
    top: 50%;
    right: max(16px, calc((100% - 1400px) / 2 + 12px));
    display: flex;
    align-items: center;
    gap: 8px;
    height: auto;
    margin: 0;
    padding: 0;
    background: none;
    color: var(--promo-sort-tab-fg, inherit);
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    transform: translateY(-50%);
}

/* Tabs reach the picker: it takes a slot at the end of the row instead. */
body.cms-bf-promo-home #stickyNav .nav-tabs-container > li.promo-sort--nav.promo-sort--in-row {
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
    align-self: center;
    margin-left: 12px;
    transform: none;
}

body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__label,
body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__label {
    margin: 0;
    font-weight: 400;
    opacity: .7;
}

body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__button,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    min-height: 0;
    margin: 0;
    padding: 0 10px 0 12px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-color: color-mix(in srgb, currentColor 22%, transparent);
    border-radius: 4px;
    background: var(--promo-sort-tab-bg, rgba(255, 255, 255, .08));
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    transition: border-color .15s ease;
}

body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__button:hover,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__button:hover,
body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__button[aria-expanded="true"],
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__button[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, .5);
    border-color: color-mix(in srgb, currentColor 50%, transparent);
    background: var(--promo-sort-tab-bg, rgba(255, 255, 255, .08));
    color: inherit;
}

body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__button:focus,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__button:focus {
    outline: none;
}

body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__button:focus-visible,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__chevron,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__chevron {
    opacity: .8;
    transition: transform .15s ease;
}

body.cms-bf-promo-home #stickyNav .promo-sort--nav [aria-expanded="true"] .promo-sort__chevron,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline [aria-expanded="true"] .promo-sort__chevron {
    transform: rotate(180deg);
}

body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__menu,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 5;
    min-width: 100%;
    margin: 0;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-color: color-mix(in srgb, currentColor 12%, transparent);
    border-radius: 6px;
    background: var(--promo-sort-tab-bg, #1d1d1d);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    color: inherit;
    list-style: none;
    outline: none;
    text-align: left;
}

body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__option,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__option {
    position: relative;
    display: block;
    height: auto;
    margin: 0;
    padding: 8px 14px 8px 30px;
    border: 0;
    border-radius: 4px;
    background: none;
    color: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    cursor: pointer;
}

body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__option.is-active,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__option.is-active {
    background: rgba(255, 255, 255, .1);
    background: color-mix(in srgb, currentColor 10%, transparent);
}

body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__option[aria-selected="true"],
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__option[aria-selected="true"] {
    font-weight: 600;
}

body#html-body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__option[aria-selected="true"]::before,
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline .promo-sort__option[aria-selected="true"]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 12px;
    width: 4px;
    height: 8px;
    margin-top: -6px;
    border: solid var(--promo-sort-accent, currentColor);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Narrower desktop: the label stays for screen readers. */
@media (max-width: 1099px) {
    body.cms-bf-promo-home #stickyNav .promo-sort--nav .promo-sort__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* Mobile picker: shrink-wrapped and right-aligned above the grid, so the menu
   is sized like the desktop one; it opens over the cards (discount badge: z 9). */
body#html-body.cms-bf-promo-home main#maincontent .promo-sort--inline {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    margin: 0 0 12px auto;
    color: var(--promo-sort-tab-fg, #fff);
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

/* Image whitespace trim (feature "image_trim", Etele\PromoPage\Model\ImageTrim).
   Every card's image box gets the same server-computed frame ratio up front, so
   nothing shifts when images load; the image is placed inside it at the size and
   offset the server measured. The box never exceeds the image's natural width,
   so a product shown at full size is drawn 1:1 and never upscaled. */
.cms-bf-promo-home .promo-img-trim-grid .promo-img-trim .product-image-container {
    aspect-ratio: var(--promo-img-ratio);
    max-width: min(100%, var(--promo-img-max-width));
    position: relative;
    width: 100%;
}

.cms-bf-promo-home .promo-img-trim-grid .promo-img-trim .product-image-wrapper {
    height: auto;
    inset: 0;
    padding-bottom: 0 !important;
    position: absolute;
}

.cms-bf-promo-home .promo-img-trim-grid .promo-img-trim .product-image-photo {
    height: auto;
    left: var(--promo-img-left);
    margin: 0;
    max-width: none;
    top: var(--promo-img-top);
    width: var(--promo-img-width);
}

/* The promo theme in design/head/includes paints .product-item-photo white too.
   That <a> is inline, so its line box sits ~1px above the card top on mobile and,
   at some scroll offsets, shows as a white sliver above the card. The card behind
   it is already white, so dropping the link's own background removes only that sliver. */
body#html-body.cms-bf-promo-home main#maincontent .products-content li.product-item a.product-item-photo,
body#html-body.cms-bf-promo-home main#maincontent .mobile-exclusive-products li.product-item a.product-item-photo {
    background: transparent !important;
}

/* Two products per row on phones (feature "mobile_two_columns"). The mobile
   grid sits in a 30px side margin sized for one wide card; the list pulls
   20px back out of it so two cards keep usable widths. The theme's 480-767px
   one-card rules (asymmetric grid margins, centred card contents) are undone.
   .desktop-content only shows on phones under promo-m-desktop-grids (below). */
@media (max-width: 767px) {
    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) .block-content:has(ol.promo-mobile-2col),
    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) .products-grid:has(> ol.promo-mobile-2col) {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0 -20px !important;
        padding: 0;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col > li.product-item {
        display: flex;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-item-info {
        display: flex;
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
        padding: 0 8px 10px;
        box-sizing: border-box;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .savepercentage {
        font-size: 12px !important;
        /* Optical centring as on the desktop badge (bfhome-style.css), retuned:
           at 12px the figures sit higher in the line box and the badge is narrower. */
        line-height: 24px !important;
        padding: 0 7px 0 0 !important;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-item-photo {
        display: block;
    }

    /* Room under the discount badge. A trimmed image (server-added .promo-img-trim)
       already keeps that room inside its frame, so only untrimmed images get it. */
    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-item-photo:not(.promo-img-trim) {
        padding-top: 24px;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-image-container {
        display: block;
        width: 100% !important;
        margin: 0 auto;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-item-details {
        display: flex;
        flex: 1;
        flex-direction: column;
        margin-top: 12px !important;
        padding: 0 !important;
    }

    /* Clamp on the link itself: clamping the <strong> around an inline <a> cuts
       mid-line and lets a fourth line show. */
    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-item-name {
        display: block !important;
        height: calc(3 * 1.35 * 12px);
        margin: 6px 0 4px !important;
        overflow: hidden;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-item-name a {
        display: -webkit-box !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .price-box {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: auto;
        min-height: 0 !important;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .promo-installments-inline {
        margin: 2px 0 8px;
        font-size: 10px;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-item-inner,
    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-item-actions {
        margin: 0 !important;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .product-item-inner,
    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .actions-primary,
    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .actions-primary form {
        display: block;
        width: 100%;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .action.tocart {
        width: 100%;
        min-height: 36px;
        padding: 9px 4px !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
        white-space: nowrap;
    }

    body#html-body.cms-bf-promo-home main#maincontent :is(.mobile-exclusive-products, .desktop-content) ol.promo-mobile-2col .action.tocart span {
        padding: 0 !important;
        font-size: 12px !important;
        line-height: 1.5 !important;
    }
}

/* Phones showing the desktop category grids instead of the mobile Best Promo
   grid (features "mobile_category_tabs" / "mobile_best_promo_only"). The body
   classes come from promo-mobile-sections.js, which also builds .promo-m-nav. */
.promo-m-nav,
.promo-m-more {
    display: none;
}

@media (max-width: 767px) {
    /* Beats the phone-only `.desktop-content { display: none !important }` rules
       (desktop-headers.phtml, and the promo theme's head includes at
       body#html-body.cms-bf-promo-home main#maincontent) and the page's own
       matchMedia .hide(). */
    html body#html-body.cms-bf-promo-home.promo-m-desktop-grids main#maincontent .desktop-content {
        display: flex !important;
        margin-right: 0 !important;
    }

    html body#html-body.promo-m-desktop-grids main#maincontent .mobile-exclusive-products,
    html body#html-body.promo-m-tabs main#maincontent .desktop-content > :not(.promo-m-shown),
    html body#html-body.promo-m-best-only main#maincontent .desktop-content li.product-item:not(.is-best-promo) {
        display: none !important;
    }

    /* The two-column list reaches 20px out of this margin, so the cards line up
       with the tabs and the category tiles at the page gutter. */
    body.promo-m-desktop-grids main#maincontent .desktop-content .products-content {
        margin: 0 20px !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
    }

    /* The desktop sticky-header script still runs here and writes the stuck
       geometry onto the category headings; on phones they stay in the flow. */
    body.promo-m-desktop-grids main#maincontent .desktop-content .magento-hero-buttons {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: none !important;
        transform: none !important;
    }

    body.promo-m-desktop-grids main#maincontent .desktop-content .sticky-cta-wrapper {
        height: auto;
        margin: 0;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-nav {
        display: block;
        margin: 0 0 12px;
    }

    /* All tabs fit: one row up to three, else two even rows (--promo-m-cols from the script). */
    body#html-body.cms-bf-promo-home main#maincontent .promo-m-tablist {
        display: grid;
        grid-template-columns: repeat(var(--promo-m-cols, 3), minmax(0, 1fr));
        gap: 6px;
        background: var(--promo-m-bar-bg, #e0dfdb);
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-tab,
    body#html-body.cms-bf-promo-home main#maincontent .promo-m-tab:hover,
    body#html-body.cms-bf-promo-home main#maincontent .promo-m-tab:focus,
    body#html-body.cms-bf-promo-home main#maincontent .promo-m-tab:active {
        min-width: 0;
        min-height: 44px;
        margin: 0;
        padding: 0 4px;
        /* A faint outline in the tab's own text colour: reads as tappable, stays quiet. */
        border: 1px solid rgba(255, 255, 255, .2);
        border-color: color-mix(in srgb, currentColor 22%, transparent);
        border-radius: 6px;
        background: var(--promo-m-tab-bg, transparent);
        box-shadow: none;
        color: var(--promo-m-tab-fg, #000);
        font: inherit;
        font-size: clamp(12px, 3.7vw, 14px);
        font-weight: 600;
        line-height: 1.2;
        letter-spacing: normal;
        text-transform: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        /* The theme gives every button a 0.5s transition; a tab switch should feel instant. */
        transition: background-color .12s ease, border-color .12s ease, color .12s ease;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-empty {
        display: none;
        margin: 24px 30px 8px;
        color: #fff;
        font-size: 14px;
        text-align: center;
        opacity: .8;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-nav.is-empty .promo-m-empty {
        display: block;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-sort-slot.is-empty {
        display: none;
    }

    /* Stacked categories keep their name as a heading, without the "Vezi toate" button. */
    body.promo-m-desktop-grids main#maincontent .desktop-content .magento-hero-buttons a {
        display: none !important;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-tab.is-active {
        border-color: var(--promo-m-active-bg, #ea2776);
        background: var(--promo-m-active-bg, #ea2776);
        color: var(--promo-m-active-fg, #fff);
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-tab:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: -4px;
    }

    /* Without the heading row the picker sits under the tabs, at the gutter. */
    body#html-body.cms-bf-promo-home main#maincontent .promo-m-sort-slot .promo-sort--inline {
        margin: 12px 0 0 auto;
    }

    /* "Promoții exclusive" on the left, the sort picker on the right; it reaches
       out of .category-grid's 5px padding to the page gutter, like the tabs. */
    body#html-body.cms-bf-promo-home main#maincontent .promo-m-head {
        display: flex;
        align-items: center;
        gap: 12px;
        box-sizing: border-box;
        width: calc(100% + 10px);
        margin: 0 -5px;
        padding: 0 0 12px;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-head .bottom-header-mobile-promo {
        flex: 1 1 auto;
        min-width: 0;
        padding: 10px 0 0 !important;
        font-size: clamp(19px, 5.6vw, 24px) !important;
        line-height: 1.2;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* On a narrow phone the picker gives way first, so the heading stays whole. */
    body#html-body.cms-bf-promo-home main#maincontent .promo-m-head .promo-m-sort-slot {
        flex: 0 999 auto;
        min-width: 0;
        padding-top: 10px;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-head .promo-sort--inline {
        margin: 0;
    }

    /* The label stays for screen readers; the icon says "sort" on screen. */
    body#html-body.cms-bf-promo-home main#maincontent .promo-m-head .promo-sort__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-head .promo-sort__button {
        max-width: 100%;
        height: 36px;
        padding: 0 10px;
        gap: 6px;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-head .promo-sort__button::before {
        content: "";
        flex: none;
        width: 14px;
        height: 14px;
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12V2M1.5 4.5 4 2l2.5 2.5M10 2v10M7.5 9.5 10 12l2.5-2.5'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12V2M1.5 4.5 4 2l2.5 2.5M10 2v10M7.5 9.5 10 12l2.5-2.5'/%3E%3C/svg%3E") center / contain no-repeat;
        opacity: .85;
    }

    body#html-body.cms-bf-promo-home main#maincontent .promo-m-head .promo-sort__value {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Too narrow for heading and value side by side: icon and chevron only
       (the menu still marks the chosen order; the name stays for screen readers). */
    @media (max-width: 349px) {
        body#html-body.cms-bf-promo-home main#maincontent .promo-m-head .promo-sort__value {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0 0 0 0);
            white-space: nowrap;
        }
    }

    /* "Vezi toată categoria …" under the tab's grid (promo-mobile-sections.js), in
       the sort picker's colours (copied onto it as --promo-sort-tab-*). */
    body#html-body.cms-bf-promo-home main#maincontent .desktop-content > a.promo-m-more {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-sizing: border-box;
        width: 100%;
        min-height: 44px;
        margin: 16px 0 20px;
        padding: 10px 16px;
        border: 1px solid rgba(255, 255, 255, .2);
        border-color: color-mix(in srgb, currentColor 22%, transparent);
        border-radius: 4px;
        background: var(--promo-sort-tab-bg, #1d1d1d);
        color: var(--promo-sort-tab-fg, #fff);
        font-size: 15px;
        font-weight: 600;
        line-height: 1.2;
        text-align: center;
        text-decoration: none;
        transition: border-color .15s ease;
    }

    body#html-body.cms-bf-promo-home main#maincontent .desktop-content > a.promo-m-more::after {
        content: "";
        flex: none;
        width: 7px;
        height: 7px;
        border: solid currentColor;
        border-width: 2px 2px 0 0;
        transform: rotate(45deg);
    }

    body#html-body.cms-bf-promo-home main#maincontent .desktop-content > a.promo-m-more:hover,
    body#html-body.cms-bf-promo-home main#maincontent .desktop-content > a.promo-m-more:active {
        border-color: rgba(255, 255, 255, .5);
        border-color: color-mix(in srgb, currentColor 50%, transparent);
        color: var(--promo-sort-tab-fg, #fff);
        text-decoration: none;
    }

    body#html-body.cms-bf-promo-home main#maincontent .desktop-content > a.promo-m-more:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 2px;
    }

    /* Best Promo cards are framed as on desktop (the promo theme colours it),
       thinner to suit the narrower cards. Not needed when they are all there is. */
    body.promo-m-desktop-grids:not(.promo-m-best-only) main#maincontent .desktop-content li.product-item.is-best-promo {
        position: relative;
        z-index: 1;
    }

    body.promo-m-desktop-grids:not(.promo-m-best-only) main#maincontent .desktop-content li.product-item.is-best-promo::after {
        content: '';
        position: absolute;
        inset: 0;
        border: 4px solid #ea2776;
        box-sizing: border-box;
        z-index: 5;
        pointer-events: none;
    }
}

/* Phones: the space from the header to the banner image, and from the image to
   "Categorii populare", is half what it was at 390px (24px / 40px to 12px / 20px).
   The banner box has the image's own shape here (mobile-banner-style.phtml), so
   these are gaps to the image itself and stay the same at every width. The
   visible header (#sticky-menu) ends 25px below .page-header, over the content. */
@media (max-width: 767px) {
    body#html-body.cms-bf-promo-home main#maincontent .column.main {
        padding-top: 25px;
    }

    body#html-body.cms-bf-promo-home main#maincontent .etele-ct--home {
        margin-top: 13px;
    }
}
