/* Query Loop - Horizontal Scroll (Swiper ou só flex) */

/* Sem scrollbar nativa e largura total */
.wp-block-query.is-style-horizontal-scroll { overflow: hidden; width: 100%; }

/* Wrapper vira flex e anula grid do core */
.wp-block-query.is-style-horizontal-scroll .wp-block-post-template {
  display: flex !important;
  gap: var(--wp--preset--spacing--30, 24px);
  min-width: 0;
}
.wp-block-query.is-style-horizontal-scroll .wp-block-post-template.is-layout-grid {
  grid-template-columns: none !important;
}

/* Itens base: largura fixa (mobile/tablet ajustam via vars) */
.wp-block-query.is-style-horizontal-scroll .wp-block-post-template > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: var(--wp--custom--card-width, 264.75px);
  min-width: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .wp-block-query.is-style-horizontal-scroll .wp-block-post-template > * {
    width: var(--wp--custom--card-width-mobile, 266.5px);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .wp-block-query.is-style-horizontal-scroll .wp-block-post-template > * {
    width: var(--wp--custom--card-width-desktop, 301.5px);
  }

  /* MENOS de 4 itens? (não existe o 4º) -> remover largura fixa e preencher igualmente */
  .wp-block-query.is-style-horizontal-scroll:not(:has(.wp-block-post-template > :nth-child(4)))
  .wp-block-post-template > * {
    width: auto !important;
    flex: 1 1 0%;
  }
}

/* Esconde barra nativa (opcional) */
.wp-block-query.is-style-horizontal-scroll .wp-block-post-template { scrollbar-width: none; }
.wp-block-query.is-style-horizontal-scroll .wp-block-post-template::-webkit-scrollbar { display: none; }

/* UL/OL sem bullets/padding (se o template for lista) */
.wp-block-query.is-style-horizontal-scroll .wp-block-post-template:is(ul,ol) {
  list-style: none; margin: 0; padding-left: 0;
}
