/* Same Boat Product Card widget — Elementor-safe (survives kit typography) */

.sb-product-card-widget {
  width: 100%;
  max-width: none;
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  box-sizing: border-box;
}

.sb-product-card-widget__grid {
  display: grid;
  align-items: stretch;
  gap: 28px 22px;
  width: 100%;
}

.sb-product-card-widget__grid--1 { grid-template-columns: 1fr; max-width: 360px; }
.sb-product-card-widget__grid--2 { grid-template-columns: repeat(2, 1fr); }
.sb-product-card-widget__grid--3 { grid-template-columns: repeat(3, 1fr); }
.sb-product-card-widget__grid--4 { grid-template-columns: repeat(4, 1fr); }

.sb-product-card-widget.is-center {
  margin-left: auto;
  margin-right: auto;
}

.sb-product-card-widget.is-center .sb-product-card-widget__grid--1 {
  margin-left: auto;
  margin-right: auto;
}

.sb-product-card-widget *,
.sb-product-card-widget *::before,
.sb-product-card-widget *::after {
  box-sizing: border-box;
}

.sb-product-card-widget__empty {
  margin: 0;
  padding: 24px;
  border: 1px dashed #c9d4e0;
  border-radius: 16px;
  color: #7d8da3;
  font-size: 14px;
  text-align: center;
  background: #f8fafc;
}

body .sb-product-card-widget .sb-product-card,
.sb-product-card-widget .sb-product-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Square image box — desktop + mobile */
body .sb-product-card-widget .sb-product-card__media,
.sb-product-card-widget .sb-product-card__media,
body .sb-product-card-widget a.sb-product-card__media,
body .sb-product-card-widget div.sb-product-card__media {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #e5eef3 !important;
  border-radius: 20px !important;
  background: #f5f9fb !important;
  color: #21364d !important;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 10px 28px rgba(33, 54, 77, 0.05) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body .sb-product-card-widget .sb-product-card:hover .sb-product-card__media {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(33, 54, 77, 0.1) !important;
}

body .sb-product-card-widget .sb-product-card__media img,
body .sb-product-card-widget .sb-product-card__media > a,
body .sb-product-card-widget .sb-product-card__media > a img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0 !important;
}

/* Nested link inside media (Elementor / WC wrappers) */
body .sb-product-card-widget .sb-product-card__media > a.sb-product-card__media {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  aspect-ratio: auto !important;
  height: 100% !important;
}

body .sb-product-card-widget .sb-product-card__title,
body .sb-product-card-widget .sb-product-card h3,
body.elementor-page .sb-product-card-widget .sb-product-card__title,
body.elementor-page .sb-product-card-widget .sb-product-card h3 {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden !important;
  min-height: calc(1.35em * 2) !important;
  margin: 14px 0 6px !important;
  padding: 0 !important;
  color: #21364d !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
}

.sb-product-card-widget.is-center .sb-product-card__title,
.sb-product-card-widget.is-center .sb-product-card h3 {
  text-align: center !important;
}

body .sb-product-card-widget .sb-product-card__title a,
body .sb-product-card-widget .sb-product-card h3 a,
body.elementor-page .sb-product-card-widget .sb-product-card__title a,
body .sb-product-card-widget .sb-product-card__title a:link,
body .sb-product-card-widget .sb-product-card__title a:visited {
  color: #21364d !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #21364d !important;
  background: none !important;
  box-shadow: none !important;
}

body .sb-product-card-widget .sb-product-card__title a:hover {
  color: #5d9bd3 !important;
  -webkit-text-fill-color: #5d9bd3 !important;
}

body .sb-product-card-widget .sb-price,
body.elementor-page .sb-product-card-widget .sb-price {
  min-height: 1.4em;
  margin: 0 0 12px !important;
  padding: 0 !important;
  color: #21364d !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

.sb-product-card-widget.is-center .sb-price {
  text-align: center !important;
}

body .sb-product-card-widget .sb-price .amount,
body .sb-product-card-widget .sb-price .woocommerce-Price-amount {
  color: #21364d !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

body .sb-product-card-widget .sb-price del {
  color: #9aabba !important;
  margin-right: 6px;
  font-weight: 500 !important;
}

body .sb-product-card-widget .sb-price ins {
  color: #21364d !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

body.elementor-kit-4 .sb-product-card-widget a.sb-more,
body .sb-product-card-widget a.sb-more,
body .sb-product-card-widget a.sb-more:link,
body .sb-product-card-widget a.sb-more:visited,
body.elementor-page .sb-product-card-widget a.sb-more {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 42px !important;
  height: auto !important;
  margin-top: auto !important;
  margin-right: auto !important;
  margin-bottom: 0 !important;
  margin-left: auto !important;
  padding: 8px 18px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: #e8f2f7 !important;
  background-image: none !important;
  color: #4a7ba7 !important;
  -webkit-text-fill-color: #4a7ba7 !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-transform: none !important;
  box-shadow: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sb-product-card-widget.is-center a.sb-more {
  align-self: center;
}

body.elementor-kit-4 .sb-product-card-widget a.sb-more:hover,
body.elementor-kit-4 .sb-product-card-widget a.sb-more:focus,
body .sb-product-card-widget a.sb-more:hover,
body .sb-product-card-widget a.sb-more:focus {
  transform: translateY(-1px);
  color: #4a7ba7 !important;
  -webkit-text-fill-color: #4a7ba7 !important;
  font-size: 14px !important;
}

body.elementor-kit-4 .sb-product-card-widget a.sb-more--cart,
body .sb-product-card-widget a.sb-more--cart,
body .sb-product-card-widget a.sb-more--cart:link,
body .sb-product-card-widget a.sb-more--cart:visited,
body.elementor-page .sb-product-card-widget a.sb-more--cart {
  background: linear-gradient(90deg, #6B9BD1 0%, #7FD4AA 100%) !important;
  background-image: linear-gradient(90deg, #6B9BD1 0%, #7FD4AA 100%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 4px 14px rgba(107, 155, 209, 0.25) !important;
  transform: scale(1);
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

body.elementor-kit-4 .sb-product-card-widget a.sb-more--cart:hover,
body.elementor-kit-4 .sb-product-card-widget a.sb-more--cart:focus,
body .sb-product-card-widget a.sb-more--cart:hover,
body .sb-product-card-widget a.sb-more--cart:focus {
  background: linear-gradient(90deg, #6B9BD1 0%, #7FD4AA 100%) !important;
  background-image: linear-gradient(90deg, #6B9BD1 0%, #7FD4AA 100%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 20px 25px -5px rgba(107, 155, 209, 0.3),
    0 8px 10px -6px rgba(107, 155, 209, 0.25) !important;
  transform: scale(1.05);
}

/* View cart — white outline button to the right of Add to cart */
body .sb-product-card-widget .sb-product-card:has(> a.added_to_cart) {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  column-gap: 10px;
}
body .sb-product-card-widget .sb-product-card:has(> a.added_to_cart) > .sb-product-card__media,
body .sb-product-card-widget .sb-product-card:has(> a.added_to_cart) > h2,
body .sb-product-card-widget .sb-product-card:has(> a.added_to_cart) > h3,
body .sb-product-card-widget .sb-product-card:has(> a.added_to_cart) > .sb-product-card__title,
body .sb-product-card-widget .sb-product-card:has(> a.added_to_cart) > .sb-price {
  grid-column: 1 / -1;
}
body .sb-product-card-widget .sb-product-card:has(> a.added_to_cart) > a.sb-more {
  grid-column: 1;
  width: 100% !important;
  margin-top: 16px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.elementor-kit-4 .sb-product-card-widget a.added_to_cart,
body .sb-product-card-widget a.added_to_cart,
body .sb-product-card-widget a.added_to_cart.wc-forward {
  grid-column: 2;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 42px !important;
  margin: 16px 0 0 !important;
  padding: 8px 18px !important;
  border: 1.5px solid #c5d8e4 !important;
  border-radius: 16px !important;
  background: #fff !important;
  background-image: none !important;
  color: #4a7ba7 !important;
  -webkit-text-fill-color: #4a7ba7 !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-transform: none !important;
  box-shadow: 0 4px 14px rgba(107, 155, 209, 0.12) !important;
}
body.elementor-kit-4 .sb-product-card-widget a.added_to_cart:hover,
body .sb-product-card-widget a.added_to_cart:hover,
body .sb-product-card-widget a.added_to_cart:focus {
  border-color: #6b9bd1 !important;
  color: #4a7ba7 !important;
  -webkit-text-fill-color: #4a7ba7 !important;
  background: #fff !important;
  background-image: none !important;
}

@media (max-width: 991px) {
  .sb-product-card-widget__grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .sb-product-card-widget__grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  body .sb-product-card-widget .sb-product-card__media,
  body .sb-product-card-widget a.sb-product-card__media,
  body .sb-product-card-widget div.sb-product-card__media {
    aspect-ratio: 1 / 1 !important;
    border-radius: 16px !important;
  }
}
@media (max-width: 767px) {
  .body .sb-product-card-widget a.sb-more,
  body .sb-product-card-widget a.sb-more:link,
  body .sb-product-card-widget a.sb-more:visited,
  body.elementor-page .sb-product-card-widget a.sb-more {
    border-radius: 12px !important;
  }
}

@media (max-width: 575px) {
  .sb-product-card-widget {
    max-width: 100%;
  }

  .sb-product-card-widget__grid--2,
  .sb-product-card-widget__grid--3,
  .sb-product-card-widget__grid--4 {
    grid-template-columns: 1fr;
  }

  body .sb-product-card-widget .sb-product-card__media,
  body .sb-product-card-widget a.sb-product-card__media,
  body .sb-product-card-widget div.sb-product-card__media {
    aspect-ratio: 1 / 1 !important;
    border-radius: 14px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .sb-product-card-widget .sb-product-card__media,
  body .sb-product-card-widget a.sb-more {
    transition: none;
  }
}
