/* ============================================================
   product-card.css — card produs (home, produse, categorie, etc.)
   ============================================================ */

.product-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow:
    0 4px 16px rgba(15, 23, 42, 0.06),
    0 1px 3px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-decoration: none;
  color: #0f172a;
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.10),
    0 4px 8px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.product-card:active { transform: scale(0.98); }

html[data-theme="dark"] .product-card {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.65));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
html[data-theme="dark"] .product-image {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02));
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-image img { transform: scale(1.06); }
.product-image > i {
  font-size: 48px;
  color: #22c55e;
  opacity: 0.3;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.4);
  z-index: 2;
}
.product-badge i { font-size: 10px; }

.product-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  transition: color .15s, transform .15s, background .15s;
}
.product-fav:hover {
  color: #ef4444;
  transform: scale(1.1);
  background: #fff;
}
.product-fav:active { transform: scale(0.92); }
.product-fav.active { color: #ef4444; }
html[data-theme="dark"] .product-fav {
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  flex: 1;
}
.product-info h3 {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: inherit;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  letter-spacing: -0.01em;
}
.product-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #94a3b8;
}
.product-brand i { font-size: 10px; color: #22c55e; }

.product-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.product-price .price-current {
  font-size: 17px;
  font-weight: 800;
  color: #16a34a;
  letter-spacing: -0.02em;
  line-height: 1;
}
.product-price .price-old {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
}
html[data-theme="dark"] .product-price .price-current { color: #22c55e; }

.product-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  width: fit-content;
}
.product-status i { font-size: 9px; }
.product-status.in-stock {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #15803d;
}
html[data-theme="dark"] .product-status.in-stock { color: #4ade80; }
.product-status.out-stock {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.product-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  padding: 8px 14px;
  margin-top: 4px;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(34, 197, 94, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform .15s, filter .15s;
}
.product-add:hover { filter: brightness(1.06); }
.product-add:active { transform: scale(0.96); }
.product-add i { font-size: 12px; }
.product-add:disabled {
  background: rgba(148, 163, 184, 0.3);
  box-shadow: none;
  cursor: not-allowed;
  color: #64748b;
}

@media (min-width: 640px) {
  .product-info { padding: 14px; gap: 7px; }
  .product-info h3 { font-size: 14px; }
  .product-price .price-current { font-size: 18px; }
  .product-add { min-height: 40px; font-size: 13px; }
}
@media (min-width: 960px) {
  .product-info { padding: 16px; gap: 8px; }
  .product-info h3 { font-size: 14.5px; }
  .product-price .price-current { font-size: 19px; }
}