/* Products page, product inside view and selection tray (15 Nov 2026). Ephoria look: theme.css tokens only, flat selected
   state (--sel-*), status dot, no decorative shadows. One component for the Products page and the chat's picker. */
.pb-root{display:block;min-width:0}
.pb-page-title{align-items:flex-start}
.pb-ask{margin:-6px 0 14px}
.pb-head{display:grid;gap:10px;margin-bottom:12px}
.pb-search{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pb-search input[type=search]{flex:1 1 280px;min-width:0}
.pb-sort{display:flex;gap:8px;align-items:center;font-size:13px;color:var(--ink-2)}
.pb-sort select{width:auto}
.pb-count{margin:0;font-size:13px;color:var(--ink-2)}
.pb-filters{display:grid;gap:6px}
.pb-filter-row{display:flex;gap:10px;align-items:baseline;min-width:0}
details.pb-filter-row{display:block}
details.pb-filter-row>summary{cursor:pointer;display:flex;gap:10px;align-items:baseline;list-style:none;padding:2px 0}
details.pb-filter-row>summary::-webkit-details-marker{display:none}
details.pb-filter-row>summary::after{content:"";width:6px;height:6px;border-right:1.5px solid var(--ink-3);border-bottom:1.5px solid var(--ink-3);transform:rotate(45deg) translateY(-2px);margin-left:2px}
details.pb-filter-row[open]>summary::after{transform:rotate(225deg)}
details.pb-filter-row .pb-filter-chips{margin:6px 0 4px}
.pb-filter-label{flex:none;width:104px;font-size:13px;color:var(--ink-3)}
.pb-filter-current{font-size:13px;color:var(--ink)}
.pb-filter-chips{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.pb-filter{font:inherit;font-size:13px;line-height:1.2;padding:5px 10px;border-radius:999px;border:1px solid var(--hair);background:var(--surface);color:var(--ink-2);cursor:pointer}
.pb-filter:hover{background:var(--hover-fill)}
.pb-filter[aria-pressed="true"]{background:var(--sel-fill);border-color:var(--sel-line);color:var(--sel-ink);font-weight:var(--sel-weight)}
.pb-n{color:var(--ink-3);font-weight:400}
.pb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(176px,1fr));gap:14px;min-height:240px}
.pb-mode-picker .pb-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.pb-grid[aria-busy="true"]{opacity:.6}
.pb-card{min-width:0}
.pb-card-open{display:grid;gap:8px;width:100%;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.pb-card-photo{display:block;aspect-ratio:4/5;border-radius:10px;overflow:hidden;background:var(--paper-2);border:1px solid var(--hair-soft)}
.pb-card-photo img,.pb-card-photo .placeholder{width:100%;height:100%;object-fit:cover;display:block}
.pb-card-open:hover .pb-card-photo{border-color:var(--hair-2)}
.pb-card-text{display:grid;gap:2px;min-width:0;padding:0 2px}
.pb-card-text strong{font-weight:500;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pb-code{font:500 12px var(--mono,ui-monospace,monospace);color:var(--ink-2);letter-spacing:.02em}
.pb-card-meta{font-size:13px;color:var(--ink-3)}
.pb-chip{display:inline-flex;align-items:center;gap:6px;width:max-content;font-size:12px;padding:3px 9px;border-radius:999px;border:1px solid var(--hair);color:var(--ink-2)}
.pb-chip-on::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--status-ok);flex:none}
.pb-pager{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 14px;margin:6px 0 14px}
.pb-pager[data-pager="bottom"]{margin:18px 0 6px}
.pb-pager-count{font-size:13px;color:var(--ink-2)}
.pb-pager-pages{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.pb-page{font:inherit;font-size:13px;min-width:34px;height:32px;padding:0 10px;border-radius:8px;border:1px solid var(--hair);background:var(--surface);color:var(--ink);cursor:pointer}
.pb-page:hover:not(:disabled){background:var(--hover-fill)}
.pb-page:disabled{color:var(--ink-3);cursor:default;opacity:.6}
.pb-page[aria-current="page"]{background:var(--sel-fill);border-color:var(--sel-line);color:var(--sel-ink);font-weight:var(--sel-weight)}
.pb-gap{color:var(--ink-3);padding:0 2px}
.pb-gap-phone{display:none}
/* Inside a product: a shop product page. Photos left, everything else right; one column on a phone. */
.pb-view-top{margin-bottom:12px}
.pb-pdp{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,1fr);gap:28px;align-items:start}
.pb-stage{display:grid;grid-template-columns:72px minmax(0,1fr);gap:10px;position:sticky;top:12px}
.pb-stage-main{grid-column:2;grid-row:1;aspect-ratio:4/5;border-radius:12px;overflow:hidden;background:var(--paper-2);border:1px solid var(--hair-soft)}
.pb-stage-img{width:100%;height:100%;object-fit:contain;display:block}
.pb-stage-thumbs{grid-column:1;grid-row:1;display:flex;flex-direction:column;gap:8px;height:0;min-height:100%;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}
.pb-stage-thumbs::-webkit-scrollbar{display:none}
.pb-thumb{flex:none;width:72px;height:90px;padding:0;border-radius:8px;overflow:hidden;border:1px solid var(--hair);background:var(--paper-2);cursor:pointer}
.pb-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.pb-thumb[aria-pressed="true"]{border-color:var(--pick-ring);outline:2px solid var(--pick-ring);outline-offset:-2px}
.pb-info{display:grid;gap:12px;min-width:0}
.pb-kicker{margin:0;font:500 12px var(--mono,ui-monospace,monospace);color:var(--ink-2);letter-spacing:.02em}
.pb-title{margin:0;font:500 24px/1.25 var(--disp,inherit)}
.pb-design-line{margin:0;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
.pb-design-line strong{font-weight:600}
.pb-shopno{font-size:12px;color:var(--ink-3)}
.pb-designs-head{display:flex;gap:10px;align-items:baseline;font-size:13px;color:var(--ink-2)}
.pb-designs-head small{color:var(--ink-3)}
.pb-designs{display:grid;grid-template-columns:repeat(auto-fill,minmax(60px,1fr));grid-auto-rows:max-content;align-content:start;gap:8px;max-height:340px;overflow:auto;padding:2px;scrollbar-width:thin}
.pb-design{position:relative;display:block;padding:0;height:auto;min-height:0;border-radius:8px;overflow:hidden;border:1px solid var(--hair);background:var(--swatch,var(--paper-2));cursor:pointer}
.pb-design img,.pb-design .placeholder{position:relative;width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;display:block}
/* The name on the colour sits under the photo: visible until the thumbnail has loaded (or if it never does), covered after. */
.pb-design-name{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:4px;font-size:10px;line-height:1.25;text-align:center;color:var(--swatch-ink,var(--ink-2));overflow:hidden;word-break:break-word}
.pb-thumb{position:relative}
.pb-thumb .pb-design-name{font-size:12px;color:var(--ink-3)}
.pb-thumb img{position:relative}
.pb-design[aria-pressed="true"]{border-color:var(--pick-ring);outline:2px solid var(--pick-ring);outline-offset:-2px}
.pb-design-mark{position:absolute;left:3px;right:3px;bottom:3px;font-size:10px;line-height:1.4;padding:1px 4px;border-radius:5px;background:var(--surface);color:var(--ink);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pb-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.pb-facts{margin:0;display:grid;gap:6px}
.pb-facts>div{display:grid;grid-template-columns:120px minmax(0,1fr);gap:10px;font-size:14px}
.pb-facts dt{color:var(--ink-3)}
.pb-facts dd{margin:0;color:var(--ink)}
.pb-ready-slot{font-size:14px}
.pb-ready>summary{cursor:pointer;list-style:none;display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline;color:var(--ink-2)}
.pb-ready>summary::-webkit-details-marker{display:none}
.pb-ready-label{color:var(--ink-3)}
.pb-ready-more{margin-left:auto;font-size:13px;text-decoration:underline;text-underline-offset:3px;color:var(--ink)}
.pb-ready[open] .pb-ready-more{visibility:hidden}
.pb-ready .product-readiness{margin-top:10px}
.pb-ready-none{margin:0;font-size:13px}
.pb-about summary{cursor:pointer;font-size:14px;color:var(--ink-2)}
.pb-about p{font-size:14px;line-height:1.55;color:var(--ink-2)}
.pb-link{font-size:14px;color:var(--ink);text-decoration:underline;text-underline-offset:3px}
/* The tray: in the flow at the bottom of the page, held at the bottom of the window while scrolling; a spacer keeps the last
   row clear of it. */
.pb-tray{position:sticky;bottom:0;z-index:5;display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:12px;padding:10px 12px;border:1px solid var(--hair-2);border-radius:12px;background:var(--surface)}
.pb-tray-space{height:8px}
.pb-tray-items{display:flex;gap:6px;overflow-x:auto;min-width:0;flex:1 1 300px;scrollbar-width:thin}
.pb-tray-item{flex:none;display:inline-flex;align-items:center;gap:6px;padding:3px 4px 3px 3px;border:1px solid var(--hair);border-radius:8px;font-size:12px;max-width:240px}
.pb-tray-item img{width:24px;height:30px;object-fit:cover;border-radius:4px}
.pb-tray-item span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pb-x{border:0;background:none;color:var(--ink-2);font-size:16px;line-height:1;padding:2px 5px;cursor:pointer;border-radius:5px}
.pb-x:hover{background:var(--hover-fill)}
.pb-tray-actions{display:flex;gap:8px;align-items:center;flex:none;flex-wrap:wrap}
.pb-tray-label{flex:none;align-self:center;font-size:12px;color:var(--ink-2);white-space:nowrap}
/* One control height for every button in the tray and the inside view's actions (16 Nov 2026: Clear was shorter than its neighbours);
   the token is theme.css --control-h (36 px, 44 px at phone width); the fallbacks are the same numbers. */
.pb-tray .btn,.pb-actions .btn,.pb-view-top .btn{height:var(--control-h,36px);min-height:var(--control-h,36px);padding-top:0;padding-bottom:0;box-sizing:border-box}
@media(max-width:767px){.pb-tray .btn,.pb-actions .btn,.pb-view-top .btn{height:var(--control-h,44px);min-height:var(--control-h,44px)}}
/* Add a product */
/* Top-anchored (15 Nov 2026): a centred dialog re-centred as the preview arrived, moving the pressed "Read this page" button. */
.pb-add{margin:24px auto auto;width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 48px);overflow:auto;padding:20px 22px;border:1px solid var(--hair-2);border-radius:14px;background:var(--surface);color:var(--ink)}
.pb-add::backdrop{background:rgba(10,10,14,.45)}
.pb-add-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.pb-add-head h2{margin:0;font:500 21px var(--disp,inherit)}
.pb-add-tabs{display:flex;gap:6px;margin-bottom:14px}
.pb-add form{display:grid;gap:12px}
.pb-add [data-link-form]{grid-template-columns:minmax(0,1fr) auto;align-items:end}
.pb-preview{display:grid;gap:12px;margin-top:14px}
.pb-preview-photos,.pb-upload-previews{display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin}
.pb-preview-photos img,.pb-upload-previews img{flex:none;width:96px;aspect-ratio:4/5;object-fit:cover;border-radius:8px;border:1px solid var(--hair-soft)}
.pb-preview-actions{display:flex;gap:8px}
.pb-dup{margin-top:12px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pb-dup p{margin:0}
.pb-added{margin-top:22px}
.pb-added summary{cursor:pointer;font-size:14px;color:var(--ink-2)}
.pb-added-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:8px}
.pb-added-list li{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--hair-soft)}
.pb-added-list small{display:block}
@media (max-width:900px){.pb-pdp{grid-template-columns:minmax(0,1fr)}.pb-stage{position:static}}
@media (max-width:560px){
 .pb-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .pb-filter-label{width:auto}
 .pb-filter-row:not(details){flex-direction:column;gap:6px}
 .pb-stage{grid-template-columns:minmax(0,1fr)}
 .pb-stage-main{grid-column:1}
 .pb-stage-thumbs{grid-column:1;grid-row:2;flex-direction:row;overflow-x:auto;overflow-y:hidden;height:auto;min-height:0}
 .pb-thumb{width:56px;height:70px}
 .pb-designs{grid-template-columns:repeat(auto-fill,minmax(52px,1fr));max-height:260px}
 .pb-add [data-link-form]{grid-template-columns:minmax(0,1fr)}
 /* The count line and the page buttons start at the content's left edge, like the Library's count line (10.5). */
 .pb-pager{justify-content:flex-start}
 /* The tray's buttons take their own row and wrap inside the phone's width (16 Nov 2026). */
 .pb-tray-actions{flex:1 1 100%}
 /* A phone shows First, Previous, the nearby page numbers, Next and Last (batch 9: Last was hidden at 390 px); the bare first and
    last page numbers are dropped instead, since First and Last reach them. */
 .pb-page[data-far],.pb-page[data-edge]{display:none}
 .pb-gap-phone{display:inline}
}

/* Design tile colours, one per colour word (generated from SWATCH in client/product-view.js; the page forbids inline styles). */
.pb-design[data-swatch="none"]{--swatch:#6f7078;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="black"]{--swatch:#1d1d20;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="jet"]{--swatch:#1d1d20;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="charcoal"]{--swatch:#3a3b40;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="anthra"]{--swatch:#3a3b40;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="graphite"]{--swatch:#45464c;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="grey"]{--swatch:#8a8d93;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="gray"]{--swatch:#8a8d93;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="ash"]{--swatch:#b4b6ba;--swatch-ink:#1d1d20}
.pb-design[data-swatch="silver"]{--swatch:#c3c5c9;--swatch-ink:#1d1d20}
.pb-design[data-swatch="melange"]{--swatch:#9a9ca2;--swatch-ink:#1d1d20}
.pb-design[data-swatch="heather"]{--swatch:#9a9ca2;--swatch-ink:#1d1d20}
.pb-design[data-swatch="white"]{--swatch:#f2f1ee;--swatch-ink:#1d1d20}
.pb-design[data-swatch="ivory"]{--swatch:#efe9da;--swatch-ink:#1d1d20}
.pb-design[data-swatch="cream"]{--swatch:#ece3cf;--swatch-ink:#1d1d20}
.pb-design[data-swatch="beige"]{--swatch:#d6c6a5;--swatch-ink:#1d1d20}
.pb-design[data-swatch="sand"]{--swatch:#cdb991;--swatch-ink:#1d1d20}
.pb-design[data-swatch="khaki"]{--swatch:#a99a6b;--swatch-ink:#1d1d20}
.pb-design[data-swatch="camel"]{--swatch:#b88a55;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="brown"]{--swatch:#6e4b35;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="coffee"]{--swatch:#5a3d2b;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="navy"]{--swatch:#1f2a48;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="indigo"]{--swatch:#33407a;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="blue"]{--swatch:#3d6fb0;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="royal"]{--swatch:#2e56b3;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="sky"]{--swatch:#8fbfe6;--swatch-ink:#1d1d20}
.pb-design[data-swatch="aqua"]{--swatch:#7fc6c4;--swatch-ink:#1d1d20}
.pb-design[data-swatch="teal"]{--swatch:#2f7f80;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="turquoise"]{--swatch:#3cb5b0;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="petrol"]{--swatch:#2b5c66;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="cyan"]{--swatch:#3cb9d8;--swatch-ink:#1d1d20}
.pb-design[data-swatch="green"]{--swatch:#3f7d4e;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="olive"]{--swatch:#6b6e3a;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="military"]{--swatch:#545a3a;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="sage"]{--swatch:#9caf88;--swatch-ink:#1d1d20}
.pb-design[data-swatch="mint"]{--swatch:#a8dcc0;--swatch-ink:#1d1d20}
.pb-design[data-swatch="lime"]{--swatch:#b5d64c;--swatch-ink:#1d1d20}
.pb-design[data-swatch="myrtle"]{--swatch:#2f5a45;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="red"]{--swatch:#b8312f;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="maroon"]{--swatch:#6b1f2a;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="wine"]{--swatch:#6b1f2a;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="burgundy"]{--swatch:#6b1f2a;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="rust"]{--swatch:#a5482a;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="marsala"]{--swatch:#8a3d3a;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="orange"]{--swatch:#e07a2e;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="pumpkin"]{--swatch:#d9752b;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="coral"]{--swatch:#ee7f6d;--swatch-ink:#1d1d20}
.pb-design[data-swatch="peach"]{--swatch:#f2b199;--swatch-ink:#1d1d20}
.pb-design[data-swatch="pink"]{--swatch:#e79bb5;--swatch-ink:#1d1d20}
.pb-design[data-swatch="rose"]{--swatch:#d98a9c;--swatch-ink:#1d1d20}
.pb-design[data-swatch="fuchsia"]{--swatch:#c23b8a;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="yellow"]{--swatch:#e8c93a;--swatch-ink:#1d1d20}
.pb-design[data-swatch="mustard"]{--swatch:#c99a2e;--swatch-ink:#1d1d20}
.pb-design[data-swatch="lemon"]{--swatch:#ece27a;--swatch-ink:#1d1d20}
.pb-design[data-swatch="gold"]{--swatch:#c9a23a;--swatch-ink:#1d1d20}
.pb-design[data-swatch="purple"]{--swatch:#6a4a8c;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="violet"]{--swatch:#7b5ab0;--swatch-ink:#f6f5f2}
.pb-design[data-swatch="lavender"]{--swatch:#b6a6d8;--swatch-ink:#1d1d20}
.pb-design[data-swatch="lilac"]{--swatch:#c4a8d6;--swatch-ink:#1d1d20}
.pb-design[data-swatch="mauve"]{--swatch:#a98aa3;--swatch-ink:#1d1d20}
.pb-design[data-swatch="plum"]{--swatch:#5e3a5a;--swatch-ink:#f6f5f2}
