/*
 * Maison HKM — Phase 7D: harmonisation of the WooCommerce / theme pages with the
 * validated homepage. Loaded only on pages that receive the Maison HKM header/footer
 * (body.mhkm-shop). No theme file or setting is modified: removing this file (or
 * deactivating the plugin) restores the WoodMart rendering.
 *
 * Palette (validated homepage): green #173524 / #0f2b1d, cream #f7f3ea, paper #fffdf8,
 * gold #ad7b34, ink #19241c, muted #6d706a, line #ded8cc.
 */

/* ---------- 1. WoodMart demo chrome replaced by the Maison HKM header/footer ---------- */
body.mhkm-shop .whb-header,
body.mhkm-shop .wd-toolbar,
body.mhkm-shop .footer-container,
body.mhkm-shop .wd-footer {
  display: none !important;
}
body.mhkm-shop.sticky-toolbar-on {
  padding-bottom: 0 !important;
}
.mhkm-chrome {
  display: contents;
}
/* sticky header below the WordPress admin bar (logged-in users only) */
body.mhkm-shop.admin-bar .mhkm-chrome-header {
  --mhkm-top: 32px;
}
@media (max-width: 782px) {
  body.mhkm-shop.admin-bar .mhkm-chrome-header {
    --mhkm-top: 46px;
  }
}
@media (max-width: 600px) {
  body.mhkm-shop.admin-bar .mhkm-chrome-header {
    --mhkm-top: 0px;
  }
}

/* ---------- 2. WoodMart variables -> homepage palette & typography ---------- */
body.mhkm-shop {
  --wd-primary-color: #173524;
  --wd-alternative-color: #ad7b34;
  --btn-accented-bgcolor: #173524;
  --btn-accented-bgcolor-hover: #0f2b1d;
  --btn-accented-color: #fff;
  --btn-accented-color-hover: #fff;
  --btn-accented-box-shadow: none;
  --btn-accented-box-shadow-hover: none;
  --btn-accented-bottom-active: 0px;
  --btn-accented-font-family: Manrope, Arial, sans-serif;
  --btn-accented-font-weight: 700;
  --btn-default-font-family: Manrope, Arial, sans-serif;
  --btn-default-bgcolor: #f7f3ea;
  --btn-default-bgcolor-hover: #efe5d3;
  --btn-default-color: #173524;
  --btn-default-color-hover: #173524;
  --wd-text-font: Manrope, Arial, sans-serif;
  --wd-text-color: #5b5f58;
  --wd-title-font: "Cormorant Garamond", Georgia, serif;
  --wd-title-font-weight: 600;
  --wd-title-color: #19241c;
  --wd-entities-title-font: "Cormorant Garamond", Georgia, serif;
  --wd-entities-title-font-weight: 600;
  --wd-entities-title-color: #19241c;
  --wd-entities-title-color-hover: #ad7b34;
  --wd-alternative-font: Manrope, Arial, sans-serif;
  --wd-widget-title-font: Manrope, Arial, sans-serif;
  --wd-widget-title-color: #19241c;
  --wd-header-el-font: Manrope, Arial, sans-serif;
  --wd-link-color: #19241c;
  --wd-link-color-hover: #ad7b34;
  --wd-form-brd-color: #ded8cc;
  --wd-form-brd-color-focus: #ad7b34;
  --wd-main-bgcolor: #fffdf8;
  --notices-success-bg: #173524;
  --notices-warning-bg: #ad7b34;
  background-color: #fffdf8;
  font-family: Manrope, Arial, sans-serif;
}
body.mhkm-shop .wd-page-content {
  background-color: #fffdf8;
}

/* ---------- 3. page title band (was black WoodMart demo banner) ---------- */
body.mhkm-shop .wd-page-title {
  background-color: #f7f3ea !important;
  border-bottom: 1px solid #ded8cc;
}
body.mhkm-shop .wd-page-title .wd-page-title-bg {
  display: none;
}
body.mhkm-shop .wd-page-title[class*="color-scheme-light"] {
  --color-gray-100: #f7f3ea;
  --color-gray-200: #efe5d3;
  --color-gray-300: #b9b3a6;
  --color-gray-400: #9a9d96;
  --color-gray-500: #6d706a;
  --color-gray-600: #5b5f58;
  --color-gray-700: #3b3f37;
  --color-gray-800: #19241c;
  --color-gray-900: #19241c;
  --color-black-rgb: 0, 0, 0;
  --brdcolor-gray-200: rgba(0, 0, 0, 0.075);
  --brdcolor-gray-300: rgba(0, 0, 0, 0.105);
  --wd-text-color: #6d706a;
  --wd-title-color: #173524;
  --wd-entities-title-color: #173524;
  --wd-entities-title-color-hover: #ad7b34;
  --wd-link-color: #19241c;
  --wd-link-color-hover: #ad7b34;
  --wd-navigation-color: 23, 53, 36;
  --wd-main-bgcolor: #f7f3ea;
  color: #6d706a;
}
body.mhkm-shop .wd-page-title .entry-title,
body.mhkm-shop .wd-page-title .title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #173524;
}
/* checkout steps (Panier → Paiement → Commande terminée) */
body.mhkm-shop .wd-checkout-steps {
  font-family: Manrope, Arial, sans-serif;
  color: #6d706a;
}
body.mhkm-shop .wd-checkout-steps .step-active,
body.mhkm-shop .wd-checkout-steps li.step-active a {
  color: #173524;
}

/* ---------- 4. prices, labels, stars ---------- */
body.mhkm-shop .price,
body.mhkm-shop .amount {
  color: #173524;
}
body.mhkm-shop .price del,
body.mhkm-shop .price del .amount {
  color: #9a9d96;
}
body.mhkm-shop .onsale,
body.mhkm-shop .product-label.onsale {
  background-color: #ad7b34;
}
body.mhkm-shop .star-rating span::before {
  color: #ad7b34;
}

/* ---------- 5. WooCommerce Cart / Checkout blocks ---------- */
body.mhkm-shop .wc-block-components-button:not(.is-link),
body.mhkm-shop .wc-block-cart__submit-button,
body.mhkm-shop .wc-block-components-checkout-place-order-button {
  background-color: #173524;
  color: #fff;
  border-radius: 0;
  font-family: Manrope, Arial, sans-serif;
}
body.mhkm-shop .wc-block-components-button:not(.is-link):hover,
body.mhkm-shop .wc-block-cart__submit-button:hover,
body.mhkm-shop .wc-block-components-checkout-place-order-button:hover {
  background-color: #0f2b1d;
  color: #fff;
}
body.mhkm-shop .wc-block-components-title,
body.mhkm-shop .wc-block-components-checkout-step__title,
body.mhkm-shop .wc-block-cart__totals-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  color: #19241c;
}
body.mhkm-shop .wc-block-components-product-name {
  color: #19241c;
}

/* ---------- 6. product titles & prices (same rhythm as the homepage cards) ---------- */
body.mhkm-shop .wd-entities-title,
body.mhkm-shop .product_title,
body.mhkm-shop .wd-page-title .title,
body.mhkm-shop h1,
body.mhkm-shop h2,
body.mhkm-shop h3 {
  font-variant-numeric: lining-nums;
}
body.mhkm-shop .product-grid-item .wd-entities-title {
  font-size: 19px;
  line-height: 1.12;
}
body.mhkm-shop .product-grid-item .price {
  font: 700 15px/1.2 Manrope, Arial, sans-serif;
  color: #19241c;
}
body.mhkm-shop .product-grid-item .price .amount {
  color: #19241c;
}

/* ---------- 7. small texts of the Cart/Checkout blocks stay in Manrope (legibility) ---------- */
body.mhkm-shop .wc-block-components-product-name,
body.mhkm-shop .wc-block-components-totals-item__label,
body.mhkm-shop .wc-block-components-order-summary-item__description,
body.mhkm-shop .wc-block-cart-item__product .wc-block-components-product-name {
  font-family: Manrope, Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  font-variant-numeric: lining-nums;
}
body.mhkm-shop .wc-block-components-totals-item__label {
  font-weight: 500;
}

/* =====================================================================================
   Phase 7E — final e-commerce cleanup (visual only, WooCommerce/WoodMart logic untouched)
   ===================================================================================== */

/* ---------- 8. Cart / Checkout blocks: product names in Manrope ----------
   WoodMart styles `.wd.wd.wd .wc-block-components-product-name` with
   font-family: var(--wd-entities-title-font) (Cormorant). Instead of fighting its
   specificity, the variable itself is redefined on the element. */
body.mhkm-shop .wc-block-components-product-name {
  --wd-entities-title-font: Manrope, Arial, sans-serif;
  --wd-entities-title-font-weight: 600;
  --wd-entities-title-color: #19241c;
  line-height: 1.35;
  font-variant-numeric: lining-nums;
}

/* ---------- 9. "Rupture de stock" label: readable pill instead of a 50px circle ---------- */
body.mhkm-shop .product-labels .product-label.out-of-stock {
  width: auto;
  max-width: none;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #ded8cc;
  background: #fffdf8;
  color: #173524;
  font: 700 10px/1.2 Manrope, Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
@media (max-width: 720px) {
  body.mhkm-shop .product-labels .product-label.out-of-stock {
    padding: 5px 8px;
    font-size: 9px;
    letter-spacing: 0.05em;
  }
}

/* ---------- 10. WoodMart mini-cart (side panel): colours, type, buttons only ---------- */
body.mhkm-shop .cart-widget-side {
  background-color: #fffdf8;
  color: #5b5f58;
}
body.mhkm-shop .cart-widget-side .wd-heading {
  border-bottom: 1px solid #ded8cc;
}
body.mhkm-shop .cart-widget-side .wd-heading .title {
  font: 600 24px/1.1 "Cormorant Garamond", Georgia, serif;
  color: #173524;
  text-transform: none;
}
body.mhkm-shop .cart-widget-side .close-side-widget .wd-action-text {
  font: 600 12px/1 Manrope, Arial, sans-serif;
  color: #173524;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart-item {
  border-bottom-color: #ded8cc;
}
body.mhkm-shop .cart-widget-side .cart-info .wd-entities-title {
  font: 600 14px/1.35 Manrope, Arial, sans-serif;
  color: #19241c;
  font-variant-numeric: lining-nums;
}
body.mhkm-shop .cart-widget-side .cart-info .quantity,
body.mhkm-shop .cart-widget-side .cart-info .quantity .amount {
  font-family: Manrope, Arial, sans-serif;
  color: #6d706a;
}
body.mhkm-shop .cart-widget-side .cart-info .quantity .amount {
  font-weight: 700;
  color: #173524;
}
body.mhkm-shop .cart-widget-side .remove_from_cart_button {
  color: #6d706a;
}
body.mhkm-shop .cart-widget-side .remove_from_cart_button:hover {
  color: #ad7b34;
}
body.mhkm-shop .cart-widget-side .shopping-cart-widget-footer {
  border-top: 1px solid #ded8cc;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart__total {
  font-family: Manrope, Arial, sans-serif;
  color: #19241c;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart__total strong {
  font-weight: 600;
  color: #19241c;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart__total .amount {
  font-weight: 700;
  color: #173524;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart__buttons .button,
body.mhkm-shop .cart-widget-side .wd-empty-mini-cart .btn {
  min-height: 46px;
  border-radius: 0;
  font: 700 12.5px/1 Manrope, Arial, sans-serif;
  letter-spacing: 0.04em;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart__buttons .btn-cart {
  background: #f7f3ea;
  color: #173524;
  border: 1px solid #ded8cc;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart__buttons .btn-cart:hover {
  background: #efe5d3;
  color: #173524;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart__buttons .checkout,
body.mhkm-shop .cart-widget-side .wd-empty-mini-cart .btn {
  background: #173524;
  color: #fff;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart__buttons .checkout:hover,
body.mhkm-shop .cart-widget-side .wd-empty-mini-cart .btn:hover {
  background: #0f2b1d;
  color: #fff;
}
body.mhkm-shop .cart-widget-side .woocommerce-mini-cart__empty-message {
  font: 600 22px/1.2 "Cormorant Garamond", Georgia, serif;
  color: #19241c;
}
