/* Product card */

.vsc-main > .vsc-product-card {
  max-width: min(280px, calc(100% - 2 * var(--vsc-content-pad, 16px)));
  margin: 24px auto;
  width: 100%;
  box-sizing: border-box;
}

.vsc-row__col > .vsc-product-card {
  max-width: 280px;
  width: 100%;
  margin: 0;
  height: 100%;
}

.vsc-product-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--color-border-muted, #ececec);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg-surface, #fafafa);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 250ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1)),
    border-color 250ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1));
}

.vsc-product-card--linked {
  cursor: pointer;
}

.vsc-product-card:hover,
.vsc-product-card:focus-visible {
  box-shadow: 0 8px 24px rgba(32, 42, 68, 0.16);
}

.vsc-product-card--linked:focus-visible {
  outline: 2px solid var(--color-brand-primary, #d42c31);
  outline-offset: 2px;
}

.vsc-product-card__media {
  position: relative;
  width: 100%;
  height: 180px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--color-bg-muted, #ececec);
}

.vsc-product-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vsc-product-card__cta {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: calc(100% - 32px);
  padding: var(--spacing-8, 8px);
  border-radius: var(--radius-pill, 999px);
  background: var(--color-brand-primary, #d42c31);
  color: var(--color-text-inverse, #fafafa);
  overflow: hidden;
  transition: gap 200ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1)),
    padding 200ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1));
}

.vsc-product-card:hover .vsc-product-card__cta,
.vsc-product-card:focus-visible .vsc-product-card__cta {
  gap: 8px;
  padding: var(--spacing-8, 8px) var(--spacing-12, 12px);
}

.vsc-product-card__cta-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: currentColor;
}

.vsc-product-card__cta-icon svg {
  display: block;
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.vsc-product-card__cta-label {
  display: inline-block;
  max-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 12px;
  line-height: 14px;
  color: inherit;
  opacity: 0;
  transition: max-width 200ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1)),
    opacity 200ms var(--cubic-bezier, cubic-bezier(0.4, 0, 0.2, 1));
}

.vsc-product-card:hover .vsc-product-card__cta-label,
.vsc-product-card:focus-visible .vsc-product-card__cta-label {
  max-width: 12em;
  opacity: 1;
}

.vsc-product-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-8, 8px);
  flex: 1 1 auto;
  padding: var(--spacing-16, 16px);
  overflow: hidden;
}

.vsc-product-card__title {
  margin: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 15px;
  line-height: normal;
  color: var(--color-text-primary, #222);
}

.vsc-product-card__text {
  margin: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-weight: 400;
  font-size: 13px;
  line-height: 20px;
  color: var(--color-text-secondary, #6f6f6f);
}

@media (max-width: 768px) {
  .vsc-main > .vsc-product-card {
    max-width: calc(100% - 2 * var(--vsc-content-pad, 16px));
  }

  .vsc-row__col > .vsc-product-card,
  .vsc-product-card {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vsc-product-card,
  .vsc-product-card__cta,
  .vsc-product-card__cta-label {
    transition: none;
  }
}
