/* Page Ventes - Styles spécifiques */

.hero-ventes {
  margin-top: 64px;
  height: 400px;
}

.hero-ventes-content {
  margin-top: 0;
}

/* Badge VENDU en bandeau diagonal sur l'image */
.badge-vendu {
  position: absolute;
  top: 20px;
  left: -45px;
  background-color: #f44336;
  color: white;
  font-weight: bold;
  font-size: 14px;
  padding: 8px 55px;
  transform: rotate(-45deg);
  transform-origin: center center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1;
}

/* Cartes de ventes - Solution CSS Grid */

/* Grille responsive 2 colonnes avec hauteur égale */
.ventes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 0;
}

/* Cards prennent 100% de la hauteur de leur cellule */
.ventes-grid .w3-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Container prend l'espace restant */
.ventes-grid .w3-card .w3-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Description avec hauteur limitée (3 lignes max) */
.vente-description {
  max-height: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.6;
}

/* Bouton toujours en bas - force le positionnement */
.ventes-grid .w3-card .vente-btn-bottom {
  margin-top: auto !important;
}

/* Force les autres éléments à ne pas prendre d'espace supplémentaire */
.ventes-grid .w3-card .w3-container > h4,
.ventes-grid .w3-card .w3-container > p {
  flex-shrink: 0;
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .hero-ventes {
    min-height: 220px;
    height: auto;
  }

  .hero-ventes-content {
    margin-top: 5px;
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 90%;
  }

  .hero-ventes h1 {
    font-size: 2.4rem !important;
  }

  .hero-ventes p {
    font-size: 1.4rem !important;
  }

  /* Grille 1 colonne sur mobile */
  .ventes-grid {
    grid-template-columns: 1fr;
  }
}
