/* ============================================
   INDIVIDUAL CATEGORY - DARK/PLAYFUL THEME
   ============================================ */

:root {
  /* CORE THEME VARIABLES */
  --theme-primary-color: #e53e3e;
  --theme-secondary-color: #c53030;
  --theme-accent-color: #ff6b35;
  --theme-background-color: #f8f9fa;
  --theme-text-color: #333333;
  --theme-font-family: 'Poppins', sans-serif;

  /* DERIVED COLORS - DARK MODE */
  --cat-primary: var(--theme-accent-color);
  --cat-primary-600: color-mix(in srgb, var(--theme-accent-color) 85%, #000000);
  --cat-bg-main: color-mix(in srgb, var(--theme-text-color) 10%, #000000);
  --cat-bg-secondary: color-mix(in srgb, var(--theme-text-color) 5%, #000000);
  --cat-text-primary: var(--theme-background-color);
  --cat-text-secondary: color-mix(in srgb, var(--theme-background-color) 90%, #ffffff);
  --cat-text-light: color-mix(in srgb, var(--theme-background-color) 80%, #ffffff);
  --cat-border: color-mix(in srgb, var(--theme-text-color) 20%, #000000);
  --cat-shadow: color-mix(in srgb, var(--theme-accent-color) 8%, rgba(0, 0, 0, 0.4));
  --cat-shadow-xl: color-mix(in srgb, var(--theme-primary-color) 15%, rgba(0, 0, 0, 0.4));
}

/* ============================================
   MAIN CONTAINER & SPACING
   ============================================ */

.category-section {
  padding: 60px 0 80px;
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 50%, #16213e 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.category-section::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(229, 62, 62, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.category-container {
  margin: 0 40px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

@media (max-width: 1000px) {
  .category-container {
    margin: 0 30px;
  }
}

@media (max-width: 640px) {
  .category-container {
    margin: 0 20px;
  }
}

@media (max-width: 480px) {
  .category-container {
    margin: 0 15px;
  }
}

/* ============================================
   HERO SECTION - DARK PLAYFUL
   ============================================ */

.category-hero {
  text-align: center;
  margin-bottom: 60px;
  padding: 60px 40px;
  background: linear-gradient(135deg, #ff6b35 0%, #e53e3e 50%, #c53030 100%);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(255, 107, 53, 0.4), inset 0 0 40px rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 107, 53, 0.5);
  position: relative;
  overflow: hidden;
}

.category-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float-dark 20s ease-in-out infinite;
}

@keyframes float-dark {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(30px) rotate(5deg); }
}

.category-hero-icon {
  font-size: 80px;
  display: inline-block;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  animation: bounce-playful 2s ease-in-out infinite;
}

@keyframes bounce-playful {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.1); }
}

.category-title {
  font-size: 3rem;
  font-weight: 900;
  margin: 0 0 12px;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  letter-spacing: -1px;
}

.category-hero-image {
  max-width: 500px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

.category-short-description {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .category-hero {
    padding: 40px 24px;
    margin-bottom: 40px;
  }

  .category-hero-icon {
    font-size: 64px;
    margin-bottom: 16px;
  }

  .category-hero-image {
    max-width: 100%;
    width: 100%;
  }

  .category-title {
    font-size: 2rem;
  }

  .category-short-description {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .category-hero {
    padding: 32px 16px;
    margin-bottom: 32px;
    border-radius: 16px;
  }

  .category-hero-icon {
    font-size: 48px;
    margin-bottom: 12px;
  }

  .category-hero-image {
    max-width: 100%;
    width: 100%;
  }

  .category-title {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }

  .category-short-description {
    font-size: 0.9rem;
  }

  .category-description-block {
    padding: 24px 16px;
  }

  .category-description-block h2 {
    font-size: 1.2rem;
  }

  .category-full-description {
    font-size: 0.9rem;
  }
}

/* ============================================
   CONTENT GRID (2 COLUMNS)
   ============================================ */

.category-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 80px;
  align-items: start;
}

@media (max-width: 1000px) {
  .category-content-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.category-media {
  margin-bottom: 40px;
}

.category-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2a2a3e 0%, #1f1f2e 100%);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--cat-border);
  color: var(--cat-text-light);
  font-size: 48px;
  overflow: hidden;
  position: relative;
}

.category-image-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 107, 53, 0.1) 50%, transparent 70%);
  animation: shine-dark 3s infinite;
}

@keyframes shine-dark {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.category-image-placeholder p {
  font-size: 0.9rem;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.category-description-block {
  background: var(--cat-bg-main);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 32px var(--cat-shadow);
  margin-bottom: 24px;
  border: 1px solid var(--cat-border);
  position: relative;
  overflow: hidden;
}

.category-description-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6b35, #e53e3e, #ff6b35);
  animation: glow-shift 3s ease-in-out infinite;
}

@keyframes glow-shift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.category-description-block h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--cat-text-primary);
}

.category-full-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--cat-text-secondary);
  margin: 0;
}

.category-featured-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ff6b35 0%, #e53e3e 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 900;
  width: fit-content;
  box-shadow: 0 0 30px rgba(255, 107, 53, 0.4);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.badge-icon {
  font-size: 1.5rem;
  animation: spin 3s linear infinite;
}

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

/* ============================================
   SIDEBAR
   ============================================ */

.category-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.category-stats-card,
.category-seo-card,
.category-nav-card {
  background: var(--cat-bg-main);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px var(--cat-shadow);
  border: 1px solid var(--cat-border);
  position: relative;
  overflow: hidden;
}

.category-stats-card::before,
.category-seo-card::before,
.category-nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6b35, #e53e3e);
}

.category-stats-card h3,
.category-seo-card h3,
.category-nav-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--cat-text-primary);
  background: linear-gradient(135deg, #ff6b35, #e53e3e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 12px;
}

/* Stats List */
.stats-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cat-border);
}

.stat-label {
  font-weight: 600;
  color: var(--cat-text-secondary);
  font-size: 0.9rem;
}

.stat-value {
  font-weight: 800;
  color: #ff6b35;
  font-size: 0.95rem;
}

/* SEO Info */
.seo-item {
  margin-bottom: 16px;
}

.seo-item label {
  font-weight: 700;
  color: var(--cat-text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ff6b35, #e53e3e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.seo-value {
  font-size: 0.9rem;
  color: var(--cat-text-light);
  margin: 0;
  line-height: 1.5;
}

/* Navigation Links */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--cat-bg-secondary);
  border-radius: 8px;
  text-decoration: none;
  color: var(--cat-text-primary);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff6b35, #e53e3e);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-link:hover {
  color: white;
  transform: translateX(4px);
  border-color: #ff6b35;
}

.nav-link:hover::before {
  transform: scaleX(1);
}

.nav-icon {
  font-size: 1.2rem;
}

/* ============================================
   SUBCATEGORIES & PRODUCTS SECTIONS
   ============================================ */

.subcategories-section,
.products-section {
  margin-bottom: 80px;
}

.subcategories-section h2,
.products-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 40px;
  background: linear-gradient(135deg, #ff6b35, #e53e3e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--cat-border);
}

.subcategories-grid,
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.subcategory-card,
.product-card {
  background: var(--cat-bg-main);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 8px 32px var(--cat-shadow);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
  border: 1px solid var(--cat-border);
  position: relative;
  overflow: hidden;
}

.subcategory-card::before,
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff6b35, #e53e3e);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.subcategory-card:hover,
.product-card:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow: 0 0 40px rgba(255, 107, 53, 0.3);
  border-color: #ff6b35;
}

.subcategory-card:hover::before,
.product-card:hover::before {
  transform: scaleX(1);
}

.subcategory-icon,
.product-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.subcategory-card:hover .subcategory-icon,
.product-card:hover .product-icon {
  transform: scale(1.2) rotate(-5deg);
}

.subcategory-card h4,
.product-card h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--cat-text-primary);
}

.subcategory-card p,
.product-card p {
  font-size: 0.9rem;
  color: var(--cat-text-light);
  margin: 0;
}

.no-items {
  text-align: center;
  padding: 40px 20px;
  color: var(--cat-text-light);
  font-style: italic;
}

/* ============================================
   BACK TO CATEGORIES BUTTON
   ============================================ */

.back-to-catalogue-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 107, 53, 0.1);
  color: #ff6b35;
  border: 2px solid #ff6b35;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  margin-bottom: 24px;
  font-weight: 700;
  font-size: 0.9rem;
}

.back-to-catalogue-btn:hover {
  background: linear-gradient(135deg, #ff6b35 0%, #e53e3e 100%);
  color: white;
  border-color: #ff6b35;
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* ============================================
   LOAD MORE BUTTON & LOADING INDICATOR
   ============================================ */

#load-more-container {
  text-align: center;
  padding: 40px 0;
  margin-top: 40px;
  display: block;
}

#load-more-btn {
  padding: 14px 48px;
  background: linear-gradient(135deg, #ff6b35 0%, #e53e3e 100%);
  color: white;
  border: 2px solid #ff6b35;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

#load-more-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.5);
  border-color: #ff6b35;
}

#load-more-btn:active {
  transform: translateY(-2px) scale(1.02);
}

#load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#loading-indicator {
  text-align: center;
  padding: 24px;
  display: none;
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 107, 53, 0.2);
  border-top: 4px solid #ff6b35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loading-indicator p {
  color: var(--cat-text-secondary);
  font-size: 0.95rem;
}

/* ============================================
   NO RESULTS MESSAGE
   ============================================ */

.no-results-message {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: var(--cat-bg-main);
  border-radius: 12px;
  box-shadow: 0 8px 32px var(--cat-shadow);
  text-align: center;
  border: 1px solid var(--cat-border);
}

.no-results-message.no-results-initial {
  display: flex;
}

.no-results-message.no-results-search {
  display: none;
}

.no-results-message.no-results-search.show {
  display: flex;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.no-results-message h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--cat-text-primary);
}

.no-results-message p {
  font-size: 1rem;
  color: var(--cat-text-secondary);
  margin: 0;
}
