
/* ARVO Grille 4 - v1.1
   4 colonnes + espace horizontal/vertical + images entières.
   Ne modifie pas les couleurs du module Prix ARVO.
*/

@media (min-width: 992px) {
  body#category #js-product-list .products {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -9px !important;
    margin-right: -9px !important;
    align-items: stretch !important;
  }

  body#category #js-product-list .products > .product,
  body#category #js-product-list .products > article.product-miniature,
  body#category #js-product-list .products > * {
    width: 25% !important;
    flex: 0 0 25% !important;
    max-width: 25% !important;
    padding-left: 9px !important;
    padding-right: 9px !important;
    margin-bottom: 24px !important;
    box-sizing: border-box !important;
  }
}

/* La miniature doit tenir dans sa colonne */
body#category .product-miniature {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Zone image : ne jamais rogner la photo */
body#category .product-miniature .thumbnail-container,
body#category .product-miniature .product-thumbnail {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body#category .product-miniature .product-thumbnail {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body#category .product-miniature .product-thumbnail img,
body#category .product-miniature img.product-thumbnail,
body#category .product-miniature .thumbnail-container > a img {
  width: 100% !important;
  max-width: 100% !important;
  height: 280px !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Zone blanche du bas : flux normal */
body#category .product-miniature .product-description {
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 8px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* Bandeau Faillite sous le prix */
body#category .product-miniature .arvo-faillite-grille4 {
  position: static !important;
  display: block !important;
  clear: both !important;
  width: calc(100% - 16px) !important;
  box-sizing: border-box !important;
  margin: 10px 8px 0 !important;
  padding: 7px 8px !important;
  background: #087dbd !important;
  color: #fff !important;
  border-radius: 4px !important;
  text-align: center !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}


/* v1.2 : supprimer le coeur sans toucher aux cartes/prix */
body#category .product-miniature .wishlist-button-add,
body#category .product-miniature .wishlist-button,
body#category .product-miniature button.wishlist-button-add,
body#category .product-miniature [class*="wishlist"] {
  display: none !important;
}

/* Garder le rectangle bleu à la même taille, texte seulement plus petit */
body#category .product-miniature .arvo-faillite-grille4 {
  font-size: 12px !important;
}


/* v1.3 : classe exacte constatée dans le HTML PrestaShop */
body#category button.wishlist-button-add {
    display: none !important;
}


/* v1.4 : supprimer aussi le coeur sur la page d'accueil */
body#index button.wishlist-button-add {
    display: none !important;
}


/* v1.5 : même bandeau Faillite sur la page d'accueil */
body#index .product-miniature .arvo-faillite-grille4 {
  position: static !important;
  display: block !important;
  clear: both !important;
  width: calc(100% - 16px) !important;
  box-sizing: border-box !important;
  margin: 10px 8px 0 !important;
  padding: 7px 8px !important;
  background: #087dbd !important;
  color: #fff !important;
  border-radius: 4px !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body#index .product-miniature .product-description {
  height: auto !important;
  overflow: visible !important;
  padding-bottom: 8px !important;
  box-sizing: border-box !important;
}


/* v1.6 accueil : le bandeau reste dans SA carte et réserve sa place */
body#index .product-miniature .thumbnail-container {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding-bottom: 0 !important;
}

body#index .product-miniature .product-description {
  position: static !important;
  height: auto !important;
  min-height: 118px !important;
  overflow: visible !important;
  padding-bottom: 8px !important;
}

body#index .product-miniature .arvo-faillite-grille4 {
  position: static !important;
  display: block !important;
  width: calc(100% - 16px) !important;
  margin: 10px 8px 0 !important;
  box-sizing: border-box !important;
}

/* espace réel entre les deux rangées de l'accueil */
body#index .featured-products .products > .product,
body#index .product-accessories .products > .product {
  margin-bottom: 26px !important;
}


/* v1.7 - accueil : correction basée sur la structure HTML réelle
   span.arvo-dossier-name est déjà dans .product-description.
   On réserve la place dans chaque carte et on garde le bandeau dans son bloc. */

body#index .featured-products .product-miniature .thumbnail-container {
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

body#index .featured-products .product-miniature .product-description {
  position: relative !important;
  height: 150px !important;
  min-height: 150px !important;
  padding: 8px 8px 48px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body#index .featured-products .product-miniature
.product-description > span.arvo-dossier-name.arvo-faillite-grille4 {
  position: absolute !important;
  left: 8px !important;
  right: 8px !important;
  bottom: 8px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 7px 8px !important;
  box-sizing: border-box !important;
  background: #087dbd !important;
  color: #fff !important;
  border-radius: 4px !important;
  text-align: center !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body#index .featured-products .products > .product {
  margin-bottom: 26px !important;
}


/* v1.8 - Accueil : correction d'après la hauteur réelle observée (~129px)
   Le bandeau Faillite reste dans product-description et la carte réserve sa hauteur. */
body#index section.featured-products[data-type="popularproducts"] .product-miniature .product-description {
    position: relative !important;
    height: 150px !important;
    min-height: 150px !important;
    padding: 8px 8px 46px 8px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body#index section.featured-products[data-type="popularproducts"] .product-miniature
.product-description > span.arvo-dossier-name.arvo-faillite-grille4 {
    position: absolute !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 7px 8px !important;
    box-sizing: border-box !important;
    font-size: 12px !important;
}

/* Séparation verticale entre les rangées */
body#index section.featured-products[data-type="popularproducts"] .products > .js-product {
    margin-bottom: 26px !important;
}


/* v1.9 - ALIGNEMENT DES PRIX
   Les titres disposent tous de la même hauteur.
   Le prix commence donc exactement au même niveau sur les 4 cartes.
   Aucun changement de couleur ou de style du badge Prix ARVO. */

/* Pages catégories / faillites */
body#category .product-miniature .product-description .product-title {
    min-height: 46px !important;
    height: 46px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin-bottom: 6px !important;
    box-sizing: border-box !important;
}

/* Accueil */
body#index section.featured-products .product-miniature .product-description .product-title {
    min-height: 46px !important;
    height: 46px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin-bottom: 6px !important;
    box-sizing: border-box !important;
}

/* Le bloc prix garde sa place identique dans chaque carte */
body#category .product-miniature .product-price-and-shipping,
body#index section.featured-products .product-miniature .product-price-and-shipping {
    min-height: 43px !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
}


/* v2.0 - Alignement précis des prix sur les pages catégories.
   Structure réelle constatée :
   .product-description > h2.h3.product-title
   .product-description > .product-price-and-shipping
   On ne touche PAS au badge .price de Prix ARVO. */

body#category #js-product-list .product-miniature .product-description > h2.h3.product-title,
body#category #js-product-list .product-miniature .product-description > h3.h3.product-title,
body#category #js-product-list .product-miniature .product-description > .product-title {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    margin: 0 6px 6px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body#category #js-product-list .product-miniature .product-description > .product-price-and-shipping {
    min-height: 43px !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
}


/* v2.1 - Alignement prix basé sur les règles réellement vues dans DevTools.
   On neutralise uniquement la géométrie du CONTENEUR du prix.
   Le span.price (orange/vert) n'est pas modifié. */
body#category #js-product-list .product-miniature .product-description {
    display: flex !important;
    flex-direction: column !important;
}

body#category #js-product-list .product-miniature .product-description > .product-title {
    flex: 0 0 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    margin: 0 6px 6px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body#category #js-product-list .product-miniature .product-description > .product-price-and-shipping {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 0 0 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    margin: 0 !important;
    padding: 5px 7px !important;
    line-height: normal !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}


/* v2.2 - Remonter les prix juste sous les titres, tout en gardant l'alignement. */
body#category #js-product-list .product-miniature .product-description {
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
    padding-top: 8px !important;
}

body#category #js-product-list .product-miniature .product-description > .product-title {
    flex: 0 0 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 6px 2px !important;
}

body#category #js-product-list .product-miniature .product-description > .product-price-and-shipping {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 43px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 2px 7px 5px !important;
    align-items: flex-start !important;
}


/* v2.3 - OPTION 1
   Prix immédiatement sous le titre sur les pages catégories.
   Important : le thème Classic positionne product-description en bas de la carte.
   On conserve ce bloc, mais on supprime l'espace artificiel entre titre et prix. */

body#category #js-product-list .product-miniature .product-description {
    height: 105px !important;
    min-height: 105px !important;
    padding: 8px 8px 6px !important;
    display: block !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

body#category #js-product-list .product-miniature .product-description > h2.product-title,
body#category #js-product-list .product-miniature .product-description > h3.product-title,
body#category #js-product-list .product-miniature .product-description > .product-title {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 0 0 2px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

body#category #js-product-list .product-miniature .product-description > .product-price-and-shipping {
    position: static !important;
    height: 43px !important;
    min-height: 43px !important;
    max-height: 43px !important;
    margin: 0 !important;
    padding: 2px 7px 4px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}


/* v2.4 - FICHE PRODUIT
   Espacement validé : PRIX     TTC   |   Type de prix.
   Ne modifie ni la couleur ni la forme du badge Prix ARVO. */
body#product .product-prices {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    column-gap: 0 !important;
}

body#product .product-prices .current-price,
body#product .product-prices .product-price {
    margin-right: 24px !important;
}

/* TTC : espace net après le badge prix */
body#product .product-prices .tax-shipping-delivery-label,
body#product .product-prices .tax-label,
body#product .product-prices [class*="tax"] {
    margin-left: 0 !important;
    margin-right: 22px !important;
}

/* Séparation visuelle avant "Prix par pièce / lot / fonds de commerce" */
body#product .product-prices .arvo-price-type,
body#product .product-prices [class*="price-type"],
body#product .product-prices [class*="type-prix"],
body#product .product-prices [class*="prix-type"] {
    margin-left: 0 !important;
    padding-left: 22px !important;
    border-left: 1px solid #777 !important;
}


/* v2.5 - FICHE PRODUIT : PRIX + TTC + TYPE SUR UNE SEULE LIGNE */
body#product .product-prices {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

body#product .product-prices > * {
    flex: 0 0 auto !important;
}

/* Espace après le badge prix */
body#product .product-prices .current-price,
body#product .product-prices .product-price {
    margin: 0 24px 0 0 !important;
}

/* TTC reste sur la même ligne */
body#product .product-prices .tax-shipping-delivery-label,
body#product .product-prices .tax-label,
body#product .product-prices [class*="tax"] {
    display: inline-block !important;
    margin: 0 20px 0 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

/* Type de prix sur la même ligne avec séparateur */
body#product .product-prices .arvo-price-type,
body#product .product-prices [class*="price-type"],
body#product .product-prices [class*="type-prix"],
body#product .product-prices [class*="prix-type"] {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 0 0 20px !important;
    border-left: 1px solid #777 !important;
    white-space: nowrap !important;
}


/* v2.6 - FICHE PRODUIT : présentation validée
   Ligne 1 : PRIX    TTC | Prix par pièce
   Ligne 2 : Faillite : ...
*/

/* Le bloc principal des prix reste sur une ligne */
body#product .product-prices {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
}

/* Badge prix */
body#product .product-prices .current-price,
body#product .product-prices .product-price {
    flex: 0 0 auto !important;
    margin: 0 28px 0 0 !important;
}

/* TTC */
body#product .product-prices .tax-shipping-delivery-label,
body#product .product-prices .tax-label,
body#product .product-prices [class*="tax"] {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 18px 0 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

/* Type de prix : même ligne et centré verticalement */
body#product .product-prices .arvo-price-type,
body#product .product-prices [class*="price-type"],
body#product .product-prices [class*="type-prix"],
body#product .product-prices [class*="prix-type"] {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    align-self: center !important;
    height: 28px !important;
    line-height: 28px !important;
    margin: 0 !important;
    padding: 0 0 0 20px !important;
    border-left: 1px solid #777 !important;
    white-space: nowrap !important;
}

/* Faillite obligatoirement sur une nouvelle ligne sous le prix */
body#product .product-prices .arvo-dossier-name,
body#product .product-prices [class*="dossier"],
body#product .product-prices [class*="faillite"] {
    flex-basis: 100% !important;
    width: 100% !important;
    display: block !important;
    margin: 7px 0 0 0 !important;
    padding: 0 !important;
    border-left: 0 !important;
    line-height: 1.3 !important;
}


/* v2.7 - espacement fiche produit validé
   150 €      TTC   |   Prix par pièce
   Faillite : ... en dessous
*/

/* Plus d'espace entre le badge prix et TTC */
body#product .product-prices .current-price,
body#product .product-prices .product-price {
    margin-right: 38px !important;
}

/* TTC */
body#product .product-prices .tax-shipping-delivery-label,
body#product .product-prices .tax-label,
body#product .product-prices [class*="tax"] {
    display: inline-flex !important;
    align-items: center !important;
    margin-right: 14px !important;
    white-space: nowrap !important;
}

/* Prix par pièce : espace de chaque côté de la barre */
body#product .product-prices .arvo-price-type,
body#product .product-prices [class*="price-type"],
body#product .product-prices [class*="type-prix"],
body#product .product-prices [class*="prix-type"] {
    display: inline-flex !important;
    align-items: center !important;
    height: 30px !important;
    line-height: 30px !important;
    margin: 0 !important;
    padding-left: 22px !important;
    border-left: 1px solid #777 !important;
    white-space: nowrap !important;
}

/* Faillite reste seule en dessous */
body#product .product-prices .arvo-dossier-name,
body#product .product-prices [class*="dossier"],
body#product .product-prices [class*="faillite"] {
    flex-basis: 100% !important;
    width: 100% !important;
    margin-top: 7px !important;
    padding-left: 0 !important;
    border-left: 0 !important;
}


/* v2.8 - structure exacte vue dans DevTools
   .product-prices
     .product-price
     .arvo-dossier-name
     .tax-shipping-delivery-label
       TTC
       .arvo-price-type

   Résultat :
   [150 €]     TTC   |   Prix par pièce
   Faillite : Selos Bureau
*/

body#product .product-prices {
    display: grid !important;
    grid-template-columns: max-content max-content !important;
    grid-template-rows: auto auto !important;
    column-gap: 38px !important;
    row-gap: 6px !important;
    align-items: center !important;
    justify-content: start !important;
}

/* Prix */
body#product .product-prices > .product-price {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
}

/* TTC + Prix par pièce : ils sont dans le MÊME conteneur */
body#product .product-prices > .tax-shipping-delivery-label {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    line-height: 30px !important;
}

/* Prix par pièce avec la barre à gauche et de vrais espaces */
body#product .product-prices > .tax-shipping-delivery-label > .arvo-price-type {
    display: inline-flex !important;
    align-items: center !important;
    height: 30px !important;
    line-height: 30px !important;
    margin: 0 0 0 18px !important;
    padding: 0 0 0 22px !important;
    border-left: 1px solid #777 !important;
    white-space: nowrap !important;
}

/* Faillite sous le prix */
body#product .product-prices > .arvo-dossier-name {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    display: block !important;
    white-space: nowrap !important;
}


/* v2.9 - FICHE PRODUIT
   Le badge orange/vert s'adapte à la largeur réelle du prix.
   Exemple : 80 € = badge plus court que 150 €.
   Le reste de la présentation v2.8 est conservé. */

body#product .product-prices > .product-price,
body#product .product-prices > .product-price.h5 {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
}

/* Le badge de prix lui-même : largeur automatique selon le texte */
body#product .product-prices > .product-price .current-price,
body#product .product-prices > .product-price .price,
body#product .product-prices > .product-price span.price {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    display: inline-block !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}


/* v3.0 - correction du badge prix sur la fiche produit.
   Le rectangle orange/vert doit être COURT et suivre le texte du prix. */
body#product .product-prices > .product-price,
body#product .product-prices > .product-price.h5 {
    display: inline-flex !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: max-content !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: content-box !important;
    white-space: nowrap !important;
}

/* Annule l'élargissement ajouté en v2.9 sur le texte intérieur. */
body#product .product-prices > .product-price .current-price,
body#product .product-prices > .product-price .price,
body#product .product-prices > .product-price span.price {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
}
