/* BE-CLONE — Product Card
   Shopify: .product-grid-item
   Aspect ratio: var(--product-media-ratio) = 150%
   Grid: 4 col desktop, 3 tablet, 2 mobile
   Background: #f6f6f6
   ========================================= */

.be-product-card {
  position: relative;
  text-align: center;
}

.be-product-card__link {
  display: block;
  color: inherit;
}

/* ── Media Container ── */
.be-product-card__media {
  position: relative;
  overflow: hidden;
  background: #f6f6f6;
  padding-top: var(--product-media-ratio);
}

.be-product-card__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.be-product-card__img--primary {
  z-index: 1;
  transition: opacity var(--dur-med) var(--ease);
}

.be-product-card__img--secondary {
  z-index: 0;
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease);
}

.be-product-card:hover .be-product-card__img--primary,
.be-product-card:focus-within .be-product-card__img--primary {
  opacity: 0;
}

.be-product-card:hover .be-product-card__img--secondary,
.be-product-card:focus-within .be-product-card__img--secondary {
  opacity: 1;
}

/* ── Badges ── */
.be-product-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.be-badge {
  display: inline-block;
  padding: 4px 6px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: var(--font-weight-regular);
  text-transform: var(--caps-label);
  letter-spacing: 0.05em;
  border-radius: var(--radius-badge);
  line-height: 1.3;
}

.be-badge--sale {
  background-color: var(--color-sale);
  color: var(--color-btn-text);
}

.be-badge--sold {
  background-color: var(--color-accent);
  color: var(--color-btn-text);
}

/* ── Body (title + price inline like Shopify) ── */
.be-product-card__body {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 0;
  flex-wrap: wrap;
}

.be-product-card__title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  text-transform: var(--caps-heading);
  letter-spacing: var(--ls-heading);
  color: var(--color-heading);
  margin: 0 0 4px;
  line-height: 1.2;
}

.be-product-card__price {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-light);
  margin: 0;
}

.be-product-card__price del {
  opacity: 0.6;
  margin-right: 4px;
}

.be-product-card__price ins {
  text-decoration: none;
  color: var(--color-sale);
}

/* ── CTA (Quick Buy) ── */
.be-product-card__cta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-med) var(--ease),
              transform var(--dur-med) var(--ease);
  pointer-events: none;
}

.be-product-card:hover .be-product-card__cta,
.be-product-card:focus-within .be-product-card__cta {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.be-product-card__cta .button,
.be-product-card__cta .add_to_cart_button,
.be-product-card__cta .added_to_cart {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  border: none;
  font-family: var(--font-button);
  font-size: calc(1rem * 0.75);
  text-transform: var(--caps-button);
  letter-spacing: var(--ls-button);
  text-align: center;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}

.be-product-card__cta .button:hover,
.be-product-card__cta .add_to_cart_button:hover {
  background: var(--color-text-light);
}
