/* =========================================================
   TU RINCÓN FERRETERO — TARJETAS DE PRODUCTO COMPARTIDAS
   Portada, archivos de productos y productos relacionados.
   Generado desde 20-home.css y 40-single-product.css.
   Los archivos originales permanecen intactos.
   ========================================================= */

/* ============================================
   PRODUCTS GRID
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.products-grid--bestsellers {
  grid-template-columns: repeat(5, 1fr);
}


.product-card {
  border: 2px solid var(--line);
  border-radius: 2px;
  padding: 10px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--line);
  position: relative;
  transition: all .1s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--line);
}

.product-card .product-link { color: inherit; text-decoration: none; display: block; }
.product-card .product-link:hover { text-decoration: none; }

.product-image {
  aspect-ratio: 1/1;
  background:
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(0,0,0,0.05) 8px 9px);
  border: 1.5px dashed var(--muted);
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.product-image img { width: 100%; height: 100%; object-fit: contain; }

.product-brand-sku {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.product-name {
  font-size: 13px;
  line-height: 1.3;
  margin: 4px 0;
  color: var(--ink);
}

.product-price {
  color: var(--accent-pink);
  font-size: 16px;
  font-weight: 700;
  font-family: 'Oswald', sans-serif;
}
.product-price-old {
  color: var(--muted);
  font-size: 11px;
  margin-left: 4px;
  text-decoration: line-through;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent-pink);
  color: #fff;
  border: 1.5px solid var(--line);
  border-radius: 2px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
}

.favorite-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px; height: 28px;
  border: 1.5px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}


.product-image {
  background: #F7F4EE !important;
}
.product-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}
.favorite-btn.in-wishlist { color: #e53935 !important; }
.tu-rincon-wishlist-btn.in-wishlist { border-color: #e53935 !important; color: #e53935 !important; }
.tr-added-to-cart-msg {
  display: inline-block;
  background: #22c55e;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}
