/* SIC Para Lisos v4 - 24/11/2026
   Sobre v3 (no ar):
   1) A caixa da foto crescia com flex:1 ate preencher a altura do card (igual ao
      banner). A img era dimensionada pela altura (quadrada) e transbordava nas
      laterais; overflow:hidden cortava selos (Black November, Oferta de Novembro)
      e o produto parecia zoom. Precos e COMPRAR iam para o rodape de um card
      muito alto (abaixo da dobra em janelas baixas).
      Agora a caixa da foto e quadrada (altura = largura do card, limitada para
      caber nome/preco/COMPRAR na mesma altura do banner). object-fit:contain,
      sem recorte. Espaco sobrando fica abaixo do botao.
   2) Os cards clonados da categoria nascem com src = GIF 1x1 e data-srcset
      (50w..1024w). v3 ja tentava promover para 640, mas o srcset ainda trazia
      50/100/240 e o lazyload podia vencer a corrida. O JS v3 monta srcset
      so 320/480/640/1024, src de fallback 640, sizes corretos, e remove
      data-src / lazyload. (-1024-0.webp da 403; o 1024 e -1024-1024.webp.)

   Altura do banner/card continua explicita (--spl-h). Sem height:0, sem
   min-height:100%, sem aspect-ratio para dimensionar o trilho.
   Escopo: so html body section.spl. NAO publicar ainda. */

/* Fallback (sem cqi): 100vw menos o padding conhecido do .container
   (16px no celular; 20px de 768-1024; 70px a partir de 1025 — sic-largura-desktop-v1). */
html body section.spl{
  background:#000;
  color:#f2f2f2;
  padding:50px 0;
  margin:0;
  font-weight:400;
  --spl-ratio: 1674 / 940;
  --spl-inner: calc(100vw - 32px);
  --spl-col: calc(var(--spl-inner) * 0.67);
  --spl-h: calc(var(--spl-col) * 1674 / 940);
  --spl-card-w: var(--spl-col);
  --spl-info: 188px;
  --spl-img: min(var(--spl-card-w), max(140px, calc(var(--spl-h) - var(--spl-info))));
}
@media (min-width:768px) and (max-width:1024px){
  html body section.spl{
    --spl-inner: calc(100vw - 40px);
    --spl-col: calc(var(--spl-inner) * 0.67);
    --spl-h: calc(var(--spl-col) * 1674 / 940);
    --spl-card-w: var(--spl-col);
    --spl-img: min(var(--spl-card-w), max(140px, calc(var(--spl-h) - var(--spl-info))));
  }
}
@media (min-width:1024px){
  html body section.spl{
    --spl-col: calc(var(--spl-inner) * 0.26);
    --spl-h: calc(var(--spl-col) * 1674 / 940);
    --spl-card-w: calc((var(--spl-inner) - var(--spl-col) - 60px) / 3);
    --spl-info: 240px;
    --spl-img: min(var(--spl-card-w), max(140px, calc(var(--spl-h) - var(--spl-info))));
  }
}
@media (min-width:1025px){
  html body section.spl{
    --spl-inner: calc(100vw - 140px);
    --spl-col: calc(var(--spl-inner) * 0.26);
    --spl-h: calc(var(--spl-col) * 1674 / 940);
    --spl-card-w: calc((var(--spl-inner) - var(--spl-col) - 60px) / 3);
    --spl-info: 240px;
    --spl-img: min(var(--spl-card-w), max(140px, calc(var(--spl-h) - var(--spl-info))));
  }
}

/* Preferencia: 100cqi = largura da caixa de conteudo de .spl__inner,
   independente do padding/scrollbar. Variaveis no .spl__row (filho),
   porque 100cqi no proprio container nao aponta para si mesmo. */
@supports (width:1cqi){
  html body section.spl .spl__inner{
    container-type:inline-size;
    container-name:spl;
  }
  html body section.spl .spl__row{
    --spl-inner: 100cqi;
    --spl-col: calc(100cqi * 0.67);
    --spl-h: calc(100cqi * 0.67 * 1674 / 940);
    --spl-card-w: calc(100cqi * 0.67);
    --spl-info: 188px;
    --spl-img: min(var(--spl-card-w), max(140px, calc(var(--spl-h) - var(--spl-info))));
  }
  @media (min-width:1024px){
    html body section.spl .spl__row{
      --spl-col: calc(100cqi * 0.26);
      --spl-h: calc(100cqi * 0.26 * 1674 / 940);
      --spl-card-w: calc((100cqi - 26cqi - 60px) / 3);
      --spl-info: 240px;
      --spl-img: min(var(--spl-card-w), max(140px, calc(var(--spl-h) - var(--spl-info))));
    }
  }
}

html body section.spl .spl__inner{padding-top:0;padding-bottom:0}
html body section.spl .spl__topo{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0 0 20px;
}
html body section.spl .spl__h{
  margin:0;
  font-size:24px;
  font-weight:300;
  line-height:1.25;
  letter-spacing:0;
  color:#f2f2f2!important;
  -webkit-text-fill-color:#f2f2f2!important;
}
html body section.spl .spl__ver{
  flex:0 0 auto;
  font-size:14px;
  font-weight:400;
  line-height:1.2;
  color:#f2f2f2!important;
  -webkit-text-fill-color:#f2f2f2!important;
  text-decoration:none;
  white-space:nowrap;
}
html body section.spl .spl__ver:hover,
html body section.spl .spl__ver:focus{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  text-decoration:underline;
  text-underline-offset:3px;
}

/* Desktop: flex com alturas explicitas — nada de grid + aspect-ratio. */
html body section.spl .spl__row{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:30px;
  height:var(--spl-h);
}
html body section.spl .spl__banner{
  display:block;
  overflow:hidden;
  border-radius:12px;
  background:#000;
  line-height:0;
  text-decoration:none;
  color:inherit;
  box-sizing:border-box;
}
html body section.spl .spl__banner--lado{
  flex:0 0 var(--spl-col);
  width:var(--spl-col);
  max-width:none;
  height:var(--spl-h);
  position:relative;
}
html body section.spl .spl__banner img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center center;
  border-radius:inherit;
}
html body section.spl .spl__banner--slide{display:none}

html body section.spl .spl__palco{
  position:relative;
  flex:1 1 auto;
  min-width:0;
  width:auto;
  height:var(--spl-h);
}
html body section.spl .spl__trilho{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:stretch;
  gap:15px;
  width:100%;
  height:var(--spl-h);
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
html body section.spl .spl__trilho::-webkit-scrollbar{display:none;width:0;height:0}

/* Cards escuros com a MESMA altura explicita do banner (nao height:0). */
html body section.spl .spl__trilho > .js-item-product,
html body section.spl .spl__trilho > .product-item{
  flex:0 0 calc((100% - 30px) / 3);
  width:calc((100% - 30px) / 3)!important;
  max-width:none!important;
  min-width:0;
  margin-left:0!important;
  margin-right:0!important;
  margin-bottom:0!important;
  padding-left:0!important;
  padding-right:0!important;
  scroll-snap-align:start;
  scroll-snap-stop:normal;
  background:#121212!important;
  color:#f2f2f2!important;
  -webkit-text-fill-color:#f2f2f2;
  box-sizing:border-box;
  height:var(--spl-h)!important;
  min-height:var(--spl-h);
  max-height:var(--spl-h);
  overflow:hidden;
  border:1px solid #2e2e2e!important;
  border-radius:0!important;
  box-shadow:none!important;
  display:flex!important;
  flex-direction:column!important;
}

/* Caixa da foto QUADRADA (nao flex-grow). A foto cabe inteira (contain),
   sem recorte de selos. Nome, precos e COMPRAR permanecem visiveis na
   altura do banner; sobra vai para baixo do botao. */
html body section.spl .spl__trilho .product-item-image-container,
html body section.spl .spl__trilho .js-product-item-image-container-private{
  flex:0 0 var(--spl-img)!important;
  flex-grow:0!important;
  flex-shrink:0!important;
  width:100%!important;
  height:var(--spl-img)!important;
  max-height:var(--spl-img)!important;
  min-height:0!important;
  position:relative!important;
  overflow:hidden!important;
  background:#fff!important;
}
html body section.spl .spl__trilho .product-item-image-container > div[style*="padding-bottom"],
html body section.spl .spl__trilho .js-product-item-image-container-private > div[style*="padding-bottom"]{
  padding-bottom:0!important;
  width:100%!important;
  height:100%!important;
  position:absolute!important;
  inset:0!important;
  overflow:hidden!important;
}
html body section.spl .spl__trilho .product-item-image-container img.product-item-image-featured,
html body section.spl .spl__trilho .js-product-item-image-container-private img.product-item-image-featured,
html body section.spl .spl__trilho img.product-item-image-featured{
  position:absolute!important;
  inset:0!important;
  top:0!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform:none!important;
  -webkit-transform:none!important;
  opacity:1!important;
  z-index:1;
}
/* A segunda foto (hover) nao pode cobrir a principal — era isso que
   mostrava o recorte/zoom "capa" no lugar do packshot. */
html body section.spl .spl__trilho img.product-item-image-secondary,
html body section.spl .spl__trilho img.js-product-item-secondary-image-private{
  opacity:0!important;
  z-index:2;
  pointer-events:none;
}
html body section.spl .spl__trilho .product-item-image-container:hover img.product-item-image-secondary,
html body section.spl .spl__trilho .js-product-item-image-container-private:hover img.js-product-item-secondary-image-private,
html body section.spl .spl__trilho .product-item-image-container:hover img.product-item-image-secondary{
  opacity:1!important;
}
html body section.spl .spl__trilho .product-item-image-container:hover img.product-item-image-featured,
html body section.spl .spl__trilho .js-product-item-image-container-private:hover img.product-item-image-featured{
  opacity:0!important;
}
html body section.spl .spl__trilho .js-item-name,
html body section.spl .spl__trilho .product-item-name,
html body section.spl .spl__trilho .product-item-price-container,
html body section.spl .spl__trilho form.sic-buy,
html body section.spl .spl__trilho .js-max-installments-container,
html body section.spl .spl__trilho [class*="installment"]{
  flex:0 0 auto;
}

/* Foto do produto permanece em caixa branca (fotos de catalogo com fundo branco). */
html body section.spl .spl__trilho .product-item-image-container,
html body section.spl .spl__trilho .js-product-item-image-container-private,
html body section.spl .spl__trilho .product-item-image{
  background:#fff!important;
}

/* Textos do card */
html body section.spl .spl__trilho .product-item-name,
html body section.spl .spl__trilho .js-item-name,
html body section.spl .spl__trilho .product-item a,
html body section.spl .spl__trilho .product-item a:link,
html body section.spl .spl__trilho .product-item a:visited{
  color:#f2f2f2!important;
  -webkit-text-fill-color:#f2f2f2!important;
}
html body section.spl .spl__trilho .product-item-price,
html body section.spl .spl__trilho .js-price-display,
html body section.spl .js-price-display,
html body section.spl .product-item [class*="price"]:not([class*="compare"]){
  color:#f2f2f2!important;
  -webkit-text-fill-color:#f2f2f2!important;
}
html body section.spl .spl__trilho .product-item-price-compare,
html body section.spl .spl__trilho .js-compare-price-display,
html body section.spl .spl__trilho .price-compare,
html body section.spl .product-item [class*="compare"]{
  color:#8a8a8a!important;
  -webkit-text-fill-color:#8a8a8a!important;
}
html body section.spl .spl__trilho [class*="installment"],
html body section.spl .spl__trilho [class*="installment"] *,
html body section.spl .product-item [class*="installment"],
html body section.spl .product-item [class*="installment"] *{
  color:#a8a8a8!important;
  -webkit-text-fill-color:#a8a8a8!important;
}

/* COMPRAR: permanece verde do tema; so garante o texto branco do botao. */
html body section.spl .spl__trilho .sic-buy-btn,
html body section.spl .spl__trilho .sic-buy-btn *,
html body section.spl .spl__trilho .js-addtocart,
html body section.spl .spl__trilho .js-addtocart *,
html body section.spl .spl__trilho .sic-buy-txt,
html body section.spl .spl__trilho .sic-buy-ico,
html body section.spl .spl__trilho .sic-buy-ico svg,
html body section.spl .product-item form.sic-buy .sic-buy-btn,
html body section.spl .product-item form.sic-buy .sic-buy-btn *{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  fill:#fff!important;
}

html body section.spl .spl__seta{
  position:absolute;
  z-index:3;
  top:26%;
  transform:translateY(-50%);
  width:35px;
  height:35px;
  border-radius:50%;
  border:1px solid #2e2e2e;
  background:#1b1b1b;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
  transition:opacity .2s,background .2s,color .2s;
}
html body section.spl .spl__seta:hover{background:#fff;color:#000}
html body section.spl .spl__seta svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
html body section.spl .spl__seta--prev{left:-8px}
html body section.spl .spl__seta--next{right:-8px}
html body section.spl .spl__seta[disabled]{opacity:.4;pointer-events:none;cursor:default}
html body section.spl .spl__seta[disabled]:hover{background:#1b1b1b;color:#fff}

@media (max-width:1023.98px){
  html body section.spl{padding:20px 0 30px}
  html body section.spl .spl__h{font-size:24px}
  html body section.spl .spl__row{
    display:block;
    gap:0;
    height:var(--spl-h);
  }
  html body section.spl .spl__banner--lado{display:none}
  html body section.spl .spl__palco{
    flex:none;
    width:100%;
    height:var(--spl-h);
  }
  html body section.spl .spl__banner--slide{
    display:block;
    position:relative;
    flex:0 0 var(--spl-col);
    width:var(--spl-col);
    max-width:none;
    margin:0;
    padding:0;
    box-sizing:border-box;
    scroll-snap-align:start;
    background:#000;
    height:var(--spl-h);
    overflow:hidden;
    border-radius:12px;
  }
  html body section.spl .spl__banner--slide img{
    width:100%;
    height:100%;
    object-fit:contain;
    border-radius:12px;
  }
  html body section.spl .spl__trilho{
    height:var(--spl-h);
    gap:12px;
  }
  html body section.spl .spl__trilho > .js-item-product,
  html body section.spl .spl__trilho > .product-item{
    flex:0 0 var(--spl-col);
    width:var(--spl-col)!important;
    height:var(--spl-h)!important;
    min-height:var(--spl-h);
    max-height:var(--spl-h);
  }
  html body section.spl .spl__seta{display:none}
}

@media (prefers-reduced-motion:reduce){
  html body section.spl .spl__trilho{scroll-behavior:auto}
}
