/* Règles de base partagées */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
      Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    font-size: 0.95rem;
  }
  
  body {
    background-color: #1e1e24;
    color: white;
    font-size: 0.9rem;
  }
  
  .container {
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 15px;
  }
  .cart-icon-container {
    position: relative;
    display: inline-block;
    margin-top: -5.5px;
  }
  /* --------- Section Publicités --------- */
  .pub {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 13px;
    padding: 13px;
    background-color: #121218;
    margin: 13px 0;
    margin-top: -45px;
    scrollbar-width: none;
  }
  
  .pub::-webkit-scrollbar {
    display: none;
  }
  
  .pub img {
    scroll-snap-align: start;
    width: 52%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
  }
  
  .pub img:hover {
    transform: scale(1.02);
  }
  
  @media (max-height: 900px) {
    .pub img {
      width: auto;
      height: 100%;
      max-height: 270px;
    }
  }
  
  /* --------- Section Héro --------- */
  .hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('../images/background_image.jpg');
    background-size: cover;
    background-position: center;
    height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 50px;
    margin-top: 0%;
  }
  
  .hero-content h1 {
    font-size: 2rem;
    margin-bottom: 13px;
  }
  
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  #shop-now {
    background-color: #1d71f7;
    color: white;
    border: none;
    text-decoration: none;
    padding: 8px 20px;
    font-size: 0.8rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  #shop-now:hover {
    background-color: #1763da;
  }
  
  /* --------- Section Catégories --------- */
  .categories {
    padding: 40px 0;
    text-align: center;
  }
  
  .categories h2 {
    font-size: 2rem;
    margin-top: -40px;
    margin-bottom: 20px;
    color: black;
    text-decoration: unset;
  }
  
  .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(134px, 1fr));
    gap: 20px;
    padding: 0 13px;
  }
  
  .category-card {
    background-color: #121218;
    color: white;
    border-radius: 7px;
    overflow: hidden;
    transition: transform 0.3s;
  }
  
  .category-card:hover {
    transform: translateY(-7px);
  }
  
  .category-card img {
    width: 75%;
    height: auto;
    object-fit: cover;
  }
  
  .category-card h3 {
    padding: 13px;
    font-size: 1rem;
  }
  
  /* --------- Produits en vedette --------- */
  /* Variables globales */
  :root {
    --background-dark: #121218;
    --text-light: #f5f5f7;
    --text-secondary: #a0a0a5;
    --accent-color: #6366f1;
    --card-bg: #1c1c24;
    --border-radius: 8px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 15px;
  }
  
  /* Style principal des produits */
  .featured-products {
    background-color: var(--background-dark);
    color: var(--text-light);
    padding: var(--spacing-lg);
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
  }
  
  .featured-products h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
  }
  
  /* Section promotions scrollable */
  .promotion-section {
    margin-bottom: var(--spacing-lg);
  }
  
  .promotion-products {
    display: flex;
    overflow-x: auto;
    padding-bottom: var(--spacing-md);
    gap: var(--spacing-lg);
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--card-bg);
    scroll-behavior: smooth;
    cursor:text;
  }
  
  .promotion-products::-webkit-scrollbar {
    height: 8px;
  }
  
  .promotion-products::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 20px;
  }
  
  .promotion-products::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 20px;
  }
  
  .promotion-products .product-card {
    flex: 0 0 280px;
    margin-right: 0;
  }
  
  
  /* Grille de produits standard */
  .regular-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    cursor: text;
  }
  
  /* Cartes de produits */
  .product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  }
  
  /* Badge de promotion */
  .product-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background-color:red;
    color: var(--text-light);
    padding: 4px 8px;
    font-weight: 600;
    font-size: 0.875rem;
  }
  
  /* Image du produit */
  .product-image {
    width: 100%;
    height: 50%;
    object-fit:cover;
    display: block;
  }
  
  /* Informations produit */
  .product-info {
    padding: var(--spacing-md);
  }
  
  .product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-sm) 0;
  }
  
  .product-category {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 var(--spacing-sm) 0;
  }
  
  /* Prix du produit */
  .product-price {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
  }
  
  .current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
  }
  
  .original-price {
    margin-left: var(--spacing-sm);
    font-size: 1rem;
    text-decoration: line-through;
    color: var(--text-secondary);
  }
  
  
  .buy-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--accent-color);
    color: var(--text-light);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    
    text-decoration: none
  }
  
  .buy-now-btn:hover {
    background-color: #4f46e5; 
  }
  
  .buy-now-btn svg {
    margin-right: var(--spacing-sm);
  }
  
  

  
  /* --------- Animations --------- */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
  
  @keyframes fadeOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  }
  
  @keyframes highlight {
    0% { box-shadow: 0 0 0 rgba(99, 102, 241, 0); }
    50% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.5); }
    100% { box-shadow: 0 0 0 rgba(99, 102, 241, 0); }
  }
  
  /* --------- Media Queries --------- */
  /* Grand écran à moyen (1200px et moins) */
  @media (max-width: 1200px) {
    .container {
      max-width: 960px;
    }
    
    .category-grid, .products-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  
  /* Moyen écran (992px et moins) */
  @media (max-width: 992px) {
    .container {
      max-width: 720px;
    }
    
    .hero-content h1 {
      font-size: 1.8rem;
    }
  }
  
  /* Petit écran (768px et moins) */
  @media (max-width: 768px) {
    .container {
      max-width: 540px;
    }
    
    .category-grid, .products-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
    }
    
    .hero-section {
      height: 280px;
    }
    
    .hero-content h1 {
      font-size: 1.6rem;
    }
    
    .regular-products {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .promotion-products .product-card {
      flex: 0 0 220px;
    }
  }
  
  /* Très petit écran (576px et moins) */
  @media (max-width: 576px) {
    body {
      font-size: 0.85rem;
    }
    
    .pub img {
      width: 80%;
    }
    
    .category-grid, .products-grid {
      grid-template-columns: 1fr;
    }
    
    .hero-section {
      height: 220px;
    }
    
    .hero-content h1 {
      font-size: 1.4rem;
    }
    
    .hero-content p {
      font-size: 0.9rem;
    }
    
    .shop-now {
      padding: 6px 15px;
      font-size: 0.75rem;
    }
    
    .regular-products {
      grid-template-columns: 1fr;
    }
    
    .promotion-products .product-card {
      flex: 0 0 80%;
    }
  }
  
  /* Pour les très petits écrans (400px et moins) */
  @media (max-width: 400px) {
    .pub img {
      width: 100%;
    }
    
    .hero-content h1 {
      font-size: 1.2rem;
    }
  }