/* =========================
   MODAL OVERLAY
========================= */

#product-modal {
  position: fixed;
  inset: 0;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.55);
  z-index: 1000;
}

/* ouverture */
#product-modal:not(.hidden) {
  display: flex;
}

/* =========================
   MODAL BOX
========================= */

#modal-content {
  width: 100%;

  min-height: 420px;   /* 👈 ajoute de la hauteur */
  max-height: 85vh;    /* 👈 évite overflow écran */

  
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-top: 40px;

  position: relative;

  box-shadow: 0 10px 30px rgba(0,0,0,0.25);

  display: flex;
  flex-direction: column;
  gap: 10px;
}


#modal-content .images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#modal-content .images img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
}

/* =========================
   TEXTES
========================= */
#modal-content h2 {
  font-size: 18px;
  margin: 0;
}

#modal-content p {
  margin: 4px 0;
  font-size: 14px;
}

/* =========================
   QTY CONTROLS
========================= */
.modal-cart-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

#modal-add,
#modal-remove {
  width: 36px;
  height: 36px;

  border: 1px solid #ddd;
  background: #fff;

  border-radius: 8px;
  cursor: pointer;

  font-size: 18px;
}

 
#modal-add:hover,
#modal-remove:hover {
  background: #f5f5f5;
}

.modal-footer {
  margin-top: 10px;
  padding-top: 10px;

  border-top: 1px solid #eee;

  display: flex;
  justify-content: space-between;

  font-size: 14px;
  font-weight: 600;
}
/* =========================
   CLOSE BUTTON (si tu en as un)
========================= */
.modal-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#modal-close,
#modal-cancel  
 {
   width: 160px;
   

  border: 2px solid var(--accent-bordeaux);
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;

   background: var(--accent-bordeaux);
   cursor: pointer;
}
/* =========================
   MODAL GRID 2 COLONNES
========================= */

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* =========================
   LEFT (IMAGES)
========================= */

.modal-left .images {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-left .images img {
  
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
}

/* =========================
   RIGHT (INFOS)
========================= */

.modal-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================
   MOBILE RESPONSIVE
========================= */

@media (max-width: 700px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-left .images img {
    height: 200px;
  }
}