/* Category Page Comprehensive Improvements */

/* Loading Skeletons */
.skeleton-loader {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.skeleton-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 12px;
  margin-bottom: 12px;
}

.skeleton-text {
  height: 16px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text.title {
  width: 80%;
  height: 20px;
}

.skeleton-text.price {
  width: 40%;
  height: 24px;
}

@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 20px;
  margin: 40px 0;
}

.empty-state-icon {
  font-size: 80px;
  color: #cbd5e1;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.empty-state h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 16px;
  color: #64748b;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn-reset-all {
  padding: 12px 32px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-reset-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Product Image Hover Zoom */
.product-card .product-image {
  overflow: hidden;
  border-radius: 12px;
}

.product-card .product-image img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

/* Active Filter Tags */
.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  min-height: 52px;
  align-items: center;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  transition: all 0.2s ease;
  animation: tagSlideIn 0.3s ease;
}

@keyframes tagSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.filter-tag-label {
  color: #64748b;
  font-weight: 600;
}

.filter-tag-value {
  color: #2563eb;
}

.filter-tag-remove {
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.2s ease;
  font-size: 14px;
}

.filter-tag-remove:hover {
  color: #ef4444;
}

.clear-all-tags {
  color: #ef4444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.clear-all-tags:hover {
  background: #fee2e2;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item:hover {
  color: #2563eb;
}

.breadcrumb-item.active {
  color: #1e293b;
  font-weight: 600;
}

.breadcrumb-separator {
  color: #cbd5e1;
  font-size: 12px;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

/* Lazy Loading Images */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Quick View Modal */
.quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.quick-view-modal.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.quick-view-content {
  background: #ffffff;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quick-view-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-view-close:hover {
  background: #ffffff;
  transform: rotate(90deg);
}

/* Mobile Sticky Filter Button */
.mobile-filter-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  padding: 14px 28px;
  border: none;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
  0% { transform: translateX(-50%) scale(0); }
  50% { transform: translateX(-50%) scale(1.1); }
  100% { transform: translateX(-50%) scale(1); }
}

.filter-badge {
  background: #ffffff;
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

/* Recently Viewed */
.recently-viewed-section {
  margin-top: 60px;
  padding: 40px 0;
  background: #f8fafc;
  border-radius: 20px;
}

.recently-viewed-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 0 20px;
}

.recently-viewed-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.recently-viewed-header i {
  font-size: 24px;
  color: #2563eb;
}

.recently-viewed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 0 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-filter-toggle {
    display: flex;
  }
  
  .filter-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    bottom: 0;
    z-index: 100;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    overflow-y: auto;
    transition: left 0.3s ease;
    border-radius: 0;
  }
  
  .filter-sidebar.mobile-active {
    left: 0;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  }
  
  .scroll-to-top {
    bottom: 80px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  .quick-view-content {
    max-height: 85vh;
  }
  
  .empty-state {
    padding: 60px 20px;
  }
  
  .empty-state-icon {
    font-size: 60px;
  }
  
  .breadcrumb-nav {
    font-size: 13px;
    gap: 6px;
  }
  
  .active-filter-tags {
    flex-direction: column;
    align-items: stretch;
  }
  
  .recently-viewed-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
