/* Shared finder styles for the finders in this repo (filters/, pads/, tires/).
   Copied from carmall-ngk-finder/styles.css with the pf- prefix renamed to fd-, so all
   finders the hub opens look like one family. */
:root{
  --navy:#2b2b6e;
  --navy-d:#20204f;
  --ink:#1d1d24;
  --muted:#6b6f76;
  --line:#e6e7ec;
  --bg:#ffffff;
  --soft:#f5f6f9;
  --dx:#bb198b;          /* NGK's own MotoDX accent colour */
  --warn:#b9892b;
  --sale:#d8262d;
  --radius:14px;
  --shadow:0 1px 2px rgba(20,20,40,.04),0 8px 24px rgba(20,20,40,.06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  color:var(--ink);
  background:transparent;
  -webkit-font-smoothing:antialiased;
  line-height:1.5;
}
.fd{max-width:680px;margin:0 auto;padding:20px 16px 26px}
/* header */
/* back to the parts-finder hub — shown only when opened with ?from=hub */
.fd-back{display:inline-flex;align-items:center;gap:4px;margin:0 0 14px;padding:6px 13px 6px 11px;font-size:13.5px;font-weight:700;color:var(--navy);text-decoration:none;background:var(--soft);border:1px solid var(--line);border-radius:999px}
.fd-back:hover{border-color:var(--navy)}
.fd-back[hidden]{display:none}
.fd-head{margin-bottom:18px}
.fd-title{
  font-size:22px;font-weight:800;margin:0;letter-spacing:.3px;
  color:var(--navy);display:flex;align-items:center;gap:9px;
}
/* Each finder picks its own title icon with an ico-* class on .fd-title (the plug finder's
   lightning bolt would be wrong on an air-filter page); no class = no icon. */
.fd-title::before{
  content:"";width:22px;height:22px;flex:0 0 auto;border-radius:6px;
  background:var(--navy);display:none;
}
.fd-title.ico-filter::before{
  display:block;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path fill-rule='evenodd' d='M4 5h16v14H4zM7 8h2v8H7zm4 0h2v8h-2zm4 0h2v8h-2z'/></svg>") center/17px no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path fill-rule='evenodd' d='M4 5h16v14H4zM7 8h2v8H7zm4 0h2v8h-2zm4 0h2v8h-2z'/></svg>") center/17px no-repeat;
}
.fd-sub{margin:6px 0 0;color:var(--muted);font-size:13.5px}
/* steps */
.fd-steps{display:flex;flex-direction:column;gap:12px}
.fd-field{display:flex;flex-direction:column;gap:6px}
.fd-field[hidden]{display:none}
.fd-label{font-size:13px;font-weight:700;color:var(--ink);display:flex;align-items:center;gap:7px}
.fd-label i{
  font-style:normal;width:19px;height:19px;border-radius:50%;
  background:var(--navy);color:#fff;font-size:11px;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;
}
.fd-select{position:relative;display:block}
.fd-select::after{
  content:"";position:absolute;right:14px;top:50%;width:11px;height:11px;
  transform:translateY(-55%) rotate(45deg);
  border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);
  pointer-events:none;
}
.fd-select select{
  -webkit-appearance:none;-moz-appearance:none;appearance:none;
  width:100%;padding:13px 40px 13px 14px;
  font-size:15.5px;font-family:inherit;color:var(--ink);
  background:var(--bg);border:1.5px solid var(--line);border-radius:12px;
  cursor:pointer;transition:border-color .15s,box-shadow .15s;
}
.fd-select select:hover:not(:disabled){border-color:#c9cbd4}
.fd-select select:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(43,43,110,.12)}
.fd-select select:disabled{background:var(--soft);color:#aab;cursor:not-allowed}
/* result */
.fd-result{margin-top:18px;animation:rise .25s ease}
@keyframes rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.rc{
  border:1.5px solid var(--line);border-radius:var(--radius);
  background:var(--bg);box-shadow:var(--shadow);overflow:hidden;
}
.rc-top{padding:15px 16px;background:linear-gradient(180deg,#fafbfd,#f4f5f9);border-bottom:1px solid var(--line)}
.rc-veh{font-size:14px;font-weight:700;color:var(--navy)}
.rc-veh small{display:block;font-weight:500;color:var(--muted);font-size:12.5px;margin-top:2px}
.rc-body{padding:16px}
/* spec table */
.spec-title{font-size:13px;font-weight:700;margin:0 0 9px}
.spec-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-bottom:16px}
.spec{width:100%;border-collapse:collapse;font-size:12.5px;white-space:nowrap}
.spec th{
  background:var(--soft);color:var(--muted);font-weight:700;font-size:11.5px;
  padding:8px 10px;text-align:left;border-bottom:1.5px solid var(--line);
}
.spec td{padding:9px 10px;border-bottom:1px solid var(--line);color:var(--ink)}
.spec tr:last-child td{border-bottom:none}
.spec .dx{color:var(--dx);font-weight:800}
/* buy options */
.opt-title{font-size:13px;font-weight:700;color:var(--ink);margin:2px 0 10px}
.opt-title span{font-weight:500;color:var(--muted);font-size:12px}
.opt{
  display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;
  border:1.5px solid var(--line);border-radius:12px;padding:13px 14px;margin-bottom:10px;
  transition:border-color .15s,box-shadow .15s,transform .05s;background:var(--bg);
}
.opt:hover{border-color:var(--navy);box-shadow:0 4px 14px rgba(43,43,110,.10)}
.opt:active{transform:translateY(1px)}
.opt-main{flex:1;min-width:0}
.opt-name{font-size:14px;font-weight:700;color:var(--ink);display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.opt-sub{font-size:12px;color:var(--muted);margin-top:3px}
.opt-right{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.opt-price{text-align:right;line-height:1.15;white-space:nowrap}
.opt-price .unitp{display:block;font-size:11px;font-weight:500;color:var(--muted)}
.opt-price .now{display:block;font-size:18px;font-weight:800;color:var(--navy)}
.opt-right svg{width:18px;height:18px;color:var(--navy)}
.tag{display:inline-block;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;vertical-align:middle;margin-left:6px}
.tag-dx{background:#fbe9f5;color:var(--dx)}
.tag-low{background:#fdecec;color:var(--sale)}
.tag-brand{background:#eef0fa;color:var(--navy)}
/* a per-fit caveat on a buy card (frame-number change, shop-matched fitment) */
.opt-note{font-size:12px;color:#7a5a17;background:#fdf4e3;border-radius:8px;padding:5px 8px;margin-top:6px;line-height:1.5}
.fd-title.ico-pad::before{display:block;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path fill-rule='evenodd' d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm0 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10z'/></svg>") center/17px no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path fill-rule='evenodd' d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm0 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10z'/></svg>") center/17px no-repeat;}
/* notes + empty states */
.note{
  display:flex;gap:8px;align-items:flex-start;font-size:12.5px;color:var(--muted);
  background:var(--soft);border-radius:10px;padding:10px 12px;margin-top:12px;
}
.note svg{width:15px;height:15px;flex:0 0 auto;margin-top:1px;opacity:.7}
/* The Taiwan list carries no model years, so its caveat has to read as a caution
   rather than blend into the grey footnotes it sits next to. */
.note-warn{background:#fdf4e3;color:#7a5a17}
.note-warn b{color:#8a5a00}
.state{text-align:center;padding:18px 10px 10px}
.state .ico{width:42px;height:42px;margin:0 auto 10px;opacity:.55}
.state h3{margin:0 0 6px;font-size:15px;color:var(--ink)}
.state p{margin:0;font-size:13px;color:var(--muted)}
.state .cta{margin-top:14px}
.cta{
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;padding:13px;border-radius:12px;border:none;cursor:pointer;
  background:var(--navy);color:#fff;font-size:15px;font-weight:700;font-family:inherit;
  text-decoration:none;transition:background .15s,transform .05s;
}
.cta:hover{background:var(--navy-d)}
.cta:active{transform:translateY(1px)}
.cta.secondary{background:#fff;color:var(--navy);border:1.5px solid var(--navy)}
.cta.secondary:hover{background:#f3f3fb}
.fd-foot{font-size:11.5px;color:#a0a3ab;text-align:center;margin:18px 0 0;line-height:1.6}
/* desktop */
@media(min-width:560px){
  .fd-steps{flex-direction:row}
  .fd-field{flex:1}
}
/* phone: turn the spec table into stacked rows */
@media(max-width:479px){
  .spec,.spec tbody,.spec tr,.spec td{display:block;width:100%}
  .spec{white-space:normal}
  .spec thead{display:none}
  .spec tr{border:1.5px solid var(--line);border-radius:10px;padding:4px 0;margin-bottom:8px}
  .spec tr:last-child{margin-bottom:0}
  .spec td{
    display:flex;justify-content:space-between;gap:12px;
    border-bottom:1px dashed var(--line);padding:7px 12px;
  }
  .spec tr td:last-child{border-bottom:none}
  .spec td::before{content:attr(data-th);color:var(--muted);font-size:11.5px;flex:0 0 auto}
}
/* ---- tyre finder (tires/) — additive; filters/ and pads/ never use these classes ---- */
.fd-title.ico-tire::before{display:block;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path fill-rule='evenodd' d='M12 1.5a10.5 10.5 0 1 1 0 21 10.5 10.5 0 0 1 0-21zm0 4.5a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 3.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z'/></svg>") center/17px no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path fill-rule='evenodd' d='M12 1.5a10.5 10.5 0 1 1 0 21 10.5 10.5 0 0 1 0-21zm0 4.5a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 3.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z'/></svg>") center/17px no-repeat;}
.tire-pos{margin-top:16px}
.tc{margin-bottom:10px}
.tc>.opt{margin-bottom:0}
.tc.has-install>.opt{border-radius:12px 12px 0 0}
/* the 合作車行安裝 twin: a sibling link under the card, never nested inside its <a> */
.opt-install{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  border:1.5px solid var(--line);border-top:none;border-radius:0 0 12px 12px;
  padding:10px 14px;background:var(--soft);color:var(--navy);text-decoration:none;font-size:13px;
}
.opt-install:hover{border-color:var(--navy)}
.opt-install .oi-main{flex:1;min-width:0}
.opt-install b{font-weight:700}
.opt-install small{display:block;color:var(--muted);font-size:11.5px;line-height:1.5;margin-top:2px}
.opt-install .oi-price{font-weight:800;font-size:15px;white-space:nowrap}
.opt-price .was{text-decoration:line-through}
