/* Step 68: a quieter customer website (the owner's ask: "clean like Uber Eats, headings less bold").
   Customer pages only (.p): seller and admin (.d) keep their look. Loaded last.
   - Neutral greys: white page, #F3F3F5 fills, #6B6A75 secondary text (5.3:1 on white, 4.8:1 on the fill).
   - Lighter type: section headings 22px (phones) / 24px at 700, the hero up to 40px at 700, letter spacing -0.01em;
     card titles 16px at 600; meta 14px at 400 in grey.
   - Header: one row on desktop with grey pills (Delivery | Collect, search); phones get three rows and the search
     row stays stuck to the top while rows 1 and 2 scroll away.
   Violet stays for the main action and links, mint for good news only. */
.p{
  --fill:#F3F3F5;--fill-2:#E9E9ED;
  --ink-2:#6B6A75;--muted:#6B6A75;--line:#EBEBEF;--bg-2:#F6F6F8;--ph:#F3F3F5;--ph-2:#E9E9ED;
  --fs-meta:14px;--fs-h2:22px;
  --fw-head:700;
  --pill:999px;
  /* Phones and tablets: header rows 1 and 2 (they scroll away), then the sticky search row. */
  --hdr-r1:56px;--hdr-r2:48px;--hdr-r3:60px
}
@media (min-width:1024px){.p{--fs-h2:24px}}

/* ---------- Type ---------- */
.p h1{font-weight:var(--fw-head);letter-spacing:-0.01em}
.p .h-display{font-weight:var(--fw-head);letter-spacing:-0.01em;line-height:1.1}
.p .h2,.p h2.h2{font-size:var(--fs-h2) !important;font-weight:var(--fw-head);letter-spacing:-0.01em;line-height:1.2}
.p .h3{letter-spacing:-0.01em}
.p .lede{font-size:var(--fs-md);color:var(--ink-2)}
.p .meta,.p .prod__meta{font-size:var(--fs-meta);font-weight:var(--fw-reg);color:var(--ink-2)}

/* ---------- Header ---------- */
.p .hdr{border-bottom:1px solid var(--line)}
.p .hdr .search{height:44px;padding:0 var(--s1) 0 var(--s4);border:0;border-radius:var(--pill);background:var(--fill)}
.p .hdr .search:focus-within{box-shadow:inset 0 0 0 2px var(--ink);background:var(--bg)}
.p .hdr .search input{font-size:var(--fs-md)}
.p .hdr .search input::placeholder{color:var(--ink-2)}
.p .hdr .search > svg{stroke:var(--ink)}
.p .hdr .search .iconbtn{width:40px;height:40px;border-radius:var(--pill)}

/* Delivery | Collect: a grey track with the picked option as a white pill (desktop). */
.p .hway{display:flex;align-items:center;flex:none}
.p .wayt{display:inline-flex;align-items:center;gap:0;height:40px;padding:var(--s1);border:0;border-radius:var(--pill);background:var(--fill);overflow:visible}
.p .wayt__b{height:32px;min-width:0;padding:0 var(--s4);border:0;border-radius:var(--pill);background:transparent;color:var(--ink);font-size:var(--fs-meta);font-weight:var(--fw-bold);cursor:pointer}
.p .wayt__b + .wayt__b{border-left:0}
.p .wayt__b:hover{background:var(--fill-2);color:var(--ink)}
.p .wayt__b.on,.p .wayt__b.on:hover{background:var(--bg);color:var(--ink);box-shadow:0 1px 2px rgba(17,17,17,.10),0 1px 4px rgba(17,17,17,.06);cursor:default}
.p .wayt__b:focus-visible{outline:2px solid var(--focus);outline-offset:1px;border-radius:var(--pill)}

/* Where and when: "E12 4AA · Today by 2pm" (desktop), "Deliver today by 2pm" over "E12 4AA" (phones). */
.hloc{grid-area:loc;display:flex;align-items:center;min-width:0}
.hloc__b{display:inline-flex;align-items:center;gap:var(--s2);min-height:44px;max-width:100%;padding:0 var(--s2);border:0;border-radius:var(--pill);background:none;font:inherit;font-size:var(--fs-meta);color:var(--ink);cursor:pointer;text-align:left;white-space:nowrap}
.hloc__b:hover{background:var(--fill)}
.hloc__b > svg{flex:none}
.hloc__l{display:none}
.hloc__v{display:inline-flex;align-items:center;gap:var(--s1);min-width:0}
.hloc__w{font-weight:var(--fw-bold);overflow:hidden;text-overflow:ellipsis}
.hloc__t{color:var(--ink);overflow:hidden;text-overflow:ellipsis}
.hloc__v svg{flex:none}

/* The "Delivery" menu (phones and tablets). */
.wmenu{grid-area:way;position:relative;display:none;justify-self:end}
.wmenu__b{display:inline-flex;align-items:center;gap:var(--s1);height:44px;padding:0 var(--s3) 0 var(--s4);border:0;border-radius:var(--pill);background:var(--fill);font:inherit;font-size:var(--fs-meta);font-weight:var(--fw-bold);color:var(--ink);cursor:pointer;white-space:nowrap}
.wmenu__b:hover{background:var(--fill-2)}
.wmenu__list{position:absolute;right:0;top:calc(100% + 4px);z-index:80;width:304px;max-width:calc(100vw - 32px);padding:var(--s2);border:1px solid var(--line);border-radius:var(--r-md);background:var(--bg);box-shadow:0 8px 24px rgba(17,17,17,.12)}
.wmenu__i{display:flex;align-items:center;gap:var(--s3);width:100%;min-height:52px;padding:var(--s2) var(--s3);border:0;border-radius:var(--r-sm);background:none;font:inherit;color:var(--ink);text-align:left;text-decoration:none;cursor:pointer}
.wmenu__i:hover,.wmenu__i:focus-visible{background:var(--fill)}
.wmenu__i:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.wmenu__i svg{flex:none}
.wmenu__i span{display:flex;flex-direction:column;min-width:0}
.wmenu__i b{font-size:var(--fs-md);font-weight:var(--fw-bold)}
.wmenu__i small{font-size:var(--fs-meta);color:var(--ink-2)}
.wmenu__i[aria-checked=true]{background:var(--violet-tint)}
.wmenu__i[aria-checked=true] b::after{content:"";display:inline-block;width:8px;height:8px;margin-left:var(--s2);border-radius:50%;background:var(--violet);vertical-align:middle}
.wmenu__i--area{border-top:1px solid var(--line);border-radius:0 0 var(--r-sm) var(--r-sm);margin-top:var(--s1)}

/* Desktop: one row. Menu, logo, Delivery | Collect, where and when, search, then links and icons. */
@media (min-width:1024px){
  .p .hdr__row{grid-template-columns:auto auto auto minmax(0,auto) minmax(160px,1fr) auto;grid-template-areas:"menu logo way loc search actions";align-items:center;column-gap:var(--s3);min-height:72px;padding-top:var(--s3);padding-bottom:var(--s3)}
  .p .hdr--info .hdr__row{grid-template-columns:auto auto minmax(200px,1fr) auto;grid-template-areas:"menu logo search actions"}
  .p .hdr__menu{display:inline-flex;grid-area:menu;margin-left:calc(var(--s2) * -1)}
  .p .hdr .logo{margin-right:var(--s2)}
  /* The header lines up with the page content (same width as the sections below). */
  .p .hway{grid-area:way}
  .p .hdr .search{grid-area:search;height:48px}
  .p .hdr .actions{gap:0}
  .p .hdr .toplink{font-size:var(--fs-meta);font-weight:var(--fw-bold);padding:0 var(--s3);border-radius:var(--pill)}
  .p .hdr .toplink:hover{background:var(--fill);text-decoration:none}
  .p .hdr .pn-acct__btn{font-size:var(--fs-meta);font-weight:var(--fw-bold)}
}
/* Narrow desktops: Sell on Nearbury lives in the menu, so the search box keeps its room. */
@media (min-width:1024px) and (max-width:1279px){
  .p .hdr .actions .toplink[href$="/sell"]{display:none}
  .p .hloc__t{display:none}
  .p .hdr__row{column-gap:var(--s2)}
  .p .hdr .search{min-width:0}
  .p .hdr .search:not(:focus-within) .iconbtn{display:none}
  .p .hloc__w{max-width:120px}
}

/* Phones and tablets: three rows. Row 1 menu, logo, account, basket; row 2 where (left) and the Delivery menu
   (right); row 3 the search pill, full width and always there. */
@media (max-width:1023px){
  .p .hdr--search .hdr__row,.p .hdr--full .hdr__row{grid-template-columns:auto auto minmax(0,1fr) auto;grid-template-rows:var(--hdr-r1) var(--hdr-r2) var(--hdr-r3);grid-template-areas:"menu logo . actions" "loc loc loc way" "search search search search";align-items:center;column-gap:var(--s2);row-gap:0;min-height:0;padding-top:0;padding-bottom:0}
  .p .hdr--search .hway,.p .hdr--full .hway{display:none}
  .p .hdr--search .wmenu,.p .hdr--full .wmenu{display:block}
  .p .hdr .actions{grid-area:actions;justify-self:end}
  .p .hdr--search .actions .hdr__sbtn,.p .hdr--full .actions .hdr__sbtn,.p .hdr--search .hdr__sclose,.p .hdr--full .hdr__sclose{display:none}
  .p .hdr--search .search,.p .hdr--full .search{display:flex;position:relative;left:auto;right:auto;top:auto;grid-area:search;align-self:start;height:48px;margin-top:var(--s1);padding-right:var(--s1)}
  /* The Ask and photo buttons show once the box is in use, so the empty pill stays plain. */
  .p .hdr--search .search:not(:focus-within) .iconbtn,.p .hdr--full .search:not(:focus-within) .iconbtn{display:none}
  .p .hdr--search.is-search .actions,.p .hdr--search.is-search .logo,.p .hdr--search.is-search .hdr__menu,
  .p .hdr--full.is-search .actions,.p .hdr--full.is-search .logo,.p .hdr--full.is-search .hdr__menu{visibility:visible}
  .hloc{margin-left:calc(var(--s2) * -1)}
  .hloc__b{flex-direction:column;align-items:flex-start;justify-content:center;gap:0;min-height:44px;padding:0 var(--s2);border-radius:var(--r-sm);line-height:1.25}
  .hloc__b > svg{display:none}
  .hloc__l{display:block;max-width:100%;font-size:var(--fs-sm);color:var(--ink-2);overflow:hidden;text-overflow:ellipsis}
  .hloc__v{max-width:100%;font-size:var(--fs-md)}
  .hloc__t{display:none !important}
  .wmenu__b{height:44px}
}
@media (max-width:767px){
  /* Sticky: the header slides up by rows 1 and 2, so only the search row stays at the top. No hiding on scroll. */
  .p .hdr--search,.p .hdr--full{position:sticky;top:calc(-1 * (var(--hdr-r1) + var(--hdr-r2)));transform:none !important;transition:none}
  .p .hdr--search .sugg,.p .hdr--full .sugg{max-height:calc(100dvh - 140px)}
  body:has(.hdr--search) .sfbar,body:has(.hdr--full) .sfbar{top:calc(var(--hdr-r3) + 1px)}
}
@media (min-width:768px) and (max-width:1023px){
  .p .hdr--search,.p .hdr--full{position:sticky;top:calc(-1 * (var(--hdr-r1) + var(--hdr-r2)));z-index:70}
}

/* The signed in seller or admin bar: one slim line. */
.p .pn-rolebar__row{min-height:32px;padding-top:var(--s1);padding-bottom:var(--s1)}
.p .pn-rolebar__t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p .pn-rolebar .pn-rolebar__x{width:32px;height:32px;margin:0 calc(var(--s2) * -1) 0 0}
@media (max-width:767px){
  .p .pn-rolebar__row{min-height:44px;padding-top:0;padding-bottom:0}
  .p .pn-rolebar .pn-rolebar__link{display:inline-flex;align-items:center;min-height:44px}
  .p .pn-rolebar .pn-rolebar__x{width:44px;height:44px}
  .p .pn-ann__in .pn-ann__x{display:inline-flex}
}

/* ---------- Sections and "See all" ---------- */
.p .sec--line{border-top:0}
.p .sec--tight{padding:var(--s5) 0}
@media (min-width:1024px){.p .sec--tight{padding:var(--s6) 0}}
.p .sec__head{align-items:center;margin-bottom:var(--s4)}
.seeall{display:inline-flex;align-items:center;gap:var(--s3);min-height:44px;font-size:var(--fs-meta);font-weight:var(--fw-bold);color:var(--ink);text-decoration:none;white-space:nowrap}
.seeall__i{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:var(--fill);color:var(--ink)}
.seeall:hover .seeall__i{background:var(--fill-2)}
@media (max-width:767px){
  /* Phones: just the round arrow (the words stay for screen readers). */
  .seeall{font-size:0;gap:0}
  .seeall__i{width:44px;height:44px}
}

/* ---------- Homepage: category pictures and quick filters ---------- */
.qcats-sec{padding-bottom:var(--s2)}
.qcats{display:flex;gap:var(--s3);overflow-x:auto;scrollbar-width:none;margin:0 calc(var(--s4) * -1);padding:0 var(--s4) var(--s1)}
.qcats::-webkit-scrollbar{display:none}
/* 16 Nov: 80px on phones, 108px on desktop (was 96 and 144). 14 Nov: like Back Market's "Shop our most wanted": a large soft tile with the picture, the name under it. */
.qcat{flex:none;display:flex;flex-direction:column;align-items:center;gap:var(--s2);width:80px;padding:var(--s1) 0;color:var(--ink);text-decoration:none;border-radius:var(--r-md)}
.qcat__img{display:flex;align-items:center;justify-content:center;width:80px;height:80px;border-radius:18px;background:var(--fill);color:var(--violet);overflow:hidden;transition:background var(--t2) var(--ease),transform var(--t2) var(--ease)}
.qcat__img img{width:100%;height:100%;object-fit:contain}
.qcat__img svg{width:30px;height:30px}
.qcat__name{max-width:calc(100% + 12px);font-size:var(--fs-sm);font-weight:var(--fw-bold);line-height:1.25;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.qcat:hover .qcat__img{background:var(--fill-2);transform:translateY(-2px)}
.qcat:hover .qcat__name{text-decoration:underline;text-underline-offset:3px}
@media (min-width:1024px){
  .qcats{gap:var(--s4);margin:0;padding:0 0 var(--s1)}
  .qcat{width:108px}
  .qcat__name{font-size:var(--fs-meta)}
  .qcat__img{width:108px;height:108px;border-radius:22px}
  .qcat__img svg{width:40px;height:40px}
}
/* 16 Nov (owner): See all sits in the row's heading, like the other rows. */
.qcats__head{margin-bottom:var(--s3)}
/* 16 Nov: the All categories page. */
.qcatall{padding-top:var(--s7);padding-bottom:var(--s8)}
.qcatall__h{font-size:var(--fs-2xl)}
.qcatall .qcatall__lede{max-width:none;margin:var(--s2) 0 var(--s6)}
.qcatall__grid{display:grid;grid-template-columns:1fr;gap:var(--s4)}
.qcatdept{display:flex;flex-direction:column;gap:var(--s3);padding:var(--s5);border:1px solid var(--line);border-radius:var(--r-lg);background:var(--paper)}
.qcatdept__top{display:flex;align-items:center;gap:var(--s3);color:var(--ink);text-decoration:none}
.qcatdept__img{flex:none;display:flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:16px;background:var(--fill);color:var(--violet);overflow:hidden}
.qcatdept__img img{width:100%;height:100%;object-fit:contain;padding:var(--s2)}
.qcatdept__name{margin:0;font-size:var(--fs-lg);font-weight:var(--fw-bold)}
.qcatdept__top:hover .qcatdept__name{text-decoration:underline;text-underline-offset:3px}
.qcatdept__list{display:flex;flex-wrap:wrap;gap:var(--s2);margin:0;padding:0;list-style:none}
.qcatdept__list a{display:inline-flex;align-items:center;min-height:36px;padding:0 var(--s3);border-radius:var(--pill);background:var(--fill);color:var(--ink);font-size:var(--fs-meta);text-decoration:none}
.qcatdept__list a:hover{background:var(--fill-2)}
.qcatdept__all{display:inline-flex;align-items:center;gap:var(--s1);margin-top:auto;color:var(--violet);font-size:var(--fs-meta);font-weight:var(--fw-bold);text-decoration:none}
.qcatdept__all:hover{text-decoration:underline;text-underline-offset:3px}
@media (min-width:720px){.qcatall__grid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1100px){.qcatall__grid{grid-template-columns:repeat(3,1fr)}}
.qchips{display:flex;gap:var(--s2);overflow-x:auto;scrollbar-width:none;margin:var(--s4) calc(var(--s4) * -1) 0;padding:0 var(--s4)}
.qchips::-webkit-scrollbar{display:none}
.qchip{flex:none;display:inline-flex;align-items:center;height:44px;padding:0 var(--s4);border-radius:var(--pill);background:var(--fill);color:var(--ink);font-size:var(--fs-meta);font-weight:var(--fw-bold);text-decoration:none;white-space:nowrap}
.qchip:hover{background:var(--fill-2)}
@media (min-width:1024px){.qchips{margin:var(--s4) 0 0;padding:0}.qchip{height:36px}}

/* ---------- Homepage: round shop tiles ---------- */
.qshops{display:grid;grid-auto-flow:column;grid-auto-columns:104px;gap:var(--s3);overflow-x:auto;scrollbar-width:none;margin:0 calc(var(--s4) * -1);padding:0 var(--s4) var(--s1)}
.qshops::-webkit-scrollbar{display:none}
.qshop{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;color:var(--ink);text-decoration:none;text-align:center}
.qshop__img{display:flex;align-items:center;justify-content:center;width:88px;height:88px;margin-bottom:var(--s2);border-radius:50%;background:var(--fill);overflow:hidden;box-shadow:inset 0 0 0 1px rgba(17,17,17,.06)}
.qshop__img img{width:100%;height:100%;object-fit:cover}
.qshop__img--logo{background:var(--bg)}
.qshop__img--logo img{object-fit:contain;padding:var(--s1)}
.qshop__ini{font-size:var(--fs-xl);font-weight:var(--fw-bold);color:var(--ink-2)}
.qshop__name{max-width:100%;font-size:var(--fs-md);font-weight:var(--fw-bold);line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-align:center}
.qshop__line{max-width:100%;font-size:var(--fs-meta);color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.qshop:hover .qshop__name{text-decoration:underline;text-underline-offset:3px}
@media (min-width:1024px){
  .qshops{grid-auto-columns:168px;gap:var(--s4);margin:0;padding:0 0 var(--s1)}
  .qshop__img{width:104px;height:104px}
}

/* ---------- Product cards (shared: homepage rows, search results, categories, shop pages) ---------- */
.p .prod{gap:var(--s1)}
.p .prod__img{border:1px solid var(--line);border-radius:var(--r-md);margin-bottom:var(--s2)}
.p .prod:hover .prod__img{border-color:#D5D5DC}
.p .prod__name{font-size:var(--fs-md);font-weight:var(--fw-bold);line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* 14 Nov: every card lines up. The name always takes two lines, the specs one line, and the delivery tag sits at the
   bottom, so a long name never pushes one card's price lower than its neighbours'. */
.p .prod__name{min-height:calc(2 * 1.3em)}
.p .prod__spec{display:block;max-width:100%;font-size:var(--fs-sm);font-weight:var(--fw-reg);line-height:1.35;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p .prod__price{font-size:var(--fs-md);font-weight:var(--fw-reg);color:var(--ink)}
.p .prod .tag{margin-top:auto;align-self:flex-start;min-height:24px;font-size:var(--fs-sm)}
.p .prod > .prod__price{margin-bottom:var(--s1)}
.p .prod .tag--plain{border:0;background:var(--fill)}
/* Shop cards on the shops page keep their photo, just quieter. */
.p .prod.pn-shopcard .pn-shopcard__img{border-radius:var(--r-md)}

/* Filter chips on listing pages match the homepage chips: grey pills; the picked one stays violet (selected state). */
.p .chips .chip{border-color:transparent;background:var(--fill);border-radius:var(--pill);font-weight:var(--fw-bold)}
.p .chips .chip:hover{background:var(--fill-2)}
.p .chips .chip.on,.p .chips .chip[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:#FFFFFF}

/* ---------- Product page: spec line and specifications table (14 Nov, like Back Market) ---------- */
.p .pdp-sub{margin:0;font-size:var(--fs-md);color:var(--ink-2);line-height:1.4}
.p .specs.specs--table{display:grid;grid-template-columns:1fr;border-top:0;gap:0}
.p .specs--table .specs__row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:var(--s3);padding:var(--s3) 0;border-bottom:1px solid var(--line)}
.p .specs--table dt,.p .specs--table dd{margin:0;padding:0;border:0;font-size:var(--fs-meta);line-height:1.4}
.p .specs--table dt{color:var(--ink-2)}
.p .specs--table dd{color:var(--ink);font-weight:var(--fw-bold)}

/* ---------- 14 Nov: buyer test fixes ---------- */
/* Homepage: one quiet line on what this is and where we deliver. */
.p .qhello{display:flex;flex-direction:column;gap:var(--s1);margin-bottom:var(--s5)}
.p .qhello__t{margin:0;font-size:var(--fs-h2);font-weight:var(--fw-bold);line-height:1.2;color:var(--ink)}
.p .qhello__s{margin:0;font-size:var(--fs-meta);color:var(--ink-2);line-height:1.4}
