/**
 * Prix produit : /kg puis unité sur la même ligne (unité grand rouge, /kg petit normal).
 */

.ar-price-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.35em 0.75em;
  width: 100%;
  max-width: 100%;
  margin: 8px 0 12px;
  line-height: 1.2;
}

/* Prix à l’unité — après le /kg, mis en avant */
.ar-price-stack .ar-price-unit,
.ar-price-stack > .price,
.ar-price-stack > .ar-price {
  order: 2;
  display: inline-block;
  width: auto !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Lato", sans-serif;
  font-weight: 800 !important;
  color: #8b1e1e !important;
  line-height: 1.1;
  vertical-align: baseline;
}

.ar-price-stack .ar-price-unit .amount,
.ar-price-stack .ar-price-unit ins .amount,
.ar-price-stack .ar-price-unit bdi,
.ar-price-stack > .price .amount,
.ar-price-stack > .price ins .amount,
.ar-price-stack > .ar-price .amount,
.ar-price-stack > .ar-price ins .amount {
  font-weight: 800 !important;
  color: #8b1e1e !important;
}

.ar-price-stack .ar-price-unit del,
.ar-price-stack .ar-price-unit del .amount,
.ar-price-stack > .price del,
.ar-price-stack > .price del .amount {
  font-weight: 600 !important;
  color: #8c8578 !important;
  font-size: 0.55em !important;
}

/* Prix au kg — en premier sur la ligne */
.ar-price-stack .ar-price-kg,
.ar-price-stack .ar-pricekg,
.ar-price-stack .ar-price-perkg {
  order: 1;
  display: inline-block;
  width: auto !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  font-family: "Lato", sans-serif !important;
  font-size: clamp(11px, 1.35vw, 13px) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1.35 !important;
  color: #6a6056 !important;
  letter-spacing: 0.01em;
  vertical-align: baseline;
  white-space: nowrap;
}

.ar-price-stack:has(.ar-price-kg, .ar-pricekg, .ar-price-perkg) .ar-price-unit::before,
.ar-price-stack:has(.ar-price-kg, .ar-pricekg, .ar-price-perkg) > .price::before,
.ar-price-stack:has(.ar-price-kg, .ar-pricekg, .ar-price-perkg) > .ar-price::before {
  content: "·";
  margin-right: 0.35em;
  color: #c4bdb3;
  font-weight: 400;
}

.ar-price-stack .ar-price-kg *,
.ar-price-stack .ar-pricekg *,
.ar-price-stack .ar-price-perkg *,
.ar-price-stack .ar-price-kg strong,
.ar-price-stack .ar-pricekg strong,
.ar-price-stack .ar-price-perkg strong {
  font-weight: 400 !important;
  font-size: inherit !important;
  color: inherit !important;
}

/* Cartes boutique — /kg puis prix unitaire, centrés verticalement */
.woocommerce ul.products li.product .ar-price-stack,
.woocommerce.ar-lascours-shortcode-wrap .ar-price-stack {
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  gap: 4px !important;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
}

.woocommerce ul.products li.product .ar-price-stack .ar-price-kg,
.woocommerce ul.products li.product .ar-price-stack .ar-price-perkg,
.woocommerce.ar-lascours-shortcode-wrap .ar-price-stack .ar-price-kg,
.woocommerce.ar-lascours-shortcode-wrap .ar-price-stack .ar-price-perkg {
  order: 1 !important;
  width: 100% !important;
  text-align: center !important;
}

.woocommerce ul.products li.product .ar-price-stack .ar-price-unit,
.woocommerce.ar-lascours-shortcode-wrap .ar-price-stack .ar-price-unit,
.woocommerce ul.products li.product .ar-price-stack > .price,
.woocommerce.ar-lascours-shortcode-wrap .ar-price-stack > .price {
  order: 2 !important;
  width: 100% !important;
  text-align: center !important;
  font-size: clamp(17px, 3.8vw, 22px) !important;
}

.woocommerce ul.products li.product .ar-price-stack > .price,
.woocommerce.ar-lascours-shortcode-wrap .ar-price-stack > .price {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center !important;
  align-items: baseline !important;
}

.woocommerce ul.products li.product .ar-price-stack:has(.ar-price-kg, .ar-price-perkg) .ar-price-unit::before,
.woocommerce ul.products li.product .ar-price-stack:has(.ar-price-kg, .ar-price-perkg) > .price::before,
.woocommerce.ar-lascours-shortcode-wrap .ar-price-stack:has(.ar-price-kg, .ar-price-perkg) .ar-price-unit::before,
.woocommerce.ar-lascours-shortcode-wrap .ar-price-stack:has(.ar-price-kg, .ar-price-perkg) > .price::before {
  content: none !important;
  margin: 0 !important;
}

/* Fiche produit */
body.single-product .ar-lascours-hero-side .ar-price-stack {
  justify-content: flex-start;
  align-items: baseline;
  text-align: left;
  margin: 4px 0 16px !important;
  gap: 0.4em 0.85em;
}

body.single-product .ar-lascours-hero-side .ar-price-stack .ar-price-unit,
body.single-product .ar-lascours-hero-side .ar-price-stack > .ar-price {
  font-size: clamp(1.65rem, 4.2vw, 2.45rem) !important;
}

body.single-product .ar-lascours-hero-side .ar-price-stack > .ar-price {
  display: inline-flex !important;
  flex-wrap: wrap;
  align-items: baseline;
}

body.single-product .ar-lascours-hero-side .ar-price-stack .ar-price-kg,
body.single-product .ar-lascours-hero-side .ar-price-stack .ar-pricekg {
  font-size: clamp(12px, 1.5vw, 14px) !important;
  font-weight: 400 !important;
  color: #6a6056 !important;
}

/* Très petit écran : autoriser le retour à la ligne si besoin */
@media (max-width: 360px) {
  .ar-price-stack .ar-price-kg,
  .ar-price-stack .ar-pricekg,
  .ar-price-stack .ar-price-perkg {
    white-space: normal;
  }
}
