/*
Theme Name: Millwork Direct Catalogue
Theme URI: https://millworkdirect.ca/
Author: Millwork Direct
Description: A lightweight WooCommerce-ready catalogue theme for Millwork Direct. Designed for cabinets, parts & components, office furniture and table tops, with a PDF-inspired product-sheet layout and catalogue-only mode.
Version: 1.0.58
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: millwork-direct
*/

:root {
  --md-black: #111111;
  --md-charcoal: #2d2d2d;
  --md-slate: #314953;
  --md-muted: #687981;
  --md-line: #dfe4e7;
  --md-soft: #f6f7f7;
  --md-white: #ffffff;
  --md-red: #d8232a;
  --md-max: 1180px;
  --md-radius: 2px;
  --md-shadow: 0 8px 30px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--md-charcoal);
  background: var(--md-white);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
a:hover, a:focus { color: var(--md-red); }
img { max-width: 100%; height: auto; }

.md-wrap { width: min(var(--md-max), calc(100% - 40px)); margin-inline: auto; }

/* Header */
.md-site-header { background: var(--md-charcoal); color: var(--md-white); border-bottom: 10px solid #777; }
.md-header-inner { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.md-brand { display: flex; align-items: center; gap: 16px; min-width: 240px; }
.md-brand .custom-logo { max-height: 78px; width: auto; }
.md-brand-text { display: flex; flex-direction: column; }
.md-site-title { font-size: 30px; line-height: 1; font-weight: 500; letter-spacing: -.02em; }
.md-site-tagline { margin-top: 8px; font-size: 12px; font-style: italic; font-weight: 700; text-transform: uppercase; }
.md-primary-nav ul { list-style: none; padding: 0; margin: 0; }
.md-primary-nav > ul { display: flex; align-items: center; gap: 28px; }
.md-primary-nav li { position: relative; }
.md-primary-nav a { display:block; color: #fff; font-size: 14px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.md-primary-nav a:hover, .md-primary-nav a:focus { color: #fff; opacity: .72; }
.md-primary-nav ul.sub-menu {
  display: none !important;
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 245px;
  padding: 8px 0;
  background: var(--md-charcoal);
  border-top: 3px solid #777;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  z-index: 100;
}
.md-primary-nav .sub-menu::before {
  content: "";
  position:absolute;
  left:0; right:0; top:-17px;
  height:17px;
}
.md-primary-nav .sub-menu li { width: 100%; }
.md-primary-nav .sub-menu a { padding: 10px 16px; font-size: 13px; }
.md-primary-nav li:hover > ul.sub-menu,
.md-primary-nav li:focus-within > ul.sub-menu { display:block !important; }
.md-menu-toggle { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); padding: 9px 12px; }

/* Breadcrumbs / content */
.md-breadcrumbs { padding: 26px 0 6px; color: #647279; font-size: 14px; }
.md-page { padding: 24px 0 70px; }
.md-page h1 { margin: 0 0 28px; font-size: clamp(34px, 4vw, 50px); line-height: 1.1; font-weight: 500; }
.md-content {
  width: 100%;
  max-width: none;
}

/* v1.0.32 - unified site spacing/grid */
.md-page > article { width: 100%; }
.md-content > .wp-block-image {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.md-content > .wp-block-image img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}
.md-content > .wp-block-columns {
  width: 100%;
  max-width: none;
  gap: 32px;
  margin-left: 0;
  margin-right: 0;
}
.md-content > .wp-block-group,
.md-content > .wp-block-cover,
.md-content > .wp-block-buttons,
.md-content > .wp-block-table {
  max-width: none;
}
@media (max-width: 700px) {
  .md-content > .wp-block-columns { gap: 20px; }
}

/* Catalogue landing cards */
.md-catalogue-grid,
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 30px 0 50px !important;
}
.md-catalogue-card,
.woocommerce ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  padding: 0 0 20px !important;
  border: 1px solid var(--md-line);
  background: #fff;
  box-shadow: var(--md-shadow);
}
.md-catalogue-card img,
.woocommerce ul.products li.product img { display:block; width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; }
.md-catalogue-card h3,
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 20px !important; line-height: 1.2; padding: 16px 18px 5px !important; margin: 0 !important; color: var(--md-black); }
.md-catalogue-card p { padding: 0 18px; margin: 0; color: var(--md-muted); }
.woocommerce ul.products li.product .price { display: none !important; }

/* WooCommerce catalogue product sheet */
.single-product .site-main { width: 100%; }
.single-product div.product { display: block !important; width: 100% !important; }
.single-product div.product .summary,
.single-product div.product .woocommerce-product-gallery { display: none !important; }
.md-product-sheet {
  width: min(1180px, 100%);
  margin: 0 auto 70px;
  background: #fff;
  color: var(--md-slate);
}
.md-product-sheet-header {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 28px;
  align-items: start;
  border-bottom: 1px solid var(--md-line);
  padding: 22px 0 16px;
}
.md-product-mark { display:flex; align-items:flex-start; }
.md-product-mark img { width: 130px; max-height: 95px; object-fit: contain; }
.md-product-eyebrow { font-size: 15px; font-weight: 700; color: var(--md-muted); text-transform: uppercase; letter-spacing: .02em; }
.md-product-code { margin: 10px 0 2px; color: var(--md-slate); font-size: clamp(44px, 6vw, 64px); line-height: .95; font-weight: 800; letter-spacing: -.03em; }
.md-product-subtitle { margin: 10px 0 8px; font-size: 27px; line-height: 1.15; font-weight: 700; color: var(--md-slate); }
.md-product-ref { color: var(--md-muted); margin: 2px 0; }
.md-product-dimensions { margin-top: 4px; font-size: 18px; font-weight: 700; color: var(--md-slate); }
.md-product-study { text-align: left; font-size: 15px; font-weight: 700; text-transform: uppercase; }
.md-product-study small { display: block; margin-top: 8px; color: var(--md-muted); font-size: 13px; font-weight: 500; }
.md-product-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; padding-top: 28px; }
.md-product-section { min-width: 0; }
.md-product-section-title { margin: 0 0 12px; color: var(--md-slate); font-size: 14px; line-height: 1.3; font-weight: 800; text-transform: uppercase; }
.md-product-media { border: 0; background: #fff; min-height: 250px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.md-product-media img { display:block; max-width:100%; width:100%; height:auto; object-fit:contain; }
.md-product-lower { display:grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--md-line); }
.md-components-table { width:100%; border-collapse: collapse; font-size: 13px; color: var(--md-slate); }
.md-components-table th, .md-components-table td { padding: 7px 6px; border-bottom: 1px solid var(--md-line); text-align:left; vertical-align:top; }
.md-components-table th { font-size:11px; text-transform:uppercase; }
.md-product-notes { color: var(--md-muted); font-size: 12px; margin-top: 10px; }
.md-product-footer { display:flex; justify-content:space-between; gap:20px; margin-top:34px; padding-top:12px; border-top:1px solid var(--md-line); color: var(--md-muted); font-size:12px; text-transform:uppercase; }
.md-product-fallback { padding: 35px; background: var(--md-soft); border: 1px solid var(--md-line); }


/* Block-editor page typography: override legacy block/global styles. */
.page:not(.elementor-page) .md-content {
  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
}
.page:not(.elementor-page) .md-content p,
.page:not(.elementor-page) .md-content li {
  color: #333333 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
.page:not(.elementor-page) .md-content h1,
.page:not(.elementor-page) .md-content h2,
.page:not(.elementor-page) .md-content h3,
.page:not(.elementor-page) .md-content h4,
.page:not(.elementor-page) .md-content h5,
.page:not(.elementor-page) .md-content h6 {
  color: #111111 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
.page:not(.elementor-page) .md-content .wp-block-button__link {
  background: var(--md-charcoal) !important;
  color: #ffffff !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

/* Standard buttons */
.button, button, input[type=submit] { border-radius: var(--md-radius) !important; background: var(--md-black) !important; color:#fff !important; border:0 !important; padding:12px 18px !important; font-weight:700 !important; }
.button:hover, button:hover, input[type=submit]:hover { background:#333 !important; }

/* Footer */
.md-site-footer { margin-top: 60px; padding: 38px 0; background:#171717; color:#d7d7d7; font-size:13px; }
.md-footer-inner { display:flex; justify-content:space-between; gap:24px; align-items:center; }

/* Elementor friendliness */
.elementor-page .md-page { padding-top: 0; }


/* v1.0.16 - Order Sheet back navigation */
.md-order-back-wrap { margin: 0 0 18px; }
.md-order-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid #cfd7da;
  border-radius: 999px;
  background: #fff;
  color: #203f4a !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
}
.md-order-back:hover { background: #f4f7f8; border-color: #aebcc2; }
@media (max-width: 980px) {
  .md-primary-nav { display:none; position:absolute; top:108px; left:0; right:0; background:var(--md-charcoal); padding:20px; z-index:50; }
  .md-primary-nav.is-open { display:block; }
  .md-primary-nav > ul { flex-direction:column; align-items:flex-start; gap:0; }
  .md-primary-nav > ul > li { width:100%; }
  .md-primary-nav > ul > li > a { padding:10px 0; }
  .md-primary-nav ul.sub-menu { display:block !important; position:static; min-width:0; width:100%; margin:0 0 8px 14px; padding:0; background:transparent; border:0; box-shadow:none; }
  .md-primary-nav .sub-menu::before { display:none; }
  .md-primary-nav .sub-menu a { padding:7px 0; font-size:12px; opacity:.85; }
  .md-menu-toggle { display:block; }
  .md-header-inner { position:relative; }
  .md-catalogue-grid, .woocommerce ul.products { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .md-product-sheet-header { grid-template-columns: 170px 1fr; }
  .md-product-study { grid-column:2; }
}

@media (max-width: 700px) {
  .md-wrap { width:min(100% - 24px, var(--md-max)); }
  .md-header-inner { min-height:86px; }
  .md-brand .custom-logo { max-height:60px; }
  .md-site-title { font-size:24px; }
  .md-primary-nav { top:86px; }
  .md-catalogue-grid, .woocommerce ul.products { grid-template-columns: 1fr; }
  .md-product-sheet-header { grid-template-columns: 1fr; gap:16px; }
  .md-product-mark img { width:100px; }
  .md-product-study { grid-column:auto; }
  .md-product-grid, .md-product-lower { grid-template-columns: 1fr; }
  .md-product-subtitle { font-size:22px; }
  .md-product-media { min-height:0; }
  .md-footer-inner { flex-direction:column; align-items:flex-start; }
}


/* Catalogue landing page: override legacy Elementor/block inline typography. */
body.md-catalogue-landing .md-content h1,
body.md-catalogue-landing .md-content h2,
body.md-catalogue-landing .md-content h3,
body.md-catalogue-landing .md-content h4,
body.md-catalogue-landing .md-content h5,
body.md-catalogue-landing .md-content h6 {
  color: #111111 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
body.md-catalogue-landing .md-content p,
body.md-catalogue-landing .md-content li {
  color: #333333 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
body.md-catalogue-landing .md-content .wp-block-button__link {
  background: #2d2d2d !important;
  color: #ffffff !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

/* V2 catalogue product sheet */
.md-product-sheet-header-v2 {
  grid-template-columns: 240px 1fr;
  align-items: start;
}
.md-product-sheet-v2 .md-product-subtitle {
  color: var(--md-slate) !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
.md-product-wide-note {
  margin: 12px 0 2px;
  color: var(--md-muted);
  font-size: 12px;
  line-height: 1.45;
}
.md-product-elevations {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--md-line);
}
.md-config-section {
  min-width: 0;
}
.md-config-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.md-config-card {
  background: #f3f6f7;
  padding: 12px 14px;
  min-height: 82px;
}
.md-config-card span,
.md-config-block span {
  display: block;
  color: var(--md-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.md-config-card strong {
  display: block;
  color: var(--md-slate);
  font-size: 18px;
  line-height: 1.15;
}
.md-config-card small {
  display: block;
  margin-top: 3px;
  color: var(--md-muted);
  font-size: 11px;
}
.md-config-block {
  margin-top: 11px;
  color: var(--md-slate);
}
.md-config-block strong {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}
@media (max-width: 700px) {
  .md-product-sheet-header-v2 { grid-template-columns: 1fr; }
  .md-config-grid { grid-template-columns: 1fr; }
}


/* V2 lower technical row: compact construction + fully contained configuration panel. */
.md-product-sheet-v2 .md-product-lower {
  display: grid;
  grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}
.md-product-sheet-v2 .md-product-lower > .md-product-section {
  min-width: 0;
  width: 100%;
}
.md-product-sheet-v2 .md-product-lower > .md-product-section:first-child .md-product-media {
  min-height: 0;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
}
.md-product-sheet-v2 .md-product-lower > .md-product-section:first-child .md-product-media img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  margin: 0 auto;
}
.md-product-sheet-v2 .md-config-section {
  display: block !important;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  visibility: visible !important;
}
.md-product-sheet-v2 .md-config-section .md-product-section-title {
  margin-bottom: 14px;
}
.md-product-sheet-v2 .md-config-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.md-product-sheet-v2 .md-config-card {
  min-width: 0;
  padding: 10px 11px;
}
.md-product-sheet-v2 .md-config-card strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.md-product-sheet-v2 .md-config-block strong {
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .md-product-sheet-v2 .md-product-lower {
    grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
    gap: 16px;
  }
  .md-product-sheet-v2 .md-config-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .md-product-sheet-v2 .md-product-lower { grid-template-columns: 1fr; }
  .md-product-sheet-v2 .md-product-lower > .md-product-section:first-child .md-product-media img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }
}


/* v1.0.10 — enlarge the full lower technical row and configuration panel. */
.single-product .site-main.md-wrap {
  width: min(1260px, calc(100% - 40px));
}
.md-product-sheet-v2 {
  width: min(1260px, 100%);
}
.md-product-sheet-v2 .md-product-lower {
  grid-template-columns: minmax(0, 0.45fr) minmax(0, 0.55fr);
  gap: 24px;
}
.md-product-sheet-v2 .md-config-section .md-product-section-title {
  font-size: 16px;
  margin-bottom: 16px;
}
.md-product-sheet-v2 .md-config-grid {
  gap: 10px;
  margin-bottom: 18px;
}
.md-product-sheet-v2 .md-config-card {
  padding: 14px 15px;
  min-height: 94px;
}
.md-product-sheet-v2 .md-config-card span,
.md-product-sheet-v2 .md-config-block span {
  font-size: 11px;
  margin-bottom: 5px;
}
.md-product-sheet-v2 .md-config-card strong {
  font-size: 20px;
  line-height: 1.12;
}
.md-product-sheet-v2 .md-config-card small {
  font-size: 12px;
  margin-top: 5px;
}
.md-product-sheet-v2 .md-config-block {
  margin-top: 14px;
}
.md-product-sheet-v2 .md-config-block strong {
  font-size: 13.5px;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .single-product .site-main.md-wrap { width: min(100% - 28px, 1260px); }
  .md-product-sheet-v2 .md-product-lower {
    grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
    gap: 16px;
  }
  .md-product-sheet-v2 .md-config-card strong { font-size: 18px; }
}
@media (max-width: 700px) {
  .md-product-sheet-v2 .md-product-lower { grid-template-columns: 1fr; }
}


/* v1.0.11 — move section 06 farther right while preserving its readable width. */
.single-product .site-main.md-wrap {
  width: min(1320px, calc(100% - 40px));
}
.md-product-sheet-v2 {
  width: min(1320px, 100%);
}
.md-product-sheet-v2 .md-product-lower {
  grid-template-columns: minmax(0, 0.47fr) minmax(0, 0.53fr);
  column-gap: 44px;
}
@media (max-width: 1100px) {
  .single-product .site-main.md-wrap { width: min(100% - 32px, 1320px); }
  .md-product-sheet-v2 .md-product-lower {
    grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.54fr);
    column-gap: 30px;
  }
}
@media (max-width: 900px) {
  .md-product-sheet-v2 .md-product-lower {
    grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
    column-gap: 18px;
  }
}
@media (max-width: 700px) {
  .md-product-sheet-v2 .md-product-lower { grid-template-columns: 1fr; }
}


/* v1.0.14 — catalogue navigation back buttons. */
.md-back-nav {
  margin: 8px 0 24px;
}
.md-back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid #cfd6da;
  border-radius: 999px;
  background: #ffffff;
  color: #2d2d2d !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  box-shadow: 0 3px 12px rgba(0,0,0,.04);
}
.md-back-button:hover,
.md-back-button:focus {
  background: #2d2d2d;
  border-color: #2d2d2d;
  color: #ffffff !important;
}
.single-product .md-product-sheet > .md-back-nav {
  margin: 0 0 14px;
}
.md-product-footer-back {
  margin-top: 20px;
}

/* v1.0.15 — Millwork Direct Order Sheet. */
.md-header-inner { gap: 18px; }
.md-primary-nav { margin-left: auto; }
.md-order-sheet-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.md-order-sheet-header:hover { background: rgba(255,255,255,.1); }
.md-order-sheet-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: #1e2529;
  font-size: 12px;
  line-height: 1;
}

.md-add-order-sheet,
.md-order-sheet-page {
  width: min(1120px, 100%);
  margin: 38px auto 10px;
  padding: 28px;
  background: #f7f9fa;
  border: 1px solid #dce2e5;
  border-radius: 6px;
}
.md-order-sheet-kicker,
.md-order-section-heading > span {
  display: block;
  color: #50636c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.md-add-order-sheet h2,
.md-order-sheet-page h2,
.md-order-submit-form h2 { margin: 0 0 8px; color: #203f4a; }
.md-order-sheet-intro,
.md-order-sheet-lead { color: #52646c; max-width: 850px; }
.md-order-product-code {
  font-size: 22px;
  font-weight: 800;
  color: #203f4a;
  margin: 18px 0 12px;
}
.md-order-form-grid,
.md-order-client-grid,
.md-order-line-grid {
  display: grid;
  gap: 14px;
}
.md-order-form-grid-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md-order-dimensions-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.md-order-form-grid-bottom { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); margin-top: 14px; }
.md-order-client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md-order-line-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; }
.md-order-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.md-order-field > span {
  color: #314952;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.md-order-field input,
.md-order-field select,
.md-order-field textarea {
  width: 100%;
  border: 1px solid #cbd4d8;
  background: #fff;
  color: #222;
  border-radius: 3px;
  padding: 10px 11px;
  font: inherit;
  box-sizing: border-box;
}
.md-order-field small { color: #718087; font-size: 11px; line-height: 1.35; }
.md-order-field-wide { grid-column: span 2; }
.md-order-field-full { grid-column: 1 / -1; }
.md-order-actions,
.md-order-submit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}
.md-order-primary,
.md-order-secondary,
.md-order-link-button,
.md-order-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 700;
  cursor: pointer;
}
.md-order-primary {
  border: 1px solid #252b2e;
  background: #252b2e;
  color: #fff !important;
}
.md-order-secondary {
  border: 1px solid #97a4aa;
  background: #fff;
  color: #252b2e !important;
}
.md-order-link-button,
.md-order-remove {
  border: 0;
  background: transparent;
  color: #5b666b !important;
  text-decoration: underline !important;
  padding-left: 0;
  padding-right: 0;
}
.md-order-smallprint { margin: 14px 0 0; color: #718087; font-size: 12px; }

.md-order-sheet-page { background: #fff; border: 0; padding: 0; }
.md-order-sheet-manage { margin-top: 28px; }
.md-order-line {
  border: 1px solid #d9e0e3;
  border-radius: 6px;
  padding: 18px;
  margin: 0 0 14px;
  background: #fff;
}
.md-order-line-product {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e6ebed;
}
.md-order-line-product img { width: 72px; height: 72px; object-fit: contain; background: #fff; }
.md-order-line-product > div { display: flex; flex-direction: column; gap: 3px; }
.md-order-line-code { color: #203f4a; font-size: 20px; }
.md-order-line-product span { color: #607078; font-size: 13px; }
.md-order-manage-actions { justify-content: space-between; }
.md-order-submit-form {
  margin-top: 42px;
  padding-top: 30px;
  border-top: 2px solid #203f4a;
}
.md-order-section-heading { margin-bottom: 20px; }
.md-order-empty,
.md-order-confirmation {
  padding: 28px;
  background: #f6f8f9;
  border: 1px solid #dae1e4;
  border-radius: 6px;
}
.md-order-confirmation > span { color: #50636c; font-weight: 800; font-size: 11px; letter-spacing: .08em; }

@media (max-width: 1000px) {
  .md-order-dimensions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-order-line-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .md-header-inner { flex-wrap: wrap; }
  .md-order-sheet-header { margin-left: auto; }
  .md-add-order-sheet { padding: 20px; }
  .md-order-form-grid-top,
  .md-order-form-grid-bottom,
  .md-order-client-grid,
  .md-order-line-grid { grid-template-columns: 1fr; }
  .md-order-dimensions-grid { grid-template-columns: 1fr 1fr; }
  .md-order-field-wide,
  .md-order-field-full { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .md-order-dimensions-grid { grid-template-columns: 1fr; }
  .md-order-sheet-header-label { display: none; }
}

@media print {
  .md-site-header,
  .md-site-footer,
  .md-breadcrumbs,
  .md-order-sheet-header,
  .md-order-manage-actions,
  .md-order-submit-actions,
  .md-order-remove,
  .woocommerce-notices-wrapper { display: none !important; }
  .md-page, .md-wrap, .md-order-sheet-page { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .md-order-line { break-inside: avoid; }
}
/* v1.0.17 - Order Sheet visible item count */
.md-order-count-summary {
  margin: 20px 0 10px;
  padding: 15px 18px;
  border: 1px solid var(--md-line);
  background: var(--md-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.md-order-count-summary > div { display: flex; align-items: baseline; gap: 12px; }
.md-order-count-label { color: #52646c; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
#md-order-live-count { color: #203f4a; font-size: 30px; line-height: 1; }
.md-order-count-summary small { color: #718087; font-size: 12px; }
@media (max-width: 640px) {
  .md-order-count-summary { align-items: flex-start; flex-direction: column; gap: 6px; }
}



/* v1.0.18 - Review Product action on Order Sheet lines */
.md-order-line-product-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}
.md-order-review {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #203f4a;
  border-radius: 999px;
  background: #fff;
  color: #203f4a !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
}
.md-order-review:hover,
.md-order-review:focus {
  background: #203f4a;
  color: #fff !important;
}
@media (max-width: 640px) {
  .md-order-line-product { flex-wrap: wrap; }
  .md-order-review { width: 100%; margin-left: 0; margin-top: 6px; }
}


/* Production SKU display */
.md-order-production-pending {
  display: block;
  margin-top: 4px;
  color: var(--md-muted);
  font-size: 12px;
  font-weight: 600;
}
.md-production-summary {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid var(--md-line);
  background: var(--md-soft);
}
.md-production-summary h3 { margin: 0 0 10px; }
.md-production-summary ul { margin: 0; padding-left: 20px; }
.md-production-summary li { margin: 4px 0; }


/* v1.0.21 - measurement override workflow */
.md-measurement-override {
  grid-column: 1 / -1;
  margin: 16px 0 4px;
  padding: 16px 18px;
  border: 1px solid #c58a2a;
  border-left: 4px solid #c58a2a;
  background: #fffaf0;
  border-radius: 4px;
}
.md-measurement-override[hidden] { display: none !important; }
.md-override-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}
.md-override-heading strong { color: #6b4300; font-size: 15px; }
.md-override-heading span { color: #8a692f; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.md-measurement-override p { margin: 0 0 12px; color: #5f5138; font-size: 13px; }
.md-override-check { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #3d3425; margin-bottom: 12px; }
.md-override-check input { width: auto !important; }
.md-override-reason { margin-top: 8px; }
.md-order-override-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff3d6;
  color: #7a4d00;
  border: 1px solid #d7a84c;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.md-order-dimension-input.is-outside-standard { border-color: #c58a2a; box-shadow: 0 0 0 1px #c58a2a; background: #fffdf7; }
@media (max-width: 640px) {
  .md-override-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .md-order-override-badge { width: 100%; justify-content: center; white-space: normal; text-align: center; }
}



/* v1.0.26 — Parts product-sheet technical panel cleanup.
   Parts source crops already contain their numbered PDF section headings, so the
   theme-level duplicate headings are hidden. 03/04 are clipped exactly above the
   next PDF row, and 05 is cropped at the right edge so 06 never bleeds into it. */
.md-parts-sheet .md-product-section:not(.md-config-section) > .md-product-section-title {
  display: none !important;
}

.md-parts-sheet .md-product-elevations .md-product-section .md-product-media {
  min-height: 0 !important;
  width: 100% !important;
  aspect-ratio: 715 / 366;
  height: auto !important;
  overflow: hidden !important;
  display: block !important;
}
.md-parts-sheet .md-product-elevations .md-product-section .md-product-media img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
}

.md-parts-sheet .md-product-lower > .md-product-section:first-child .md-product-media {
  min-height: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
  display: block !important;
}
.md-parts-sheet .md-product-lower > .md-product-section:first-child .md-product-media img {
  display: block !important;
  width: 115% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
}

@media (max-width: 700px) {
  .md-parts-sheet .md-product-elevations .md-product-section .md-product-media {
    aspect-ratio: 715 / 366;
  }
  .md-parts-sheet .md-product-lower > .md-product-section:first-child .md-product-media img {
    width: 115% !important;
    max-width: none !important;
  }
}


/* v1.0.27 — clean IPDRW section 05 source crop. */
.md-parts-sheet .md-product-lower > .md-part-clean-spec .md-product-media {
  overflow: hidden !important;
  width: 100% !important;
  min-height: 0 !important;
}
.md-parts-sheet .md-product-lower > .md-part-clean-spec .md-product-media img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
}


/* v1.0.28 — floating Back to Top control for long catalogue/order pages. */
.md-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 108px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: var(--md-charcoal);
  color: var(--md-white) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease, background .18s ease;
  cursor: pointer;
}
.md-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.md-back-to-top:hover,
.md-back-to-top:focus-visible {
  background: var(--md-black);
  color: var(--md-white) !important;
}
.md-back-to-top:focus-visible {
  outline: 3px solid rgba(49,73,83,.35);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .md-back-to-top {
    right: 14px;
    bottom: 16px;
    min-width: 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
  }
  .md-back-to-top .md-back-to-top-arrow { font-size: 22px; }
  .md-back-to-top .md-back-to-top-label { display: none; }
}

/* v1.0.30 — DOORF / DRWF section 05 clean rendering.
   The shared DOORF/DRWF specification panel uses a dedicated clean source crop
   and the 100%-width no-crop rule from .md-part-clean-spec. */

/* v1.0.31 — CSG1 / CSG2 section 05 clean rendering.
   Uses a dedicated crop to keep the full Component Specifications heading visible
   and prevent section 06 bleed. */


/* v1.0.33 — dark Home page only */
body.md-home-dark,
body.md-home-dark .md-page,
body.md-home-dark .md-content {
  background: #000000;
  color: #ffffff;
}
body.md-home-dark .md-page {
  padding-top: 24px;
}
body.md-home-dark .md-page h1,
body.md-home-dark .md-content h1,
body.md-home-dark .md-content h2,
body.md-home-dark .md-content h3,
body.md-home-dark .md-content h4,
body.md-home-dark .md-content h5,
body.md-home-dark .md-content h6,
body.md-home-dark .md-content p,
body.md-home-dark .md-content li,
body.md-home-dark .md-content strong,
body.md-home-dark .md-content em,
body.md-home-dark .md-content figcaption,
body.md-home-dark .elementor-heading-title,
body.md-home-dark .elementor-widget-text-editor,
body.md-home-dark .elementor-widget-text-editor p,
body.md-home-dark .elementor-widget-text-editor li {
  color: #ffffff !important;
}
body.md-home-dark .md-content a:not(.wp-block-button__link):not(.button),
body.md-home-dark .elementor a:not(.elementor-button) {
  color: #ffffff !important;
}
body.md-home-dark .md-content a:not(.wp-block-button__link):not(.button):hover,
body.md-home-dark .elementor a:not(.elementor-button):hover {
  color: #d7d7d7 !important;
}
body.md-home-dark .md-content .wp-block-button__link,
body.md-home-dark .elementor-button {
  background: #ffffff !important;
  color: #111111 !important;
  border: 1px solid #ffffff !important;
}
body.md-home-dark .md-content .wp-block-button__link:hover,
body.md-home-dark .elementor-button:hover {
  background: #e8e8e8 !important;
  color: #111111 !important;
}
body.md-home-dark .md-page .elementor-section,
body.md-home-dark .md-page .e-con,
body.md-home-dark .md-page .elementor-widget-wrap {
  background-color: transparent !important;
}
body.md-home-dark .wp-block-separator,
body.md-home-dark hr {
  border-color: #444444 !important;
  color: #444444 !important;
}
body.md-home-dark .md-site-footer {
  margin-top: 0;
  border-top: 1px solid #333333;
}

/* v1.0.34 — purpose-built dark homepage */
body.md-home-dark .md-breadcrumbs { display: none; }
body.md-home-dark .md-site-footer { margin-top: 0; }
.md-homepage {
  background: #000;
  color: #fff;
  padding: 34px 0 0;
}
.md-homepage h1,
.md-homepage h2,
.md-homepage h3,
.md-homepage p { margin-top: 0; color: #fff; }
.md-home-hero { padding-bottom: 76px; }
.md-home-hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: cover;
  object-position: center;
  border: 1px solid #202020;
}
.md-home-hero-copy {
  max-width: 920px;
  padding-top: 44px;
}
.md-home-eyebrow,
.md-home-kicker {
  margin: 0 0 14px !important;
  color: #b8c0c4 !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.md-home-hero h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 84px);
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 700;
}
.md-home-hero-lead {
  max-width: 780px;
  margin: 24px 0 0 !important;
  color: #d6d6d6 !important;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}
.md-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.md-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
}
.md-home-button-primary { background: #fff; color: #111 !important; }
.md-home-button-secondary { background: transparent; color: #fff !important; }
.md-home-button-primary:hover { background: #e6e6e6; color: #111 !important; }
.md-home-button-secondary:hover { background: #fff; color: #111 !important; }
.md-home-section {
  padding: 84px 0;
  border-top: 1px solid #2d2d2d;
}
.md-home-intro { max-width: 1180px; }
.md-home-intro h2,
.md-home-section h2,
.md-home-final-cta h2 {
  margin-bottom: 22px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -.025em;
  font-weight: 600;
}
.md-home-intro > p:not(.md-home-kicker) {
  max-width: 900px;
  color: #c9c9c9 !important;
  font-size: 18px;
}
.md-home-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  background: #333;
  border: 1px solid #333;
}
.md-home-card {
  min-height: 350px;
  padding: 38px;
  background: #101010;
  display: flex;
  flex-direction: column;
}
.md-home-card-number {
  color: #9aa4a8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}
.md-home-card h2 {
  margin: 34px 0 16px;
  font-size: 30px;
  line-height: 1.05;
}
.md-home-card p {
  color: #bfc4c6 !important;
  font-size: 16px;
}
.md-home-card a {
  margin-top: auto;
  padding-top: 24px;
  color: #fff !important;
  font-weight: 800;
}
.md-home-card a:hover { color: #d0d0d0 !important; }
.md-home-section-heading { max-width: 650px; }
.md-home-process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  margin-top: 50px;
}
.md-home-process-step { border-top: 2px solid #fff; padding-top: 22px; }
.md-home-process-step strong {
  display: block;
  margin-bottom: 28px;
  color: #8f9aa0;
  font-size: 14px;
}
.md-home-process-step h3 { margin: 0 0 12px; font-size: 24px; }
.md-home-process-step p { color: #bfc4c6 !important; }
.md-home-feature {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 80px;
  align-items: start;
}
.md-home-feature-copy p { color: #c8c8c8 !important; font-size: 18px; }
.md-home-final-cta {
  padding: 90px 0 110px;
  border-top: 1px solid #2d2d2d;
}
.md-home-final-cta h2 { max-width: 900px; }
@media (max-width: 900px) {
  .md-home-card-grid { grid-template-columns: 1fr; }
  .md-home-card { min-height: 0; }
  .md-home-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-home-feature { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .md-homepage { padding-top: 18px; }
  .md-home-hero { padding-bottom: 56px; }
  .md-home-hero-copy { padding-top: 30px; }
  .md-home-actions { flex-direction: column; align-items: stretch; }
  .md-home-button { width: 100%; }
  .md-home-section { padding: 58px 0; }
  .md-home-card { padding: 28px; }
  .md-home-process-grid { grid-template-columns: 1fr; gap: 28px; }
  .md-home-final-cta { padding: 64px 0 82px; }
}


/* v1.0.35 — mobile-safe Order Sheet add feedback. */
.md-order-primary {
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 46px;
}
.md-order-primary.is-loading { opacity: .7; cursor: wait; }
.md-order-add-status {
  display: none;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--md-line);
  background: #f7f9fa;
  color: #314953;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.md-order-add-status.is-visible { display: block; }
.md-order-add-status.is-success { border-color: #a7c9b0; background: #f2faf4; color: #1d6b31; }
.md-order-add-status.is-error { border-color: #ddb2b2; background: #fff6f6; color: #9b2c2c; }
@media (max-width: 700px) {
  .md-order-actions .md-order-primary,
  .md-order-actions .md-order-secondary { min-height: 48px; }
}

/* v1.0.37 — stronger Order Sheet action contrast. */
.md-order-secondary {
  border-color: #5f6a70;
  color: #111111 !important;
  font-weight: 800;
}
.md-order-secondary:hover,
.md-order-secondary:focus {
  border-color: #111111;
  background: #f3f5f6;
  color: #000000 !important;
}
.md-order-link-button,
.md-order-remove {
  color: #111111 !important;
  font-weight: 800;
  text-decoration-color: #111111 !important;
  text-decoration-thickness: 1.5px !important;
  text-underline-offset: 3px;
}
.md-order-link-button:hover,
.md-order-link-button:focus,
.md-order-remove:hover,
.md-order-remove:focus {
  color: #000000 !important;
  text-decoration-color: #000000 !important;
}


/* v1.0.38 — restore visible Order Sheet action text on dark buttons. */
.md-order-secondary,
.md-order-link-button,
.md-order-remove {
  color: #d6dde0 !important;
  font-weight: 800;
  text-decoration-color: #d6dde0 !important;
}
.md-order-secondary:hover,
.md-order-secondary:focus,
.md-order-link-button:hover,
.md-order-link-button:focus,
.md-order-remove:hover,
.md-order-remove:focus {
  color: #ffffff !important;
  text-decoration-color: #ffffff !important;
}

/* v1.0.39 - purpose-built Services page */
.md-services-page {
  padding: 22px 0 84px;
  background: var(--md-white);
}
.md-services-intro {
  padding: 20px 0 46px;
  border-bottom: 1px solid var(--md-line);
}
.md-services-eyebrow {
  margin: 0 0 10px;
  color: var(--md-slate);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.md-services-intro h1 {
  margin: 0;
  color: var(--md-charcoal);
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.035em;
}
.md-services-lead {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--md-muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
}
.md-services-list {
  padding-top: 56px;
}
.md-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(42px, 6vw, 86px);
  align-items: center;
  padding: 0 0 66px;
  margin-bottom: 66px;
  border-bottom: 1px solid var(--md-line);
}
.md-service-row-reverse .md-service-media { order: 2; }
.md-service-row-reverse .md-service-copy { order: 1; }
.md-service-media {
  overflow: hidden;
  background: var(--md-soft);
  aspect-ratio: 4 / 3;
}
.md-service-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.md-service-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f3f4f4, #e5e8e9);
}
.md-service-number {
  margin: 0 0 18px;
  color: var(--md-muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
}
.md-service-copy h2 {
  margin: 0 0 20px;
  color: var(--md-charcoal);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -.025em;
}
.md-service-copy p:not(.md-service-number) {
  margin: 0 0 16px;
  color: #424a4e;
  font-size: 17px;
  line-height: 1.65;
}
.md-service-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
.md-service-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--md-charcoal);
  background: var(--md-charcoal);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.md-service-button:hover,
.md-service-button:focus {
  background: var(--md-black);
  border-color: var(--md-black);
  color: #fff !important;
}
.md-service-button-outline {
  background: transparent;
  color: var(--md-charcoal) !important;
}
.md-service-button-outline:hover,
.md-service-button-outline:focus {
  background: var(--md-charcoal);
  color: #fff !important;
}
.md-service-text-link {
  color: var(--md-charcoal);
  font-size: 14px;
  font-weight: 700;
}
.md-service-text-link:hover,
.md-service-text-link:focus { color: var(--md-red); }
.md-services-cta {
  padding: 48px 42px;
  text-align: center;
  background: var(--md-soft);
  border-top: 4px solid var(--md-charcoal);
}
.md-services-cta h2 {
  margin: 0 0 12px;
  color: var(--md-charcoal);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 500;
}
.md-services-cta > p:not(.md-services-eyebrow) {
  margin: 0 auto;
  max-width: 650px;
  color: var(--md-muted);
  font-size: 18px;
}
.md-service-actions-center { justify-content: center; }

@media (max-width: 860px) {
  .md-service-row {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 48px;
    margin-bottom: 48px;
  }
  .md-service-row-reverse .md-service-media,
  .md-service-row-reverse .md-service-copy { order: initial; }
  .md-services-list { padding-top: 38px; }
}

@media (max-width: 600px) {
  .md-services-page { padding-bottom: 54px; }
  .md-services-intro { padding-bottom: 32px; }
  .md-service-media { aspect-ratio: 16 / 10; }
  .md-service-copy p:not(.md-service-number) { font-size: 16px; }
  .md-service-actions { align-items: stretch; flex-direction: column; }
  .md-service-button { width: 100%; }
  .md-services-cta { padding: 38px 20px; }
}

/* v1.0.41 - purpose-built Contact page */
.md-contact-page {
  padding: 22px 0 90px;
  background: var(--md-white);
}
.md-contact-intro {
  padding: 20px 0 44px;
  border-bottom: 1px solid var(--md-line);
}
.md-contact-eyebrow,
.md-contact-number {
  margin: 0 0 10px;
  color: var(--md-slate);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.md-contact-intro h1 {
  margin: 0;
  color: var(--md-charcoal);
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.035em;
}
.md-contact-lead {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--md-muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
}
.md-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: clamp(42px, 7vw, 92px);
  align-items: start;
  padding-top: 54px;
}
.md-contact-copy h2 {
  margin: 0 0 20px;
  color: var(--md-charcoal);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -.025em;
}
.md-contact-copy > p:not(.md-contact-number) {
  margin: 0 0 16px;
  color: #424a4e;
  font-size: 17px;
  line-height: 1.65;
}
.md-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 32px;
}
.md-contact-button,
.md-contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--md-charcoal);
  background: var(--md-charcoal);
  color: #fff !important;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.md-contact-button:hover,
.md-contact-button:focus,
.md-contact-submit:hover,
.md-contact-submit:focus {
  background: var(--md-black);
  border-color: var(--md-black);
  color: #fff !important;
}
.md-contact-button-outline {
  background: transparent;
  color: var(--md-charcoal) !important;
}
.md-contact-button-outline:hover,
.md-contact-button-outline:focus {
  background: var(--md-charcoal);
  color: #fff !important;
}
.md-contact-note {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-left: 4px solid var(--md-charcoal);
  background: var(--md-soft);
  color: #424a4e;
  font-size: 14px;
  line-height: 1.55;
}
.md-contact-note strong { color: var(--md-charcoal); }
.md-contact-form-panel {
  padding: clamp(24px, 4vw, 42px);
  background: var(--md-soft);
  border-top: 4px solid var(--md-charcoal);
}
.md-contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.md-contact-form label {
  display: grid;
  gap: 7px;
  color: var(--md-slate);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.md-contact-form label b { color: var(--md-red); }
.md-contact-form input,
.md-contact-form select,
.md-contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #cbd3d6;
  border-radius: 0;
  background: #fff;
  color: var(--md-charcoal);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.md-contact-form input:focus,
.md-contact-form select:focus,
.md-contact-form textarea:focus {
  outline: 2px solid #8ea0a8;
  outline-offset: 1px;
  border-color: var(--md-slate);
}
.md-contact-message { margin-top: 20px; }
.md-contact-form textarea { min-height: 170px; resize: vertical; }
.md-contact-submit-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}
.md-contact-submit-row p {
  margin: 0;
  color: var(--md-muted);
  font-size: 12px;
}
.md-contact-alert {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--md-line);
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
}
.md-contact-success { border-color: #a7c9b0; background: #f2faf4; color: #1d6b31; }
.md-contact-error { border-color: #ddb2b2; background: #fff6f6; color: #9b2c2c; }
.md-contact-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
@media (max-width: 860px) {
  .md-contact-layout { grid-template-columns: 1fr; gap: 38px; }
}
@media (max-width: 620px) {
  .md-contact-page { padding-bottom: 58px; }
  .md-contact-intro { padding-bottom: 32px; }
  .md-contact-form-grid { grid-template-columns: 1fr; }
  .md-contact-actions,
  .md-contact-submit-row { flex-direction: column; align-items: stretch; }
  .md-contact-button,
  .md-contact-submit { width: 100%; }
}


/* v1.0.46 - Order PDF + Pickup/Delivery */
.md-order-fulfillment {
  margin: 4px 0 0;
  padding: 16px 18px;
  border: 1px solid #d5dde1;
  border-radius: 5px;
  background: #f7f9fa;
}
.md-order-fulfillment legend {
  padding: 0 6px;
  color: #314952;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.md-order-fulfillment-options { display:flex; flex-wrap:wrap; gap:22px; align-items:center; }
.md-order-fulfillment-options label { display:inline-flex; align-items:center; gap:7px; font-weight:700; color:#253b44; cursor:pointer; }
.md-order-fulfillment-options input { width:auto; margin:0; }
.md-order-delivery-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  padding:16px 18px;
  border:1px solid #d5dde1;
  border-radius:5px;
  background:#fbfcfc;
}
.md-order-delivery-fields[hidden] { display:none !important; }
@media (max-width:700px) { .md-order-delivery-fields { grid-template-columns:1fr; } }


/* v1.0.47 - Pickup / Delivery radio spacing + alignment */
.md-order-fulfillment-options {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center !important;
  column-gap: 38px !important;
  row-gap: 14px !important;
  margin-top: 8px;
}
.md-order-fulfillment-options label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
  white-space: nowrap;
}
.md-order-fulfillment-options input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  vertical-align: middle !important;
  flex: 0 0 18px;
}
@media (max-width: 420px) {
  .md-order-fulfillment-options { column-gap: 28px !important; }
}

/* v1.0.48 — submitted-order PDF button contrast on confirmation screen. */
.md-order-confirmation .md-order-submit-actions a.md-order-secondary {
  color: #4f5a5f !important;
  text-decoration: none !important;
}
.md-order-confirmation .md-order-submit-actions a.md-order-secondary:hover,
.md-order-confirmation .md-order-submit-actions a.md-order-secondary:focus {
  color: #252b2e !important;
  border-color: #59656b;
  background: #f3f5f6;
}


/* v1.0.49 — Parts & Components landing-page card alignment. */
body.md-parts-landing .md-content > .wp-block-columns {
  align-items: stretch;
  column-gap: 34px;
  row-gap: 34px;
  margin-bottom: 44px;
}

body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Give every category title the same visual slot so rows line up. */
body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h2,
body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h3,
body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h4 {
  display: flex;
  align-items: flex-end;
  min-height: 76px;
  margin: 0 0 16px !important;
  font-size: clamp(25px, 2.1vw, 32px) !important;
  line-height: 1.12 !important;
}

/* Standardized image stage: same size, same centre line, no stretching. */
body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > figure.wp-block-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 0 20px !important;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > figure.wp-block-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain;
  object-position: center center;
}

/* Keep action buttons on one baseline even when headings wrap differently. */
body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-buttons {
  margin-top: auto !important;
  padding-top: 2px;
}

body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column .wp-block-button__link {
  min-width: 210px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}

/* The final single category card can use the same visual proportions. */
body.md-parts-landing .md-content > h2 + figure.wp-block-image,
body.md-parts-landing .md-content > h3 + figure.wp-block-image {
  width: min(100%, 390px);
  aspect-ratio: 4 / 3;
  margin: 0 0 20px !important;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}
body.md-parts-landing .md-content > h2 + figure.wp-block-image img,
body.md-parts-landing .md-content > h3 + figure.wp-block-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  object-position: center center;
}

@media (max-width: 900px) {
  body.md-parts-landing .md-content > .wp-block-columns {
    column-gap: 22px;
    row-gap: 28px;
  }
  body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h2,
  body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h3,
  body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h4 {
    min-height: 68px;
  }
}

@media (max-width: 700px) {
  body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h2,
  body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h3,
  body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h4 {
    min-height: 0;
    margin-bottom: 12px !important;
  }
  body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > figure.wp-block-image {
    aspect-ratio: 16 / 10;
  }
  body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column .wp-block-button__link {
    width: 100%;
    min-width: 0;
  }
}


/* v1.0.50 — Cabinet Catalogue landing-page card alignment. */
body.md-cabinet-landing .md-content > .wp-block-columns {
  align-items: stretch;
  gap: 34px;
  margin-bottom: 36px;
}

body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column {
  min-width: 0;
}

body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns {
  height: 100%;
  align-items: stretch;
  gap: 30px;
}

/* The four actual category cards are the nested leaf columns. */
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

/* Give every title the same vertical space, including Specialty / Corner / Other. */
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > h2,
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > h3,
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > h4 {
  display: flex;
  align-items: flex-end;
  min-height: 100px;
  margin: 0 0 14px !important;
  font-size: clamp(25px, 2.2vw, 32px) !important;
  line-height: 1.12 !important;
}

/* Every category image gets the same stage; the artwork scales without cropping. */
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > figure.wp-block-image {
  width: 100%;
  height: 270px;
  margin: 0 0 22px !important;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > figure.wp-block-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Keep all four actions on one baseline and one visual size. */
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > .wp-block-buttons {
  margin-top: auto !important;
  padding-top: 2px;
}
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column .wp-block-button__link {
  min-width: 200px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 1050px) {
  body.md-cabinet-landing .md-content > .wp-block-columns { gap: 24px; }
  body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns { gap: 20px; }
  body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > figure.wp-block-image { height: 235px; }
  body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column .wp-block-button__link { min-width: 0; width: 100%; }
}

@media (max-width: 700px) {
  body.md-cabinet-landing .md-content > .wp-block-columns,
  body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns {
    gap: 26px;
  }
  body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > h2,
  body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > h3,
  body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > h4 {
    min-height: 0;
    margin-bottom: 12px !important;
  }
  body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > figure.wp-block-image {
    height: min(68vw, 340px);
  }
}


/* v1.0.51 — Cabinet Catalogue card-centering refinement. */
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column {
  align-items: center;
}
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > h2,
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > h3,
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > h4 {
  width: 100%;
  justify-content: center;
  text-align: center;
}
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > figure.wp-block-image {
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > figure.wp-block-image img {
  margin-left: auto !important;
  margin-right: auto !important;
}
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > .wp-block-buttons {
  width: 100%;
  justify-content: center;
}
body.md-cabinet-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-columns > .wp-block-column > .wp-block-buttons .wp-block-button {
  margin-left: auto;
  margin-right: auto;
}

/* v1.0.52 — Parts & Components card-centering refinement. */
body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column {
  align-items: center;
  text-align: center;
}

body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h2,
body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h3,
body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > h4 {
  width: 100%;
  justify-content: center;
  text-align: center;
}

body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > figure.wp-block-image {
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > figure.wp-block-image img {
  margin-left: auto !important;
  margin-right: auto !important;
}

body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-buttons {
  width: 100%;
  justify-content: center;
}

body.md-parts-landing .md-content > .wp-block-columns > .wp-block-column > .wp-block-buttons .wp-block-button {
  margin-left: auto;
  margin-right: auto;
}

/* Final single card (Inner Pullout Drawer) uses the same centered visual system. */
body.md-parts-landing .md-content > h2,
body.md-parts-landing .md-content > h3,
body.md-parts-landing .md-content > h4 {
  width: min(100%, 390px);
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

body.md-parts-landing .md-content > h2 + figure.wp-block-image,
body.md-parts-landing .md-content > h3 + figure.wp-block-image,
body.md-parts-landing .md-content > h4 + figure.wp-block-image {
  margin-left: auto !important;
  margin-right: auto !important;
}

body.md-parts-landing .md-content > .wp-block-buttons {
  width: min(100%, 390px);
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: center;
}

@media (max-width: 700px) {
  body.md-parts-landing .md-content > h2,
  body.md-parts-landing .md-content > h3,
  body.md-parts-landing .md-content > h4,
  body.md-parts-landing .md-content > .wp-block-buttons {
    width: 100%;
  }
}

/* v1.0.53 — Keep the final Inner Pullout Drawer card at the same visual height as the other Parts cards. */
body.md-parts-landing .md-content > figure.wp-block-image {
  width: min(100%, 390px) !important;
  height: 300px !important;
  aspect-ratio: auto !important;
  margin: 0 auto 18px !important;
  padding: 8px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}
body.md-parts-landing .md-content > figure.wp-block-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto !important;
}

@media (max-width: 700px) {
  body.md-parts-landing .md-content > figure.wp-block-image {
    width: 100% !important;
    height: min(72vw, 300px) !important;
  }
}


/* v1.0.54 — Compact the final Inner Pullout Drawer landing card and keep its action close. */
body.md-parts-landing .md-content img[src*="drawer_assembly_instructions"],
body.md-parts-landing .md-content img[src*="inner-pullout"],
body.md-parts-landing .md-content img[alt*="Inner Pullout Drawer" i] {
  display: block !important;
  width: auto !important;
  height: 280px !important;
  max-width: 100% !important;
  max-height: 280px !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto !important;
}

body.md-parts-landing .md-content figure.wp-block-image:has(img[src*="drawer_assembly_instructions"]),
body.md-parts-landing .md-content figure.wp-block-image:has(img[src*="inner-pullout"]),
body.md-parts-landing .md-content figure.wp-block-image:has(img[alt*="Inner Pullout Drawer" i]) {
  width: min(100%, 390px) !important;
  height: 300px !important;
  min-height: 0 !important;
  max-height: 300px !important;
  margin: 0 auto 12px !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.md-parts-landing .md-content figure.wp-block-image:has(img[src*="drawer_assembly_instructions"]) + .wp-block-buttons,
body.md-parts-landing .md-content figure.wp-block-image:has(img[src*="inner-pullout"]) + .wp-block-buttons,
body.md-parts-landing .md-content figure.wp-block-image:has(img[alt*="Inner Pullout Drawer" i]) + .wp-block-buttons {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

@media (max-width: 700px) {
  body.md-parts-landing .md-content img[src*="drawer_assembly_instructions"],
  body.md-parts-landing .md-content img[src*="inner-pullout"],
  body.md-parts-landing .md-content img[alt*="Inner Pullout Drawer" i] {
    height: 240px !important;
    max-height: 240px !important;
  }
  body.md-parts-landing .md-content figure.wp-block-image:has(img[src*="drawer_assembly_instructions"]),
  body.md-parts-landing .md-content figure.wp-block-image:has(img[src*="inner-pullout"]),
  body.md-parts-landing .md-content figure.wp-block-image:has(img[alt*="Inner Pullout Drawer" i]) {
    height: 255px !important;
    max-height: 255px !important;
  }
}

/* v1.0.55 — final Inner Pullout Drawer landing-card fix. */
body.md-parts-landing .md-content .md-inner-pullout-landing-figure {
  width: min(100%, 390px) !important;
  height: 430px !important;
  min-height: 0 !important;
  max-height: 430px !important;
  margin: 0 auto 14px !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff;
}
body.md-parts-landing .md-content .md-inner-pullout-landing-image {
  display: block !important;
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto !important;
}
body.md-parts-landing .md-content .md-inner-pullout-landing-buttons {
  width: min(100%, 390px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  justify-content: center !important;
}
@media (max-width: 700px) {
  body.md-parts-landing .md-content .md-inner-pullout-landing-figure {
    width: 100% !important;
    height: min(110vw, 430px) !important;
    max-height: 430px !important;
  }
  body.md-parts-landing .md-content .md-inner-pullout-landing-buttons {
    width: 100% !important;
  }
}

/* How to Order page - v1.0.56 */
.md-how-order-page {
  background: #fff;
  color: #202a2f;
  padding: 0 0 72px;
}
.md-how-order-hero {
  padding-top: 48px;
  padding-bottom: 42px;
  border-bottom: 1px solid #dfe4e7;
}
.md-how-order-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .15em;
  color: #53707c;
}
.md-how-order-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  font-weight: 500;
  color: #1d2529;
}
.md-how-order-lead {
  max-width: 850px;
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
  color: #4c5b63;
}
.md-how-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.md-how-order-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid #252c30;
  border-radius: 999px;
  background: #252c30;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}
.md-how-order-button:hover,
.md-how-order-button:focus { background: #111; border-color: #111; }
.md-how-order-button-outline { background: #fff; color: #29343a !important; }
.md-how-order-button-outline:hover,
.md-how-order-button-outline:focus { background: #f1f4f5; color: #111 !important; }
.md-how-order-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0;
  padding-top: 48px;
  padding-bottom: 52px;
}
.md-how-order-step {
  min-height: 290px;
  padding: 28px 30px 30px;
  border-top: 1px solid #dfe4e7;
  border-right: 1px solid #dfe4e7;
}
.md-how-order-step:nth-child(3n+1) { border-left: 1px solid #dfe4e7; }
.md-how-order-step:nth-last-child(-n+3) { border-bottom: 1px solid #dfe4e7; }
.md-how-order-step-number {
  display: block;
  margin-bottom: 28px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .14em;
  color: #b11b25;
}
.md-how-order-step h2 {
  margin: 0 0 14px;
  font-size: 25px;
  line-height: 1.15;
  color: #1e282d;
}
.md-how-order-step p {
  margin: 0 0 12px;
  line-height: 1.6;
  color: #53636b;
}
.md-how-order-note {
  font-size: 14px;
  color: #6b777d !important;
}
.md-how-order-step-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 16px;
}
.md-how-order-step-links a,
.md-how-order-inline-link {
  color: #21343e;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.md-how-order-builds {
  padding-top: 20px;
  padding-bottom: 56px;
}
.md-how-order-section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}
.md-how-order-section-heading h2,
.md-how-order-checklist h2,
.md-how-order-cta h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  color: #1d2529;
  font-weight: 500;
}
.md-how-order-build-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.md-how-order-build-card {
  padding: 28px;
  background: #f4f6f6;
  border: 1px solid #dce2e5;
}
.md-how-order-build-code {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #263137;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.md-how-order-build-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  color: #202a2f;
}
.md-how-order-build-card p {
  margin: 0;
  line-height: 1.6;
  color: #526168;
}
.md-how-order-checklist {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 64px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 48px;
  border-top: 1px solid #dfe4e7;
  border-bottom: 1px solid #dfe4e7;
}
.md-how-order-checklist ul {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.md-how-order-checklist li {
  position: relative;
  padding-left: 23px;
  color: #49585f;
  line-height: 1.5;
}
.md-how-order-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #b11b25;
  font-weight: 900;
}
.md-how-order-cta {
  padding-top: 58px;
  text-align: center;
}
.md-how-order-cta p:not(.md-how-order-eyebrow) {
  max-width: 680px;
  margin: 14px auto 0;
  color: #53636b;
  font-size: 18px;
}
.md-how-order-actions-center { justify-content: center; }

@media (max-width: 900px) {
  .md-how-order-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .md-how-order-step:nth-child(3n+1) { border-left: 0; }
  .md-how-order-step:nth-child(2n+1) { border-left: 1px solid #dfe4e7; }
  .md-how-order-step:nth-last-child(-n+3) { border-bottom: 0; }
  .md-how-order-step:nth-last-child(-n+2) { border-bottom: 1px solid #dfe4e7; }
  .md-how-order-build-grid { grid-template-columns: 1fr; }
  .md-how-order-checklist { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 620px) {
  .md-how-order-hero { padding-top: 30px; }
  .md-how-order-steps { grid-template-columns: 1fr; }
  .md-how-order-step { min-height: 0; border-left: 1px solid #dfe4e7 !important; border-bottom: 0 !important; }
  .md-how-order-step:last-child { border-bottom: 1px solid #dfe4e7 !important; }
  .md-how-order-checklist ul { grid-template-columns: 1fr; }
  .md-how-order-actions { flex-direction: column; }
  .md-how-order-button { width: 100%; }
}

/* v1.0.57 — leg-aware cabinet height display */
.md-leg-height-helper { display:block; margin-top:6px; color:#52616a; font-size:12px; line-height:1.35; }
.md-leg-height-helper strong { color:#153845; font-weight:700; }


/* v1.0.58 — product-form View Order Sheet button contrast. */
.md-add-order-form .md-order-actions a.md-order-secondary {
  color: #4f5a5f !important;
  text-decoration: none !important;
}
.md-add-order-form .md-order-actions a.md-order-secondary:hover,
.md-add-order-form .md-order-actions a.md-order-secondary:focus {
  color: #252b2e !important;
  border-color: #59656b;
  background: #f3f5f6;
}
