/* Stock catalogue — grid, filters, tree sheet */

.stocklayout{display:grid;grid-template-columns:262px minmax(0,1fr);
  gap:clamp(24px,4vw,52px);align-items:start;padding-block:clamp(34px,4.5vw,60px) 100px}
@media(max-width:900px){.stocklayout{grid-template-columns:1fr;gap:6px}}

/* --- name search --- */
.namehunt{background:var(--wash);border:1px solid var(--wash-dp);border-radius:var(--radius);
  padding:24px 26px;display:flex;gap:22px;align-items:center;flex-wrap:wrap;margin-top:30px}
.namehunt .t{max-width:36ch}
.namehunt .t b{display:block;font-family:var(--display);font-size:1.28rem;
  font-weight:var(--display-weight);letter-spacing:var(--display-track);margin-bottom:4px}
.namehunt .t span{font-size:14.3px;color:#4a5c50}
.namehunt input{flex:1;min-width:230px;font:inherit;font-size:16.5px;padding:15px 18px;
  border:1px solid var(--line);border-radius:var(--radius);background:var(--white)}
.namehunt input:focus{outline:0;border-color:var(--forest);box-shadow:0 0 0 3px rgba(8,69,41,.1)}

/* --- filters --- */
.filters{position:sticky;top:116px}
/* Phones: the filters were a 16-checkbox panel parked in front of the first
   tree, about 1,700px down. Now they are a button that stays under the thumb
   and opens a sheet from the bottom; the button then says how many trees the
   sheet has narrowed it to, and closes it. */
.fsum__close{display:none}
@media(max-width:900px){
  .filters{position:static;margin:0;border:0;padding:0}
  .filters > summary{list-style:none;cursor:pointer;position:fixed;z-index:96;
    left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom));
    min-height:50px;padding:0 26px;border-radius:999px;background:var(--forest);color:#fff;
    display:flex;align-items:center;gap:10px;font-size:13px;letter-spacing:.16em;
    text-transform:uppercase;font-weight:500;box-shadow:0 10px 30px rgba(7,28,18,.32);
    white-space:nowrap}
  .filters > summary::-webkit-details-marker{display:none}
  .filters > summary b{font-weight:600}
  .filters > summary b:empty{display:none}
  #fActive{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;
    border-radius:11px;background:#fff;color:var(--forest);font-size:12px;letter-spacing:0}
  #fActive:empty{display:none}
  .filters[open] .fsum__open{display:none}
  .filters[open] .fsum__close{display:inline}
  .filters[open]::before{content:'';position:fixed;inset:0;z-index:94;background:rgba(7,28,18,.42)}
  .filters[open] .fbody{position:fixed;left:0;right:0;bottom:0;z-index:95;max-height:80svh;
    overflow:auto;overscroll-behavior:contain;background:var(--white);
    border-radius:16px 16px 0 0;padding:22px var(--gut) calc(96px + env(safe-area-inset-bottom));
    box-shadow:0 -20px 50px rgba(7,28,18,.25)}
  /* room so the button never sits on the last card */
  .stockmain{padding-bottom:84px}
}
@media(min-width:901px){.filters > summary{display:none}}
.fgrp{border-bottom:1px solid var(--line-soft);padding-bottom:18px;margin-bottom:18px}
.fgrp[hidden]{display:none}
/* .tail is whichever group is last AFTER the empty ones are hidden */
.fgrp:last-child,.fgrp.tail{border:0;margin-bottom:0}
.fgrp h3{font-family:var(--sans);font-size:11px;letter-spacing:.24em;text-transform:uppercase;
  color:var(--sage);margin-bottom:13px;font-weight:400}
.ck{display:flex;align-items:center;gap:10px;font-size:14.6px;padding:9px 0;min-height:44px;cursor:pointer;
  color:#4a5c50;transition:color .2s}
.ck:hover{color:var(--ink)}
.ck input{accent-color:var(--forest);width:15px;height:15px;margin:0;flex:none}
.ck .n{margin-left:auto;font-size:12px;color:var(--sage);font-variant-numeric:tabular-nums}
.rangeval{font-size:14px;color:#4a5c50;margin-bottom:9px;font-variant-numeric:tabular-nums}
.rangeval b{color:var(--forest)}
/* A 16px-tall slider is a thumb-width of nothing. The track stays slim; the
   control gets a real box around it to grab. */
input[type=range]{width:100%;accent-color:var(--forest);height:44px;cursor:pointer}
.clearall{background:none;border:0;padding:10px 0;min-height:44px;color:var(--moss);
  font-size:13.6px;text-decoration:underline;text-underline-offset:3px;text-align:left}

/* --- toolbar --- */
.stocktools{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:20px}
.stocktools .cnt{font-size:14.6px;color:#4a5c50}
.stocktools .cnt b{color:var(--ink);font-weight:600}
.stocktools select{margin-left:auto;font:inherit;font-size:14px;padding:9px 13px;
  border:1px solid var(--line);border-radius:9px;background:var(--white)}

/* --- cards --- */
.tgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:clamp(14px,2vw,26px)}
.tcard{touch-action:manipulation;-webkit-tap-highlight-color:transparent;background:var(--white);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;
  text-align:left;padding:0;color:inherit;display:flex;flex-direction:column;width:100%;
  transition:transform .38s var(--ease),box-shadow .38s var(--ease),border-color .38s}
.tcard:active{transform:translateY(-1px)}
.tcard:hover{transform:translateY(-5px);box-shadow:0 20px 44px rgba(10,28,18,.13);
  border-color:var(--wash-dp)}
.tcard:focus-visible{outline:2px solid var(--forest);outline-offset:3px}
.tcard__img{position:relative;aspect-ratio:4/3.5;overflow:hidden;
  background:linear-gradient(165deg,#eaf0e8,#d4dfd2);display:flex;align-items:flex-end;
  justify-content:center}
/* direct child only — a descendant selector here also caught the play-badge
   icon and scaled it to 76% of the badge. */
.tcard__img > svg{width:76%;height:88%;transition:transform .55s var(--ease)}
.tcard:hover .tcard__img > svg{transform:scale(1.05)}
/* Real photography. Same direct-child rule as the svg above, and the same
   hover behaviour, so a photographed tree and a drawn one feel identical. */
.tcard__img > img{width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .55s var(--ease)}
.tcard:hover .tcard__img > img{transform:scale(1.04)}
.chip-vid svg{width:9px;height:10px;margin-left:1px}
.tcard.is-sold .tcard__img{filter:saturate(.35) opacity(.75)}
.chip-st{position:absolute;top:11px;left:11px;font-size:11px;letter-spacing:.09em;
  text-transform:uppercase;font-weight:700;padding:5px 9px;border-radius:5px;
  background:var(--forest);color:#fff}
.chip-st.res{background:#8a6a2c}
.chip-st.gnd{background:#8c5a34}
.chip-st.sold{background:#67706a}
.chip-asp{position:absolute;top:11px;right:11px;font-size:11px;font-weight:700;padding:5px 9px;
  border-radius:5px;background:rgba(255,255,255,.94);color:var(--moss)}
.chip-vid{position:absolute;bottom:11px;right:11px;width:26px;height:26px;border-radius:50%;
  background:rgba(10,28,18,.72);color:#fff;display:grid;place-items:center;font-size:9px}
.tcard__b{padding:15px 16px 17px}
.tcard__b .nm{font-family:var(--display);font-size:1.3rem;font-weight:var(--display-weight);
  letter-spacing:var(--display-track);line-height:1.12}
.tcard__b .sp{font-size:13.4px;color:var(--sage);margin-top:3px}
.tcard__m{display:flex;gap:7px;margin-top:11px;font-size:12.4px;color:#4a5c50;
  font-variant-numeric:tabular-nums;align-items:center;flex-wrap:wrap}
.tcard__m span{background:var(--wash);padding:3px 8px;border-radius:5px}
/* "Not measured yet" is information, not a measurement — it reads quieter
   than a real number so the two are never confused at a glance. */
.tcard__m .unmeasured{background:transparent;padding:3px 0;color:var(--sage);font-style:italic}
/* Peter's own label for the plant — "Aged Frangipani", "Sculpted Olive" */
.tcard__m .rib{background:var(--forest);color:#eef4ec}

.noresult{padding:70px 24px;text-align:center;border:1px dashed var(--line);border-radius:var(--radius);
  color:#4a5c50}
.noresult h3{margin-bottom:10px}

/* --- detail sheet --- */
.sheetwrap{position:fixed;inset:0;z-index:200;display:none;overflow-y:auto;overscroll-behavior:contain;
  background:rgba(6,26,16,.62);backdrop-filter:blur(3px);padding:clamp(0px,4vh,44px) clamp(0px,3vw,24px)}
.sheetwrap.open{display:block}
.sheet{background:var(--white);border-radius:var(--radius);max-width:1000px;margin-inline:auto;
  overflow:hidden;position:relative;box-shadow:0 30px 90px rgba(0,0,0,.34)}
.sheet__grid{display:grid;grid-template-columns:1.02fr 1fr}
@media(max-width:820px){.sheet__grid{grid-template-columns:1fr}}
.sheet__gal{background:linear-gradient(165deg,#eaf0e8,#d2ded0);padding:clamp(20px,3vw,30px);
  display:flex;flex-direction:column}
.sheet__hero{flex:1;display:flex;align-items:flex-end;justify-content:center;min-height:260px}
/* The hero doubles as the way into the full-size photograph, so when there is
   a photograph behind it, it is a real button — keyboard-reachable, and it
   says so on hover and on touch. */
button.sheet__hero{position:relative;width:100%;padding:0;border:0;background:transparent;
  cursor:zoom-in;overflow:hidden;border-radius:10px;-webkit-appearance:none;appearance:none}
button.sheet__hero:focus-visible{outline:2px solid var(--forest);outline-offset:3px}
.zoomhint{position:absolute;right:10px;bottom:10px;display:flex;align-items:center;gap:6px;
  background:rgba(8,26,16,.72);color:#e8efe8;font-size:11px;letter-spacing:.08em;
  text-transform:uppercase;font-weight:600;padding:7px 10px;border-radius:6px;
  opacity:.85;transition:opacity var(--t1,130ms) ease,transform var(--t1,130ms) ease}
button.sheet__hero:hover .zoomhint{opacity:1;transform:translateY(-1px)}
.thumbs .th{cursor:zoom-in}
.sheet__hero > svg{width:74%;max-height:330px;height:100%}
/* CONTAIN, for the same reason the triage queue does: this is the picture
   somebody decides on a $6,000 tree from, and a portrait photograph of a palm
   cropped to a landscape box loses the head. The card thumbnails above stay
   cropped — they are a grid of tiles, not the thing being judged. */
.sheet__hero > img{width:100%;height:100%;max-height:420px;object-fit:contain;display:block}
.sheet__hero > video{width:100%;max-height:420px;display:block;background:#0b1c12}
/* A plant with no photograph and no drawing. Says so, rather than
   borrowing another species' illustration. */
.noart{width:100%;height:100%;min-height:180px;display:grid;place-items:center;align-content:center;
  gap:6px;text-align:center;padding:18px;background:linear-gradient(165deg,#e9efe7,#cfdccd)}
.noart span{font-family:var(--display);font-size:1.15rem;color:var(--forest);line-height:1.15}
.noart em{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--sage);font-style:normal}
.thumbs{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-top:18px}
.thumbs .th{aspect-ratio:1;border-radius:7px;background:rgba(255,255,255,.62);
  border:1px solid rgba(0,0,0,.06);display:grid;place-items:center}
.thumbs .th.on{background:var(--white);border-color:var(--forest)}
.thumbs .th{padding:0;overflow:hidden;cursor:pointer;-webkit-appearance:none;appearance:none}
.thumbs .th img{width:100%;height:100%;object-fit:cover;display:block}
.thumbs .th.on{outline:2px solid var(--forest);outline-offset:-2px}
.sheet__info{padding:clamp(24px,3.4vw,42px)}
.sheet__eye{font-size:11px;letter-spacing:.26em;text-transform:uppercase;color:var(--moss);
  font-weight:400}
.sheet__info h2{font-size:clamp(2.1rem,3.6vw,3.2rem);margin:10px 0 5px;line-height:.94}
.sheet__bot{font-style:italic;color:var(--sage);font-size:14.4px;margin-bottom:20px}
/* The walk-around is a button now, not a caption: it plays the video. */
.vidbar{-webkit-appearance:none;appearance:none;border:0;width:100%;text-align:left;
  cursor:pointer;font:inherit}
.vidbar:hover{background:var(--forest)}
.vidbar{display:flex;align-items:center;gap:12px;background:var(--forest-dp);color:#dbe6da;
  border-radius:11px;padding:14px 16px;font-size:13.8px;margin-bottom:20px}
.vidbar .play{width:29px;height:29px;border-radius:50%;background:var(--moss);color:#fff;
  display:grid;place-items:center;flex:none;font-size:10px}
table.spec{width:100%;border-collapse:collapse;font-size:14.6px;margin-bottom:20px}
table.spec td{padding:9px 0;border-bottom:1px solid var(--line-soft)}
table.spec td:first-child{color:var(--sage);width:46%}
table.spec td.unmeasured{color:var(--sage);font-style:italic}
table.spec td:last-child{font-weight:600;font-variant-numeric:tabular-nums;text-align:right}
/* A labelled block, not a bar down the side: the label is what tells you this
   is about the viewing aspect, and it does it in words. */
.aspnote{background:var(--wash);border:1px solid var(--wash-dp);border-radius:var(--radius);
  padding:14px 16px;font-size:14.2px;line-height:1.62;color:#3d5145;margin-bottom:20px}
.aspnote b{display:block;color:var(--forest);margin-bottom:3px;font-size:13px;
  letter-spacing:.06em;text-transform:uppercase}
/* Peter's own line about where the tree came from — set as what it is, a
   quotation, with the mark doing the work instead of a rule. */
.storynote{position:relative;padding-left:26px;font-size:14.6px;
  color:#4a5c50;font-style:italic;margin-bottom:24px}
.storynote::before{content:'\201C';position:absolute;left:0;top:-2px;font-family:var(--display);
  font-size:2.1rem;line-height:1;color:var(--wash-dp)}
.sheet .btn{width:100%;justify-content:center}
.sheet__sub{text-align:center;font-size:13px;color:var(--sage);margin-top:11px;line-height:1.55}
.sheetx{position:absolute;top:14px;right:14px;width:38px;height:38px;border-radius:50%;
  background:rgba(255,255,255,.94);border:1px solid var(--line);color:var(--ink);
  display:grid;place-items:center;font-size:20px;line-height:1;z-index:5}
.sheetx:hover{background:var(--forest);color:#fff;border-color:var(--forest)}

/* ---------- full-size photograph ------------------------------------- */
/* Peter's photographs are the product. This is the only place on the site
   where one is shown at the size it was taken at, so it gets the whole
   screen and nothing else competes with it. */
/* Opaque, not translucent: at 96% the plant sheet underneath was still
   legible through it, and two interfaces fighting for the same pixels is
   exactly what somebody squinting at bark does not need. */
.zoom{position:fixed;inset:0;z-index:300;background:#0a1810;
  display:grid;grid-template-rows:auto 1fr auto;
  /* otherwise the close button sits under the notch and the tip line under
     the home indicator */
  padding:env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left)}
.zoom[hidden]{display:none}
.zoom__bar{display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:12px clamp(12px,2.5vw,22px);color:#dfe8de;border-bottom:1px solid rgba(255,255,255,.09)}
.zoom__who{display:flex;align-items:baseline;gap:12px;min-width:0}
.zoom__who b{font-family:var(--display);font-weight:var(--display-weight);font-size:1.2rem;
  color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.zoom__who span{font-size:12.5px;color:#9fb3a4;font-variant-numeric:tabular-nums;white-space:nowrap}
.zoom__tools{display:flex;align-items:center;gap:6px;flex:none}
.zoom__tools button{width:44px;height:44px;border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.06);color:#e8efe8;border-radius:8px;font-size:19px;line-height:1;
  cursor:pointer;display:grid;place-items:center;-webkit-appearance:none;appearance:none;
  transition:background var(--t1,130ms) ease,border-color var(--t1,130ms) ease}
.zoom__tools button:hover:not(:disabled){background:rgba(255,255,255,.14)}
.zoom__tools button:disabled{opacity:.32;cursor:default}
.zoom__tools button:focus-visible{outline:2px solid #8fc0a0;outline-offset:2px}
#zpct{font-size:12.5px;color:#9fb3a4;min-width:52px;text-align:center;
  font-variant-numeric:tabular-nums}

.zoom__stage{position:relative;overflow:hidden;display:grid;place-items:center;overscroll-behavior:contain;
  padding:clamp(8px,2.4vw,34px);touch-action:none;-webkit-user-select:none;user-select:none}
.zoom__stage img{max-width:100%;max-height:100%;display:block;transform-origin:center center;
  will-change:transform;cursor:zoom-in;-webkit-user-drag:none}
.zoom__stage img.grabbable{cursor:grab}
.zoom__stage img.grabbable:active{cursor:grabbing}

.zoom__nav{position:absolute;top:50%;transform:translateY(-50%);width:52px;height:76px;
  border:0;background:rgba(8,24,14,.55);color:#e8efe8;cursor:pointer;display:grid;place-items:center;
  -webkit-appearance:none;appearance:none;transition:background var(--t1,130ms) ease}
.zoom__nav:hover{background:rgba(8,24,14,.85)}
.zoom__nav:focus-visible{outline:2px solid #8fc0a0;outline-offset:-3px}
.zoom__nav.prev{left:0;border-radius:0 8px 8px 0}
.zoom__nav.next{right:0;border-radius:8px 0 0 8px}
.zoom__tip{padding:10px 16px 14px;text-align:center;color:#8ea395;font-size:12px;
  letter-spacing:.04em}

@media (max-width:700px){
  .zoom__who b{font-size:1.05rem}
  .zoom__nav{width:44px;height:64px}
  .zoom__tip{font-size:11px;padding:8px 12px 12px}
}
@media (prefers-reduced-motion:reduce){
  .zoom__tools button,.zoom__nav,.zoomhint{transition:none}
}
