/* =============================
   PRODUCT CARD - MYBODY
   ============================= */

/* --- ESTRUCTURA GENERAL --- */
.product-card {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: #fcfcfc;
  margin-bottom: 0;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.22s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 18px 12px 18px 12px;
}
.product-card:hover {
  box-shadow: 0 12px 36px rgba(202,0,39,0.18);
  transform: translateY(-8px) scale(1.035);
  
  background: #fff;
}

/* --- GRADIENTE DE BORDE EN HOVER --- */
.product-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  z-index: -1;
  background: none;
  pointer-events: none;
  transition: background 0.25s;
}
.product-card:hover::before {
  background: linear-gradient(135deg, #CA0027 0%, #fff 80%);
  border-radius: 16px;
  z-index: -1;
}

/* --- BORDE GRADIENTE INTERIOR EN HOVER --- */
.product-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  border: 5px solid transparent; /* Ancho del borde gradiente */
  background-clip: padding-box;
  overflow: visible;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  /* El truco: el gradiente solo se verá en el borde gracias a mask */
  background: linear-gradient(135deg, #CA0027 0%, #fff 80%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0) border-box;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  mask:
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0) border-box;
  mask-composite: exclude;
}

.product-card:hover::before {
  opacity: 0;
}

/* --- IMAGEN DEL PRODUCTO --- */
.product-card .product-image {
  width: 100%;
  aspect-ratio: 1/1; /* cuadrado, puedes probar 4/3 si prefieres */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  border-radius: 8px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.2s;
  display: block;
  max-width: none;
  max-height: none;
}
.product-card .product-image:hover img {
  transform: scale(1.035);
}

/* --- BADGE "MY" --- */
.product-card .product-new {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #CA0027;
  color: #fff;
  font-size: 11px;
  padding: 5px 7px;
  border-radius: 25px;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 2;
}

/* --- TÍTULO DEL PRODUCTO --- */
.product-card .product-title-custom {
  font-size: 1.22rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 2px 0;
  text-align: left;
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.18;
  max-height: 2.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-card .product-title-custom a {
  color: #222 !important;
  text-decoration: none;
  pointer-events: none;
  cursor: default;
}

/* --- CATEGORÍA Y SUBCATEGORÍA --- */
.product-category-line {
  color: #444;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 8px;
  margin-bottom: 0;
}
.product-category-link {
  color: #444;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.18s, text-decoration 0.18s;
}
.product-category-link:hover, .product-category-link:focus {
  color: #CA0027 !important;
  text-decoration: underline;
}
.product-subcategory-line {
  color: #b0b0b0;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  margin-top: 2px;
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0.01em;
}
.product-subcategory-link {
  color: #b0b0b0;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.18s, text-decoration 0.18s;
}
.product-subcategory-link:hover, .product-subcategory-link:focus {
  color: #CA0027 !important;
  text-decoration: underline;
}

/* --- DESCRIPCIÓN Y LAYOUT INTERNO --- */
.product-card .product-description {
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  gap: 4px;
}

/* --- PRECIO --- */
.product-price {
  font-size: 1.18rem;
  color: #CA0027;
  font-weight: bold;
  background: #f7f7f7;
  border-radius: 6px;
  padding: 3px 10px;
  margin: 4px 0 0 0;
  display: inline-block;
  text-align: center;
  letter-spacing: 0.01em;
}

/* --- BOTÓN VER MÁS --- */
.btn-ver-mas {
  display: block;
  width: 100%;
  margin: 10px 0 0 0;
  padding: 9px 0;
  background: #CA0027;
  color: #fff !important;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(202,0,39,0.08);
}
.btn-ver-mas:hover, .btn-ver-mas:focus {
  background: #a8001f;
  color: #fff !important;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(202,0,39,0.13);
}

/* --- FILA INFERIOR: BOTÓN WHATSAPP --- */
.product-bottom-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
}
.product-contact .btn {
  min-width: 120px;
  font-size: 15px;
  background: #25D366;
  color: #444 !important;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(37,211,102,0.08);
  transition: background 0.2s;
  margin: 0 auto;
  padding: 7px 0 7px 0;
}
.product-contact .btn:hover {
  background: #128C7E;
  color: #fff !important;
}
.product-contact .fa-whatsapp, .product-contact img {
  font-size: 20px !important;
  width: 22px;
  height: 22px;
  margin-right: 4px;
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
  .col-lg-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
@media (max-width: 767px) {
  .col-md-4, .col-lg-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .product-card {
    padding: 12px;
  }
  .product-card .product-image img {
    max-height: 90px;
  }
}