/* Compra móvil: controles legibles, catálogo temprano y acciones sin superposición. */
.ms-buy-fab[hidden] { display: none !important; }
.ms-buy-fab:not(.is-full) { display: none; }
body.woocommerce-cart .ms-buy-fab { display: none; }

@media (max-width: 760px) {
  .ms-header { position: relative; }
  .ms-topbar { padding: 10px 16px; gap: 10px; }
  .ms-logo img { height: 44px; }
  .ms-action { height: 44px; min-width: 44px; }
  .ms-search { height: 48px; min-width: 0; }
  .ms-search input[type=search] { min-width: 0; font-size: 16px; }
  .ms-nav-toggle { min-height: 44px; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) .storefront-breadcrumb { padding-block: 10px; margin-bottom: 6px; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) .storefront-sorting { gap: 8px; padding-bottom: 14px; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) .storefront-sorting:has(+ .products) .woocommerce-pagination { display: none; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) .woocommerce-ordering { width: 100%; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) .woocommerce-ordering select { width: 100%; max-width: 100%; min-height: 44px; font-size: 16px; }
  .ms-filters { margin-bottom: 12px; }
  .ms-filters-scroll { min-width: 0; }
  .ms-fchip, .ms-filters-toggle, .ms-fquick { min-height: 44px; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) ul.products {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) ul.products::before,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) ul.products::after { display: none; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) ul.products li.product { width: 100%; min-width: 0; margin: 0; padding: 10px; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) ul.products li.product .woocommerce-loop-product__title { font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) ul.products li.product .price { font-size: 16px; line-height: 1.5; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) ul.products li.product .button { min-height: 44px; padding: 10px 8px; font-size: 14px; line-height: 1.4; white-space: normal; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) .woocommerce-pagination ul { display: flex; overflow-x: auto; max-width: 100%; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) .woocommerce-pagination li { flex: 0 0 auto; }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand,.tax-product_tag) .woocommerce-pagination :is(a,span) { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
  body.woocommerce-cart .ms-cart-intro { margin-bottom: 16px; }
  body.woocommerce-cart .wc-block-cart .wc-block-cart__main,
  body.woocommerce-cart .wc-block-cart .wc-block-cart__sidebar { padding: 14px; border-radius: 14px; }
  body:is(.woocommerce-cart,.woocommerce-checkout) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 16px; }
  body.woocommerce-checkout .wc-block-components-text-input input { min-height: 52px; }
  body.woocommerce-checkout .wc-block-components-checkbox label { min-height: 44px; align-items: flex-start; }
  body.woocommerce-checkout .wc-block-components-checkbox__label { line-height: 1.6; overflow-wrap: anywhere; }
  /* El espacio reservado permite desplazar hasta el último contenido sin quedar tapado. */
  body.ms-has-cart-fab { padding-bottom: calc(76px + env(safe-area-inset-bottom,0px)); }
  .ms-buy-fab { left: 16px; right: 16px; bottom: max(12px,env(safe-area-inset-bottom,0px)); justify-content: center; min-height: 48px; max-width: calc(100% - 32px); z-index: 900; }
  body:has(.ms-filters.is-open) .ms-buy-fab,
  body:has(input:focus,textarea:focus,select:focus) .ms-buy-fab { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ms-buy-fab { transition: none; } }
