/* Template 2 only: portrait cards and gallery matching the supplied mobile reference.
   Template 1 and other themes are intentionally untouched. */
body.store-theme-template_2.store-home-reference .sf-products .product-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:24px 18px!important;
}
body.store-theme-template_2.store-home-reference .sf-products .product-card{
  display:flex!important;flex-direction:column!important;position:relative!important;
  min-width:0!important;min-height:0!important;height:auto!important;
  border:0!important;border-radius:0!important;overflow:visible!important;
  box-shadow:none!important;background:transparent!important;
}
body.store-theme-template_2.store-home-reference .sf-products .sf-product-link{
  display:flex!important;flex-direction:column!important;min-width:0!important;
  text-decoration:none!important;
}
body.store-theme-template_2.store-home-reference .sf-products .product-image{
  position:relative!important;display:block!important;flex:none!important;
  width:100%!important;height:auto!important;min-height:0!important;
  aspect-ratio:424 / 505!important;overflow:hidden!important;
  border-radius:22px!important;background:#f5f5f5!important;
}
body.store-theme-template_2.store-home-reference .sf-products .product-image>img{
  display:block!important;width:100%!important;height:100%!important;
  position:absolute!important;inset:0!important;object-fit:cover!important;border-radius:22px!important;
}
body.store-theme-template_2.store-home-reference .sf-products .product-image .sf-heart{
  display:flex!important;position:absolute!important;top:12px!important;right:12px!important;
  align-items:center!important;justify-content:center!important;z-index:3!important;
  width:40px!important;height:40px!important;border-radius:50%!important;
  background:#df3550!important;color:#fff!important;font-size:30px!important;
}
body.store-theme-template_2.store-home-reference .sf-products .product-image>em{
  top:12px!important;left:12px!important;z-index:3!important;
}
body.store-theme-template_2.store-home-reference .sf-products .product-copy{
  display:flex!important;flex-direction:column!important;align-self:stretch!important;
  padding:8px 6px 0!important;background:transparent!important;
}
body.store-theme-template_2.store-home-reference .sf-products .product-copy h3{
  order:0!important;font-size:18px!important;line-height:1.3!important;
  font-weight:500!important;margin:0 0 14px!important;
}
body.store-theme-template_2.store-home-reference .sf-products .product-copy small{order:1!important;margin:0 0 10px!important;}
body.store-theme-template_2.store-home-reference .sf-products .product-copy .product-price{
  order:2!important;font-size:19px!important;font-weight:600!important;
}
body.store-theme-template_2.store-home-reference .sf-products .sf-quick{
  display:block!important;position:absolute!important;z-index:4!important;
  top:auto!important;bottom:auto!important;left:7%!important;right:7%!important;
  width:86%!important;height:auto!important;min-width:0!important;
  padding:0!important;margin:0!important;
  /* Portrait image height = card width * 505/424. The button is 15% up from the image bottom. */
  transform:translateY(calc((100cqw * 505 / 424) * -0.14))!important;
}
/* Position the button relative to the image, without moving the copy or changing its form action. */
body.store-theme-template_2.store-home-reference .sf-products .product-card{container-type:inline-size!important;}
body.store-theme-template_2.store-home-reference .sf-products .sf-quick{
  top:calc(100cqw * 505 / 424 - 54px)!important;transform:none!important;
}
body.store-theme-template_2.store-home-reference .sf-products .sf-quick button{
  display:flex!important;justify-content:center!important;align-items:center!important;
  width:100%!important;min-width:0!important;min-height:44px!important;
  padding:8px 10px!important;border:0!important;border-radius:999px!important;
  background:#111!important;color:#fff!important;box-shadow:none!important;
  font-size:16px!important;line-height:1.2!important;
}
body.store-theme-template_2.store-home-reference .sf-products .sf-quick button::before{display:none!important;}
body.store-theme-template_2.store-home-reference .sf-products .sf-quick button::after{
  position:static!important;display:inline!important;color:#fff!important;
}
body.store-theme-template_2.store-product-reference .ref-product-form{
  gap:24px!important;
}
body.store-theme-template_2.store-product-reference .ref-main-image{
  width:100%!important;height:auto!important;max-height:none!important;
  aspect-ratio:885 / 1130!important;border:1px solid #222!important;
  border-radius:36px!important;overflow:hidden!important;background:#f7f7f7!important;
}
body.store-theme-template_2.store-product-reference .ref-main-image img{
  width:100%!important;height:100%!important;object-fit:cover!important;
  border-radius:35px!important;
}
body.store-theme-template_2.store-product-reference .ref-thumb-rail{
  margin-top:6px!important;
}
body.store-theme-template_2.store-product-reference .ref-product-card{
  border-radius:0!important;box-shadow:none!important;
}
@media(max-width:700px){
  body.store-theme-template_2.store-home-reference .sf-products .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px 14px!important;
  }
  body.store-theme-template_2.store-home-reference .sf-products .product-image{
    border-radius:20px!important;
  }
  body.store-theme-template_2.store-home-reference .sf-products .product-image>img{border-radius:20px!important;}
  body.store-theme-template_2.store-home-reference .sf-products .product-copy h3{
    font-size:17px!important;line-height:1.25!important;
  }
  body.store-theme-template_2.store-home-reference .sf-products .sf-quick{
    top:calc(100cqw * 505 / 424 - 52px)!important;
  }
  body.store-theme-template_2.store-home-reference .sf-products .sf-quick button{
    min-height:42px!important;font-size:15px!important;
  }
  body.store-theme-template_2.store-product-reference .ref-main-image{border-radius:32px!important;}
  body.store-theme-template_2.store-product-reference .ref-main-image img{border-radius:31px!important;}
}

/* v583: Template 2 desktop homepage, four portrait cards matching reference.
   Scoped above the approved mobile breakpoint; no new stylesheet or application changes. */
@media (min-width:701px) {
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-grid {
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:22px 17px!important;align-items:start!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-card {
  display:block!important;position:relative!important;min-width:0!important;min-height:0!important;
  width:100%!important;height:auto!important;grid-template-columns:none!important;grid-template-rows:none!important;
  border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;overflow:visible!important;container-type:inline-size!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .sf-product-link {
  display:block!important;min-width:0!important;text-decoration:none!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-image {
  display:block!important;position:relative!important;grid-row:auto!important;grid-column:auto!important;
  width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:2 / 3!important;
  border:0!important;border-radius:6px!important;overflow:hidden!important;background:#f5f5f5!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-image > img {
  position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;
  object-fit:cover!important;border-radius:6px!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-image .sf-heart {
  display:flex!important;position:absolute!important;top:12px!important;right:12px!important;left:auto!important;
  width:34px!important;height:34px!important;align-items:center!important;justify-content:center!important;
  border-radius:50%!important;background:#df3550!important;color:#fff!important;z-index:3!important;font-size:24px!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-image > em {
  top:12px!important;left:12px!important;z-index:3!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-copy {
  display:flex!important;flex-direction:column!important;align-self:stretch!important;min-width:0!important;
  padding:14px 16px 0!important;background:transparent!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-copy h3 {
  order:0!important;margin:0 0 22px!important;font-size:15px!important;line-height:1.3!important;
  font-weight:500!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-copy small {
  order:1!important;margin:0 0 12px!important;font-size:13px!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-copy .product-price {
  order:2!important;font-size:16px!important;line-height:1.35!important;font-weight:600!important;
 }
 /* Reference has no resting CTA. Keep the existing action accessible on hover and keyboard focus. */
 body.store-body.store-theme-template_2.store-home-reference .sf-products .sf-quick {
  display:block!important;position:absolute!important;z-index:4!important;
  top:calc(100cqw * 3 / 2 - 58px)!important;bottom:auto!important;
  left:7%!important;right:7%!important;width:86%!important;
  margin:0!important;padding:0!important;transform:none!important;
  opacity:0!important;pointer-events:none!important;transition:opacity .18s ease!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-card:hover .sf-quick,
 body.store-body.store-theme-template_2.store-home-reference .sf-products .product-card:focus-within .sf-quick {
  opacity:1!important;pointer-events:auto!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .sf-quick button {
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:100%!important;min-width:0!important;height:44px!important;min-height:44px!important;
  padding:8px 10px!important;border:0!important;border-radius:8px!important;
  background:#111!important;color:#fff!important;font-size:14px!important;line-height:1.2!important;
  box-shadow:none!important;
 }
 body.store-body.store-theme-template_2.store-home-reference .sf-products .sf-quick button::before,
 body.store-body.store-theme-template_2.store-home-reference .sf-products .sf-quick button::after {
  content:none!important;display:none!important;
 }
}
