.button.button--primary:before {
    background-color: unset;
}

#tbiButton{
    background: #f60;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border: 1px solid #f60;
    align-items: center;
    align-content: center;
    row-gap: 2px;
    height: auto;
    min-height: 50px;
    font-size: 12px;
    width: 100% !important;
    /* max-width: 440px; */
    padding: 2px 8px;
    box-sizing: border-box;
    font-weight: 700;
    margin-top: 10px !important;
}

/* @media (min-width: 1000px) {
  #tbiButton {
    max-width: 440px;
  }
}

@media (max-width: 750px) {
  #tbiButton {
    max-width: 440px;
  }
} */

#tbiButton .tbiCiSubtext {
    display: block;
    width: 100%;
    text-align: center;
}

#tbiCartButton {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    background: #f60 !important;
    color: #fff;
    cursor: pointer;
    border: 1px solid #f60 !important;
    height: 50px;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.3s linear all;
    width: 100%;
    padding: 2px 8px;
    text-decoration: none;
    box-shadow: none !important;
    opacity: 1 !important;
    font-weight: 500;
    margin-top: 0px !important;
}

#tbiCartButton:after {
    box-shadow: none !important;
}

/* Below 750px the cart footer spans the full width, but Dawn caps the checkout button at
   max-width: 36rem. Match it so the TBI button lines up under "Преминаване към плащане"
   instead of stretching across the whole .cart__ctas column. */
@media (max-width: 749px) {

  /* The .cart__ctas flex column (below) would push the 36rem-wide checkout and TBI buttons
     to the left, while Dawn centres the wallet buttons under them. Centre the column so
     checkout, TBI and the wallets stack on one axis. */
  .cart__ctas {
    align-items: center;
  }

  /* Keep the checkout button at its full 36rem (a centred flex item would otherwise shrink
     to its text), so it and the TBI button stay the same width. */
  .cart__ctas > #checkout {
    width: 100%;
  }
}

#tbiCartButton .tbiCiSubtext {
    display: block;
    width: 100%;
    text-align: center;
}

#tbiMiniCartButton {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    row-gap: 2px;
    background: #f60;
    color: #fff;
    cursor: pointer;
    border: 1px solid #f60;
    border-radius: 14px;
    font-weight: 500;
    font-size: 14px;
    min-width: 162px;
    width: 100%;
    height: 50px;
    padding-top: 2px;
    margin-top: 0px !important;
}

#tbiMiniCartButton .tbiCiSubtext {
    display: block;
    width: 100%;
    text-align: center;
}

#tbiCheckoutButton {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    background: #f60;
    color: #fff;
    cursor: pointer;
    border: 1px solid #f60;
    border-radius: 10px;
    height: 48px;
    width: 100%;
    margin-top: 8px;
    padding: 4px 8px;
    font-size: 12px;
    text-decoration: none;
    box-shadow: none !important;
    padding-top: 2px;
    padding-bottom: 5px;
}

@media (max-width: 512px) {
  #tbiCheckoutButton {
    width: 100%;
  }
}

#tbiCheckoutButton .tbiCiSubtext {
    display: block;
    width: 100%;
    text-align: center;
}

#tbi_cart_button {
    margin-top: 10px!important;
}

.tbiLogo {
    max-width: 70px !important;
    /* height: auto; */
    height: 25px !important;
    /* margin-left: 5px !important; */
    align-self: unset;
    display: block;
}

#tbiCheckoutButton .tbiLogo{
    margin-left: 5px !important;
}

/*
  #tbiPopUpContainer is a native <dialog> (see initializePopup() in main.js), opened
  with showModal() so it is promoted into the browser's top layer. This is required
  because some merchant themes (e.g. mebelipremium.com's Shopify "Horizon" theme)
  render their own overlays - cart drawers, quick-view/zoom dialogs - as native
  <dialog> elements too, and the top layer always paints above every ordinarily
  z-indexed element, no matter how high. As a plain fixed-position <div>, no z-index
  value here could ever win against an already-open theme dialog.

  IMPORTANT: "display" must stay scoped to the [open] attribute, not put on the bare
  #tbiPopUpContainer selector. Closed <dialog> elements are hidden by a NORMAL
  (non-!important) user-agent rule - dialog:not([open]) { display: none } - which any
  author rule of equal-or-higher specificity overrides outright, regardless of
  !important. An unscoped "display: flex" here would make the dialog visible the
  instant it's created, before showModal() is ever called.
*/
#tbiPopUpContainer {
    position: fixed;
    z-index: 9999999999;
    width: 100%;
    height: 100%;
    background: rgba(51, 51, 51, .3);
    top: 0;
    justify-content: center;
    align-items: center;
    border: none;
    padding: 0;
    margin: 0;
    max-width: none;
    max-height: none;
}

/* Only takes effect once showModal() has applied [open]; stays correctly hidden
   (via the UA default above) until then. */
#tbiPopUpContainer[open] {
    display: flex;
}

/* Suppress the native <dialog> backdrop so it doesn't double up with the
   rgba(51,51,51,.3) dimming #tbiPopUpContainer already paints itself. */
#tbiPopUpContainer::backdrop {
    background: transparent;
}

#iframeContainer {
    width: 768px;
    height: 90vh;
    max-width: 100%;
    min-height: 400px;
    max-height: 720px;
    position: relative;
    background: #f4f4f4;
    border-radius: 24px;
    z-index: 99999999999;
}

#tbiPopUpIframe {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    z-index: 99999999999;
}

#tbiLoading {
    position: absolute;
    top: calc(50% - 50px);
    left: calc(50% - 50px);
    width: 100px;
    height: 100px;
    max-width: 40%;
}

.add_to_cart_holder{
    margin-bottom: 50px;
}

.cart__ctas{
    display: flex;
    flex-direction: column;
}

@media (max-width:768px) {
}

.next-prev-buttons{
    display: flex;
    flex-flow: column;
}

.payment-step-wrapper .btn{
   margin-left:0;
}

.cart-section .cart-buttons .col-6:nth-child(2) {
    display: flex;
    flex-flow: column;
    align-items: flex-end;
}

/* mg-jewellery.com
   Product page: .product-info is block flow, so #tbiButton already gets its own line after
   the store's (hidden) .tbi-financing-trigger. Give it some room above, as the store's own
   blocks have (the generic #tbiButton rule forces margin-top: 0).
   Cart page: .cart-summary__actions is a flex ROW on desktop (column below 900px), so a plain
   sibling would sit beside "Завърши поръчката". Let the row wrap only when the TBI button is
   in it, and make the button a full-width line of its own under the checkout button. */
.product-page__grid > .product-info > #tbiButton {
    margin-top: 14px !important;
    max-width: none;
}

.cart-summary__actions:has(> #tbiCartButton) {
    flex-wrap: wrap;
}

.cart-summary__actions > #tbiCartButton {
    flex: 1 1 100%;
    max-width: none;
    height: auto;
    min-height: 50px;
}
