/* ============================================================
   Product Card CSS — SmartHub IT Store (Modernized)
   ============================================================ */

.product-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px -6px rgba(37, 99, 235, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  border-color: #93c5fd;
}

/* ── Wishlist Heart ──────────────────────────────────────────── */
.product-card__wish {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.product-card__wish:hover {
  background: #ffffff;
  border-color: #fca5a5;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.18);
}
.product-card__wish svg {
  width: 16px;
  height: 16px;
  stroke: #94a3b8;
  fill: transparent;
  transition: all 0.2s ease;
}
.product-card__wish.is-wishlisted svg {
  stroke: #ef4444;
  fill: #ef4444;
}
.product-card__wish:hover svg {
  stroke: #ef4444;
}

/* ── Image Wrap ──────────────────────────────────────────────── */
.product-card__img-wrap {
  position: relative;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #f1f5f9;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  overflow: hidden;
  text-decoration: none;
}
.product-card__img-wrap .product-img {
  max-height: 150px;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.04));
}
.product-card:hover .product-card__img-wrap .product-img {
  transform: scale(1.07);
}

/* Brand badge */
.product-card__brand-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* "NEW" ribbon */
.product-card__ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* ── Body ────────────────────────────────────────────────────── */
.product-card__body {
  padding: 16px 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-card__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-decoration: none;
  min-height: 2.75rem;
  transition: color 0.15s ease;
}
.product-card__name:hover {
  color: #2563eb;
}
.product-card__sku {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
  margin-top: -2px;
}

/* Pricing Section */
.product-card__prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.product-card__price {
  font-size: 1.22rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.product-card__old-price {
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
}
.product-card__discount {
  font-size: 0.7rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: auto;
}

/* Stock Badges with Dot Indicator */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  width: fit-content;
}
.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.badge--in {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.badge--in .badge__dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}
.badge--low {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge--low .badge__dot {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}
.badge--out {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.badge--out .badge__dot {
  background: #ef4444;
}

/* ── Footer / Actions ────────────────────────────────────────── */
.product-card__footer {
  padding: 6px 16px 16px;
  display: flex;
  flex-direction: column;
}
.product-card__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modern Stepper */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  height: 40px;
  background: #f8fafc;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}
.qty-stepper:focus-within {
  border-color: #3b82f6;
  background: #ffffff;
}
.qty-stepper button {
  width: 32px;
  height: 40px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.qty-stepper button:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.qty-stepper input {
  width: 34px;
  height: 40px;
  text-align: center;
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  background: transparent;
  -moz-appearance: textfield;
  padding: 0;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* Add to Cart Button */
.product-card__atc {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.product-card__atc:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.product-card__atc:active:not(:disabled) {
  transform: translateY(0);
}
.product-card__atc:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  cursor: not-allowed;
  box-shadow: none;
}
.product-card__atc svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.product-card__atc.loading {
  position: relative;
  color: transparent;
}
.product-card__atc.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* B2B WhatsApp Action Button */
.product-card__action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.b2b-btn-wa {
  width: 100%;
  height: 36px;
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
  transition: all 0.2s ease;
  font-family: inherit;
  margin-top: 8px;
}
.b2b-btn-wa:hover {
  background: #1eb954;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}
.b2b-btn-wa svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .product-card {
    border-radius: 14px;
  }
  .product-card__body {
    padding: 12px 12px 6px;
    gap: 6px;
  }
  .product-card__name {
    font-size: 0.84rem;
    min-height: 2.5rem;
  }
  .product-card__price {
    font-size: 1.05rem;
  }
  .product-card__old-price {
    font-size: 0.75rem;
  }
  .product-card__footer {
    padding: 4px 12px 12px;
  }
  .product-card__atc {
    font-size: 0.78rem;
    height: 36px;
    gap: 4px;
  }
  .qty-stepper {
    height: 36px;
  }
  .qty-stepper button {
    width: 26px;
    height: 36px;
  }
  .qty-stepper input {
    width: 26px;
    height: 36px;
    font-size: 0.82rem;
  }
  .product-card__img-wrap {
    height: 155px;
    padding: 14px;
  }
}


