/* ══════════════════════════════════════════════════════════════════════════
   NEL'S DISTRIBUTORS — DETAIL PAGES  (product.html + secondhand.html)
   Loads AFTER css/nel-design.css and only adds what the design system does
   not already carry. Nothing here re-declares a token or a shared component:
   buttons, cards, chips, pills, the spec table and the product card all come
   from nel-design.css so these two pages can never drift from the rest.

   Every colour is a token (var(--…)) so both themes work. The only literal
   colours are the ones that are the same in both themes by design: the white
   photo tile behind product photography (handled with a dark-theme override)
   and pure white text on the red "Checked" badge.
   ══════════════════════════════════════════════════════════════════════════ */

/* ══ BREADCRUMB + PAGE HEAD ══════════════════════════════════════════════ */
.nel-subhead{background:var(--surface);border-bottom:1px solid var(--line);}
.nel-crumb{font-size:13px;color:var(--muted);display:flex;flex-wrap:wrap;align-items:center;
  line-height:1.5;}
.nel-crumb a{color:var(--muted);}
.nel-crumb a:hover{color:var(--red-text);}
.nel-crumb-sep{margin:0 7px;opacity:1;}
.nel-crumb-cur{color:var(--ink);font-weight:600;}

/* ══ PRODUCT DETAIL LAYOUT ═══════════════════════════════════════════════
   Mobile: one column, gallery first. ≥900px: gallery slightly wider than the
   summary column, both top-aligned (a tall spec column must not stretch the
   gallery). */
.nel-pd{display:grid;grid-template-columns:minmax(0,1fr);gap:32px;}
@media(min-width:900px){
  .nel-pd{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:48px;align-items:start;}
}
.nel-2col{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;}
@media(min-width:900px){.nel-2col{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;}}

/* ══ GALLERY ═════════════════════════════════════════════════════════════
   The stage is 4:3 with object-fit:contain — the WHOLE machine shows, wheels
   and implement ends included; nothing is ever cropped. Photography is a mix
   of white studio cut-outs and phone shots, so the stage sits on a light tile
   in both themes (the same rule .nel-prod-media already uses for cards). */
.nel-gal-stage{position:relative;aspect-ratio:4/3;background:#0E0E0E;
  border:1px solid var(--line);border-radius:16px;overflow:hidden;
  box-shadow:var(--shadow-rest);display:flex;align-items:center;justify-content:center;}
.nel-gal-stage img{width:100%;height:100%;object-fit:contain;padding:10px;display:block;}
/* Black by default (owner request) — matches the backdrop most of the library
   is shot on. .is-light is set per photo from the measured `bgs` value for the
   44 white studio cut-outs, so they never float on black. */
.nel-gal-stage.is-light{background:#F2EFE9;}
.nel-gal-stage.is-cutout{background:var(--plate);}
.nel-gal-stage.is-scene{background:var(--plate);}
.nel-gal-stage.is-scene img{object-fit:cover;padding:0;}
.nel-gal-stage.is-empty{background:var(--surface2);}
.nel-gal-thumb{background:#0E0E0E;}
.nel-gal-thumb.is-light{background:#F2EFE9;}
.nel-gal-thumb.is-cutout{background:var(--plate);}
.nel-gal-thumb.is-scene{background:var(--plate);}
.nel-gal-thumb.is-scene img{object-fit:cover;padding:0;}
.nel-gal-bar{position:absolute;top:0;left:0;right:0;height:3px;opacity:.85;}
.nel-gal-thumbs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px;}
@media(min-width:480px){.nel-gal-thumbs{grid-template-columns:repeat(4,minmax(0,1fr));}}
.nel-gal-thumb{aspect-ratio:4/3;background:var(--surface2);border:1.5px solid var(--line);
  border-radius:10px;overflow:hidden;padding:0;cursor:pointer;display:block;width:100%;
  transition:border-color .15s;}
.nel-gal-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.nel-gal-thumb:hover{border-color:var(--muted);}
.nel-gal-thumb.is-active{border-color:var(--red);}

/* ══ SUMMARY COLUMN ══════════════════════════════════════════════════════ */
.nel-pd-brandrow{display:flex;align-items:center;gap:9px;}
.nel-pd-brandrow .nel-logo-tile{width:112px;height:44px;border-radius:8px;padding:3px 5px;}
.nel-pd-brandname{font-size:12.5px;font-weight:700;letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted);}
.nel-pd-title{font-size:clamp(28px,4vw,42px);margin:14px 0 0;letter-spacing:-.01em;}
.nel-pd-pills{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;}
.nel-pd-desc{color:var(--muted);font-size:16px;line-height:1.65;margin-top:18px;}

/* Price band — "price on request" is deliberate: no Rand amount ever appears
   on a new-machine page (price-approval rule). */
.nel-price-band{background:var(--red-soft);border-radius:12px;padding:14px 18px;margin-top:20px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.nel-price-band strong{font-weight:700;color:var(--red-text);font-size:15px;}

.nel-cta-stack{display:flex;flex-direction:column;gap:10px;margin-top:20px;}
.nel-cta-row{display:flex;gap:10px;}
.nel-cta-row>*{flex:1;}
.nel-assure{display:flex;flex-direction:column;gap:8px;margin-top:20px;}
.nel-assure span{display:flex;align-items:flex-start;gap:9px;color:var(--muted);font-size:14px;
  line-height:1.5;}
.nel-assure b{color:var(--red-text);font-weight:800;flex-shrink:0;}

/* ══ SPEC TABLE WRAPPER + FEATURE CARDS ══════════════════════════════════ */
.nel-spec-wrap{border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-top:16px;}
/* Spec values come straight from the verified mirror and some are long
   ("Kubota B/L-reeks, TAFE 35–45 HP, John Deere 3-reeks — Kategorie I
   koppeling"). Let them wrap rather than push the table wider than a 360px
   phone. */
.nel-spec th,.nel-spec td{overflow-wrap:anywhere;}
.nel-feat-list{display:flex;flex-direction:column;gap:10px;margin-top:16px;}
.nel-feat{display:flex;gap:12px;background:var(--surface);border:1px solid var(--line);
  border-radius:12px;padding:14px 16px;box-shadow:var(--shadow-rest);}
.nel-feat b{color:var(--red-text);font-weight:800;flex-shrink:0;}
.nel-feat span{font-size:14.5px;line-height:1.5;}
.nel-feat em{font-style:normal;font-weight:700;}

/* ══ SECOND-HAND ═════════════════════════════════════════════════════════ */
.nel-trust-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;}
@media(min-width:640px){.nel-trust-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
.nel-trust{display:flex;gap:11px;background:var(--surface);border:1px solid var(--line);
  border-radius:12px;padding:14px 16px;box-shadow:var(--shadow-rest);}
.nel-trust b{color:var(--red-text);font-weight:800;flex-shrink:0;}
.nel-trust span{font-size:14px;line-height:1.5;}

.nel-used-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;}
@media(min-width:640px){.nel-used-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(min-width:900px){.nel-used-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
.nel-used-card{display:flex;flex-direction:column;}
/* Cover crop (not contain) is right here: these are photographs of real units
   on the yard, not cut-outs, and the card needs one consistent picture shape. */
.nel-used-cover{position:relative;aspect-ratio:4/3;background:var(--surface2);
  border-bottom:1px solid var(--line);overflow:hidden;}
.nel-used-cover img{width:100%;height:100%;object-fit:cover;display:block;}
.nel-used-badge{position:absolute;top:12px;left:12px;background:var(--red);color:#fff;
  font-weight:700;font-size:11.5px;letter-spacing:.05em;text-transform:uppercase;
  padding:5px 11px;border-radius:7px;}
.nel-used-body{padding:16px;display:flex;flex-direction:column;flex:1;}
.nel-used-kicker{display:flex;align-items:center;gap:7px;font-size:11.5px;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;color:var(--muted);}
.nel-used-name{font-family:'Montserrat',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;font-weight:700;font-size:19px;margin:6px 0 0;}
.nel-used-meta{font-size:13px;font-weight:600;color:var(--muted);margin-top:4px;line-height:1.5;}
.nel-used-pricerow{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;
  margin-top:14px;flex:1;flex-wrap:wrap;}
.nel-used-price{font-family:'Montserrat',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;font-weight:800;font-size:23px;color:var(--red-text);
  line-height:1.1;}
.nel-used-btns{display:flex;gap:8px;margin-top:14px;}
.nel-used-btns .nel-btn{flex:1;padding:11px 8px;font-size:13.5px;min-height:44px;}
.nel-callbtn{width:44px;min-width:44px;height:44px;display:flex;align-items:center;
  justify-content:center;border:1.5px solid var(--line);border-radius:9px;color:var(--ink);
  flex-shrink:0;transition:border-color .15s,background .15s;}
.nel-callbtn:hover{border-color:var(--ink);background:var(--surface2);}

/* ══ CTA BAND (shared by both pages) ═════════════════════════════════════
   This block is one of the four rules deliberately duplicated between here and
   nel-content.css (see that file's header note). The two copies had DRIFTED:
   nel-content.css also carries the `.nel-cta-band .nel-btn{flex-shrink:0}`
   line below and this file had lost it, so on product.html and
   secondhand.html the band's button could be squeezed narrower than its label
   at the point where the flex row is about to wrap. Re-added to restore
   byte-for-byte parity — if either copy changes, change both. */
.nel-cta-band{margin-top:32px;background:var(--surface);border:1px solid var(--line);
  border-radius:16px;padding:clamp(22px,3.5vw,36px);display:flex;align-items:center;
  justify-content:space-between;gap:20px;flex-wrap:wrap;box-shadow:var(--shadow-rest);}
.nel-cta-band .nel-btn{flex-shrink:0;}
/* 320px OVERFLOW FIX (2026-08-27). flex-shrink:0 above holds the button at its
   max-content width; secondhand.html's "Vra op WhatsApp wat beskikbaar is" is
   337px of label, so at a 320px viewport the button ran 60px past the edge and
   scrolled the page sideways. Below 480px the band stacks and the button goes
   full width, which is the right phone layout anyway. Above 480px nothing
   changes and flex-shrink:0 still guards the squeeze it was added for. */
@media(max-width:479.98px){
  .nel-cta-band{flex-direction:column;align-items:stretch;}
  .nel-cta-band .nel-btn{flex-shrink:1;width:100%;max-width:100%;}
}

/* ══ PRE-JS LANGUAGE VISIBILITY ══════════════════════════════════════════
   Unit data on the second-hand page (meta lines) ships as an AF and an EN
   span. nel-app.js hides the inactive one on load, but the inline <head>
   script has already set data-nel-lang before first paint — so this rule hides
   it a frame earlier and, if JavaScript never arrives, the page still reads in
   exactly one language instead of showing both. */
[data-nel-lang="af"] [data-lang-en]{display:none;}
[data-nel-lang="en"] [data-lang-af]{display:none;}

/* ══ SAFETY: nothing may overflow at 360px ═══════════════════════════════ */
.nel-pd,.nel-2col,.nel-used-grid,.nel-trust-grid,.nel-gal-thumbs{min-width:0;}
.nel-pd *,.nel-used-body *{min-width:0;}
.nel-used-name,.nel-pd-title{overflow-wrap:anywhere;}

/* ══ PHOTO ZOOM / LIGHTBOX ═══════════════════════════════════════════════
   Full-screen photo viewer (js/nel-zoom.js). The backdrop is a literal near
   black in BOTH themes on purpose: this is a viewing surface, and a bone
   backdrop in light theme would wash out machinery shot on black. The chrome
   on top of it is therefore also literal, not tokenised. */
.nel-zoom{position:fixed;inset:0;z-index:200;background:rgba(9,9,9,.94);
  display:flex;align-items:center;justify-content:center;}
.nel-zoom[hidden]{display:none!important;}
html.nel-zoom-open{overflow:hidden;}
.nel-zoom-stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  overflow:hidden;touch-action:none;cursor:zoom-in;}
.nel-zoom.is-zoomed .nel-zoom-stage{cursor:grab;}
.nel-zoom.is-zoomed .nel-zoom-stage:active{cursor:grabbing;}
.nel-zoom-stage img{max-width:94vw;max-height:88vh;width:auto;height:auto;display:block;
  transform-origin:center center;user-select:none;-webkit-user-drag:none;
  transition:transform .12s ease-out;will-change:transform;}
.nel-zoom-bar{position:absolute;top:0;left:0;right:0;z-index:2;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;background:linear-gradient(rgba(9,9,9,.85),transparent);}
.nel-zoom-count{font-size:13.5px;font-weight:700;color:#F2EFE9;
  font-variant-numeric:tabular-nums;letter-spacing:.04em;}
.nel-zoom-tools{display:flex;gap:8px;}
.nel-zoom-btn{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:10px;border:1px solid rgba(242,239,233,.28);background:rgba(20,20,20,.7);
  color:#F2EFE9;cursor:pointer;padding:0;}
.nel-zoom-btn:hover{background:rgba(60,60,60,.85);}
.nel-zoom-btn[disabled]{opacity:.35;cursor:default;}
.nel-zoom-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round;}
.nel-zoom-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;
  width:48px;height:64px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:12px;border:1px solid rgba(242,239,233,.28);background:rgba(20,20,20,.7);
  color:#F2EFE9;cursor:pointer;padding:0;}
.nel-zoom-nav:hover{background:rgba(60,60,60,.85);}
.nel-zoom-nav[hidden]{display:none!important;}
.nel-zoom-nav svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;}
.nel-zoom-prev{left:10px;} .nel-zoom-next{right:10px;}
/* The hint sits ON the photo, so it needs its own ground or it disappears
   into whatever happens to be behind it. It also gets out of the way as soon
   as the customer starts zooming — by then it has done its job. */
.nel-zoom-hint{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);z-index:2;
  max-width:calc(100% - 32px);text-align:center;font-size:12.5px;line-height:1.4;
  color:#F2EFE9;background:rgba(9,9,9,.72);border:1px solid rgba(242,239,233,.16);
  border-radius:999px;padding:7px 15px;margin:0;pointer-events:none;
  transition:opacity .18s;}
.nel-zoom.is-zoomed .nel-zoom-hint{opacity:0;}
.nel-zoom:focus-visible,.nel-zoom-btn:focus-visible,.nel-zoom-nav:focus-visible{
  outline:3px solid #F2EFE9;outline-offset:2px;}
@media(max-width:599.98px){
  .nel-zoom-nav{width:44px;height:56px;}
  .nel-zoom-stage img{max-width:100vw;max-height:78vh;}
  .nel-zoom-hint{bottom:10px;font-size:12px;}
}
@media(prefers-reduced-motion:reduce){.nel-zoom-stage img{transition:none;}}

/* The stage photo is now the thing you click to enlarge, so it has to say so. */
.nel-gal-stage{cursor:zoom-in;}
.nel-gal-stage.is-empty{cursor:default;}
.nel-gal-zoom{position:absolute;right:10px;bottom:10px;z-index:2;
  width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:10px;border:1px solid rgba(242,239,233,.34);background:rgba(14,14,14,.62);
  color:#F2EFE9;cursor:zoom-in;padding:0;}
.nel-gal-stage.is-light .nel-gal-zoom,.nel-gal-stage.is-cutout .nel-gal-zoom,
.nel-gal-stage.is-scene .nel-gal-zoom{border-color:rgba(14,14,14,.3);background:rgba(14,14,14,.72);}
.nel-gal-zoom:hover{background:rgba(14,14,14,.88);}
.nel-gal-zoom svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round;}

/* Gallery equivalent of .nel-prod-media.is-full — see the note there. */
.nel-gal-stage.is-full{background:var(--plate);}
.nel-gal-stage.is-full img{object-fit:contain;padding:10px;}
.nel-gal-thumb.is-full{background:var(--plate);}
.nel-gal-thumb.is-full img{object-fit:contain;padding:4px;}

/* ══ FORMAL PASS (2026-11-12) — gallery uses the same grey photo plate as the
   catalogue cards (see the block at the end of nel-design.css). Real
   photographs (.is-scene) keep their own background. */
.nel-gal-stage,.nel-gal-stage.is-light,.nel-gal-stage.is-cutout,.nel-gal-stage.is-full,
.nel-gal-thumb,.nel-gal-thumb.is-light,.nel-gal-thumb.is-cutout,.nel-gal-thumb.is-full{background:var(--photo-plate);}
.nel-gal-stage.is-scene,.nel-gal-thumb.is-scene{background:#1A1A1A;}
/* brand colour bar under the stage: dropped with the card bars (dot + logo carry the brand) */
.nel-gal-bar{display:none;}
