/* ==========================================================
   Component: ProductCard
   Variantes: .cs-product-card--lg | .cs-product-card--sm

   lg → Destaques: 231px × 306px | Figma: 4:15083, 4:15138
   sm → Sala/Decoração: 124px × 123px | Figma: 5:541, 5:577
   ========================================================== */

/* ----- Base ----- */
.cs-product-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: hsl(var(--cs-surface));
  border-radius: var(--cs-radius-2xl);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.cs-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 46, 71, 0.14);
}

/* ----- Large variant ----- */
.cs-product-card--lg {
  width: var(--cs-card-lg-w);
  padding: var(--cs-space-4);
  gap: var(--cs-space-4);
}

.cs-product-card--lg .cs-product-card__image-wrap {
  position: relative;
  width: calc(100% + var(--cs-space-4) * 2);
  height: var(--cs-card-lg-img-h);
  margin: calc(-1 * var(--cs-space-4));
  margin-bottom: 0;
  border-radius: var(--cs-radius-xl) var(--cs-radius-xl) 0 0;
  overflow: hidden;
  flex-shrink: 0;
}

/* ----- Small variant ----- */
.cs-product-card--sm {
  width: var(--cs-card-sm-w);
  border-radius: var(--cs-radius-md);
  padding: 0;
  gap: var(--cs-space-2);
}

.cs-product-card--sm .cs-product-card__image-wrap {
  position: relative;
  width: 100%;
  height: var(--cs-card-sm-h);
  border-radius: var(--cs-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

/* ----- Image ----- */
.cs-product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ----- Price badge ----- */
.cs-product-card__price {
  position: absolute;
  bottom: var(--cs-space-2);
  right: var(--cs-space-3);
  font-family: var(--cs-font-base);
  font-weight: var(--cs-fw-bold);
  font-size: var(--cs-fs-base);
  line-height: var(--cs-lh-tight);
  color: var(--cs-text-on-dark);
  white-space: nowrap;
}

.cs-product-card--lg .cs-product-card__price {
  font-size: var(--cs-fs-lg);
  bottom: var(--cs-space-4);
}

/* ----- Favorite button ----- */
.cs-product-card__favorite {
  position: absolute;
  top: var(--cs-space-2);
  right: var(--cs-space-2);
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--cs-surface));
  transition: transform 0.15s ease, color 0.15s ease;
}

.cs-product-card--lg .cs-product-card__favorite {
  top: var(--cs-space-4);
  right: var(--cs-space-4);
  width: 24px;
  height: 24px;
}

.cs-product-card__favorite:hover {
  transform: scale(1.15);
  color: #e74c3c;
}

.cs-product-card__favorite--active {
  color: #e74c3c;
}

/* ----- Text info ----- */
.cs-product-card__info {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 var(--cs-space-2) var(--cs-space-2);
  box-sizing: border-box;
}

.cs-product-card--lg .cs-product-card__info {
  gap: var(--cs-space-1);
  padding: var(--cs-space-3) 0 0;
}

.cs-product-card--sm .cs-product-card__info {
  gap: 2px;
  padding: 0 var(--cs-space-2) var(--cs-space-2);
}

.cs-product-card__name {
  font-family: var(--cs-font-base);
  font-weight: var(--cs-fw-semibold);
  line-height: var(--cs-lh-tight);
  color: var(--cs-text-primary);
  margin: 0;
}

.cs-product-card--lg .cs-product-card__name {
  font-size: var(--cs-fs-lg);
}

.cs-product-card--sm .cs-product-card__name {
  font-size: var(--cs-fs-sm);
}

.cs-product-card__brand {
  font-family: var(--cs-font-base);
  font-weight: var(--cs-fw-regular);
  line-height: var(--cs-lh-tight);
  color: var(--cs-text-secondary);
  margin: 0;
}

.cs-product-card--lg .cs-product-card__brand {
  font-size: var(--cs-fs-md);
}

.cs-product-card--sm .cs-product-card__brand {
  font-size: var(--cs-fs-xs);
}

/* ==========================================================
   Variant: Decoração (padded card ~133×124 image)
   Figma nodes: 4:15358, 4:15367, 4:15376
   Outer: rounded-[10.382px], padding: 9.228px
   Image: 133px × 124px, rounded-[8px]
   ========================================================== */

.cs-product-card--deco {
  width: auto;
  padding: 9px;
  border-radius: 10px;
  gap: 9px;
}

.cs-product-card--deco .cs-product-card__image-wrap {
  position: relative;
  width: 133px;
  height: 124px;
  border-radius: var(--cs-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.cs-product-card--deco .cs-product-card__price {
  font-size: var(--cs-fs-base);
  bottom: var(--cs-space-2);
  right: var(--cs-space-2);
}

.cs-product-card--deco .cs-product-card__favorite {
  top: var(--cs-space-2);
  right: var(--cs-space-2);
  width: 20px;
  height: 20px;
}

.cs-product-card--deco .cs-product-card__info {
  width: 115px;
  padding: 0;
  gap: 2px;
}

.cs-product-card--deco .cs-product-card__name {
  font-size: var(--cs-fs-sm);
}

.cs-product-card--deco .cs-product-card__brand {
  font-size: var(--cs-fs-xs);
}
