/* DAILORA: let each home-page product row share a natural card height. */
body.home .woocommerce ul.products {
  align-items: stretch !important;
}

body.home .woocommerce ul.products > li.product {
  display: flex !important;
  flex-direction: column;
  align-self: stretch;
  min-width: 0;
  height: auto !important;
}

body.home .woocommerce ul.products > li.product > .astra-shop-thumbnail-wrap {
  flex: 0 0 auto;
}

body.home .woocommerce ul.products > li.product > .astra-shop-summary-wrap {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

/* Keep the whole name readable, including narrow two-column mobile grids. */
body.home .woocommerce ul.products > li.product .woocommerce-loop-product__title {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
  -webkit-line-clamp: unset !important;
}

/* Extra space goes above the price, so the price and both actions line up. */
body.home .woocommerce ul.products > li.product > .astra-shop-summary-wrap > .price {
  margin-top: auto !important;
}

body.home .woocommerce ul.products > li.product > .astra-shop-summary-wrap > a.button {
  box-sizing: border-box;
  max-width: 100%;
  flex-shrink: 0;
}

/* Preserve the existing mobile search arrangement and desktop 48px controls. */
@media (min-width: 768px) {
  body:not(.wp-admin) :is(.elementor-location-header, .elementor-192) form.e-search-form {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: stretch !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  body:not(.wp-admin) :is(.elementor-location-header, .elementor-192) form.e-search-form > .e-search-input-wrapper {
    flex: 1 1 auto !important;
    min-width: 0;
    height: 48px !important;
    margin-block: 0 !important;
    justify-content: center;
  }

  body:not(.wp-admin) :is(.elementor-location-header, .elementor-192) form.e-search-form input.e-search-input,
  body:not(.wp-admin) :is(.elementor-location-header, .elementor-192) form.e-search-form > button.e-search-submit {
    box-sizing: border-box !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin-block: 0 !important;
    align-self: stretch;
  }

  body:not(.wp-admin) :is(.elementor-location-header, .elementor-192) form.e-search-form input.e-search-input {
    width: 100%;
    padding-block: 0 !important;
    padding-inline: 44px 36px !important;
  }
}
