/*
 * ============================================================================
 *  MILTONCAT MANAGED FILE - DO NOT EDIT ON THE SERVER
 * ----------------------------------------------------------------------------
 *  Owner : Getfused (git repo: miltoncat)
 *  Deploy: SFTP overwrites this file wholesale. Server-side edits WILL BE
 *          LOST without warning, with no backup and no notification.
 *
 *  Site code belongs in one of these instead. Neither is ever written by a
 *  Getfused deploy, so anything you put there is safe:
 *      themes/miltoncat-gp/functions.php   (below the SITE CUSTOMIZATIONS marker)
 *      themes/miltoncat-gp/style.css       (below the SITE CUSTOMIZATIONS marker)
 *
 *  Full ownership map: _OWNERSHIP.md in the theme root.
 * ============================================================================
 */
/* ==========================================================================
   MiltonCAT - equipment detail templates (new_equipment + used_equipment)
   Styled to the approved comp (MCAT-26): ink hero band (breadcrumb, title,
   gallery | price rail), black tab bar, white content band, promo row,
   surface "Similar Products" band. The comp and reference captures are in the
   git repo under docs/comps/mcat-26/. It is drawn at 1440px (1280 container),
   and a comment that starts "Comp:" gives a size measured from it - odd-looking
   paddings (9.5px, 13px, 27px) are there to land on those sizes exactly.

   New vs used: <article> carries WordPress's own post_class() names, and
   .type-new_equipment / .type-used_equipment are what this file and the
   script use to tell the two page types apart.

   Reads the site-wide tokens from site-style.css (--mc-*). Everything is
   scoped under .mc-detail so generic class names (.gallery, .tabs, .modal)
   cannot collide with GeneratePress / GenerateBlocks. Buttons and badges are
   the shared .mc-btn / .mc-badge components from site-style.css.

   Layout: .detail-grid is ONE grid for the hero, tab bar and content, so the
   rail can stay sticky across all three. .mc-main and .tabs are
   display:contents - their children (gallery, tab list, panels) are the grid
   items. Bands are painted edge to edge with the border-image rule in
   "Full-bleed bands" below; nothing leaves the page container.

   Custom properties:
     --mc-*          Site-wide design tokens, defined in site-style.css. A
                     colour, size or spacing more than one page could use
                     belongs there, not here.
     --mc-detail-*   Declared on .mc-detail below: measurements and tints that
                     exist only in this page's comp.
     --mc-band       Colour of a full-bleed band; set it on the band element.
     --mc-plain-bg, --mc-plain-hover
                     Fill and hover colour of chrome-less buttons (tabs,
                     accordion headers, Print / Share); set per band so the
                     one button rule works on white, ink and black.
     --mc-rail-h, --mc-cell-img, --mc-cell-zoom, --mc-thumb-img,
     --mc-thumb-bg-zoom, --mc-thumb-zoom / -x / -y
                     Written by equipment-detail.js at run time (see below).

   Breakpoints (equipment-detail.js repeats the ones marked *; change both):
     >= 1025px *  two columns, gallery | rail; price card sticky
     <= 1024px    one column, rail under the gallery, nothing sticky
     <=  768px *  tab bar becomes stacked accordions; promo row stacks
     <=  640px    phone: stacked tables, 44px touch targets
     <=  380px    narrowest phones
   Thumbnails per row are not set here: five, then four below 640px and three
   below 420px, all in the Slick options in the script.

   State set by equipment-detail.js and styled here:
     .tabs__panel.is-active       the selected tab's panel (tab mode)
     .tabs.is-accordion           tabs are in accordion mode (<= 768px)
     .tabs__panel.is-open         a tab's panel opened as an accordion
     .accordion__panel.is-open    an open Condition / spec group
     .avail-used__extra.is-open   "View More" list in the rail is open
     .detail-grid.is-rail-sticky  sticky price card: the script has measured
                                  the rail (--mc-rail-h) and the first card,
                                  .rail__sticky, may now stick
     .gallery__thumb[aria-current="true"]   thumbnail of the image on show
     .gallery__cell[data-backdrop], --mc-cell-img, --mc-cell-zoom
                                  photo backdrop, used listings (see Gallery)
     .gallery__thumb-img[data-backdrop], --mc-thumb-img, --mc-thumb-bg-zoom,
     --mc-thumb-zoom, --mc-thumb-x, --mc-thumb-y
                                  the same backdrop in a thumbnail (see Gallery)
     .modal-backdrop.is-open      inquiry modal is open
   With JS off none of these change: the page shows the first tab's panel
   only (the other tabs cannot be opened), the first gallery image, and the
   rail scrolls away with the hero.

   The site team restyles these pages from style.css, which loads after this
   file. Renaming or removing a class here can silently break their rules -
   search the staging copy of style.css before you do.
   ========================================================================== */

.mc-detail {
  /* Legacy aliases. style.css (site team) still reads these names in its
     .mc-detail overrides - keep them resolving. Use --mc-* in this file. */
  --cat-yellow: var(--mc-cat-yellow);
  --cat-yellow-dark: var(--mc-yellow-dark);
  --ink: var(--mc-ink);
  --ink-2: var(--mc-neutral);
  --ink-3: var(--mc-text-secondary);
  --line: var(--mc-border);
  --line-2: var(--mc-cat-gray);
  --bg: var(--mc-surface);
  --bg-2: var(--mc-neutral-tint);
  --white: var(--mc-white);

  --mc-detail-rail: 356px;        /* comp: 900 gallery + 24 gap + 356 rail */
  --mc-detail-zebra: #f9fafa;     /* comp: alternate table row */
  --mc-detail-on-dark: #c9ced2;   /* secondary text on ink / black (9.9:1) */
  --mc-detail-hairline: rgba(255, 255, 255, 0.28);
  --mc-detail-edge: rgba(255, 255, 255, 0.6); /* comp: 1px line round the gallery image, thumbs, above the tab bar */
  --mc-plain-hover: var(--mc-ink); /* hover colour of chrome-less buttons */

  /* Sit at the token page padding whatever width GeneratePress gives the
     container: pad by the difference between the wanted gutter and the gap
     the container already leaves on each side. */
  padding-inline: max(0px, calc(var(--mc-page-padding) - (100vw - 100%) / 2));

  color: var(--mc-ink);
  font-family: var(--mc-font-body);
  font-size: var(--mc-fs-body);
  line-height: var(--mc-lh-body);
}

.mc-detail *,
.mc-detail *::before,
.mc-detail *::after { box-sizing: border-box; }

.mc-detail img { max-width: 100%; height: auto; display: block; }
.mc-detail a { color: inherit; }

/* ---------- Full-bleed bands ---------------------------------------------
   A one-colour border-image with a 100vmax horizontal outset paints the band
   out to both viewport edges without moving the element or creating
   horizontal scroll. It is drawn with the element's own box, so stacked bands
   meet exactly (a clipped box-shadow leaves hairline seams between them). */
.mc-detail .tabs__list,
.mc-detail .detail-grid::before,
.mc-detail .section-block {
  background: var(--mc-band);
  border-image: conic-gradient(var(--mc-band) 0 0) fill 0 / 0 / 0 100vmax;
}

/* ---------- Breadcrumb + title (on ink) ---------------------------------- */
.mc-detail .mc-breadcrumb {
  font-size: var(--mc-fs-body);
  color: var(--mc-white);
  padding: 4px 0 0;
}
.mc-detail .mc-breadcrumb a {
  color: var(--mc-detail-on-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mc-detail .mc-breadcrumb a:hover,
.mc-detail .mc-breadcrumb a:focus-visible { color: var(--mc-white); }
/* The last crumb (the listing's category or family) reads as "you are
   here": white, underlined only on hover. */
.mc-detail .mc-breadcrumb > :last-child { color: var(--mc-white); text-decoration: none; }
.mc-detail .mc-breadcrumb a:last-child:hover { text-decoration: underline; }
.mc-detail .mc-breadcrumb .sep { margin: 0 6px; color: var(--mc-detail-on-dark); }

.mc-detail .mc-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0 27px; /* comp: 16px under the breadcrumb, 27px down to the gallery */
  flex-wrap: wrap;
}
.mc-detail .mc-title-row h1 {
  margin: 0;
  color: var(--mc-white);
  font-family: var(--mc-font-display);
  font-size: clamp(1.75rem, 4.2vw, var(--mc-fs-h1));
  font-weight: 400;
  line-height: var(--mc-lh-tight);
}
.mc-detail .page-actions {
  --mc-plain-hover: var(--mc-cat-yellow);
  display: flex;
  gap: 28px;
  padding-bottom: 6px;
}
.mc-detail .page-actions button,
.mc-detail .page-actions a {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  font-size: var(--mc-fs-link);
  font-weight: 700;
  color: var(--mc-white);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}
.mc-detail .page-actions a:hover { color: var(--mc-cat-yellow); }
/* Print/Share icons - inline SVG (no icon font in this theme, see the
   gallery-arrow comment below for why), sized to match the text line. */
.mc-detail .page-actions .mc-action-icon { display: block; width: 16px; height: 16px; color: var(--mc-detail-on-dark); }
/* MCAT-8 (Dan, 2026-06-30): placeholder-only, not wired to any behavior. */
.mc-detail .page-actions a[data-share-placeholder] { cursor: default; }

/* ---------- Layout grid -------------------------------------------------- */
.mc-detail .detail-grid {
  --mc-band: var(--mc-white);
  display: grid;
  /* minmax(0, 1fr) - NOT plain 1fr. Plain 1fr implies minmax(auto, 1fr), whose
     `auto` minimum grows to the column's min-content width; the Slick gallery
     sets an explicit wide track width, so plain 1fr lets the column expand to
     it and the whole page scrolls horizontally. */
  grid-template-columns: minmax(0, 1fr) var(--mc-detail-rail);
  grid-template-areas:
    "gallery rail"
    "tabs    tabs"
    "panels  .";
  column-gap: var(--mc-gap);
  align-items: start;
}
.mc-detail .mc-main,
.mc-detail .tabs { display: contents; }
.mc-detail .gallery { grid-area: gallery; }
.mc-detail .rail { grid-area: rail; }
.mc-detail .tabs__list { grid-area: tabs; }
.mc-detail .tabs__panels,
.mc-detail .mc-manual { grid-area: panels; }

/* The white content band: a grid item behind the panels row, both columns. */
.mc-detail .detail-grid::before {
  content: "";
  grid-row: panels;
  grid-column: 1 / -1;
  align-self: stretch;
  z-index: 0;
}
.mc-detail .gallery,
.mc-detail .tabs__list,
.mc-detail .tabs__panels,
.mc-detail .mc-manual { position: relative; z-index: 1; min-width: 0; }
/* Above the rows it spans when sticky, so the price card passes over the tab
   bar and the white band rather than under them. */
.mc-detail .rail { position: relative; z-index: 2; min-width: 0; }

.mc-detail .tabs__panels,
.mc-detail .mc-manual { padding: 30px 0 96px; }

/* Sticky price block (comp: "Price Block" stays in view on desktop).
   equipment-detail.js adds .is-rail-sticky once it has measured the rail: the
   rail then spans the hero, tab bar and content rows so its first card can
   stick the whole way down, and --mc-rail-h keeps the hero row tall enough
   that the cards below it (promo, Available Used) never reach the tab bar.
   Without JS the rail stays in the hero row and simply scrolls away. */
@media (min-width: 1025px) {
  .mc-detail .detail-grid.is-rail-sticky {
    grid-template-rows: minmax(var(--mc-rail-h, 0px), auto) auto auto;
  }
  /* Keeps the "rail" column from grid-area above; only the rows change. */
  .mc-detail .detail-grid.is-rail-sticky .rail {
    grid-row: 1 / span 3;
    align-self: stretch;
    align-content: start;
  }
  .mc-detail .detail-grid.is-rail-sticky .rail__sticky {
    position: sticky;
    top: 24px;
    z-index: 2;
  }
  /* Offset only when the toolbar is really there: staging defines
     --wp-admin--admin-bar--height (32px) for logged-out visitors too. */
  .admin-bar .mc-detail .detail-grid.is-rail-sticky .rail__sticky {
    top: calc(24px + var(--wp-admin--admin-bar--height, 32px));
  }
}

@media (max-width: 1024px) {
  .mc-detail .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "gallery"
      "rail"
      "tabs"
      "panels";
  }
}

/* ---------- Gallery (accessible-slick) ----------------------------------- */
/* margin: the site type styles give <section> a bottom margin; the comp has
   24px from the thumbnails to the tab bar and that is the padding here. */
.mc-detail .gallery { margin: 0; padding-bottom: 24px; }
.mc-detail .gallery__main {
  /* accessible-slick's theme adds 30px under every slider. */
  margin-bottom: 0;
  background: var(--mc-white);
  overflow: hidden;
}
/* Comp: a 1px light edge round the image. A pseudo-element so the image keeps
   its full size (900 x 460 in the comp); sits above the slides, below the
   arrows (z-index 5). Positioned against .gallery__main, which Slick's own
   CSS makes position: relative. */
.mc-detail .gallery__main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 1px solid var(--mc-detail-edge);
  pointer-events: none;
}
/* Until Slick initializes, only show the first cell to avoid a tall stack. */
.mc-detail .gallery__main:not(.slick-initialized) .gallery__cell { display: none; }
.mc-detail .gallery__main:not(.slick-initialized) .gallery__cell:first-child { display: block; }
/* vertical-align: Slick makes the cell inline-block, which leaves a text
   descender gap under it (the image area came out 466px, not 460). */
.mc-detail .gallery__cell { position: relative; overflow: hidden; vertical-align: top; }
/* contain, not cover: feed photos come in every ratio and product shots are
   cut-outs on white - never crop the machine. */
.mc-detail .gallery picture { display: block; }
.mc-detail .gallery__cell img {
  position: relative;
  width: 100%;
  aspect-ratio: 900 / 460;
  object-fit: contain;
}
/* Photo backdrop (used listings): once equipment-detail.js has looked at a
   slide's photo it marks the cell data-backdrop="on" and hands over the photo
   (--mc-cell-img) and a zoom (--mc-cell-zoom). A blurred, darkened copy then
   fills the bars either side of the "contain" image instead of white. Until
   then - and for cut-outs on white, or with no JS - the stage stays white.
   inset -32px: a blur fades out at its own edges, so the copy overhangs the
   cell (which clips it) by more than the 24px blur radius. brightness 0.55
   keeps the bars darker than the photo so they do not compete with it. */
.mc-detail .gallery__cell::before {
  content: "";
  position: absolute;
  inset: -32px;
  background: var(--mc-black) var(--mc-cell-img, none) center / cover no-repeat;
  filter: blur(24px) brightness(0.55);
  transform: scale(var(--mc-cell-zoom, 1));
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.mc-detail .gallery__cell[data-backdrop="on"]::before { opacity: 1; }

/* Comp: five 150 x 84 thumbs, 12px apart, starting at the left edge - the row
   stops short of the image's right edge. 810 = 5 x (150 + 12). "Five" is also
   slidesToShow in the script's Slick options; change them together. */
.mc-detail .gallery__nav { margin: 16px -6px 0; max-width: 810px; }
/* Fewer thumbs than the row holds: Slick centres the track; the comp starts
   them at the left edge. */
.mc-detail .gallery__nav .slick-track { margin-left: 0; }
/* Before Slick starts (and with JS off): one row of the first five thumbs.
   The sibling chain below matches the sixth thumb onwards and hides them. */
.mc-detail .gallery__nav:not(.slick-initialized) {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.mc-detail .gallery__nav:not(.slick-initialized) .gallery__thumb ~ .gallery__thumb ~ .gallery__thumb ~ .gallery__thumb ~ .gallery__thumb { display: none; }
.mc-detail .gallery__thumb {
  cursor: pointer;
  padding: 0 6px;
  outline: none;
  /* Thumbnails are <button>s (keyboard-operable); strip native button chrome so
     they read as the image-only control they were as <div>s. */
  display: block;
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  vertical-align: top; /* no descender gap under the row (see .gallery__cell) */
  -webkit-appearance: none;
  appearance: none;
}
/* The thumbnail's picture box. Three layers, back to front: the blurred
   backdrop (::before, padded photos on used listings only), the photo, and
   the frame (::after), which is drawn over the photo so no state shifts it. */
.mc-detail .gallery__thumb-img {
  position: relative;
  display: block;
  aspect-ratio: 150 / 84;
  overflow: hidden;
  background: var(--mc-white);
}
.mc-detail .gallery__thumb-img picture { height: 100%; }
/* Used-listing photos are cropped to fill the box. */
.mc-detail .gallery__thumb-img img {
  position: relative; /* paints over the ::before backdrop */
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Thumbnail backdrop (used listings): the image server pads portrait photos
   with white, which would show as white bars here. For a padded photo
   equipment-detail.js marks the box data-backdrop="on", clips the padding off
   the <img> and hands over the photo (--mc-thumb-img) plus two sets of
   numbers: --mc-thumb-zoom / -x / -y size and centre the whole picture in the
   box, and --mc-thumb-bg-zoom pushes the blurred copy's padding out of view.
   The result matches the main image: the picture uncropped, a blurred,
   darkened copy either side. Photos with no padding, new equipment and no-JS
   never get the attribute. Blur and overhang are the main image's 24px / 32px
   scaled down to thumbnail size. */
.mc-detail .gallery__thumb-img::before {
  content: "";
  position: absolute;
  inset: -8px;
  background: var(--mc-black) var(--mc-thumb-img, none) center / cover no-repeat;
  filter: blur(5px) brightness(0.55);
  transform: scale(var(--mc-thumb-bg-zoom, 1));
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.mc-detail .gallery__thumb-img[data-backdrop="on"]::before { opacity: 1; }
.mc-detail .gallery__thumb-img[data-backdrop="on"] img {
  object-fit: contain;
  transform: translate(var(--mc-thumb-x, 0), var(--mc-thumb-y, 0)) scale(var(--mc-thumb-zoom, 1));
}
/* Product cut-outs on white: show the whole machine. */
.mc-detail.type-new_equipment .gallery__thumb-img img { object-fit: contain; }
/* Comp: a 1px light edge, then a 1px gap in the hero's ink, then the photo;
   2px yellow when current. */
.mc-detail .gallery__thumb-img::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--mc-detail-edge);
  box-shadow: inset 0 0 0 1px var(--mc-ink);
  transition: border-color .15s;
  pointer-events: none;
}
.mc-detail .gallery__thumb:hover .gallery__thumb-img::after { border-color: var(--mc-white); }
/* The current thumb is marked by equipment-detail.js (aria-current), not by
   Slick's .slick-current - that class tracks the row's own scroll position. */
.mc-detail .gallery__thumb[aria-current="true"] .gallery__thumb-img::after {
  border: 2px solid var(--mc-cat-yellow);
  box-shadow: none;
}

/* Slick arrow buttons (accessible-slick ships base styles; theme them) */
.mc-detail .gallery__main .slick-prev,
.mc-detail .gallery__main .slick-next {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--mc-cat-yellow);
  z-index: 5;
  transition: background-color var(--mc-transition);
}
/* After a mouse click the arrow keeps :focus, and accessible-slick's theme
   then turns the icon orange and nudges the button up 1px. Hold both steady;
   hover and keyboard focus (below, so they win) still invert the colours. */
.mc-detail .gallery__main .slick-prev:focus,
.mc-detail .gallery__main .slick-next:focus { top: 50%; }
.mc-detail .gallery__main .slick-prev:focus .slick-prev-icon,
.mc-detail .gallery__main .slick-next:focus .slick-next-icon { color: var(--mc-ink); }
.mc-detail .gallery__main .slick-prev:hover,
.mc-detail .gallery__main .slick-next:hover,
.mc-detail .gallery__main .slick-prev:focus-visible,
.mc-detail .gallery__main .slick-next:focus-visible { background: var(--mc-ink); }
.mc-detail .gallery__main .slick-prev:hover .slick-prev-icon,
.mc-detail .gallery__main .slick-next:hover .slick-next-icon,
.mc-detail .gallery__main .slick-prev:focus-visible .slick-prev-icon,
.mc-detail .gallery__main .slick-next:focus-visible .slick-next-icon { color: var(--mc-cat-yellow); }
.mc-detail .gallery__main .slick-prev { left: 10px; }
.mc-detail .gallery__main .slick-next { right: 10px; }
/* The accessible-slick theme's glyph comes from a "slick" icon font that
   404s here; rather than fall back to a system font's unicode arrow (whose
   glyph isn't reliably centered in its own em-box), the arrow is an inline
   SVG injected via prevArrow/nextArrow in equipment-detail.js. */
.mc-detail .gallery__main .slick-prev-icon,
.mc-detail .gallery__main .slick-next-icon { color: var(--mc-ink); opacity: 1; }
.mc-detail .gallery__main .slick-prev-icon::before,
.mc-detail .gallery__main .slick-next-icon::before { content: none; }
.mc-detail .gallery__main .mc-gallery-arrow-icon { display: block; width: 16px; height: 16px; }
/* accessible-slick's base focus state bumps the (formerly text) icon to
   font-size:28px and margin-left:-2px to compensate for the old glyph -
   that would nudge the SVG 2px off-center on keyboard focus. */
.mc-detail .gallery__main .slick-prev:focus .slick-prev-icon,
.mc-detail .gallery__main .slick-next:focus .slick-next-icon {
  font-size: inherit;
  margin-left: 0;
}

/* ---------- Tabs (black bar) --------------------------------------------- */
.mc-detail .tabs__list {
  --mc-band: var(--mc-black);
  --mc-plain-hover: var(--mc-cat-yellow);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 48px;
  padding: 14px 0;
  /* Comp: a 1px light line where the hero meets the bar, edge to edge - so it
     is drawn into the band image, not as a border (see "Full-bleed bands"). */
  border-image: linear-gradient(var(--mc-detail-edge) 0 1px, var(--mc-black) 1px) fill 0 / 0 / 0 100vmax;
}
.mc-detail .tabs__tab {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: none;
  padding: 4px 0 1px;
  font: inherit;
  font-size: var(--mc-fs-h5);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--mc-white);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
/* Neutralize GeneratePress's / the Elementor kit's <button> chrome on ALL plain
   text/icon buttons in the detail. They paint a dark fill + white text on
   hover/focus that would hide the label (tabs, accordions, View More, Print,
   modal close). One base rule so every future plain button is correct by
   default; the intentional fills opt out by exclusion: .mc-btn, .unit-toggle
   buttons (carry [aria-pressed]) and the Slick gallery arrows (.slick-arrow).
   Because the fill is !important, a plain button cannot set its own
   background: set --mc-plain-bg on it instead (accordion headers and the video
   poster do). The hover colour comes from --mc-plain-hover so dark bands can
   set their own. */
.mc-detail button:not(.mc-btn):not(.slick-arrow):not([aria-pressed]),
.mc-detail button:not(.mc-btn):not(.slick-arrow):not([aria-pressed]):hover,
.mc-detail button:not(.mc-btn):not(.slick-arrow):not([aria-pressed]):focus,
.mc-detail button:not(.mc-btn):not(.slick-arrow):not([aria-pressed]):active {
  background-image: none !important;
  background-color: var(--mc-plain-bg, transparent) !important;
  box-shadow: none !important;
}
.mc-detail button:not(.mc-btn):not(.slick-arrow):not([aria-pressed]):hover,
.mc-detail button:not(.mc-btn):not(.slick-arrow):not([aria-pressed]):focus,
.mc-detail button:not(.mc-btn):not(.slick-arrow):not([aria-pressed]):active {
  color: var(--mc-plain-hover) !important;
}
.mc-detail .tabs__tab[aria-selected="true"] {
  color: var(--mc-cat-yellow);
  border-bottom-color: var(--mc-cat-yellow);
}
.mc-detail .tabs__tab:focus-visible,
.mc-detail .page-actions button:focus-visible,
.mc-detail .page-actions a:focus-visible {
  outline: 2px solid var(--mc-white);
  outline-offset: 4px;
}
.mc-detail .gallery__thumb:focus-visible .gallery__thumb-img { outline: 2px solid var(--mc-white); outline-offset: 2px; }
.mc-detail .accordion__trigger:focus-visible,
.mc-detail .tabs__acc:focus-visible,
.mc-detail .unit-toggle button:focus-visible,
.mc-detail .modal-close:focus-visible {
  outline: 2px solid var(--mc-focus);
  outline-offset: 2px;
}
.mc-detail .tabs__panel { display: none; }
.mc-detail .tabs__panel.is-active { display: block; animation: mc-fade .2s ease; }
@keyframes mc-fade { from { opacity: 0; } to { opacity: 1; } }

/* Mobile: the horizontal tablist collapses to stacked accordions, all closed
   by default (MCAT-8 F7). JS inserts a .tabs__acc trigger before each panel
   and adds .is-accordion to the .tabs root at this breakpoint. */
.mc-detail .tabs__acc { display: none; }
@media (max-width: 768px) {
  .mc-detail .tabs__list { display: none; }
  .mc-detail .tabs__panels { padding: 24px 0 40px; }
  .mc-detail .tabs__acc {
    --mc-plain-bg: var(--mc-black);
    --mc-plain-hover: var(--mc-cat-yellow);
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: var(--mc-white);
    font: inherit;
    font-size: var(--mc-fs-h5);
    font-weight: 700;
    text-transform: uppercase;
    padding: 14px 16px;
    cursor: pointer;
    border: 0;
    border-radius: 0;
    margin-bottom: 8px;
  }
  .mc-detail .tabs__acc[aria-expanded="true"] { color: var(--mc-cat-yellow); }
  .mc-detail .tabs__acc[aria-expanded="true"] .chev { transform: rotate(180deg); }
  /* In accordion mode panels are driven by .is-open, not the tab .is-active. */
  .mc-detail .tabs.is-accordion .tabs__panel { display: none; padding: 12px 0 24px; }
  .mc-detail .tabs.is-accordion .tabs__panel.is-open { display: block; animation: mc-fade .2s ease; }
}

/* ---------- Content typography ------------------------------------------- */
.mc-detail .section-title {
  margin: 0 0 16px;
  font-size: var(--mc-fs-h2);
  font-weight: 700;
  line-height: var(--mc-lh-tight);
}
.mc-detail h3.section-title { font-size: var(--mc-fs-h3); }
.mc-detail .panel-lead { max-width: 72ch; font-size: var(--mc-fs-lead); }
.mc-detail .panel-lead > :first-child { margin-top: 0; }
.mc-detail .panel-lead > :last-child { margin-bottom: 0; }

/* Chevron: one mask-drawn glyph for accordions, the mobile tab accordions and
   "View More". Points down; rotates when its control is expanded. */
.mc-detail .chev {
  flex: none;
  display: inline-block;
  width: 10px;
  height: 6px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .2s;
}

/* ---------- Toolbar: heading + Expand All / unit toggle ------------------ */
.mc-detail .spec-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mc-detail .spec-toolbar .section-title { margin: 0; }
/* Controls cluster to the right of a .spec-toolbar title (Expand All + unit toggle). */
.mc-detail .spec-toolbar__controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Comp: Expand All is 123 x 38, a size down from the standard button. */
.mc-detail .spec-toolbar .mc-btn { padding: 8px 24px; }
.mc-detail .unit-toggle {
  display: inline-flex;
  border: 2px solid var(--mc-ink);
}
.mc-detail .unit-toggle button {
  border: 0;
  border-radius: 0;
  background: var(--mc-white);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  padding: 10px 18px;
  cursor: pointer;
  color: var(--mc-ink);
}
.mc-detail .unit-toggle button:hover,
.mc-detail .unit-toggle button:focus { background: var(--mc-surface); color: var(--mc-ink); }
.mc-detail .unit-toggle button[aria-pressed="true"],
.mc-detail .unit-toggle button[aria-pressed="true"]:hover,
.mc-detail .unit-toggle button[aria-pressed="true"]:focus {
  background: var(--mc-ink);
  color: var(--mc-white);
}
/* unit toggle: hide the inactive unit */
.mc-detail [data-unit="us"] .metric,
.mc-detail [data-unit="metric"] .us { display: none; }

/* ---------- Tables: specs, listing facts, condition ----------------------
   Comp: 40px zebra rows, label column to a fixed line, value left-aligned. */
.mc-detail table.spec,
.mc-detail table.condition,
.mc-detail .mc-manual-specs table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  font-size: var(--mc-fs-body);
}
.mc-detail table.spec th,
.mc-detail table.spec td,
.mc-detail table.condition td,
.mc-detail .mc-manual-specs th,
.mc-detail .mc-manual-specs td {
  padding: 9.5px 16px; /* comp: 40px rows (21px line + 2 x 9.5) */
  border: 0;
  text-align: left;
  vertical-align: top;
  font-weight: 400;
  background: none;
}
.mc-detail table.spec tr:nth-child(even),
.mc-detail table.condition tr:nth-child(even),
.mc-detail .mc-manual-specs tr:nth-child(even) { background: var(--mc-detail-zebra); }
.mc-detail table.spec th[scope="row"],
.mc-detail table.condition td:first-child,
.mc-detail .mc-manual-specs td:first-child { width: 44%; }
.mc-detail table.condition b { font-weight: 700; }
.mc-detail table.condition .worn { display: inline-block; margin-right: 12px; white-space: nowrap; }
.mc-detail .facts-spec { margin-bottom: 32px; }

.mc-detail .spec-group { margin-bottom: 32px; }
.mc-detail .spec-group h3 {
  margin: 0;
  padding: 13px 16px;
  background: var(--mc-surface);
  font-size: var(--mc-fs-h5);
  font-weight: 700;
  text-transform: uppercase;
}
.mc-detail table.power-table thead th { font-weight: 700; border-bottom: 1px solid var(--mc-border); }
.mc-detail .mc-manual-specs th { font-weight: 700; }

/* ---------- Accordions (condition report, spec groups) ------------------- */
.mc-detail .accordion + .accordion { margin-top: 8px; }
.mc-detail .accordion__trigger {
  --mc-plain-bg: var(--mc-surface);
  width: 100%;
  min-height: 44px;
  text-align: left;
  border: 0;
  border-radius: 0;
  color: var(--mc-ink);
  font: inherit;
  font-size: var(--mc-fs-h5);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  padding: 12px 20px 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.mc-detail .accordion__trigger:hover { --mc-plain-bg: var(--mc-neutral-tint); }
.mc-detail .accordion__trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.mc-detail .accordion__panel { display: none; padding: 4px 0 8px; }
.mc-detail .accordion__panel.is-open { display: block; }

/* Rating line above the condition accordions: "Overall rating: [Good]" */
.mc-detail .cond-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: var(--mc-fs-body);
  font-weight: 700;
}

/* Badges: the shared .mc-badge, as the comp's fixed-width 72 x 20 pill.
   vertical-align: on the baseline a badge stretches its table row past 40px. */
.mc-detail .mc-badge {
  min-width: 72px;
  padding: 1px 12px;
  border-radius: 999px;
  vertical-align: middle;
  text-align: center;
  text-decoration: none;
}
.mc-detail a.mc-badge:hover,
.mc-detail a.mc-badge:focus-visible { filter: brightness(0.94); }
/* Restate the colours: ".mc-detail a { color: inherit }" above outranks the
   single-class modifiers when the badge is a link (the rail's Condition). */
.mc-detail .mc-badge--good { color: var(--mc-good); background: var(--mc-good-tint); }
.mc-detail .mc-badge--fair { color: var(--mc-fair); background: var(--mc-fair-tint); }
.mc-detail .mc-badge--poor { color: var(--mc-poor); background: var(--mc-poor-tint); }
.mc-detail .mc-badge--neutral { color: var(--mc-neutral); background: var(--mc-neutral-tint); }

/* ---------- Document / brochure links -------------------------------------
   Lists of a.icon-link (site-style.css): bold, yellow underline, and the
   external-link icon because they open in a new tab. Spec sheet titles from
   the feed run long, so these are links, not buttons. */
.mc-detail .doc-list,
.mc-detail .link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mc-detail .doc-list { margin-bottom: 40px; }
.mc-detail .media-card .caption a {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--mc-cat-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.mc-detail .media-card .caption a:hover,
.mc-detail .media-card .caption a:focus-visible { text-decoration-color: var(--mc-ink); }
.mc-detail .latest-model-cta { margin: 0; }
.mc-detail .tour-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

/* ---------- Features ----------------------------------------------------- */
.mc-detail .feature-block { margin-bottom: 28px; max-width: 80ch; }
.mc-detail .feature-block h3 { font-size: var(--mc-fs-h3); margin: 0 0 8px; }
.mc-detail .feature-block p { margin: 0 0 8px; }
.mc-detail .feature-block ul { margin: 8px 0 0; padding-left: 20px; }
.mc-detail .feature-block li { margin-bottom: 4px; }
.mc-detail .feature-subhead { font-weight: 700; }
.mc-detail .features-list { columns: 2; column-gap: 40px; margin: 0; padding-left: 20px; }
.mc-detail .features-list li { margin-bottom: 6px; break-inside: avoid; }

/* ---------- Equipment lists --------------------------------------------- */
.mc-detail .equip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 640px) { .mc-detail .equip-cols { grid-template-columns: 1fr; } }
.mc-detail .equip-group h3 { font-size: var(--mc-fs-h3); margin: 0 0 12px; }
.mc-detail .equip-group ul { margin: 0; padding-left: 20px; }
.mc-detail .equip-group li { margin-bottom: 4px; }
.mc-detail .equip-subhead { margin: 16px 0 6px; font-size: var(--mc-fs-h5); font-weight: 700; text-transform: uppercase; }

/* ---------- Videos / 360 ------------------------------------------------- */
.mc-detail .media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--mc-gap); }
@media (max-width: 640px) { .mc-detail .media-grid { grid-template-columns: 1fr; } }
/* A lone video spans the full grid width instead of sitting half-width (MCAT-8 F5). */
.mc-detail .media-grid > .media-card:only-child { grid-column: 1 / -1; }
.mc-detail .media-card { background: var(--mc-surface); overflow: hidden; }
.mc-detail .media-card iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }
/* "Watch video" link box for videos that cannot be embedded. */
.mc-detail .media-card .embed {
  width: 100%;
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  background: var(--mc-neutral-tint);
  color: var(--mc-ink);
  font-weight: 700;
  text-decoration: none;
}
/* Lite YouTube facade: poster image + play button; the real iframe is swapped
   in on click (see equipment-detail.js). The play button is the comp's yellow
   disc. */
.mc-detail .video-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  padding: 0;
  border: 0;
  margin: 0;
  cursor: pointer;
  --mc-plain-bg: var(--mc-black); /* behind the poster; see the plain-button rule */
  overflow: hidden;
}
.mc-detail .video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-detail .video-facade__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--mc-cat-yellow);
  transition: transform .15s;
}
.mc-detail .video-facade:hover .video-facade__play,
.mc-detail .video-facade:focus-visible .video-facade__play { transform: translate(-50%, -50%) scale(1.1); }
.mc-detail .video-facade__play::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--mc-ink);
}
.mc-detail .video-facade:focus-visible { outline: 2px solid var(--mc-focus); outline-offset: 2px; }
.mc-detail .media-card .caption { padding: 12px 16px; font-size: var(--mc-fs-link); }
.mc-detail .tour-stack { display: grid; gap: var(--mc-gap); }
.mc-detail .tour { margin: 0; background: var(--mc-surface); overflow: hidden; }
.mc-detail .tour iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }
.mc-detail .tour .caption { padding: 12px 16px; font-weight: 700; }

/* ---------- Right rail (on ink) ------------------------------------------ */
.mc-detail .rail {
  display: grid;
  gap: 20px;
  padding-bottom: 24px;
  color: var(--mc-white);
}
.mc-detail .rail__card {
  --mc-plain-hover: var(--mc-cat-yellow);
  padding: 20px;
  background: var(--mc-black);
  color: var(--mc-white);
}
/* Second-tier card (Available Used): outlined, so the black card stays the
   one that reads as the price / contact block. */
.mc-detail .rail__card--outline {
  background: none;
  border: 1px solid var(--mc-detail-hairline);
}
.mc-detail .rail__card > h2 {
  margin: 0 0 14px;
  color: var(--mc-white);
  font-size: var(--mc-fs-h3);
  font-weight: 700;
}
.mc-detail .price {
  margin: 0 0 2px;
  font-family: var(--mc-font-display);
  font-size: var(--mc-fs-price);
  line-height: var(--mc-lh-tight);
}
.mc-detail .spec-mini { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 3px; }
.mc-detail .spec-mini li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.mc-detail .spec-mini b { font-weight: 700; }
.mc-detail .rail__cta { width: 100%; padding-block: 8px; text-transform: uppercase; }

.mc-detail .rail-phone {
  margin: 16px 0 12px;
  font-family: var(--mc-font-display);
  font-size: 1.75rem;
  line-height: var(--mc-lh-tight);
}
.mc-detail .rail-phone a { text-decoration: none; }
.mc-detail .rail-phone a:hover,
.mc-detail .rail-phone a:focus-visible { color: var(--mc-cat-yellow); }
.mc-detail .rail-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; --mc-icon-link-color: var(--mc-white); }

/* Comp: hairline 19px under the button, name 13px under the hairline. */
.mc-detail .contact-person {
  margin-top: 19px;
  border-top: 1px solid var(--mc-detail-hairline);
  padding-top: 13px;
  display: grid;
  gap: 1px;
  justify-items: start;
}
/* Comp: the price card ends 16px under the email line (it is 318px tall).
   The card's own bottom padding is 20px, hence -4. */
.mc-detail .rail__card > .contact-person:last-child { margin-bottom: -4px; }
.mc-detail .contact-person .name { font-weight: 700; }
.mc-detail .contact-person a { text-decoration: none; }
.mc-detail .contact-person a:hover,
.mc-detail .contact-person a:focus-visible { color: var(--mc-cat-yellow); }
.mc-detail .contact-person a[href^="mailto:"] {
  text-decoration: underline;
  text-decoration-color: var(--mc-cat-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.mc-detail .avail-used { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mc-detail .avail-used li { border-bottom: 1px solid var(--mc-detail-hairline); padding-bottom: 12px; }
.mc-detail .avail-used li:last-child { border-bottom: 0; padding-bottom: 0; }
.mc-detail .avail-used .model { font-weight: 700; display: block; text-decoration: none; }
.mc-detail .avail-used .model:hover,
.mc-detail .avail-used .model:focus-visible { color: var(--mc-cat-yellow); }
.mc-detail .avail-used .serial { font-size: var(--mc-fs-caption); color: var(--mc-detail-on-dark); }
.mc-detail .avail-used__extra { display: none; }
.mc-detail .avail-used__extra.is-open { display: grid; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--mc-detail-hairline); }
.mc-detail .view-more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  font: inherit; font-size: var(--mc-fs-link); font-weight: 700;
  color: var(--mc-white); cursor: pointer;
  border: 0; border-radius: 0; background: none; padding: 0;
}
.mc-detail .view-more[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ---------- Promos --------------------------------------------------------
   Placeholders until the Promotions CPT feeds these slots (MCAT-26: "leave as
   placeholder content"). Dashed outline + label reads as an intentional
   placeholder; the boxes hold the comp's footprint so nothing shifts when the
   real cards land. */
.mc-detail .promo {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed var(--mc-cat-gray);
  background: var(--mc-surface);
  color: var(--mc-text-secondary);
  text-align: center;
}
.mc-detail .rail .promo {
  border-color: var(--mc-detail-hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mc-detail-on-dark);
}
.mc-detail .promo__placeholder { font-weight: 700; }
/* Rail promo with real content (used detail: the "Used Equipment Detail
   Promo" options page - heading / copy, then up to two outline buttons). */
.mc-detail .rail__promo {
  display: grid;
  gap: 8px;
  padding: 24px 20px 20px;
  background: var(--mc-black);
  color: var(--mc-white);
}
.mc-detail .rail__promo-content > * { margin: 0 0 8px; color: inherit; }
.mc-detail .rail__promo-content :is(h2, h3, h4) {
  font-family: var(--mc-font-display);
  font-size: var(--mc-fs-price);
  font-weight: 400;
  line-height: var(--mc-lh-tight);
}
.mc-detail .rail__promo .mc-btn { width: 100%; text-transform: uppercase; }

.mc-detail .promo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.mc-detail .promo-row .promo { min-height: 280px; }
@media (max-width: 768px) { .mc-detail .promo-row { grid-template-columns: minmax(0, 1fr); gap: var(--mc-gap); } }

/* ---------- Bands below the grid: promos, Similar Products --------------- */
.mc-detail .section-block { --mc-band: var(--mc-white); padding: 0 0 72px; }
.mc-detail .section-block--similar { --mc-band: var(--mc-surface); padding: 56px 0 60px; }
.mc-detail .section-block > h2 {
  margin: 0 0 28px;
  font-size: var(--mc-fs-h2);
  font-weight: 700;
  text-align: center;
}

/* ---------- Product cards (Similar Products, Attachments / Machines) ----- */
.mc-detail .card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
/* Tabs sit in the narrower main column: 3 across. */
.mc-detail .tabs__panel .card-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  .mc-detail .card-row,
  .mc-detail .tabs__panel .card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mc-detail .card-row,
  .mc-detail .tabs__panel .card-row { grid-template-columns: minmax(0, 1fr); }
}
.mc-detail .related-group + .related-group { margin-top: 40px; }
.mc-detail .product-card {
  display: flex;
  flex-direction: column;
  background: var(--mc-white);
  color: var(--mc-ink);
  text-decoration: none;
  transition: box-shadow var(--mc-transition);
}
/* On the white content band a card needs an edge; on the surface band the
   colour change is the edge (comp). */
.mc-detail .tabs__panel .product-card { border: 1px solid var(--mc-border); }
.mc-detail .product-card:hover,
.mc-detail .product-card:focus-visible { box-shadow: var(--mc-shadow); }
.mc-detail .product-card:focus-visible { outline: 2px solid var(--mc-focus); outline-offset: 2px; }
.mc-detail .product-card picture { display: block; }
/* Loading state: these images are lazy, and until one arrives the browser
   draws its alt text in an empty box. Hold a grey block instead and hide the
   text (still read by screen readers). */
.mc-detail .product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--mc-neutral-tint);
  color: transparent;
  font-size: 0;
}
/* New-equipment cards carry cut-out product shots on white: show the whole
   machine, and keep the box white so no grey shows beside it. */
.mc-detail .product-card--new img { object-fit: contain; background: var(--mc-white); }
.mc-detail .product-card .body { padding: 20px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.mc-detail .product-card :is(h3, h4) { margin: 0; font-size: var(--mc-fs-h4); font-weight: 700; line-height: var(--mc-lh-tight); }
.mc-detail .product-card--new :is(h3, h4) { margin-bottom: 10px; font-size: var(--mc-fs-lead); }
.mc-detail .product-card .price-sm { font-size: var(--mc-fs-h4); font-weight: 700; }
/* Used: one caption line, "247 hours · Waco, TX". */
.mc-detail .product-card .meta { font-size: var(--mc-fs-caption); color: var(--mc-text-secondary); }
.mc-detail .product-card .meta > span + span::before { content: "\00B7"; margin: 0 6px; }
/* New: the Listing Meta 1-4 rows, grey label + ink value. */
.mc-detail .product-card .meta-list { margin: 0; display: grid; gap: 4px; }
.mc-detail .product-card .meta-list > div { display: flex; flex-wrap: wrap; gap: 0 5px; }
.mc-detail .product-card .meta-list dt { font-weight: 400; color: var(--mc-text-secondary); }
.mc-detail .product-card .meta-list dd { margin: 0; }
/* "View Details" - the icon-link look (bold, yellow underline, chevron). The
   whole card is the link, so this is a span and cannot use a.icon-link. */
.mc-detail .product-card .view {
  align-self: flex-start;
  margin-top: auto;
  padding: 2px 10px 1px 0;
  position: relative;
  font-size: var(--mc-fs-link);
  font-weight: 700;
  background: linear-gradient(var(--mc-cat-yellow), var(--mc-cat-yellow)) no-repeat left bottom / calc(100% - 10px) 2px;
}
/* New cards end on the meta rows, not a one-line caption: keep the link clear. */
.mc-detail .product-card--new .view { padding-top: 12px; }
.mc-detail .product-card .view::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 7px;
  width: 5px;
  height: 8px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 6'%3E%3Cpath d='M4 2.99975L0.761751 0L0 0.705765L2.47811 3.00175L0 5.29424L0.761751 6L4 2.99975Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 6'%3E%3Cpath d='M4 2.99975L0.761751 0L0 0.705765L2.47811 3.00175L0 5.29424L0.761751 6L4 2.99975Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform var(--mc-transition);
}
.mc-detail .product-card:hover .view::after,
.mc-detail .product-card:focus-visible .view::after { transform: translateX(4px); }

/* ---------- Modal -------------------------------------------------------- */
.mc-detail .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100000; /* above the WP admin bar (99999) */
}
.mc-detail .modal-backdrop.is-open { display: flex; }
.mc-detail .modal {
  background: var(--mc-white);
  color: var(--mc-ink);
  max-width: 560px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--mc-shadow);
  animation: mc-pop .18s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes mc-pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mc-detail .modal h2 { margin: 0 0 6px; font-size: var(--mc-fs-h2); font-weight: 700; }
.mc-detail .modal-intro { margin: 0; color: var(--mc-text-secondary); }
.mc-detail .modal .product-context {
  background: var(--mc-surface);
  padding: 12px 16px;
  margin: 16px 0 20px;
}
.mc-detail .modal .product-context b { display: block; }
.mc-detail .meta-sub { font-size: var(--mc-fs-caption); color: var(--mc-text-secondary); }
.mc-detail .modal-close {
  float: right;
  border: 0; border-radius: 0; background: none; padding: 0;
  font-size: 28px; line-height: 1; cursor: pointer; color: var(--mc-text-secondary);
}
.mc-detail .note { font-size: var(--mc-fs-caption); color: var(--mc-text-secondary); margin-top: 10px; }

/* ---------- Utilities ---------------------------------------------------- */
.mc-detail .mc-muted { color: var(--mc-text-secondary); }
.mc-detail .panel-lead + .mc-muted { margin-top: 16px; }
.mc-detail .mc-mt-32 { margin-top: 32px; }
.mc-detail .mc-empty { color: var(--mc-text-secondary); font-style: italic; }
.mc-detail .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ==========================================================================
   Small displays. Goals: no horizontal overflow (the 4-col power table is the
   one real offender below ~340px), readable stacked data tables, and >=44px
   touch targets.
   ========================================================================== */
@media (max-width: 640px) {
  .mc-detail .mc-title-row { padding: 12px 0 16px; }
  .mc-detail .page-actions { gap: 20px; }
  .mc-detail .promo-row .promo { min-height: 180px; }
  .mc-detail .section-block { padding-bottom: 40px; }
  .mc-detail .section-block--similar { padding: 40px 0; }

  /* 2-column spec / facts tables -> stacked label over value (NOT the power table) */
  .mc-detail table.spec:not(.power-table),
  .mc-detail table.spec:not(.power-table) tbody,
  .mc-detail table.spec:not(.power-table) tr,
  .mc-detail table.condition,
  .mc-detail table.condition tbody,
  .mc-detail table.condition tr { display: block; width: 100%; }
  .mc-detail table.spec:not(.power-table) tr,
  .mc-detail table.condition tr { padding: 8px 16px; }
  .mc-detail table.spec:not(.power-table) th[scope="row"],
  .mc-detail table.condition td:first-child {
    display: block; width: auto; padding: 0 0 2px;
    font-size: var(--mc-fs-caption); font-weight: 700;
    color: var(--mc-text-secondary); text-transform: uppercase;
  }
  .mc-detail table.spec:not(.power-table) td,
  .mc-detail table.condition td:last-child { display: block; padding: 0; overflow-wrap: anywhere; }

  /* 4-column power-output table -> stacked cards (uses data-label markup) */
  .mc-detail table.power-table thead { position: absolute; left: -9999px; }
  .mc-detail table.power-table,
  .mc-detail table.power-table tbody { display: block; width: 100%; }
  .mc-detail table.power-table tr { display: block; padding: 8px 16px; }
  .mc-detail table.power-table td { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
  .mc-detail table.power-table td::before { content: attr(data-label); font-weight: 700; }

  /* Features list: single column on phones (CSS multicolumn ignores width otherwise) */
  .mc-detail .features-list { columns: 1; }

  /* Toolbar: title above left-aligned controls */
  .mc-detail .spec-toolbar { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Touch targets >= 44px */
  .mc-detail .rail__cta,
  .mc-detail .spec-toolbar .mc-btn { padding-block: 10px; }
  .mc-detail .unit-toggle button { padding: 12px 18px; }
  .mc-detail .view-more { padding: 12px 0; }
  .mc-detail .modal-close { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
  .mc-detail .contact-person a,
  .mc-detail .avail-used .model { padding: 8px 0; }

  .mc-detail .modal-backdrop { padding: 12px; }
  .mc-detail .modal { padding: 20px; }
}

/* Smallest phones: keep the gallery arrows off the image edges */
@media (max-width: 380px) {
  .mc-detail .gallery__main .slick-prev { left: 4px; }
  .mc-detail .gallery__main .slick-next { right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .mc-detail .tabs__panel.is-active,
  .mc-detail .modal { animation: none; }
  .mc-detail .chev,
  .mc-detail .gallery__cell::before,
  .mc-detail .product-card,
  .mc-detail .product-card .view::after,
  .mc-detail .video-facade__play { transition: none; }
}

/* Print: browsers drop backgrounds, so the white-on-ink hero would print as
   white on white. Put the hero and rail back to ink text, drop the controls. */
@media print {
  .mc-detail .mc-breadcrumb,
  .mc-detail .mc-breadcrumb a,
  .mc-detail .mc-title-row h1,
  .mc-detail .rail,
  .mc-detail .rail__card,
  .mc-detail .rail__card > h2,
  .mc-detail .tabs__tab,
  .mc-detail .avail-used .serial { color: #000 !important; }
  .mc-detail .rail__card { background: none; border: 1px solid #000; }
  .mc-detail .page-actions,
  .mc-detail .gallery__nav,
  .mc-detail .slick-arrow,
  .mc-detail .rail__cta,
  .mc-detail .promo,
  .mc-detail .promo-row { display: none !important; }
}
