/* SIC card COMPRAR em fluxo normal — v2 — 24/11/2026
   v1 (no ar desde 13:31): botão no fluxo, ordem nome/preço/parcelas/
   estrelas/COMPRAR, sem sobreposição. No mobile, --spl-h ganhava
   +72px para a foto do produto não encolher; o banner (object-fit:
   contain) ficava letterbox — topo e base da foto ~30px para dentro
   dos cards (feedback do Samuel, 13:36).

   v2: tira o +72px e devolve --spl-h à proporção 1674/940 do banner,
   para a foto do banner preencher o quadro e alinhar topo/base com
   os cards, sem recorte. Para o bloco de info (parcelas + estrelas +
   COMPRAR) caber nessa altura, aperta só o espaçamento interno do
   card no mobile (não a ordem, não o estilo do botão). A foto do
   produto pode encolher uns pixels se o --spl-info ainda pedir.

   Escopo: somente section.spl, e o aperto de espaço só em
   max-width:1023.98px. Desktop inalterado em relação ao v1.
   NÃO publicado ainda. */

/* ---- regras do v1 (fluxo do COMPRAR) ---- */

html body section.spl .js-item-product:not(.product-item-reduced):has(.sic-buy){
  padding-bottom:10px;
}

html body section.spl .js-item-product:not(.product-item-reduced):has(.sic-buy) .product-item-information{
  display:flex !important;
  flex-direction:column !important;
  flex:1 1 auto;
  min-height:0;
  position:static;
}

html body section.spl .js-item-product:not(.product-item-reduced):has(.sic-buy) .product-item-information > a.product-item-link{
  display:contents;
}

html body section.spl .js-item-product:not(.product-item-reduced) form.sic-buy,
html body section.spl .js-item-product:not(.product-item-reduced) .js-product-form.sic-buy{
  position:static !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  width:100%;
  max-width:none;
  margin:auto 0 0 0 !important;
  z-index:auto;
  order:30 !important;
  flex:0 0 auto;
}

html body section.spl .js-item-product .collection-star-section,
html body section.spl .js-item-product .bk-reviews{
  order:20 !important;
  flex:0 0 auto;
  margin-top:8px;
  margin-bottom:8px;
  position:relative;
  z-index:1;
}

/* ---- v2: mobile, altura do banner = altura dos cards, sem letterbox ---- */
@media (max-width:1023.98px){
  /* Volta à proporção original do banner. --spl-info reserva o bloco
     de nome/preço/parcelas/estrelas/COMPRAR já com o espaçamento
     apertado abaixo; --spl-img encolhe só o que faltar. */
  html body section.spl{
    --spl-info:208px;
    --spl-h: calc(var(--spl-col) * 1674 / 940);
    --spl-img: min(var(--spl-card-w), max(140px, calc(var(--spl-h) - var(--spl-info))));
  }
  html body section.spl .spl__row{
    --spl-info:208px;
    --spl-h: calc(var(--spl-card-w) * 1674 / 940);
    --spl-img: min(var(--spl-card-w), max(140px, calc(var(--spl-h) - var(--spl-info))));
  }

  html body section.spl .js-item-product:not(.product-item-reduced):has(.sic-buy){
    padding-bottom:8px;
  }
  html body section.spl .js-item-product:not(.product-item-reduced):has(.sic-buy) .product-item-information{
    padding-top:8px !important;
    padding-bottom:4px !important;
  }
  html body section.spl .spl__trilho .js-item-name,
  html body section.spl .spl__trilho .product-item-name{
    margin-bottom:6px !important;
  }
  html body section.spl .spl__trilho .custom-installments{
    margin-top:2px !important;
  }
  html body section.spl .js-item-product .collection-star-section,
  html body section.spl .js-item-product .bk-reviews{
    margin-top:4px !important;
    margin-bottom:4px !important;
  }
  /* o widget bk-reviews coloca tw-my-[0.75rem] no wrapper interno */
  html body section.spl .js-item-product .collection-star-section > div,
  html body section.spl .js-item-product .bk-reviews > div{
    margin-top:0 !important;
    margin-bottom:0 !important;
  }
}
