/**
 * 2024 Change Vivienne
 * Styles pour l'affichage des devises
 */

/* Styles pour l'affichage des devises */
.row.profuct-header {
  margin-bottom: 20px;
  background: #f8f8f8;
  border-radius: 4px;
  padding: 15px 0;
}

.row.profuct-header ul {
  display: flex;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cv-profuct-header-1,
.cv-profuct-header-2,
.cv-profuct-header-3,
.cv-profuct-header-4 {
  flex: 1;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cv-profuct-header-1 {
  flex: 2;
}

.cv-profuct-header-2 p {
  margin: 5px 0 0;
  font-size: 0.8em;
  color: #777;
}

.cv-item-select select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* Styles pour chaque produit devise */
.produit-box {
  display: flex;
  border: 1px solid #eee;
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 4px;
  list-style: none;
}

.product-container {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 15px;
}

.product-li-item1,
.product-li-item2,
.product-li-item3,
.product-li-item4 {
  flex: 1;
  padding: 0 15px;
  display: flex;
  justify-content: start;
  align-items: center;
}

.product-li-item1 {
  flex: 2;
  display: flex;
  align-items: center;
}

.product-li-item2 {
  flex: 1;
  display: flex;
  align-items: center;
}

.product-li-item3, 
.product-li-item4 {
  align-items: center;
  text-align: center;
}

.left-block.product-li-item1 {
  display: flex;
  align-items: center;
  gap: 15px;
}

.product-image-container {
  flex-shrink: 0;
  width: 50px;
}

.product-image-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.product-title-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-title-container .devise-name {
  margin: 0;
  font-size: 1.2em;
  font-weight: bold;
  background-color: rgba(187, 176, 92, 0.1);
  padding: 5px 10px;
  border-radius: 4px;
  color: #BBB05C;
  text-transform: uppercase;
  display: inline-block;
}

.product-title-container .product-name {
  margin: 0;
  font-size: 1em;
  color: #555;
}

.devise-name {
  font-weight: bold;
  margin: 0 0 5px;
  color: #BBB05C;
  text-transform: uppercase;
  font-size: 14px;
  background-color: rgba(187, 176, 92, 0.1);
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-block;
}

.product-name {
  font-size: 16px;
  color: #555;
}

/* Prix et cours */
.pricechangebox p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* Calculateur */
.ddb-calculprix {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  justify-content: center;
}

.ddb-calculprix input {
  width: 80px;
  text-align: center;
  padding: 8px 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 14px;
  height: 38px;
}

.ddb-calculprix .cdbpsymbole1 {
  font-weight: bold;
  margin: 0 2px;
  min-width: 40px;
  text-align: center;
  background-color: #BBB05C;
  color: white;
  padding: 8px 10px;
  border-radius: 4px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Colonne du bouton d'achat */
.product-li-item4 {
  flex: 0 0 150px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.right-block-content.row {
  margin: 0;
  width: 100%;
}

.cc-boutton-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.button-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-li-item4 .cdb-button,
.product-li-item4 .ajax_add_to_cart_button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #BBB05C !important;
  color: white !important;
  text-align: center !important;
  padding: 6px 15px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  border: none !important;
  cursor: pointer !important;
  height: 42px !important;
  min-height: 42px !important;
  width: 120px !important;
  min-width: 120px !important;
  font-size: 14px !important;
  transition: background-color 0.2s !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 30px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.product-li-item4 .cdb-button:hover,
.product-li-item4 .ajax_add_to_cart_button:hover {
  background-color: #a39a52 !important;
  color: white !important;
  text-decoration: none !important;
}

.product-li-item4 .cdb-button i,
.product-li-item4 .ajax_add_to_cart_button i {
  margin-right: 8px !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

.product-li-item4 .cdb-button span,
.product-li-item4 .ajax_add_to_cart_button span {
  font-size: 14px !important;
  line-height: 1 !important;
  display: inline-block !important;
}

.availability {
  font-size: 12px;
  color: #28a745;
  margin-top: 5px;
  text-align: center;
  width: 100%;
}

/* ===== MOBILE : Card layout wrap ===== */
@media (max-width: 767px) {
  /* Header compact */
  .row.profuct-header {
    padding: 10px;
  }

  .row.profuct-header ul {
    flex-direction: column;
    gap: 6px;
  }
  
  .cv-profuct-header-1,
  .cv-profuct-header-2,
  .cv-profuct-header-3,
  .cv-profuct-header-4 {
    padding: 6px 0;
  }

  /* Masquer les labels 3 et 4 du header (simulateur / achat) */
  .cv-profuct-header-3,
  .cv-profuct-header-4 {
    display: none;
  }

  /* Chaque produit = une carte */
  .produit-box {
    border-radius: 10px !important;
    margin-bottom: 12px;
    padding: 12px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }

  .product-container {
    flex-wrap: wrap;
  }
  
  /* Infos produit : pleine largeur */
  .product-li-item1 {
    flex: 0 0 100%;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    min-width: auto;
  }

  /* Cours de change : pleine largeur, compact */
  .product-li-item2 {
    flex: 0 0 100%;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    min-width: auto;
  }

  /* Simulateur : pleine largeur */
  .product-li-item3 {
    flex: 0 0 100%;
    margin-bottom: 10px;
    min-width: auto;
    padding: 0 !important;
  }

  .ddb-calculprix {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  .ddb-calculprix input {
    width: 70px;
  }

  /* Bouton acheter : pleine largeur */
  .product-li-item4 {
    flex: 0 0 100%;
    margin-bottom: 0;
    min-width: auto;
  }
  
  .product-li-item4 .cdb-button,
  .product-li-item4 .ajax_add_to_cart_button {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Classes utilitaires */
.mr-1 {
  margin-right: 0.25rem !important;
}

.d-block {
  display: block !important;
}

.text-center {
  text-align: center !important;
}

/* Tooltip */
.cdb-devise-tooltip {
  color: #777;
  margin-top: 8px;
  font-size: 0.85rem;
  cursor: help;
  width: 100%;
}

.cdb-devise-tooltip i {
  color: #BBB05C;
} 