/* NOVO BOOKS — mobile product cards */
@media (max-width: 600px) {
  /* Keep product carousel slides the same width and create a fine gutter. */
  .w-grid.type_carousel .w-grid-list.owl-carousel .owl-stage {
    display: flex;
    align-items: stretch;
  }
  .w-grid.type_carousel .w-grid-list.owl-carousel .owl-item {
    display: flex;
    align-items: stretch;
    height: auto;
    box-sizing: border-box;
    padding: 0 2px;
  }
  .w-grid.type_carousel .w-grid-list.owl-carousel .owl-item > article.product {
    display: flex;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-width: 0;
    margin: 0 !important;
    box-sizing: border-box;
  }
  .w-grid article.product .w-grid-item-h {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #6f8982;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
  }
  .w-grid article.product .usg_vwrapper_1 {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .w-grid article.product .usg_vwrapper_2 {
    display: flex;
    flex: 0 0 240px;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 240px;
    padding: 10px;
    box-sizing: border-box;
  }
  .w-grid article.product .usg_post_image_1,
  .w-grid article.product .usg_post_image_1 > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .w-grid article.product .usg_post_image_1 img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain;
  }
  .w-grid article.product .usg_post_custom_field_1 {
    margin: 8px 8px 0 !important;
    text-align: center;
  }
  .w-grid article.product .woocommerce-loop-product__title {
    display: -webkit-box;
    min-height: 3.6em;
    margin: 6px 8px !important;
    overflow: hidden;
    text-align: center;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .w-grid article.product .usg_product_field_1 {
    margin: auto 8px 12px !important;
    text-align: center;
  }

  /* Keep the same two-column rhythm on WooCommerce catalogue grids. */
  .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 4px !important;
    row-gap: 14px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .woocommerce ul.products::before,
  .woocommerce ul.products::after {
    display: none !important;
  }
  .woocommerce ul.products li.product {
    display: flex !important;
    flex-direction: column;
    float: none !important;
    clear: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 0 12px;
    overflow: hidden;
    border: 1px solid #6f8982;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
  }
  .woocommerce ul.products li.product img {
    display: block;
    width: 100%;
    height: 240px;
    margin: 0;
    padding: 10px;
    object-fit: contain;
    box-sizing: border-box;
  }
  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box;
    min-height: 3.6em;
    margin: 8px 8px 6px;
    overflow: hidden;
    text-align: center;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .woocommerce ul.products li.product .price {
    margin: auto 8px 4px;
    text-align: center;
  }
  /* Equal widths and row heights for complete product grids above and below. */
  .w-grid .w-grid-list:has(> article.product) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: 1fr;
    column-gap: 4px !important;
    row-gap: 14px !important;
  }
  .w-grid .w-grid-list:has(> article.product) > article.product {
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    height: 100%;
    min-width: 0;
    margin: 0 !important;
    box-sizing: border-box;
  }

  /* Slightly widen mobile product areas while retaining outer breathing room. */
  .w-grid.type_carousel {
    width: calc(100% + 16px) !important;
    max-width: none !important;
    margin-left: -8px !important;
    margin-right: -8px !important;
  }
  .w-grid .w-grid-list:has(> article.product),
  .woocommerce ul.products {
    width: calc(100% + 16px) !important;
    margin-left: -8px !important;
    margin-right: -8px !important;
  }

  /* Category cards follow the compact Esoterismo product-card layout. */
  body.tax-product_cat .w-grid.us_product_list .w-grid-list:has(> article.product) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    column-gap: 4px !important;
    row-gap: 14px !important;
  }
  body.tax-product_cat .w-grid.us_product_list .w-grid-list > article.product {
    display: flex !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .w-grid-item-h {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    border: 1px solid #6f8982 !important;
    border-radius: 12px !important;
    background: #fff !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .usg_vwrapper_1 {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .usg_vwrapper_2 {
    display: flex !important;
    flex: 0 0 240px !important;
    height: 240px !important;
    padding: 0 !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .usg_post_image_1,
  body.tax-product_cat .w-grid.us_product_list article.product .usg_post_image_1 > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .usg_post_image_1 img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .usg_post_custom_field_1 {
    display: none !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .woocommerce-loop-product__title {
    min-height: 3.6em !important;
    margin: 6px 8px !important;
    color: #332f2b !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-transform: none !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .usg_product_field_1 {
    margin: 12px 8px 0 !important;
    color: #3d4959 !important;
    font-size: 1.2rem !important;
    text-align: left !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .usg_add_to_cart_1 {
    width: auto !important;
    margin: 10px 8px 8px !important;
  }
  body.tax-product_cat .w-grid.us_product_list article.product .usg_add_to_cart_1 .button {
    width: 100% !important;
    border-radius: 5px !important;
  }

}
