/* PD V2 · search overlay + cart drawer (SPEC-search-cart-voices.md §2-3).
 * Ported from handover/v2/pages/_shared/search-cart.css. Uses only the site's
 * own colour tokens throughout, so both follow dark/light mode automatically —
 * unlike the 18+ age gate, these are not a fixed-dark brand moment.
 * .sr is already global (pd-v2-account-shared.css) — not redefined here.
 */
.ov{position:fixed;inset:0;z-index:300;background:rgba(14,8,16,.62);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
html[data-mode="light"] .ov{background:rgba(38,32,38,.32)}
.ov[hidden]{display:none}
html.ov-open,html.ov-open body{overflow:hidden}
/* 搜索 */
.sp{position:absolute;left:50%;top:clamp(12px,7vh,72px);translate:-50% 0;width:min(920px,calc(100% - 24px));
  max-height:calc(100dvh - clamp(24px,14vh,144px));display:flex;flex-direction:column;overflow:hidden;
  background:var(--surface);color:var(--tx);border:1px solid var(--line);border-radius:18px;box-shadow:0 30px 80px -24px rgba(0,0,0,.6);
  animation:spIn .35s cubic-bezier(.16,1,.3,1)}
@keyframes spIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.sp__bar{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line)}
/* max-width:none on every icon below overrides pd-v2-base.css's sitewide
   img,svg,video{max-width:100%} — inside a flex/grid parent with no definite
   width basis, that percentage resolves to 0 instead of falling back to the
   explicit width set here, and the icon disappears entirely (same root cause
   already fixed once this project on the copy-email icon; recurred here on
   the cart close button, confirmed on Staging — fixing every icon in this
   file up front instead of one bug report at a time). */
.sp__ic svg{width:22px;height:22px;max-width:none;fill:none;stroke:var(--tx-dim);stroke-width:1.8;stroke-linecap:round;display:block}
.sp__bar input{flex:1;min-width:0;height:44px;border:0;background:none;color:var(--tx);font:500 20px/1.2 var(--ui);outline:none}
.sp__bar input::placeholder{color:var(--tx-dim)}
.sp__bar input::-webkit-search-cancel-button{display:none}
.sp__clr{width:36px;height:36px;border:0;border-radius:50%;background:none;color:var(--tx-dim);display:grid;place-items:center;cursor:pointer}
.sp__clr:hover{background:var(--raise);color:var(--tx)}
.sp__clr svg,.cd__x svg{width:16px;height:16px;max-width:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
.sp__close{height:32px;padding:0 10px;border-radius:8px;border:1px solid var(--line);background:var(--raise);color:var(--tx-dim);
  font:800 12px/1 var(--ui);letter-spacing:.08em;cursor:pointer}
.sp__close:hover{color:var(--tx);border-color:var(--tx-faint)}
.sp__scope{display:flex;gap:8px;flex-wrap:wrap;padding:14px 18px 0}
.sp__scope button,.sp__chips button{padding:8px 14px;border-radius:var(--pill);border:1px solid var(--tx-faint);background:none;color:var(--tx);
  font:700 13.5px/1 var(--ui);cursor:pointer;transition:background .2s,border-color .2s,color .2s}
.sp__scope button:hover,.sp__chips button:hover{border-color:var(--tx)}
.sp__scope button[aria-checked="true"]{background:var(--tx);border-color:var(--tx);color:var(--bg)}
.sp__body{overflow:auto;padding:18px 18px 22px}
.sp__pop .cap{display:block;margin-bottom:10px;color:var(--tx-dim)}
.sp__chips{display:flex;gap:8px;flex-wrap:wrap}
.sp__n{margin:0 0 12px;font-size:14px;color:var(--tx-dim);min-height:1.2em}
.sp__res{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
@media (max-width:720px){.sp__res{grid-template-columns:repeat(2,minmax(0,1fr))}}
.sp__it{display:block;color:inherit;text-decoration:none}
.sp__th{aspect-ratio:1;border-radius:12px;overflow:hidden;background:var(--raise);box-shadow:inset 0 0 0 1px var(--line);display:grid;place-items:center;
  font:700 12px/1.3 var(--ui);color:var(--tx-dim);text-align:center;padding:8px;transition:box-shadow .2s}
.sp__th img{width:100%;height:100%;object-fit:cover;display:block}
.sp__th--p{background:radial-gradient(70% 70% at 50% 40%,rgba(254,3,115,.22),transparent 70%),var(--raise)}
.sp__th--d{background:radial-gradient(70% 70% at 50% 40%,rgba(197,39,243,.22),transparent 70%),var(--raise)}
.sp__it:hover .sp__th{box-shadow:inset 0 0 0 1.5px var(--tx)}
.sp__nm{margin:10px 0 0;font-family:var(--disp);font-weight:600;font-size:16px;line-height:1.25;letter-spacing:.02em;color:var(--tx)}
.sp__it:hover .sp__nm{color:var(--act)}
html[data-mode="dark"] .sp__it:hover .sp__nm{color:var(--main2)}
.sp__pr{margin:4px 0 0;font-family:var(--disp);font-weight:600;font-size:15px;letter-spacing:.02em;color:var(--tx)}
.sp__pr s{margin-left:6px;font-family:var(--ui);font-weight:600;font-size:13px;color:var(--tx-dim)}
.sp mark{background:var(--lemon);color:#262026;border-radius:2px;padding:0 1px}
html[data-mode="light"] .sp mark{background:#FFE58A}
.sp__none{padding:18px 4px;color:var(--tx-dim)}.sp__none p{margin:0}.sp__none p+p{margin-top:6px}
.sp__noneh{color:var(--tx)!important;font-weight:700}
.sp__none a{color:var(--tx);text-underline-offset:3px}
.sp__all{display:flex;justify-content:center;gap:8px;padding:14px;border-top:1px solid var(--line);color:var(--tx);font:700 14.5px/1 var(--ui);text-decoration:none}
.sp__all:hover{background:var(--raise)}
.sp__all[hidden]{display:none}
.sp :focus-visible,.cd :focus-visible{outline:2px solid var(--act);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.sp,.cd{animation:none!important;transition:none!important}}
/* 购物车 */
.cd{position:absolute;top:0;right:0;height:100%;width:min(440px,100%);display:flex;flex-direction:column;
  background:var(--surface);color:var(--tx);border-left:1px solid var(--line);box-shadow:-30px 0 80px -30px rgba(0,0,0,.6);
  animation:cdIn .38s cubic-bezier(.16,1,.3,1)}
@keyframes cdIn{from{transform:translateX(100%)}to{transform:none}}
/* Legacy theme.css ships TWO sitewide `.button,.btn,button,input[type="button"],
   input[type="submit"]{...}` rules (the second overrides the first via source
   order alone, same selector) with a pink background-color, 12-16px/30-40px
   padding and text-transform:uppercase — confirmed live that this wins over
   every button-specific rule below despite lower selector specificity (this
   platform's base stylesheet appears to sit in a higher-priority cascade
   layer; normal specificity math doesn't apply across layers). Reset every
   button inside the drawer here, !important, so legacy button CSS can never
   reach in again — the specific .cd__x/.cd__qty button/.cd__rm rules below
   still set their own width/height/border-radius/font-size on top of this,
   none of which this reset touches. */
.cd button{background:none!important;border:0!important;padding:0!important;
  text-transform:none!important;line-height:1.3!important;transition:background .2s!important;
  font-family:var(--ui);border-radius:0;color:inherit;text-align:left}
.cd__head{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid var(--line)}
.cd__head h2{margin:0;display:flex;align-items:center;gap:10px;font-family:var(--disp);font-variation-settings:var(--fr-display);font-weight:650;font-size:26px;letter-spacing:.02em;line-height:1;color:var(--tx)}
.cd__count{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:var(--pill);background:var(--act);color:#fff;
  font:800 12.5px/1 var(--ui);letter-spacing:0;font-variation-settings:normal}
.cd__x{width:40px;height:40px;border:0;border-radius:50%;background:none;color:var(--tx);display:grid;place-items:center;cursor:pointer}
.cd__x:hover{background:var(--raise)}
.cd__ship{padding:16px 22px 18px;border-bottom:1px solid var(--line)}
.cd__ship p{margin:0 0 10px;font-size:14.5px;color:var(--tx)}
.cd__ship p b{color:var(--act)} html[data-mode="dark"] .cd__ship p b{color:var(--main2)}
.cd__bar{height:6px;border-radius:var(--pill);background:var(--raise);overflow:hidden}
.cd__bar i{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,var(--act),var(--act2));transition:width .4s cubic-bezier(.16,1,.3,1)}
.cd__list{list-style:none;margin:0;padding:6px 22px;overflow:auto;flex:1}
.cd__li{display:grid;grid-template-columns:76px 1fr auto;gap:14px;padding:16px 0;border-bottom:1px solid var(--line);align-items:start}
.cd__th{width:76px;aspect-ratio:1;border-radius:10px;background:var(--raise);box-shadow:inset 0 0 0 1px var(--line);overflow:hidden}
.cd__nm{margin:0;display:block;font-family:var(--disp);font-weight:600;font-size:16px;line-height:1.25;letter-spacing:.02em;color:var(--tx)}
.cd__sd{margin:4px 0 0;font:700 11px/1 var(--ui);letter-spacing:.16em;text-transform:uppercase;color:var(--tx-dim)}
.cd__qty{display:inline-flex;align-items:center;margin-top:12px;border:1px solid var(--tx-faint);border-radius:var(--pill)}
/* display:grid;place-items:center — without it the −/+ glyphs sit on the
   button's normal text baseline, not its geometric center, so they read as
   floating noticeably lower than the quantity number next to them (reported
   on Staging, confirmed: the reference design's own CSS never centered this
   either). */
.cd__qty button{width:34px;height:34px;border:0;background:none;color:var(--tx);font:700 18px/1 var(--ui);cursor:pointer;border-radius:50%;
  display:grid;place-items:center}
.cd__qty button:hover{background:var(--raise)}
.cd__qty span{min-width:26px;text-align:center;font:700 14.5px/1 var(--ui);color:var(--tx)}
.cd__rt{text-align:right}
.cd__pr{margin:0;font-family:var(--disp);font-weight:600;font-size:16px;letter-spacing:.02em;color:var(--tx)}
.cd__rm{margin-top:10px;padding:0;border:0;background:none;color:var(--tx-dim);font:700 13px/1 var(--ui);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.cd__rm:hover{color:var(--act)} html[data-mode="dark"] .cd__rm:hover{color:var(--main2)}
.cd__empty{flex:1;display:grid;align-content:center;justify-items:center;gap:8px;padding:30px 22px;text-align:center;color:var(--tx-dim)}
.cd__empty p{margin:0}.cd__emh{font-family:var(--disp);font-variation-settings:var(--fr-display);font-weight:650;font-size:26px;letter-spacing:.02em;color:var(--tx)}
.cd__empty .pd-v2-action{margin-top:12px}
.cd__foot{padding:18px 22px calc(20px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);display:grid;gap:10px;background:var(--surface)}
.cd__sub{display:flex;justify-content:space-between;align-items:baseline}
.cd__sub span{font-size:15px;color:var(--tx-dim)}
.cd__sub b{font-family:var(--disp);font-weight:600;font-size:22px;letter-spacing:.02em;color:var(--tx)}
.cd__note{margin:-4px 0 4px;font-size:13px;color:var(--tx-dim)}
.cd__go{width:100%}
.cd .pd-v2-action--3{background:transparent;color:var(--tx);border-color:var(--tx-faint)}
.cd .pd-v2-action--3:hover{border-color:var(--tx);background:var(--raise)}
.cd__disc{display:flex;align-items:center;justify-content:center;gap:8px;margin:4px 0 0;font-size:13px;color:var(--tx-dim)}
.cd__disc svg{width:16px;height:16px;max-width:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}

/* 搜索框聚焦:不画粗框,改为搜索栏底部一条粉线(焦点仍清晰可见) */
.sp__bar input:focus-visible{outline:none}
.sp__bar:focus-within{box-shadow:inset 0 -2px 0 var(--act)}
html[data-mode="dark"] .sp__bar:focus-within{box-shadow:inset 0 -2px 0 var(--main2)}

@media (max-width:480px){.cd{width:100%}}
