/* ============================================================
   ENHANCED PRODUCT CARDS – Categories Page
   Premium card design with hover effects, shadows, and
   polished placeholder fallback for missing images.
   ============================================================ */

/* ─── Card Container ───────────────────────────────────────── */
.product-card-enhanced {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  margin-bottom: 28px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.product-card-enhanced:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04);
  border-color: rgba(13, 110, 253, 0.2);
}

/* ─── Image Area ───────────────────────────────────────────── */
.product-card-enhanced .card-img-wrapper {
  position: relative;
  overflow: hidden;
  background: #f9fafb;
  aspect-ratio: 1 / 1;
}

.product-card-enhanced .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card-enhanced:hover .card-img-wrapper img {
  transform: scale(1.12);
}

/* ─── Labels (HOT / NEW) ──────────────────────────────────── */
.product-card-enhanced .card-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-card-enhanced .badge-tag {
  display: inline-block;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 8px;
  color: #fff;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-card-enhanced .badge-hot {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.product-card-enhanced .badge-new {
  background: linear-gradient(135deg, #10b981, #059669);
}

.product-card-enhanced .badge-sale {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* ─── Quick Actions (Glassmorphism) ─────────────────────────── */
.product-card-enhanced .card-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(105%);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 3;
}

.product-card-enhanced:hover .card-actions {
  transform: translateY(0);
}

.product-card-enhanced .card-actions .action-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card-enhanced .card-actions .action-btn:hover {
  background: #0d6efd;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(13, 110, 253, 0.3);
}

.product-card-enhanced .card-actions .action-btn.btn-view-cat {
  width: auto;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ─── Card Body ────────────────────────────────────────────── */
.product-card-enhanced .card-body {
  padding: 18px 20px;
  flex-grow: 1;
}

.product-card-enhanced .card-category {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6b7280;
  margin-bottom: 8px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-card-enhanced .card-category:hover {
  color: #0d6efd;
}

.product-card-enhanced .card-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px;
  line-height: 1.5;
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card-enhanced .card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-card-enhanced .card-title a:hover {
  color: #0d6efd;
}

/* Price Row */
.product-card-enhanced .card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 5px;
}

.product-card-enhanced .card-price {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  display: flex;
  flex-direction: column;
}

.product-card-enhanced .card-price::before {
  content: 'Price';
  font-size: 10px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: -2px;
}

.product-card-enhanced .card-wishlist {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #9ba3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: none;
  transition: all 0.3s ease;
}

.product-card-enhanced .card-wishlist:hover {
  background: #fee2e2;
  color: #ef4444;
  transform: scale(1.1);
}

/* Outstanding Divider */
.product-card-enhanced .card-body::before {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  background: #0d6efd;
  border-radius: 10px;
  margin-bottom: 12px;
  transition: width 0.3s ease;
}

.product-card-enhanced:hover .card-body::before {
  width: 50px;
  background: linear-gradient(90deg, #0d6efd, #6366f1);
}

/* ─── Responsive adjustments ───────────────────────────────── */
@media (max-width: 767px) {
  .product-card-enhanced {
    margin-bottom: 16px;
    border-radius: 10px;
  }

  .product-card-enhanced .card-body {
    padding: 14px 14px 16px;
  }

  .product-card-enhanced .card-title {
    font-size: 13px;
  }

  .product-card-enhanced .card-price {
    font-size: 16px;
  }

  .product-card-enhanced .card-actions .action-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
}

@media (max-width: 575px) {
  .product-card-enhanced .card-img-wrapper {
    aspect-ratio: 4 / 3;
  }

  .product-card-enhanced .card-category {
    font-size: 10px;
  }

  .product-card-enhanced .card-body::before {
    width: 30px;
  }
}

/* ─── Grid section heading ─────────────────────────────────── */
.category-results-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}

.category-results-info .results-count {
  font-size: 14px;
  color: #6b7280;
  font-weight: 400;
}

.category-results-info .results-count strong {
  color: #1a1a2e;
  font-weight: 600;
}

/* ─── Animations ───────────────────────────────────────────── */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card-enhanced {
  animation: cardFadeIn 0.5s ease forwards;
}

.product-card-enhanced:nth-child(2) { animation-delay: 0.05s; }
.product-card-enhanced:nth-child(3) { animation-delay: 0.10s; }
.product-card-enhanced:nth-child(4) { animation-delay: 0.15s; }
.product-card-enhanced:nth-child(5) { animation-delay: 0.20s; }
.product-card-enhanced:nth-child(6) { animation-delay: 0.25s; }
.product-card-enhanced:nth-child(7) { animation-delay: 0.30s; }
.product-card-enhanced:nth-child(8) { animation-delay: 0.35s; }

/* ─── Empty state ──────────────────────────────────────────── */
.categories-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.categories-empty i {
  font-size: 56px;
  color: #d1d5db;
  margin-bottom: 18px;
}

.categories-empty h4 {
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

/* ─── Homepage Section Headers ─────────────────────────────── */
.section-header-enhanced {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.section-subtitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #6366f1;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.featured-products-section .section-title,
.new-arrivals-section .section-title {
  font-size: 32px !important;
  font-weight: 800 !important;
  color: #111827 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-transform: none !important;
  letter-spacing: -0.5px !important;
}

.section-title-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 10px;
  margin-top: 12px;
  transition: width 0.4s ease;
}

.new-arrival-line {
  background: linear-gradient(90deg, #10b981, #3b82f6);
}

.featured-products-section:hover .section-title-line,
.new-arrivals-section:hover .section-title-line {
  width: 100px;
}

@media (max-width: 767px) {
  .featured-products-section .section-title,
  .new-arrivals-section .section-title {
    font-size: 24px !important;
  }
}
