.sgsy-cards-block {
  flex: 1 1 300px;
  min-width: 169px;
  max-width: 350px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  position: relative;
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
  background-color: var(--card-color);
  border-radius: 16px;
}
.sgsy-cards-image {
  position: relative;
  overflow: hidden;
  height: 100%;
  margin-bottom: 0;
  display: block;
  border: none;
  padding: 0;
  border-radius: 16px;
}
.sgsy-cards-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  border: none;
  padding: 0;
  border-radius: 16px;
}
.sgsy-cards-image img.object-fit--contain {
  object-fit: contain;
}
.sgsy-cards-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  --label-height: 60px;
  /* Shared with .sgsy-cards-label-link below. The button now keeps its full,
     final size at all times (see below) — only this box's own height ever
     animates, so there's a single moving quantity instead of the box height
     and the button's own max-height/margin racing each other. */
  --card-reveal-timing: 0.35s cubic-bezier(0.4,0,0.2,1);
  height: var(--label-height);
  opacity: 1;
  background: var(--block-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.75rem .5rem;
  overflow: hidden;
  pointer-events: none;
  transition: height var(--card-reveal-timing), background-color 0.3s ease;
  z-index: 10;
  margin: 0;
}
.sgsy-cards-label.two-line-title {
  --label-height: 96px;
  line-height: normal;
  justify-content: center;
}
.sgsy-cards-label.has-subtitle {
  --label-height: 80px;
}
.sgsy-cards-label.has-button {
  padding-top: 0.75rem;
}
.sgsy-cards-label-title {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: normal;
  color: #fff;
  text-align: center;
  margin: 0; 
}
.sgsy-cards-label.is-product .sgsy-cards-label-title {
  font-size: 18px;
  white-space: nowrap;
}
@media screen and (max-width: 767px) {
  .sgsy-cards-label.is-product .sgsy-cards-label-title {
    font-size: 16px;
    line-height: 1.1;
  }
}

.sgsy-cards-label-subtitle {
  display: block;
  font-size: 18px;
  font-weight: 400;
  color: #fff;
  text-align: center;
  margin: 0.15rem 0 0; 
  white-space: nowrap;
}
.product-details-wrapper .sgsy-cards-label-subtitle {
  font-size: 16px;
}
@media screen and (max-width: 767px) {
  .product-details-wrapper .mobile-columns-1 .sgsy-cards-label-subtitle {
    font-size: 18px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1300px) {
  .sgsy-cards-label.is-product .sgsy-cards-label-title {
    font-size: 15px;
  }
  .sgsy-cards-label.two-line-title {
    height: 72px;
  }
  .sgsy-cards-label-subtitle {
    font-size: 13px;
    margin-top: 0;
  }
  .sgsy-cards-label {
    padding-left: .5rem;
    padding-right: .5rem;
  }
}
@media screen and (max-width: 767px) {
  .sgsy-cards-label-title {
    font-size: 18px;
  }
  .product-details-wrapper .mobile-columns-1 .sgsy-cards-label-title {
    font-size: 24px;
  }
  .sgsy-cards-label-subtitle {
    font-size: 14px;
    margin-top: 0;
  }
  .sgsy-cards-label {
    padding-left: .5rem;
    padding-right: .5rem;
  }
}
.sgsy-cards-label-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0.6rem;
  padding: 0.4rem 1.1rem;
  min-height: 45px;
  border-radius: 999px;
  font-size: 20px;
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--card-reveal-timing);
}
.product-details-wrapper .sgsy-cards-label-link {
  font-size: 18px;
}
@media screen and (min-width: 769px) and (max-width: 969px) {
  .sgsy-cards-label-link {
    font-size: 15px;
  }
  .product-details-wrapper .sgsy-cards-label-link {
    font-size: 15px;
  }
}
@media screen and (max-width: 767px) {
  .sgsy-cards-list:not(.mobile-columns-1) .sgsy-cards-label-link {
    font-size: 14px;
  }
}
.sgsy-cards-label-link:not(.target-link) {
  background: #fff;
  color: var(--color-main-accent);
}
.sgsy-cards-label-link.target-link {
  /* Colors only, matching .btn.target-link's non-inverse look — this class
     doesn't carry .btn's sizing/padding, only its own. */
  background: #fff;
  color: var(--text-color);
}
.sgsy-cards-label-link.target-link:hover {
  background: #c00;
  color: #fff;
}
@media screen and (max-width: 767px) {
  .mobile-columns-2 .sgsy-cards-label-link.target-link {
    font-size: 14px;
  }
}
/* Card click-target stacking, low to high:
   1  overlay-link - invisible whole-card link, sits behind everything else
   2  label-link    - the optional per-card button, wins over the label via its own z-index
   10 label         - title/subtitle/background; pointer-events:none so clicks fall through to the overlay-link
   11 badge         - small decorative corner graphic, always on top */
.sgsy-cards-overlay-link {
  display: block;
}
.sgsy-cards-overlay-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.sgsy-cards-block-link {
  position: relative;
  flex: 0 0 calc(25% - 1.5rem);
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}
.more-than-4 .sgsy-cards-block-link {
  flex: 0 0 calc(23% - 1.5rem);
}
.sgsy-cards-list-3 .sgsy-cards-block-link {
  flex: 0 0 calc(33.33% - 3.5rem);
}
@media screen and (min-width: 768px) {
  .product-details-wrapper .sgsy-cards-block-link {
    min-width: 192px;
  }
}

@media screen and (max-width: 767px) {
  .product-details-wrapper .mobile-scroll .sgsy-cards-block-link {
    min-width: 80%;
  }
}
.sgsy-cards-block-link:hover .sgsy-cards-label:not(.has-button),
.sgsy-cards-block-link:focus-within .sgsy-cards-label:not(.has-button) {
  height: 100% !important;
  background-color: rgba(var(--block-color-rgb), 0.75) !important;
  justify-content: center;
}
.sgsy-cards-block-link:hover .sgsy-cards-label.has-button,
.sgsy-cards-block-link:focus-within .sgsy-cards-label.has-button {
  height: calc(var(--label-height) + 50px);
}
.sgsy-cards-block-link:hover .sgsy-cards-label-link,
.sgsy-cards-block-link:focus-within .sgsy-cards-label-link {
  opacity: 1;
  pointer-events: auto;
}
.sgsy-cards-label-link .icon-target {
  display: block;
}
@media (max-width: 768px) {
  .sgsy-cards-list:not(.mobile-scroll) .sgsy-cards-block-link {
    flex: 0 0 calc( 50% - .5rem);
  }
  .sgsy-cards-list.mobile-columns-1:not(.mobile-scroll) .sgsy-cards-block-link {
    flex: 0 0 100%;
  }
  .sgsy-variant-switcher .sgsy-cards-list.mobile-columns-1:not(.mobile-scroll) .sgsy-cards-block {
    aspect-ratio: .9;
  }
  .sgsy-cards-list:not(.mobile-scroll) .sgsy-cards-block {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
  .sgsy-cards-block {
    min-width: 75vw;
    max-width: 75vw;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .sgsy-cards-label {
    transition: none !important;
  }
  .sgsy-cards-label-link,
  .sgsy-cards-label-title {
    transition: none !important;
  }
  .sgsy-cards-block-link:hover .sgsy-cards-label:not(.has-button),
  .sgsy-cards-block-link:focus-within .sgsy-cards-label:not(.has-button),
  .sgsy-cards-label:not(.has-button) {
    height: 60px !important;
  }
  /* Prevent label from covering image on hover/focus on mobile */
  .sgsy-cards-block-link:hover .sgsy-cards-label:not(.has-button),
  .sgsy-cards-block-link:focus-within .sgsy-cards-label:not(.has-button) {
    background-color: var(--block-color) !important;
    justify-content: flex-start !important;
  }
  /* Button-enabled cards: always show the full label (title/subtitle/button), no hover needed */
  .sgsy-cards-label.has-button {
    height: auto !important;
    justify-content: flex-end;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }
  .sgsy-cards-label.has-button .sgsy-cards-label-link {
    padding-top: 2px;
    padding-bottom: 2px;
    opacity: 1;
    pointer-events: auto;
    margin-top: 0.25rem;
  }
  .sgsy-cards-label-link .icon-target {
    transform: none;
    width: 23px;
    height: 23px;
  }
  .sgsy-cards-block-link:hover .sgsy-cards-label-title,
  .sgsy-cards-block-link:focus-within .sgsy-cards-label-title,
  .sgsy-cards-block-link:hover .sgsy-cards-label-link,
  .sgsy-cards-block-link:focus-within .sgsy-cards-label-link {
    opacity: 1;
  }
}

.sgsy-cards-badge {
  position: absolute;
  top: 0;
  right: 0;
  height: auto;
  z-index: 11;
}
@media screen and (min-width: 768px) {
  .sgsy-cards-badge {
    transform: translate(1.75rem, -45%);
  }
}
@media screen and (max-width: 767px) {
  .sgsy-cards-list.has-badge:not(.mobile-scroll) {
    overflow-x: visible;
  }
  .sgsy-cards-list.has-badge:not(.mobile-scroll) .sgsy-cards-badge {
    top: -2rem;
    right: -1rem;
  }
  .mobile-scroll .sgsy-cards-badge {
    top: .25rem;
    right: .25rem;
  }
}
