/* ===== PRODUCTS (mobile-first) ===== */
.products {
  padding: var(--spacing-2xl) 0;
  background:
      linear-gradient(135deg, rgba(139,92,246,0.08) 0%, transparent 50%),
      linear-gradient(225deg, rgba(6,182,212,0.06) 0%, transparent 50%),
      var(--background-light);
    position: relative;
    isolation: isolate;
  }
  
  .products__rail-wrap {
    position: relative;
    margin-top: var(--spacing-xl);
  }
  
  .products__rail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    padding: var(--spacing-md) 0;
  }
  
  @media (max-width: 768px) {
    .products__rail {
      display: flex;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      grid-template-columns: none;
    }
  }
  .products__rail::-webkit-scrollbar { height: 8px; }
  .products__rail::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-full);
  }
  
  /* Nav arrows */
  .products__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    inset-inline-start: -6px;
    z-index: 2;
    border: 1px solid var(--border-color);
    background: var(--background-light);
    border-radius: var(--border-radius-full);
    width: 40px; height: 40px;
    display: grid; place-items: center;
    box-shadow: 0 10px 30px -12px var(--shadow-lg);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  }
  .products__nav:hover { transform: translateY(-50%) scale(1.05); box-shadow: 0 18px 40px -14px rgba(0,0,0,.15); }
  .products__nav--next { inset-inline-start: auto; inset-inline-end: -6px; }
  
  /* Card */
  .product-card {
    scroll-snap-align: start;
    border-radius: 20px;
    background: 
      linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 
      0 4px 6px -1px rgba(0, 0, 0, 0.1),
      0 2px 4px -1px rgba(0, 0, 0, 0.06),
      0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
    height: 400px;
    display: flex;
    flex-direction: column;
  }
  
  @media (max-width: 768px) {
    .product-card {
      min-width: clamp(280px, 70vw, 320px);
      height: 380px;
    }
  }
  .product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
      0 20px 25px -5px rgba(0, 0, 0, 0.1),
      0 10px 10px -5px rgba(0, 0, 0, 0.04),
      0 0 0 1px rgba(99, 102, 241, 0.1) inset;
    border-color: rgba(99, 102, 241, 0.2);
  }
  
  .product-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
  }
  
  .product-card__media { 
    position: relative; 
    overflow: hidden; 
    height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  }
  
  .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
    z-index: 1;
    pointer-events: none;
  }
  
  .product-card:hover::before {
    left: 100%;
  }
  .product-card__media img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
  }
  .product-card:hover .product-card__media img { 
    transform: scale(1.05); 
  }
  
  .product-card__body { 
    padding: 20px; 
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .product-card__category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
  }
  .product-card__title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    color: #1e293b;
    line-height: 1.3;
  }
  .product-card__desc {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin-top: auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
  }
  
  .products__cta {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
    text-align: center;
  }

  .section__header-cta {
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    text-align: center;
  }
  
  /* Desktop : rail + cartes un peu plus larges */
  @media (min-width: 1024px) {
    .products__rail {
      grid-template-columns: repeat(3, 1fr);
      gap: 30px;
    }
    
    .product-card { 
      height: 420px; 
    }
    
    .product-card__media {
      height: 220px;
    }
    
    .product-card__title {
      font-size: 20px;
    }
    
    .product-card__desc {
      font-size: 15px;
    }
  }
  