/* --- Card layout --- */
.product-card {
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  margin-bottom: 10px;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.product-media {
  background: linear-gradient(135deg, #f7f9fc, #eef6ff);
  position: relative;
  text-align: center;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.ribbon {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #ff5e57;
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.product-body {
  padding: 14px;
}
.product-title {
  font-weight: 600;
  margin: 0 0 6px;
  font-size: 16px;
}
.product-desc {
  color: #888;
  font-size: 13px;
  margin-bottom: 10px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price {
  font-weight: 700;
  font-size: 18px;
}
.old-price {
  color: #bbb;
  font-size: 13px;
  text-decoration: line-through;
  margin-left: 8px;
}

.rating {
  color: #ffb400;
  font-size: 13px;
}

.cart-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.qty-input {
  width: 88px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e6e6e6;
}
.qty-input button {
  border: 0;
  background: transparent;
  /* padding: 8px 10px; */
  cursor: pointer;
}
.qty-input input {
  border: 0;
  text-align: center;
  width: 40px;
  padding: 6px 0;
}

.btn-add {
  border-radius: 6px;
}
.in-cart {
  background: #f44336;
  border-color: #f44336;
  color: #fff;
}

.cart-badge {
  position: absolute;
  right: -80px;
  top: 25px;
  z-index: 1050;
}

@media (max-width: 480px) {
  .product-media {
    height: 140px;
  }
}

@media (max-width: 768px) {
  .cart-badge {
    position: absolute;
    right: 80px;
    top: 15px;
    z-index: 1050;
  }
}
