/* Frontend v24. Reuses v23 tokens; never changes native gallery or catalog order. */
body.ma-design-v23 {
  --wd-primary-color: var(--ma23-gold);
  --wd-text-color: var(--ma23-ink);
  --wd-title-font: var(--ma23-font);
  --wd-text-font: var(--ma23-font);
  --wd-link-color: var(--ma23-ink);
}
body.ma-design-v23 :is(.whb-header, .wd-side-hidden, .woocommerce-breadcrumb, .woocommerce-result-count, .woocommerce-ordering, .product_meta, .woocommerce-tabs, .wd-products, .ma24-shared-footer) {
  font-family: var(--ma23-font);
}
body.ma-design-v23 :is(h1,h2,h3,p) { text-wrap: pretty; }
body.ma-design-v23 :is(h1,h2,h3) { text-wrap: balance; font-style: normal; }
body.ma-design-v23 .whb-top-bar .wd-social-icons { display: none; }
body.ma-design-v23 .whb-top-bar .wd-header-text { font: var(--ma23-xs); letter-spacing: normal; }
body.ma-design-v23 .wd-nav-main > li > a { font: var(--ma23-sm); font-weight: 600; }
body.ma-design-v23 .wd-nav-main > li:last-child > a { min-height: 48px; padding: 8px 12px; border-radius: 8px; }
body.ma-design-v23 .ma-header-selection a { min-height: 48px; padding: 8px; border-radius: 8px; }
body.ma-design-v23 .mobile-nav { transition: transform 500ms var(--ma23-curve); }
body.ma-design-v23 .ma24-menu-close { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin: 16px 16px 8px auto; padding: 8px 12px; background: var(--ma23-soft); color: var(--ma23-ink); border: 1px solid var(--ma23-line); border-radius: 8px; font: var(--ma23-sm); font-weight: 600; }
body.ma-design-v23 .ma24-menu-close svg { width: 24px; height: 24px; }
body.ma-design-v23.ma23-landing-page .ma-funnel-utility { display: none; }
body.ma-design-v23:not(.ma23-landing-page) .wd-content-layout { padding-inline: 0; }
body.ma-design-v23 .ma-funnel-utility { padding-block: 8px; font: var(--ma23-sm); }
body.ma-design-v23 .ma-funnel-utility > a { min-height: 48px; padding: 8px 12px; border-radius: 8px; text-decoration: none; }
body.ma-design-v23 .ma-funnel-utility > a:hover { background: var(--ma23-soft); }

/* Catalog text and controls, including related products, keep readable contrast. */
body.ma-design-v23 .wd-products .wd-product-cats a { color: var(--ma23-muted); font: var(--ma23-sm); }
body.ma-design-v23 .wd-products .price .amount,
body.ma-design-v23 .summary-inner > .price .amount { color: var(--ma23-gold); font: inherit; font-weight: 600; }
body.ma-design-v23 .wd-products .wd-add-btn > a { min-height: 48px; padding: 8px 12px; border-radius: 8px; font: var(--ma23-sm); font-weight: 600; white-space: normal; }
body.ma-design-v23 .woocommerce-pagination .page-numbers :is(a,span) { min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 8px; border-radius: 8px; color: var(--ma23-ink); background: var(--ma23-paper); font: var(--ma23-sm); }
body.ma-design-v23 .woocommerce-pagination .page-numbers .current { background: var(--ma23-ink); color: var(--ma23-paper); }
body.ma-design-v23 .woocommerce-pagination .page-numbers a:hover { background: var(--ma23-gold-soft); }
body.ma-design-v23 :is(.woocommerce-ordering select,.summary .quantity input) { min-height: 48px; border-radius: 8px; font: var(--ma23-base); }
body.ma-design-v23 .summary :is(.single_add_to_cart_button,.founda-sample-button) { min-height: 48px; padding: 8px 12px; border-radius: 8px; font: var(--ma23-base); font-weight: 600; }
body.ma-design-v23 .ma-funnel-decision { border-radius: 16px; }
body.ma-design-v23 .ma-funnel-decision h2,
body.ma-design-v23 .woocommerce-tabs h2 { font: var(--ma23-2xl); font-weight: 600; }
body.ma-design-v23 .ma24-supply { max-width: 680px; }
body.ma-design-v23 .ma24-supply a { display: inline-flex; align-items: center; min-height: 48px; margin-right: 16px; text-decoration: underline; text-underline-offset: 4px; }

/* Wider input area, one meaningful surface per section, and no iOS input zoom. */
body.ma-design-v23 .founda-request { padding: 32px; border-radius: 16px; }
body.ma-design-v23 .founda-request,
body.ma-design-v23 .founda-request * { box-sizing: border-box; }
body.ma-design-v23 .founda-request :is(input,select,textarea) { font-family: var(--ma23-font); font-size: 16px; line-height: 24px; min-height: 48px; border-radius: 8px; padding: 8px 12px; }
body.ma-design-v23 .founda-request input[type=checkbox] { min-height: 0; }
body.ma-design-v23 .founda-request :is(label,.founda-column-label) { font: var(--ma23-sm); }
body.ma-design-v23 .founda-request .founda-request-step { border-radius: 12px; padding: 24px; }
body.ma-design-v23 .founda-request legend { font: var(--ma23-xl); font-weight: 600; padding-inline: 8px; }
body.ma-design-v23 .founda-request :is(.founda-request-send,.founda-request-update) { min-height: 48px; padding: 8px 12px; font: var(--ma23-base); font-weight: 600; border-radius: 8px; }
body.ma-design-v23 .founda-request .founda-request-item-controls { min-width: 0; }
body.ma-design-v23 .founda-request .founda-request-item-controls input { text-align: left; }
body.ma-design-v23 .founda-request .founda-needs { margin-block: 16px; padding: 16px; }

body.ma-design-v23 .wd-footer { display: none; }
body.ma-design-v23 .ma24-shared-footer { color: var(--ma23-ink); background: var(--ma23-soft); }
body.ma-design-v23.ma23-landing-page .ma24-shared-footer { background: var(--ma23-ivory); }
body.ma-design-v23 .ma24-shared-footer .ma23-footer { margin: 0; }
body.ma-design-v23 .ma24-shared-footer h2 { color: var(--ma23-ink); }
body.ma-design-v23 .ma24-shared-footer p { color: var(--ma23-muted); font: var(--ma23-sm); }
body.ma-design-v23 .ma24-shared-footer .ma23-wordmark { color: var(--ma23-ink); font: var(--ma23-xl); font-weight: 700; }
body.ma-design-v23 .ma24-copyright { margin: 0; padding-block: 16px 24px; }
body.ma-design-v23 :is(.whb-header,.woocommerce-pagination,.wd-products,.woocommerce-tabs,.ma24-shared-footer) :is(a,button,input,select,summary):focus-visible { outline: 2px solid var(--ma23-gold); outline-offset: 4px; }

@media (max-width: 1024px) {
  body.ma-design-v23 .whb-top-bar { display: none; }
}
@media (max-width: 760px) {
  body.ma-design-v23:not(.ma23-landing-page) .wd-content-layout { width: calc(100% - 32px); padding-block: 24px 32px; }
  body.ma-design-v23 .ma-funnel-utility { width: calc(100% - 32px); gap: 8px; }
  body.ma-design-v23 .ma-funnel-utility > a { font: var(--ma23-xs); padding: 8px; }
  body.ma-design-v23 .ma-catalog-intro { padding: 24px 16px; }
  body.ma-design-v23 .wd-products > .wd-product { padding: 8px; }
  body.ma-design-v23 .wd-products .wd-entities-title { font: var(--ma23-sm); font-weight: 600; }
  body.ma-design-v23 .woocommerce-pagination .page-numbers { flex-wrap: wrap; }
  body.ma-design-v23 .founda-request { padding: 0; border: 0; background: transparent; margin-block: 24px; }
  body.ma-design-v23 .founda-request .founda-request-step { padding: 16px; margin-bottom: 24px; }
  body.ma-design-v23 .founda-request .founda-picker { padding: 16px; }
  body.ma-design-v23 .founda-request .founda-request-item-controls { grid-column: 1 / -1; }
  body.ma-design-v23 .founda-request .founda-request-item-controls input { max-width: none; }
  body.ma-design-v23 .founda-request .founda-request-send,
  body.ma-design-v23 .founda-request .founda-request-update { width: 100%; }
  body.ma-design-v23 .founda-request .founda-needs { padding: 12px; }
  body.ma-design-v23 .ma24-shared-footer .ma23-footer { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 16px; }
  body.ma-design-v23 .ma24-shared-footer .ma23-footer > div:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  body.ma-design-v23 .mobile-nav { transition: none; }
}

/* Cart intro eyebrow needs stronger contrast on the ivory surface. */
body.woocommerce-cart .ma-rfq-intro .ma-eyebrow {
  color: #6f5222;
}

/* PDP review form is secondary; JS wraps it in a native disclosure. */
body.ma-design-v23.single-product .ma-review-drawer {
  margin: 16px 0;
  border: 1px solid var(--ma23-line);
  border-radius: 12px;
  background: #fff;
}

body.ma-design-v23.single-product .ma-review-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 20px;
  color: var(--ma23-ink);
  font: 600 16px/24px var(--ma23-font);
  cursor: pointer;
  list-style: none;
}

body.ma-design-v23.single-product .ma-review-summary::-webkit-details-marker {
  display: none;
}

body.ma-design-v23.single-product .ma-review-summary::after {
  content: "+";
  flex: 0 0 auto;
  font: 400 24px/1 var(--ma23-font);
}

body.ma-design-v23.single-product .ma-review-drawer[open] .ma-review-summary::after {
  content: "−";
}

body.ma-design-v23.single-product .ma-review-summary small {
  display: block;
  margin-top: 2px;
  color: var(--ma23-muted);
  font: 400 13px/20px var(--ma23-font);
}

body.ma-design-v23.single-product .ma-review-drawer #review_form_wrapper {
  padding: 0 20px 20px;
}

@media (max-width: 760px) {
  body.ma-design-v23.single-product .ma-review-summary { padding: 12px 16px; }
  body.ma-design-v23.single-product .ma-review-drawer #review_form_wrapper { padding: 0 16px 16px; }
}
