/* ALLCUT — Products page: the card browser.
   Level 1 = the machine types, level 2 = the four magnetic drill types, level 3 = the machines of one range.
   All three levels are in the HTML. products.js shows one at a time (it sets [hidden] on the others).
   Without JavaScript every level is shown, one under the other.
   Only design tokens from site.css. Text: no smaller than 15px × --fs, colours ink / ink-2 only. */

.pc {
  padding: clamp(24px, 3vw, 40px) 0 clamp(48px, 6vw, 88px);
  border-top: 1px solid var(--rule);
}
.pc-panel[hidden] { display: none; }
.pc:not(.pc--js) .pc-panel + .pc-panel { margin-top: clamp(56px, 7vw, 96px); }   /* only when every level is shown (no JavaScript) */

/* JavaScript is on but has not started yet: show level 1 only, so the page does not jump when it starts */
.js .pc:not(.pc--js):not(.pc--static) .pc-panel:not([data-pc-level="1"]) { display: none; }

/* ───────────── back button and trail ───────────── */
.pc-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.pc-back {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px 0 14px;
  border: 1px solid var(--rule-2); background: var(--white); color: var(--ink);
  font: 600 calc(15px * var(--fs))/1 var(--f-sans);
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.pc-back:hover { border-color: var(--ink); }
.pc-back__icon { display: inline-flex; transform: scaleX(-1); transition: transform .15s var(--ease); }
.pc-back__icon svg { width: 16px; height: 16px; }
.pc-back:hover .pc-back__icon { transform: scaleX(-1) translateX(3px); }

.pc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 0; padding: 0; list-style: none; font: 600 calc(15.3px * var(--fs))/1.4 var(--f-sans); }
.pc-crumbs li { display: inline-flex; align-items: center; color: var(--ink-2); }
.pc-crumbs li + li::before { content: "›"; margin: 0 10px; color: var(--ink-2); }
.pc-crumbs a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-2); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .15s, text-decoration-color .15s; }
.pc-crumbs a:hover { color: var(--red-ink); text-decoration-color: currentColor; }
.pc-crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; font-size: calc(15px * var(--fs)); }

/* ───────────── heading of a level ───────────── */
.pc-head { margin-bottom: clamp(24px, 3vw, 36px); }
.pc-nav + .pc-head { margin-top: clamp(20px, 2.4vw, 28px); }
.pc-title {
  margin: 0; font-size: calc(clamp(30px, 3.4vw, 50px) * var(--fs)); font-weight: 800; line-height: 1;
  letter-spacing: -0.02em; color: var(--ink);
}
.pc-title:focus { outline: none; }          /* it takes focus after a click, so screen readers start there; no ring on a heading */
.pc-sub { margin: 12px 0 0; max-width: 62ch; font-size: calc(clamp(16px, 1.25vw, 19px) * var(--fs)); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.pc-sum { margin: 10px 0 0; font-size: calc(15px * var(--fs)); font-weight: 600; line-height: 1.4; color: var(--ink); }

/* ───────────── the grids ───────────── */
.pc-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.7vw, 24px);
  margin: 0; padding: 0; list-style: none;
}
@media (min-width: 1200px) { .pc-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1099px) { .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1199px) and (min-width: 1100px) { .pc-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .pc-grid { grid-template-columns: minmax(0, 1fr); } }

/* ───────────── card ───────────── */
.pc-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--white); border: 1px solid var(--rule);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s var(--ease);
}
.pc-card::before {                            /* top bar: range colour (red where the card has none) */
  content: ""; position: absolute; z-index: 3; left: -1px; right: -1px; top: -1px; height: 3px;
  background: var(--rc, var(--red)); transform: scaleX(0); transform-origin: left center;
  transition: transform .3s var(--ease);
}
.pc-card:focus-within::before { transform: scaleX(1); }

/* photo: the whole machine on a light panel, the same frame in every card */
.pc-card__media { position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: var(--tint); }
.pc-card__media img {
  position: absolute; left: 8%; top: 6%; width: 84%; height: 88%; object-fit: contain;
  transition: transform .4s var(--ease);
}
@media (max-width: 639px) { .pc-card__media { aspect-ratio: 4 / 3; } }

.pc-card__body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; }
.pc-card__name {
  margin: 0; font-size: calc(clamp(21px, 1.7vw, 25px) * var(--fs)); font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--ink); transition: color .15s;
}
.pc-card--type .pc-card__name { font-size: calc(clamp(23px, 1.9vw, 28px) * var(--fs)); }
.pc-card__link { color: inherit; }
.pc-card__link::after { content: ""; position: absolute; z-index: 1; inset: 0; }     /* the whole card is the link */
.pc-card__link:focus-visible { outline: none; }
.pc-card__link:focus-visible::after { outline: 2px solid var(--red); outline-offset: 2px; }
.pc-card__text { margin: 8px 0 0; font-weight: 500; font-size: calc(15.3px * var(--fs)); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }

/* key figures (machine cards): value over label, three across */
.pc-kf {
  display: grid; grid-template-columns: repeat(3, minmax(min-content, 1fr)); gap: 10px 14px;
  margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--rule);
}
.pc-kf > div { min-width: 0; }
.pc-card { container-type: inline-size; }       /* so a narrow card can show its key figures two across */
@container (max-width: 399px) { .pc-kf { grid-template-columns: repeat(2, minmax(min-content, 1fr)); } }
.pc-kf__v { display: block; margin: 0; font-size: calc(18px * var(--fs)); font-weight: 700; line-height: 1.2; letter-spacing: 0; color: var(--ink); overflow-wrap: break-word; }
.pc-kf__v--nw { white-space: nowrap; }          /* a number and its unit stay on one line ("60–200 mm") */
.pc-kf__k { width: 0; min-width: 100%; margin: 2px 0 0;   /* the label wraps inside the column the value sets (it does not widen it) */
  font-size: calc(15.3px * var(--fs)); font-weight: 500; line-height: 1.3; color: var(--ink-2); }

/* bottom row: count + arrow (types) or "View machine" + "Request a quote" (machines) */
.pc-card--type .pc-card__text, .pc-kf { margin-bottom: 18px; }
.pc-card__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule);
}
.pc-card__meta { margin: 0; font-size: calc(15px * var(--fs)); font-weight: 600; line-height: 1.4; color: var(--ink); }
.pc-card__span { display: block; font-weight: 500; font-size: calc(15.3px * var(--fs)); color: var(--ink-2); }
.pc-card__go {
  display: inline-flex; align-items: center; gap: 8px; font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--ink);
  transition: color .15s;
}
.pc-card__go svg { width: 16px; height: 16px; flex: none; transition: transform .2s var(--ease); }
.pc-card__quote {
  position: relative; z-index: 2; font-size: calc(15px * var(--fs)); font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--rule-2); text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: color .15s, text-decoration-color .15s;
}
.pc-card__quote:hover { color: var(--red-ink); text-decoration-color: currentColor; }

/* level 2: the count and size range sit above "View machines"; no hairline, because the text above can be two lines in one
   card and three in the next, and the lines would not match across the row */
.pc-grid--four .pc-card__foot { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 0; border-top: 0; }

/* hover (mouse only): lift, bar, red name, a little zoom on the photo */
@media (hover: hover) {
  .pc-card:hover { transform: translateY(-3px); border-color: var(--rule-2); box-shadow: 0 16px 32px -20px rgba(21, 19, 15, .4); }
  .pc-card:hover::before { transform: scaleX(1); }
  .pc-card:hover .pc-card__name { color: var(--rc-ink, var(--red-ink)); }
  .pc-card:hover .pc-card__media img { transform: scale(1.045); }
  .pc-card:hover .pc-card__go svg { transform: translateX(4px); }
}
@media (hover: none) { .pc-card:active .pc-card__name { color: var(--rc-ink, var(--red-ink)); } }

/* "you were sent to this machine": a short highlight */
.pc-card.is-hit { outline: 2px solid var(--rc, var(--red)); outline-offset: 3px; animation: pc-hit 2.6s var(--ease) both; }
.pc-card.is-hit::before { transform: scaleX(1); }
@keyframes pc-hit { 0% { background: var(--red-tint); } 100% { background: var(--white); } }

/* ───────────── help tile (level 1: fills the sixth place in the grid) ───────────── */
.pc-help {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; min-width: 0;
  padding: clamp(22px, 2.4vw, 36px); background: var(--tint); border: 1px solid var(--rule);
}
.pc-help__title { margin: 0; font-size: calc(clamp(21px, 1.7vw, 25px) * var(--fs)); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }
.pc-help__text { margin: 0; max-width: 40ch; font-weight: 500; font-size: calc(15.3px * var(--fs)); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.pc-help__link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding-bottom: 3px;
  font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--rule-2); transition: color .15s, border-color .15s;
}
.pc-help__link svg { width: 16px; height: 16px; flex: none; transition: transform .2s var(--ease); }
.pc-help__link:hover { color: var(--red-ink); border-color: var(--red); }
.pc-help__link:hover svg { transform: translateX(4px); }
@media (max-width: 639px) { .pc-help { padding: 22px 20px; } }

/* ───────────── New arrival: the ALLCUT 40 banner and flagged machine cards ───────────── */
.pc-arrival {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  margin: 0 0 clamp(14px, 1.7vw, 24px); background: var(--ink); color: var(--dark-1);
}
.pc-arrival::before { content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 4px; background: var(--red); }
.pc-arrival__media { position: relative; min-height: 320px; overflow: hidden; background: var(--arrival-bg); }
.pc-arrival__media img { position: absolute; left: 12%; top: 9%; width: 76%; height: 86%; object-fit: contain; object-position: center bottom; }
.pc-arrival__body { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: clamp(26px, 3vw, 44px); }
.pc-arrival__badge { margin: 0; }
.pc-arrival__name { margin: 14px 0 0; font-size: calc(clamp(32px, 3.6vw, 52px) * var(--fs)); font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: var(--white); }
.pc-arrival__text { margin: 14px 0 0; max-width: 46ch; font-weight: 500; font-size: calc(clamp(16px, 1.25vw, 19px) * var(--fs)); line-height: 1.5; color: var(--dark-2); text-wrap: pretty; }
.pc-arrival__kf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 24px 0 0; padding: 18px 0 0; border-top: 1px solid var(--dark-line); }
.pc-arrival__v { display: block; margin: 0; font-size: calc(22px * var(--fs)); font-weight: 700; line-height: 1.2; color: var(--white); white-space: nowrap; }
.pc-arrival__k { margin: 2px 0 0; font-size: calc(15.3px * var(--fs)); font-weight: 500; line-height: 1.3; color: var(--dark-2); }
.pc-arrival__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pc-arrival__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border: 1px solid var(--ink-3); color: var(--white); font: 700 calc(15px * var(--fs))/1 var(--f-sans);
  transition: border-color .15s, background-color .15s;
}
.pc-arrival__btn svg { width: 16px; height: 16px; flex: none; }
.pc-arrival__btn:hover { border-color: var(--white); }
.pc-arrival__btn--solid { background: var(--white); border-color: var(--white); color: var(--ink); }
.pc-arrival__btn--solid:hover { background: var(--dark-1); }
.pc-arrival__btn:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
@media (max-width: 759px) {
  .pc-arrival { grid-template-columns: minmax(0, 1fr); }
  .pc-arrival__media { min-height: 280px; }
  .pc-arrival__actions { flex-direction: column; }
  .pc-arrival__btn { width: 100%; }
}
.pc-card--new { background: var(--ink); border-color: var(--ink); }
.pc-card--new::before { transform: scaleX(1); height: 4px; background: var(--red); }
.pc-card--new .pc-card__media { background: var(--arrival-bg); }
.pc-card--new .pc-card__media:has(.plate) { background: var(--white); }      /* an old white-background photo keeps a light panel */
.pc-card--new .pc-card__name, .pc-card--new .pc-kf__v, .pc-card--new .pc-card__go, .pc-card--new .pc-card__quote { color: var(--white); }
.pc-card--new .pc-card__text, .pc-card--new .pc-kf__k { color: var(--dark-2); }
.pc-card--new .pc-kf, .pc-card--new .pc-card__foot { border-top-color: var(--dark-line); }
.pc-card--new .pc-card__quote { text-decoration-color: var(--ink-3); }
.pc-card--new:hover { border-color: var(--ink); }
.pc-card--new:hover .pc-card__name, .pc-card--new .pc-card__quote:hover { color: var(--white); }   /* the normal hover turns these red, too dark on ink */
.pc-card--new .pc-card__quote:hover { text-decoration-color: var(--red); }
.pc-card--new .pc-card__link:focus-visible::after { outline-color: var(--white); }
.pc-card__badge { margin: 0 0 10px; }
@media (prefers-reduced-motion: reduce) {
  .pc-card, .pc-card::before, .pc-card__media img, .pc-card__go svg, .pc-back__icon { transition: none; }
  .pc-card:hover { transform: none; }
  .pc-card:hover .pc-card__media img { transform: none; }
  .pc-card.is-hit { animation: none; }
}

/* ───────────── Compare: tick on a card, range button, tray (products-compare.js) ───────────── */
.pc-cmp {
  position: absolute; z-index: 3; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border: 1px solid var(--rule-2); background: var(--white); color: var(--ink);
  font: 600 calc(15px * var(--fs))/1 var(--f-sans); cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.pc-cmp[hidden] { display: none; }
.pc-cmp:hover { border-color: var(--ink); }
.pc-cmp:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.pc-cmp__box { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; box-sizing: border-box; border: 2px solid var(--ink); }
.pc-cmp__box svg { width: 12px; height: 12px; opacity: 0; }
.pc-cmp[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pc-cmp[aria-pressed="true"] .pc-cmp__box { background: var(--white); border-color: var(--white); color: var(--ink); }
.pc-cmp[aria-pressed="true"] .pc-cmp__box svg { opacity: 1; }
.pc-card.is-picked { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pc-card--new.is-picked { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
@media (hover: hover) { .pc-card.is-picked:hover { border-color: var(--ink); } }
@media (max-width: 639px) { .pc-cmp { top: 10px; right: 10px; padding: 0 12px; } }

.pc-head--cmp { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; }
.pc-head__cmp { display: flex; flex-direction: column; gap: 8px; }
.pc-head__cmp-note { display: none; margin: 0; font-size: calc(15px * var(--fs)); line-height: 1.4; color: var(--ink-2); }
.pc-cmp-range {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border: 1px solid var(--ink); background: var(--white); color: var(--ink); text-decoration: none;
  font: 600 calc(16px * var(--fs))/1.2 var(--f-sans); transition: background .15s, color .15s;
}
.pc-cmp-range svg { width: 20px; height: 20px; flex: none; }
.pc-cmp-range:hover { background: var(--ink); color: var(--white); }
.pc-cmp-range:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (max-width: 1019px) {
  .pc-head--cmp { display: block; }
  .pc-head__cmp { margin-top: 18px; }
  .pc-cmp-range { display: flex; width: 100%; }
  .pc-cmp-range svg { display: none; }
  .pc-head__cmp-note { display: block; }
}

.pc-tray { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; background: var(--ink); color: var(--white); border-top: 3px solid var(--red); }
.pc-tray[hidden], html.xr-open .pc-tray { display: none; }
.pc-tray__in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px clamp(16px, 3vw, 44px); }
.pc-tray__top { display: flex; align-items: baseline; gap: 12px; }
.pc-tray__count { font-size: calc(17px * var(--fs)); font-weight: 700; }
.pc-tray__max { font-size: calc(15px * var(--fs)); color: var(--dark-2, #d6d2cb); }
.pc-tray__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pc-tray__chips li { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 6px 0 12px; background: #2a2620; color: var(--white); font-size: calc(15px * var(--fs)); font-weight: 600; }
.pc-tray__chips button { width: 32px; height: 32px; border: 0; background: transparent; color: #d6d2cb; font: 600 calc(18px * var(--fs))/1 var(--f-sans); cursor: pointer; }
.pc-tray__chips button:hover { color: var(--white); }
.pc-tray__short { display: none; margin: 0; font-size: calc(15px * var(--fs)); color: var(--dark-2, #d6d2cb); }
.pc-tray__msg { margin: 0; font-size: calc(15px * var(--fs)); font-weight: 600; color: var(--white); }
.pc-tray__msg:empty { display: none; }
.pc-tray__act { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pc-tray__clear { min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--white); font: 600 calc(15px * var(--fs))/1 var(--f-sans); text-decoration: underline; cursor: pointer; }
.pc-tray__go { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; background: var(--red); color: var(--white); text-decoration: none; font: 600 calc(16px * var(--fs))/1 var(--f-sans); }
.pc-tray__go:hover { filter: brightness(1.1); }
.pc-tray button:focus-visible, .pc-tray a:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.pc-tray__go-short { display: none; }
@media (max-width: 1019px) {
  .pc-tray__in { flex-wrap: wrap; padding: 12px 16px; gap: 6px 10px; }
  .pc-tray__top { flex: 1 1 0; min-width: 0; display: block; }
  .pc-tray__max, .pc-tray__chips { display: none; }
  .pc-tray__count { display: block; font-size: calc(16px * var(--fs)); }
  .pc-tray__short { display: block; order: 5; flex: 0 0 100%; margin-top: -2px; }
  .pc-tray__msg { order: 6; flex: 0 0 100%; }
  .pc-tray__act { gap: 6px; }
  .pc-tray__go { padding: 0 16px; }
  .pc-tray__go-long { display: none; }
  .pc-tray__go-short { display: inline; }
}
html.pc-tray-on body { padding-bottom: var(--pc-tray-h, 80px); }
