/* Version 3.6 — targeted layout corrections. No change to scrolling or carousels. */
/* Editorial categories, tags and blog archive: true RTL writing and flow. */
body.blog .ms-news-archive,
body.archive:not(.post-type-archive):not(.tax-mariani_product_cat):not(.tax-product_cat) .ms-news-archive,
body.search .ms-news-archive,
.ms-news-archive .ms-news-archive-grid,
.ms-news-archive .ms-news-card,
.ms-news-archive .ms-news-card__details,
.ms-news-archive .ms-news-card__excerpt {
  direction:rtl!important;text-align:right!important;
}
.ms-news-archive .ms-news-card__title,
.ms-news-archive .ms-news-card__date {direction:rtl!important;text-align:right!important;}
/* Remove underline/border from designer credit links on every footer. */
.mariani-footer-designer a,
.mariani-footer-section .mariani-footer-designer a,
.mariani-inner-footer .mariani-footer-designer a,
.footer .mariani-footer-designer a {
  text-decoration:none!important;border:0!important;border-bottom:0!important;
  box-shadow:none!important;background-image:none!important;
}
.mariani-footer-designer a::before,.mariani-footer-designer a::after {text-decoration:none!important;border-bottom:0!important;}
@media (max-width:767px) {
  /* Mobile landing images retain their existing ratio. Pin text near bottom of each image, without stretching its box. */
  .landing-wrapper > .magnet:nth-child(-n+5) section .caption,
  .landing-wrapper > .magnet:nth-child(-n+5) section .caption.center {
    position:absolute!important;
    top:auto!important; bottom:clamp(17px,5.5vw,34px)!important;
    left:0!important;right:0!important;
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    transform:none!important;margin:0!important;padding:0 18px!important;
    display:flex!important;flex-direction:column!important;
    align-items:center!important;justify-content:flex-end!important;
    text-align:center!important;z-index:8!important;
  }
  .landing-wrapper > .magnet:nth-child(-n+5) section .caption h1,
  .landing-wrapper > .magnet:nth-child(-n+5) section .caption h2 {
    margin:0!important;padding:0!important;max-width:100%!important;
    font-size:clamp(19px,5.5vw,34px)!important;line-height:1.2!important;
    overflow-wrap:anywhere!important;text-align:center!important;
  }
  /* News on mobile: text-only articles, no empty image block. */
  .landing-wrapper #landing-section-6 .news__item__image,
  .landing-wrapper #landing-section-6 .news__item__image>a,
  .landing-wrapper #landing-section-6 .news__item__image img {
    display:none!important;height:0!important;margin:0!important;padding:0!important;
  }
  .landing-wrapper #landing-section-6 .news__item {display:flex!important;flex-direction:column!important;align-items:stretch!important;}
  .landing-wrapper #landing-section-6 .news__item__date,
  .landing-wrapper #landing-section-6 .news__item__description {width:100%!important;max-width:100%!important;flex:0 0 auto!important;}
  /* Product category hero fills the visible screen; caption is anchored inside its bottom, not below the viewport. */
  body.tax-product_cat .mariani-category-hero,
  body.tax-mariani_product_cat .mariani-category-hero {
    height:100svh!important;min-height:100svh!important;max-height:none!important;
    aspect-ratio:auto!important;margin-top:0!important;
    position:relative!important;overflow:hidden!important;
  }
  body.tax-product_cat .mariani-category-hero picture,
  body.tax-mariani_product_cat .mariani-category-hero picture,
  body.tax-product_cat .mariani-category-hero picture img,
  body.tax-mariani_product_cat .mariani-category-hero picture img {
    width:100%!important;height:100%!important;object-fit:cover!important;
  }
  body.tax-product_cat .mariani-category-hero .mariani-category-caption,
  body.tax-mariani_product_cat .mariani-category-hero .mariani-category-caption {
    position:absolute!important;top:auto!important;
    bottom:clamp(35px,8svh,85px)!important;
    left:50%!important;right:auto!important;
    transform:translateX(-50%)!important;
    width:calc(100% - 36px)!important;text-align:center!important;
    height:auto!important;max-height:none!important;
  }
  /* Single centered column for category products, including hover-image layers. */
  body.tax-product_cat .mariani-category-products .product-grid,
  body.tax-mariani_product_cat .mariani-category-products .product-grid {
    display:flex!important;flex-direction:column!important;align-items:center!important;
    justify-content:flex-start!important;flex-wrap:nowrap!important;
    margin:0!important;gap:0!important;
  }
  body.tax-product_cat .mariani-category-products .product-grid__item,
  body.tax-mariani_product_cat .mariani-category-products .product-grid__item {
    box-sizing:border-box!important;flex:0 0 auto!important;
    width:100%!important;max-width:460px!important;
    padding:clamp(24px,6vw,42px) 12px!important;
    margin-inline:auto!important;text-align:center!important;
  }
  body.tax-product_cat .mariani-category-products .mariani-category-product-image,
  body.tax-mariani_product_cat .mariani-category-products .mariani-category-product-image {
    width:100%!important;height:clamp(170px,52vw,290px)!important;
    min-height:170px!important;max-height:290px!important;
  }
  body.tax-product_cat .mariani-category-products .product-grid__item figure,
  body.tax-mariani_product_cat .mariani-category-products .product-grid__item figure {
    align-items:center!important;justify-content:center!important;
  }
  body.tax-product_cat .mariani-category-products .product-grid__item figcaption,
  body.tax-mariani_product_cat .mariani-category-products .product-grid__item figcaption {
    text-align:center!important;
  }
}
