/* ================= PRODUCT CARD ================= */

.product-card {
  background: #fff;
  border-radius: 1.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}


/* ================= MEDIA ================= */

.product-card__media {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.product-card__ratio {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}


/* ================= IMAGE ================= */

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

@media (max-width: 767px) {
  .product-image {
    transform: scale(1.05);
  }
}


/* ================= OVERLAY ================= */

.product-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(42, 36, 30, 0);
  transition: background 0.5s ease;
}

.product-card:hover .product-card__overlay {
  background: rgba(42, 36, 30, 0.2);
}


/* ================= ICON ================= */

.product-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;

  background: rgba(255,255,255,0.9);
  box-shadow: 0 20px 60px rgba(0,0,0,.08);

  opacity: 0;
  transform: scale(0.9);
  transition: all 0.5s ease;
}

.product-card:hover .product-card__icon {
  opacity: 1;
  transform: scale(1);
}


/* ================= ADD TO CART ================= */

.product-card .add-to-cart-btn {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;

  z-index: 30;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px 0;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  background: var(--sakura);
  color: var(--text-primary);

  border-radius: 999px;
  border: none;

  transform: translateY(100%);
  opacity: 0;

  transition: all 0.4s ease;

  overflow: hidden;
}

.product-card:hover .add-to-cart-btn {
  transform: translateY(0);
  opacity: 1;
}

.product-card .add-to-cart-btn:hover {
  background: var(--bronze);
  color: #fff;
}

.product-card .add-to-cart-btn.sold-out {
  background: var(--bronze);
  color: #fff;
  cursor: default;
}

/* SHINE EFFECT */
.product-card .add-to-cart-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.6),
    transparent
  );
  transform: skewX(-20deg);
  transition: all 0.8s ease;
}

.product-card .add-to-cart-btn:hover::after {
  left: 130%;
}

/* MOBILE FIX (щоб не мигала і не залипала) */
@media (max-width: 767px) {
  .product-card .add-to-cart-btn {
    display: none;
  }
}

/* ================= INFO ================= */

.product-card__info {
  margin-top: 10px;
  padding: 0 10px;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  min-height: 60px;
}

.product-title {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--text-primary);

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  margin-bottom: 4px;
}

.product-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--matcha);
  letter-spacing: 0.02em;
}


/* ================= MOBILE ================= */

@media (max-width: 767px) {

  .product-card {
    border-radius: 1.25rem;
  }

  .product-card__info {
    margin-top: 8px;
    padding: 0 8px;
    min-height: 55px;
  }

  .product-title {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 400;
    margin-bottom: 3px;
  }

  .product-price {
    font-size: 12px;
    font-weight: 500;
  }

}
