/* MusicBox 2.8 — Filtros mais largos e artigos mais próximos do banner.
   Corrige o layout do catálogo WooCommerce / Extendable, sem alterar produtos ou opções. */
@media (min-width:1200px) {
  body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand)
  .wp-block-columns.mbx-shop-layout.mbx-shop-layout--compact {
    column-gap:clamp(16px,1.25vw,24px)!important;
  }
  body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand)
  .wp-block-columns.mbx-shop-layout.mbx-shop-layout--compact > .wp-block-column.mbx-shop-sidebar,
  body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand)
  .wp-block-columns.mbx-shop-layout.mbx-shop-layout--compact > .wp-block-column:first-child {
    flex:0 0 clamp(318px,18vw,344px)!important;
    flex-basis:clamp(318px,18vw,344px)!important;
    width:clamp(318px,18vw,344px)!important;
    min-width:318px!important;
    max-width:344px!important;
  }
  body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand)
  .wp-block-columns.mbx-shop-layout.mbx-shop-layout--compact > .wp-block-column.mbx-shop-results,
  body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand)
  .wp-block-columns.mbx-shop-layout.mbx-shop-layout--compact > .wp-block-column:last-child {
    flex:1 1 0!important;
    min-width:0!important;
    max-width:none!important;
    width:auto!important;
  }
}
@media (min-width:782px) and (max-width:1199px) {
  body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand)
  .wp-block-columns.mbx-shop-layout.mbx-shop-layout--compact > .wp-block-column.mbx-shop-sidebar,
  body:is(.post-type-archive-product,.tax-product_cat,.tax-product_tag,.tax-product_brand)
  .wp-block-columns.mbx-shop-layout.mbx-shop-layout--compact > .wp-block-column:first-child {
    flex:0 0 clamp(275px,25vw,305px)!important;
    flex-basis:clamp(275px,25vw,305px)!important;
    width:clamp(275px,25vw,305px)!important;
    min-width:275px!important;
    max-width:305px!important;
  }
}
@media(min-width:782px) {
  /* Preço: as duas caixas não devem ultrapassar a barra lateral. */
  .mbx-shop-layout--compact .mbx-shop-filters-v24 :is(
    .wc-block-components-price-slider__controls,
    .wc-block-product-filter-price-slider__controls,
    .wc-block-components-price-slider__amounts,
    .wc-block-product-filter-price-slider__amounts
  ) {width:100%!important;max-width:100%!important;min-width:0!important;gap:8px!important;box-sizing:border-box!important;}
  .mbx-shop-layout--compact .mbx-shop-filters-v24 :is(
    .wc-block-components-price-slider__controls,
    .wc-block-product-filter-price-slider__controls,
    .wc-block-components-price-slider__amounts,
    .wc-block-product-filter-price-slider__amounts
  ) > * {flex:1 1 0!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
  .mbx-shop-layout--compact .mbx-shop-filters-v24 :is(
    .wc-block-components-price-slider__controls input,
    .wc-block-product-filter-price-slider__controls input,
    .wc-block-components-price-slider__amounts input,
    .wc-block-product-filter-price-slider__amounts input
  ) {min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important;}
  /* O shortcode do banner tem de ficar colado à secção seguinte do catálogo. */
  .mbx-shop-layout--compact .mbx-shop-results .wp-block-shortcode:has(> .mbx-shop-banner) {
    margin-block-end:0!important;
    padding-block-end:0!important;
  }
  .mbx-shop-layout--compact .mbx-shop-results .mbx-shop-banner {
    margin-block-end:0!important;
  }
  .mbx-shop-layout--compact .mbx-shop-results .mbx-shop-after-banner {
    margin-block-start:10px!important;
    padding-block-start:0!important;
  }
  .mbx-shop-layout--compact .mbx-shop-results .mbx-shop-after-banner :is(.wp-block-woocommerce-breadcrumbs,.woocommerce-breadcrumb) {
    margin-block-start:0!important;
  }
  /* Menor distância entre título, contagem e primeiros artigos. */
  .mbx-shop-layout--compact .mbx-shop-results :is(.wp-block-woocommerce-product-collection,.wp-block-woocommerce-product-template,ul.products) {
    margin-block-start:6px!important;
  }
}
/* A experiência no telemóvel mantém a coluna a 100%, com filtros recolhidos. */
