/* ================================
   CATEGORY PAGE STYLES
   ================================ */

/* Breadcrumb */

.breadcrumb {
  background: var(--bg-elev-1);
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumb-list li:not(:last-child)::after {
  content: '›';
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-list a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-list a:hover {
  color: var(--accent);
}

.breadcrumb-list li[aria-current='page'] {
  color: var(--text);
  font-weight: 600;
}

/* Hero */

.category-hero {
  background: var(--bg-elev-1);
  padding: 4rem 0;
  text-align: center;
}

.category-hero-title {
  font-size: clamp(2.5rem, 6vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.category-hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Product listing */

.category-products-section {
  padding: 4rem 0;
}

.category-products-header {
  text-align: center;
  margin-bottom: 3rem;
}

.category-products-header h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.category-products-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

.category-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.category-product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev-1);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.category-product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-elev-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-product-media img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.category-product-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.category-product-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-product-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: none;
}

.category-product-description {
  color: var(--text-muted);
  line-height: 1.5;
  min-height: 3.6rem;
}

.category-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.category-product-price {
  font-weight: 700;
  color: var(--accent);
}

.category-product-actions {
  display: flex;
  justify-content: flex-start;
}

.category-product-actions .btn-primary {
  padding: 0.75rem 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0;
}

/* Loading & error states */

.category-page-loading,
.category-page-error {
  padding: 4rem 0;
  text-align: center;
}

.loading-content,
.error-message {
  display: inline-flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  padding: 2rem 3rem;
  background: var(--bg-elev-1);
  border-radius: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Related categories */

.related-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.related-category-card {
  background: var(--bg-elev-1);
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.related-category-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.related-category-image {
  aspect-ratio: 4 / 3;
  background: var(--bg-elev-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-category-image img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.related-category-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.related-category-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-category-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.related-category-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Responsive */

@media (max-width: 1024px) {
  .category-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .category-hero {
    padding: 3rem 0;
  }

  .category-products-section {
    padding: 3rem 0;
  }

  .category-product-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .category-product-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

