/* =========================================================
   Module Divi personnalisé : Carte Produit Simple
   ========================================================= */
.dbc-product-card {
  --dbc-red: #a90018;
  --dbc-white: #ffffff;
  --dbc-black: #111111;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  text-align: center;
  background-color: var(--dbc-white);
  border-radius: 4px;
  box-shadow: 0px 2px 6px 2px rgba(0, 0, 0, 0.08);
}

.dbc-product-card,
.dbc_product_card .et_pb_module_inner {
  height: 100%;
}

/* Image produit */
.dbc-product-card__image-wrapper {
  width: 100%;
  aspect-ratio: 356 / 250;
  overflow: hidden;
  background: #ffffff;
}

.dbc-product-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

/* Nom produit */
.dbc-product-card__name {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  background: var(--dbc-red);
  color: var(--dbc-white);
  font-size: 19px;
  font-weight: 400;
  font-family: 'Righteous', display;
  line-height: 1.15;
  text-align: center;
  text-transform: lowercase;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenu */
.dbc-product-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px 14px;
  background-image: url(/wp-content/uploads/2026/06/bg-card-product-bottom.jpg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: top left;
}

/* Descriptif */
.dbc-product-card__description {
  max-width: 180px;
  margin: 0 auto;
  color: var(--dbc-black);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

/*
   Important :
   On ne met plus le séparateur sur le descriptif.
   Le descriptif peut avoir une hauteur variable.
*/
/* Prix */
.dbc-product-card__price {
  color: var(--dbc-red);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

/* Séparateur avant le prix */
.dbc-product-card__price::before {
  content: "";
  display: block;
  width: 128px;
  height: 1px;
  margin: 12px auto 12px;
  background: rgba(0, 0, 0, 0.18);
}

/* Si le prix existe sans descriptif */
.dbc-product-card__content>.dbc-product-card__price:first-child {
  margin-top: auto;
  margin-bottom: auto;
}

/* Sécurité textes longs */
.dbc-product-card__name,
.dbc-product-card__description,
.dbc-product-card__price {
  overflow-wrap: anywhere;
}

/* =========================================================
   Grille des cartes produits
   Classe à ajouter sur la Row Divi :
   dbc-products-grid-row
   ========================================================= */
.dbc-products-grid-row .et_pb_column {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.dbc-products-grid-row .et_pb_module {
  margin-bottom: 0 !important;
}

.dbc-products-grid-row .et_pb_module,
.dbc-products-grid-row .dbc-product-card {
  width: 100%;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 981px) {
  .dbc-products-grid-row .et_pb_column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .dbc-products-grid-row .et_pb_column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .dbc-products-grid-row .et_pb_column {
    grid-template-columns: 1fr;
  }

  .dbc-product-card {
    max-width: 260px;
    margin-right: auto;
    margin-left: auto;
  }
}
