@import 'header.css';
@import 'footer.css';
@import 'home-carousel.css';
@import 'nos-partenaire.css';
@import 'productdetails.css';
@import 'search-result.css';
@import 'shopping-cart.css';
@import 'wishlist-icon.css';
@import 'wishlist.css';



/* ===================================
   VARIABLES CSS (Custom Properties)
   =================================== */
   :root {
    /* Colors */
    --primary-color: #C9332D;
    --primary-dark: #c0392b;
    --secondary-color: #d63031;
    --accent-color: #0066cc;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --white: #ffffff;
    --background-light: #f5f5f5;
    --border-light: #eeeeee;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-family-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 14px;
    --font-size-large: 18px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 600;
    --letter-spacing: 0.5px;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    
    /* Layout */
    --container-max-width: 1200px;
    --content-max-width: 80%;
    --header-height: 60px;
    --logo-width: 180px;
    --logo-height: 60px;
    --search-max-width: 600px;
    
    /* Border Radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-header: 0 2px 10px var(--shadow-light);
    --shadow-search: 0 2px 5px var(--shadow-light);
  }
  
  /* ===================================
     RESET & BASE STYLES
     =================================== */
  *,
  *::before,
  *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
    margin: 0 auto;
  }
  @media (min-width: 1024px) {
    body {
        max-width: 1200px;
        margin: 0 auto;
    }
  }
  
  /* Large screens - 1500px and above */
  @media (min-width: 1500px) {
    :root {
      --container-max-width: 1600px;
      --font-size-base: 16px;
      --font-size-large: 20px;
      --spacing-lg: 30px;
      --spacing-xl: 40px;
      --logo-width: 220px;
      --logo-height: 70px;
      --search-max-width: 700px;
    }
    
    body {
      max-width: 1600px;
      font-size: var(--font-size-base);
    }
    
    .container {
      max-width: var(--container-max-width);
      padding: 0 var(--spacing-xl);
    }
    
    /* Product cards larger */
    .product-card {
      width: 280px;
      padding: 20px 16px 24px;
    }
    
    .product-title {
      font-size: 16px;
    }
    
    .product-desc {
      font-size: 13px;
    }
    
    .product-price {
      font-size: 14px;
    }
    
    .btn-cart-user {
      padding: 14px 24px;
      font-size: 10px;
    }
    
    /* Partner products */
    .partner-products {
      max-width: 1600px;
      padding: 1.5rem;
    }
    
    .partner-product-card {
      max-width: 320px;
    }
    
    .product-image {
      height: 240px;
    }
    
    .product-name {
      font-size: 14px;
    }
    
    .price {
      font-size: 15px;
    }
    
    .btn-cart {
      padding: 14px 24px;
      font-size: 10px;
    }
    
    /* Products grid */
    .products-grid {
      gap: 40px;
      padding: 50px 0;
    }
    
    /* Home page - Full width for product slides on large screens */
    body.page-index .partner-products {
      max-width: 100%;
      padding: 2rem 0;
      width: 100%;
    }
    
    body.page-index .partner-products .swiper {
      width: 100%;
      padding: 2rem 0 3rem 0;
      max-width: 100%;
    }
    
    body.page-index .partner-products .swiper-wrapper {
      display: grid !important;
      grid-template-columns: repeat(5, 1fr) !important;
      gap: 0 !important;
      transform: none !important;
      width: 100% !important;
    }
    
    body.page-index .partner-products .swiper-slide {
      width: 100% !important;
      margin-right: 0 !important;
      flex-shrink: 0;
    }
    
    body.page-index .partner-product-card {
      width: 100%;
      max-width: 100%;
      min-height: 460px;
      display: flex;
      flex-direction: column;
      border-radius: 20px;
    }
    
    body.page-index .partner-product-card .product-image {
      height: 280px;
      flex-shrink: 0;
      border-radius: 20px 20px 0 0;
    }
    
    body.page-index .partner-product-card .product-info {
      padding: 28px;
      flex: 1;
      display: flex;
      flex-direction: column;
    }
    
    body.page-index .partner-product-card .category {
      font-size: 13px;
      margin-bottom: 12px;
      font-weight: 600;
    }
    
    body.page-index .partner-product-card .product-name {
      font-size: 15px;
      min-height: 52px;
      margin-bottom: 16px;
      font-weight: 700;
      line-height: 1.5;
    }
    
    body.page-index .partner-product-card .price {
      font-size: 16px;
      margin-bottom: 20px;
      font-weight: 700;
    }
    
    body.page-index .partner-product-card .btn-cart {
      padding: 16px 28px;
      font-size: 11px;
      margin-top: auto;
      font-weight: 700;
      letter-spacing: 1px;
    }
    
    body.page-index .partner-product-card .badge {
      font-size: 9px;
      padding: 8px 14px;
      font-weight: 700;
    }
    
    body.page-index .partner-product-card .action-buttons {
      top: 16px;
      right: 16px;
    }
    
    body.page-index .partner-product-card .action-buttons button {
      width: 44px;
      height: 44px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    body.page-index .partner-product-card .action-buttons button i {
      font-size: 16px;
    }
    
    body.page-index .partner-product-card:hover {
      transform: translateY(-8px);
      box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    }
  }
  /* ===================================
     UTILITY CLASSES
     =================================== */
  .container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
  }
  
  .flex {
    display: flex;
  }
  
  .flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .flex-evenly {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
  }
  
  .text-center {
    text-align: center;
  }
  
  .text-uppercase {
    text-transform: uppercase;
  }
  
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  
    
/* ===================================
    PRODUCT CARD
    =================================== */
    .products-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 30px;
        justify-content: space-between;
        padding: 40px 0;
      }
      
      .product-card {
        margin-top: -20px;
        position: relative;
        background-color: #fff;
        border-radius: 12px;
        width: 220px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        padding: 16px 12px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: transform 0.2s ease;
      }
      
      .product-card:hover {
        transform: translateY(-5px);
      }
      
      /* Badges */
      .product-tags {
        position: absolute;
        top: 10px;
        left: 10px;
        display: flex;
        gap: 6px;
      }
      
      .tag {
        padding: 4px 10px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        border-radius: 4px;
        color: #fff;
        line-height: 1;
      }
      
      .tag.new {
        background-color: #000;
      }
      
      .tag.discount {
        background-color: #e74c3c;
      }
      
      .product-card img {
        width: 100%;
        height: auto;
        object-fit: contain;
        margin-top: 30px;
        margin-bottom: 14px;
      }
      
      /* Titre du produit */
      .product-title {
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        color: #222;
        margin: 5px 0 6px;
        text-align: center;
      }
      
      /* Description */
      .product-desc {
        font-size: 11.5px;
        color: #888;
        text-align: center;
        margin-bottom: 12px;
        min-height: 36px;
      }
      
      /* Prix */
      .product-price {
        font-size: 12px;
        font-weight: bold;
        color: #e91e63;
        margin-bottom: 14px;
      }
      
      /* Bouton */
      .btn-cart-user {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 8px 14px;
        background-color: #000;
        color: #fff;
        font-size: 12px;
        font-weight: 500;
        text-decoration: none;
        border-radius: 6px;
        width: 100%;
        transition: background-color 0.3s ease;
      }
      
      .btn-cart-user i {
        font-size: 13px;
      }
      
      .btn-cart-user {
        background: linear-gradient(135deg, #050506, #222528);
        color: white;
        padding: 12px 20px;
        font-size: 8px;
        text-align: center;
        border-radius: 8px;
        display: block;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 100%;
        border: none;
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        position: relative;
        overflow: hidden;
    }
  
    .btn-cart-user::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }
  
    .btn-cart-user:hover::before {
        left: 100%;
    }
  
    .btn-cart-user:hover {
        background: linear-gradient(135deg, #1c1d20, #03060e);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(9, 15, 29, 0.3);
    }
      
  
/* ===================================
    PARTNER PRODUCT CARD
    =================================== */
   
    .partner-products {
      padding: 1rem;
      max-width: 1400px;
      margin: 0 auto;
  }


  .swiper {
      width: 100%;
      padding: 1rem 0 2rem 0;
      overflow: visible;
  }

  .swiper-slide {
      display: flex;
      justify-content: center;
      height: auto;
  }
  .swiper-slide a{
    text-decoration: none;
  }

  .partner-product-card {
      width: 100%;
      max-width: 280px;
      background: white;
      border-radius: 16px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
  }

  .partner-product-card:hover {
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
      transform: translateY(-5px);
  }

  .badge-group {
      position: absolute;
      top: 12px;
      left: 12px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      z-index: 10;
  }

  .badge {
      font-size: 7px;
      padding: 6px 10px;
      color: #fff;
      border-radius: 20px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      backdrop-filter: blur(10px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .badge.discount {
      background: linear-gradient(135deg, #e74c3c, #c0392b);
  }

  .badge.new {
      background: linear-gradient(135deg, #34495e, #2c3e50);
  }

  .product-image {
      position: relative;
      border-radius: 16px 16px 0 0;
      overflow: hidden;
      background: linear-gradient(135deg, #f8f9fa, #e9ecef);
      height: 200px;
  }

  .product-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
  }

  .partner-product-card:hover .product-image img {
      transform: scale(1.05);
  }

  .action-buttons {
      position: absolute;
      top: 12px;
      right: 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      opacity: 0;
      transform: translateX(10px);
      transition: all 0.3s ease;
  }

  .partner-product-card:hover .action-buttons {
      opacity: 1;
      transform: translateX(0);
  }

  .action-buttons button {
      background: rgba(255, 255, 255, 0.95);
      border: none;
      border-radius: 50%;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
  }

  .action-buttons button:hover {
      background: #e74c3c;
      color: white;
      transform: scale(1.1);
  }

  .action-buttons button i {
      font-size: 12px;
  }

  .product-info {
      padding: 20px;
      text-align: left;
  }

  .category {
      font-size: 11px;
      color: #7f8c8d;
      text-transform: uppercase;
      letter-spacing: 1px;
      font-weight: 500;
      margin-bottom: 8px;
  }

  .product-name {
      font-size: 12px;
      font-weight: 600;
      margin: 0 0 12px 0;
      color: #2c3e50;
      line-height: 1.4;
      min-height: 40px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
  }

  .price {
      color: #e74c3c;
      font-size: 13px;
      font-weight: 700;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
  }

  .original-price {
      font-size: 14px;
      color: #95a5a6;
      text-decoration: line-through;
      font-weight: 400;
  }

  .btn-cart {
      background: linear-gradient(135deg, #1c3d8b, #2980b9);
      color: white;
      padding: 12px 20px;
      font-size: 8px;
      text-align: center;
      border-radius: 8px;
      display: block;
      text-decoration: none;
      font-weight: 600;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      width: 100%;
      border: none;
      cursor: pointer;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      position: relative;
      overflow: hidden;
  }

  .btn-cart::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: left 0.5s;
  }

  .btn-cart:hover::before {
      left: 100%;
  }

  .btn-cart:hover {
      background: linear-gradient(135deg, #163177, #1c3d8b);
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(28, 61, 139, 0.3);
  }

  /* Swiper Pagination */
  .swiper-pagination {
      bottom: 0;
  }

  .swiper-pagination-bullet {
      width: 10px;
      height: 10px;
      background: rgba(28, 61, 139, 0.3);
      border-radius: 50%;
      transition: all 0.3s ease;
  }

  .swiper-pagination-bullet-active {
      background: #1c3d8b;
      transform: scale(1.2);
      box-shadow: 0 2px 8px rgba(28, 61, 139, 0.4);
  }

  /* Mobile Optimizations */
  @media (max-width: 768px) {
      .partner-products {
          padding: 1rem 0.5rem;
      }

      .swiper {
          padding: 0.5rem 0 1.5rem 0;
      }

      .partner-product-card {
          max-width: 250px;
      }

      .product-image {
          height: 180px;
      }

      .product-info {
          padding: 16px;
      }

      .product-name {
          font-size: 13px;
          min-height: 36px;
      }

      .price {
          font-size: 15px;
      }

      .btn-cart {
          padding: 10px 16px;
          font-size: 11px;
      }

      /* Show and keep wishlist action button at top-right on tablet */
      .action-buttons {
          display: flex;
          opacity: 1;
          transform: translateX(0);
          position: absolute;
          top: 12px;
          right: 12px;
      }

  }

  @media (max-width: 480px) {
    .partner-products {
        padding: 0.5rem;
    }

    .partner-products .partner-product-card {
        max-width: 220px;
    }

    .partner-products .partner-product-card .product-image {
        height: 160px;
    }

    .partner-products .partner-product-card .product-info {
        padding: 14px;
    }

    .partner-products .partner-product-card .product-info .category {
        font-size: 10px;
    }

    .partner-products .partner-product-card .product-info .product-name {
        font-size: 12px;
        min-height: 32px;
    }

    .partner-products .partner-product-card .product-info .price {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .partner-products .partner-product-card .product-info .btn-cart {
        padding: 8px 14px;
        font-size: 5px;
    }

    .partner-products .partner-product-card .badge {
        font-size: 9px;
        padding: 4px 8px;
    }
}

  /* Touch-friendly improvements */
  @media (hover: none) {
      .partner-product-card:hover {
          transform: none;
          box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      }

      .partner-product-card:hover .product-image img {
          transform: none;
      }

      .btn-cart:hover {
          transform: none;
          box-shadow: none;
      }

      /* Keep wishlist action button visible and positioned at top-right on touch devices */
      .action-buttons {
          opacity: 1;
          transform: translateX(0);
          position: absolute;
          top: 12px;
          right: 12px;
          flex-direction: column;
          justify-content: flex-start;
      }
  }

  /* Loading Animation */
  @keyframes fadeInUp {
      from {
          opacity: 0;
          transform: translateY(30px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .partner-product-card {
      animation: fadeInUp 0.6s ease forwards;
  }

  .swiper-slide:nth-child(1) .partner-product-card { animation-delay: 0.1s; }
  .swiper-slide:nth-child(2) .partner-product-card { animation-delay: 0.2s; }
  .swiper-slide:nth-child(3) .partner-product-card { animation-delay: 0.3s; }
  .swiper-slide:nth-child(4) .partner-product-card { animation-delay: 0.4s; }
  .swiper-slide:nth-child(5) .partner-product-card { animation-delay: 0.5s; }
    
/* notification style    */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 12000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Style du toast */
.toast {
    background: #fff;
    color: #1f2937;
    min-width: 280px;
    max-width: 340px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.35s ease;
    font-family: system-ui, sans-serif;
    border-left: 6px solid transparent;
}

/* Apparition/disparition */
.toast.show {
    transform: translateX(0);
    opacity: 1;
}
.toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Contenu */
.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    position: relative;
}

/* Icône circulaire */
.toast-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

/* Bouton de fermeture */
.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    margin-left: auto;
    line-height: 1;
}

/* Barre de progression */
.toast-progress {
    height: 3px;
    background: rgba(0,0,0,0.1);
    width: 100%;
}

/* Thèmes */
.toast.success { border-left-color: #22c55e; }
.toast.success .toast-icon { background: #22c55e; content: "✔"; }

.toast.error { border-left-color: #ef4444; }
.toast.error .toast-icon { background: #ef4444; content: "✖"; }

.toast.info { border-left-color: #3b82f6; }
.toast.info .toast-icon { background: #3b82f6; content: "ℹ"; }

.toast.warning { border-left-color: #f59e0b; }
.toast.warning .toast-icon { background: #f59e0b; content: "⚠"; }
