:root {
    /* Color System */
    --color-primary: #4F46E5;
    --color-primary-dark: #4338CA;
    --color-primary-light: #818CF8;
    --color-primary-50: #EEF2FF;
    
    /* Product Type Colors */
    --color-course: #2563EB;
    --color-course-light: #DBEAFE;
    --color-pdf: #DC2626;
    --color-pdf-light: #FEE2E2;
    --color-doc: #059669;
    --color-doc-light: #D1FAE5;
    --color-bundle: #7C3AED;
    --color-bundle-light: #EDE9FE;
    --color-free: #10B981;
    --color-free-light: #D1FAE5;
  
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  }
  
  /* -----------------------------------------------------
     GLOBAL LAYOUT
  ----------------------------------------------------- */
  .catalog-container {
    min-height: 100vh;
    background-color: #F8FAFC;
  }
  
  /* -----------------------------------------------------
     HERO SECTION + WAVE BACKGROUND
  ----------------------------------------------------- */
  .hero-section {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    padding: 6rem 2rem 8rem;
    position: relative;
    overflow: hidden;
  }
  
  .hero-section::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg ...");
    background-size: cover;
    background-position: center;
  }
  
  .hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: white;
  }
  
  .hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #E0E7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 3rem;
  }
  
  /* -----------------------------------------------------
     STATS (catalog-stats)
  ----------------------------------------------------- */
  .catalog-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
  }
  
  .stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s;
  }
  
  .stat-item:hover {
    transform: translateY(-5px);
  }
  
  .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #E0E7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
  }
  
  /* -----------------------------------------------------
     FILTER SECTION (search + filter tags)
  ----------------------------------------------------- */
  .filter-section {
    margin-top: -4rem;
    margin-bottom: 2rem;
    padding: 0 2rem;
  }
  
  .filter-container {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* Search Box */
  .search-box {
    position: relative;
    margin-bottom: 1.5rem;
  }
  
  .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #94A3B8;
  }
  
  .search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #E2E8F0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s;
  }
  
  .search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-50);
    outline: none;
  }
  
  /* Filter Tags */
  .filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .filter-tag {
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    background: #F1F5F9;
    color: #475569;
  }
  
  .filter-tag:hover {
    background: #E2E8F0;
  }
  
  .filter-tag.active {
    background: var(--color-primary);
    color: white;
  }
  
  /* -----------------------------------------------------
     PRODUCTS GRID
  ----------------------------------------------------- */
  .products-section {
    padding: 2rem;
  }
  
  .products-grid {
    /* 3 colonne su schermi grandi, 2 su medi, 1 su piccoli */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* -----------------------------------------------------
     PRODUCT CARD
  ----------------------------------------------------- */
  .product-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* L'immagine in alto, footer in basso */
  }
  
  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
  }
  
  /* Se è un bundle, puoi aggiungere uno stile differente se vuoi */
  .product-card.is-bundle {
    border: 2px solid var(--color-bundle-light);
  }
  
  /* Card Image */
  .card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #E2E8F0; /* Colore di sfondo se l'immagine manca */
  }
  
  .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  /* Card Body */
  .card-body {
    padding: 1.5rem !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  /* Card Header (badge) */
  .card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }
  
  .product-badge {
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  /* Badge Styles by Type */
  .course-badge {
    background: var(--color-course-light);
    color: var(--color-course);
  }
  
  .pdf-badge {
    background: var(--color-pdf-light);
    color: var(--color-pdf);
  }
  
  .doc-badge {
    background: var(--color-doc-light);
    color: var(--color-doc);
  }
  
  .bundle-badge {
    background: var(--color-bundle-light);
    color: var(--color-bundle);
  }
  
  .free-badge {
    background: var(--color-free-light);
    color: var(--color-free);
  }
  
  .product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.4;
  }
  
  .product-description {
    color: #64748B;
    font-size: 0.875rem;
    line-height: 1.6;
  }
  
  /* Bundle Contents */
  .bundle-contents {
    background: #F8FAFC;
    border-radius: 0.5rem;
    padding: 0.75rem;
  }
  
  .bundle-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
  }
  
  .bundle-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .bundle-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    color: #64748B;
    font-size: 0.875rem;
  }
  
  .item-icon {
    width: 1rem;
    height: 1rem;
    color: var(--color-primary);
  }
  
  /* Card Footer */
  .card-footer {
    padding: 1.25rem 1.5rem !important;
    border-top: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  /* Price Section */
  .price-section {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
  }
  
  .original-price {
    color: #94A3B8;
    text-decoration: line-through;
    font-size: 0.875rem;
  }
  
  .current-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1E293B;
  }
  
  /* Action Buttons */
  .action-section {
    display: flex;
    gap: 0.5rem;
  }
  
  .action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    border: none;
  }
  
  .action-button.enrolled {
    background: var(--color-free);
    color: white;
  }
  
  .action-button.purchase {
    background: var(--color-primary);
    color: white;
  }
  
  /* Pulsante secondario (es. "Scopri di più") */
  .action-button.secondary {
    background: #E2E8F0;
    color: #1E293B;
  }
  
  .action-button.login {
    background: #F1F5F9;
    color: #475569;
  }
  
  .action-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
  }
  
  .action-button span {
    margin: 0;
  }
  
  .action-button .button-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s;
  }
  
  .action-button:hover .button-icon {
    transform: translateX(3px);
  }
  
  /* -----------------------------------------------------
     EMPTY STATE
  ----------------------------------------------------- */
  .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    grid-column: 1 / -1;
  }
  
  .empty-icon {
    width: 4rem;
    height: 4rem;
    color: #94A3B8;
    margin-bottom: 1.5rem;
  }
  
  .empty-state h3 {
    color: #1E293B;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
  }
  
  .empty-state p {
    color: #64748B;
    font-size: 1rem;
  }
  
  /* -----------------------------------------------------
     RESPONSIVE DESIGN
  ----------------------------------------------------- */
  @media (max-width: 1024px) {
    .products-grid {
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
  }
  
  @media (max-width: 768px) {
    .hero-title {
      font-size: 2.5rem;
    }
    
    .catalog-stats {
      grid-template-columns: 1fr;
      gap: 1rem;
    }
    
    .filter-container {
      padding: 1rem;
    }
    
    .products-grid {
      grid-template-columns: 1fr;
    }
    
    .card-footer {
      flex-direction: column;
      gap: 1rem;
    }
    
    .action-section {
      width: 100%;
      justify-content: center;
    }
    
    .action-button {
      width: 100%;
      justify-content: center;
    }
  }
  