/* Product card component (product-card.css) */
/* Based on user's Uiverse.io card, adapted for WooCommerce loop */

/* Card base - make flexible to fit grid item width */
.card {
  width: 100%;
  padding: .8em;
  background: #f5f5f5;
  position: relative;
  overflow: visible;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  border-radius: .5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
}

/* Image area - use background image when available */
.card-img {
  background-color: #ffcaa6;
  height: 140px;
  width: 100%;
  border-radius: .5rem;
  transition: .3s ease;
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

/* Card info area */
.card-info {
  padding-top: .6rem;
  flex: 1 1 auto;
}

svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Footer */
.card-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #ddd;
  flex: 0 0 auto;
}

/* Text */
.text-title {
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 .25rem 0;
}

.text-body {
  font-size: .9rem;
  padding-bottom: 10px;
  margin: 0;
  color: #555;
}

/* Button */
.card-button {
  border: 1px solid #252525;
  display: inline-flex;
  padding: .35em;
  cursor: pointer;
  border-radius: 50px;
  transition: .3s ease-in-out;
  background: transparent;
  align-items: center;
  justify-content: center;
}

/* Hover effects */
.card-img:hover {
  transform: translateY(-6%);
  box-shadow: rgba(226, 196, 63, 0.25) 0px 13px 47px -5px,
              rgba(180, 71, 71, 0.3) 0px 8px 16px -8px;
}

.card-button:hover {
  border: 1px solid #ffcaa6;
  background-color: #ffcaa6;
}

/* Ensure add-to-cart link/button inside looks proper */
.card .button,
.card-button a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: none;
  padding: 0;
}

/* Small adjustments for very small screens */
@media (max-width: 420px) {
  .card-img {
    height: 120px;
  }
  .text-title {
    font-size: 1rem;
  }
}
