/* assets/css/listing.css */

/* ------------------------------------------------------------------
   Wrapper image + overlay drapeau
   ------------------------------------------------------------------ */
.image-wrapper {
  position: relative;
}

/* image principale */
.image-wrapper > img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
}

/* drapeau superposé, taille ajustée */
.image-wrapper .flag-icon {
  position: absolute;
  top: -21px;
  right: -21px;
  width: 33px;
  height: 19px;
  pointer-events: none;
  z-index: 1;
  border: 1px solid #000; /* bordure fine et noire */
}

/* ------------------------------------------------------------------
   Grille de produits
   ------------------------------------------------------------------ */
.products {
  max-width: 1200px;
  margin: 2rem auto;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.product-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.product-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.product-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
}

/* ------------------------------------------------------------------
   Mettre .info en flex colonne pour aligner les boutons en bas
   ------------------------------------------------------------------ */
.product-card .info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* titre et description restent en haut */
.product-card .info h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}
.product-card .info p {
  margin-bottom: 0.5rem;
}

/* Aligner bouton en bas */
.product-card .info > button {
  margin-top: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  background: #28a745;
  color: #fff;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.product-card .info > button:hover {
  background: #218838;
}

/* ------------------------------------------------------------------
   Forcer prix + tickets sur une seule ligne
   ------------------------------------------------------------------ */
.product-card .info .price {
  font-weight: bold;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

/* Réduire et aligner correctement l’icône ticket */
.product-card .info .ticket-img {
  width: 3em;
  height: auto;
  vertical-align: middle;
  margin-left: 0.2em;
}

/* ------------------------------------------------------------------
   Responsive grille produits
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
  .products {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
