/* AST Genuine Parts — shared styles (derived from Claude Design) */
*{box-sizing:border-box}
body{margin:0;font-family:'IBM Plex Sans Thai',system-ui,sans-serif;color:#14181d;background:#fff;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
.mono{font-family:'IBM Plex Mono',monospace}
.nv:hover{color:#1f5fbf}
.btn-p{background:#1f5fbf;color:#fff;border-radius:3px;font-weight:600;transition:.2s;display:inline-block}
.btn-p:hover{background:#1a52a6}
.btn-o{border:1.5px solid #d2d8df;border-radius:3px;font-weight:600;transition:.2s;display:inline-block}
.btn-o:hover,.btn-o.act{border-color:#1f5fbf;color:#1f5fbf}
.card{transition:.2s;border:1px solid #e3e7ec;border-radius:6px;overflow:hidden;display:block;background:#fff}
.card:hover{border-color:#1f5fbf;box-shadow:0 8px 24px rgba(31,95,191,.1);transform:translateY(-3px)}
.cat{transition:.2s}
.cat:hover{border-color:#1f5fbf;box-shadow:0 8px 24px rgba(31,95,191,.1);transform:translateY(-3px)}
.fl:hover{color:#1f5fbf}
.fld:focus{outline:none;border-color:#1f5fbf;box-shadow:0 0 0 3px rgba(31,95,191,.12)}
.ph{background:repeating-linear-gradient(45deg,#eef1f4,#eef1f4 12px,#f7f9fb 12px,#f7f9fb 24px);display:flex;align-items:center;justify-content:center;color:#9aa3ad;font:500 12px 'IBM Plex Mono',monospace}

/* header */
.topbar{background:#0e1116;color:#aeb6c0;font:500 13px 'IBM Plex Mono',monospace;letter-spacing:.03em;padding:9px clamp(20px,5vw,56px);display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;overflow:hidden;max-height:60px;transition:max-height .25s ease,padding .25s ease,opacity .2s ease}
@media(max-width:860px){
  .topbar.is-hidden{max-height:0!important;padding-top:0!important;padding-bottom:0!important;opacity:0}
}
.navwrap{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;padding:16px clamp(20px,5vw,56px);border-bottom:1px solid #e3e7ec}
.navlinks{display:flex;gap:clamp(16px,2.5vw,34px);font-weight:500;font-size:16px;align-items:center;flex-wrap:wrap}
header.site{position:sticky;top:0;z-index:50;background:#fff}

/* footer */
footer.site{background:#0a0c10;color:#8b929c;padding:clamp(40px,5vw,56px) clamp(20px,5vw,56px) 32px}
footer.site .cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:32px;max-width:1100px}
footer.site .ttl{color:#fff;font-weight:600;margin-bottom:14px;font-size:15px}
footer.site .lnks{display:flex;flex-direction:column;gap:9px;font-size:14px}
footer.site .base{border-top:1px solid #1c2026;margin-top:36px;padding-top:24px;font:500 13px 'IBM Plex Mono',monospace;display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}

/* products page */
.pg-head{padding:clamp(28px,4vw,52px) clamp(20px,5vw,56px) 18px;border-bottom:1px solid #e3e7ec;background:#fbfcfd}
.crumbs{font:500 13px 'IBM Plex Mono',monospace;color:#8b929c}
.layout{display:grid;grid-template-columns:280px 1fr;align-items:start;gap:clamp(24px,3vw,40px);padding:clamp(28px,4vw,48px) clamp(20px,5vw,56px);max-width:1340px;margin:0 auto}
aside.filter{position:sticky;top:130px;border:1px solid #e3e7ec;border-radius:8px;padding:24px;align-self:start;max-height:calc(100vh - 150px);overflow-y:auto;background:#fff}
aside.filter .lbl{font:600 12px 'IBM Plex Mono',monospace;letter-spacing:.1em;color:#8b929c;margin-bottom:14px}
aside.filter .grp{font-weight:600;font-size:15px;margin-bottom:10px}
.fl{display:flex;gap:9px;align-items:flex-start;cursor:pointer;font-size:14px;color:#5b6470;line-height:1.35}
.fl input{accent-color:#1f5fbf;width:16px;height:16px;flex:none;margin-top:1px}
.fl .cnt{margin-left:auto;color:#9aa3ad;font:500 11px 'IBM Plex Mono',monospace;padding-top:2px}
.pgn{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border:1px solid #d2d8df;border-radius:4px;color:#5b6470;font-family:'IBM Plex Mono',monospace;font-weight:500;cursor:pointer;background:#fff;font-size:14px}
.pgn.on{background:#1f5fbf;color:#fff;border-color:#1f5fbf}
.pgn:disabled{opacity:.35;cursor:default}
.badge-b{position:absolute;top:12px;left:12px;background:#1f5fbf;color:#fff;font:600 11px 'IBM Plex Mono',monospace;padding:4px 9px;border-radius:3px}
.tag{display:inline-block;font-size:11px;background:#eef4fc;color:#1f5fbf;padding:3px 10px;border-radius:999px;margin-top:10px}

/* LINE button */
.btn-line{background:#06c755;color:#fff;border-radius:3px;font-weight:600;transition:.2s;display:inline-flex;align-items:center;gap:8px;justify-content:center}
.btn-line:hover{background:#05b34c}
.btn-line svg{flex:none}

/* header contact buttons */
.hdr-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

/* brand quick chips */
.brandchips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}
.bchip{border:1px solid #d2d8df;border-radius:999px;padding:7px 16px;font-size:14px;color:#5b6470;cursor:pointer;background:#fff;transition:.15s;white-space:nowrap;font-weight:500}
.bchip:hover{border-color:#1f5fbf;color:#1f5fbf}
.bchip.on{background:#1f5fbf;color:#fff;border-color:#1f5fbf}

/* mobile filter toggle */
.filter-toggle{display:none}

/* floating mobile contact bar */
.mobilebar{display:none}
.mobilebar a{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:14px 8px;font-weight:600;font-size:15px}

@media(max-width:860px){
  .layout{grid-template-columns:1fr;padding-bottom:90px}
  aside.filter{position:static;max-height:none;max-width:none;order:-1}
  /* filter พับได้บนมือถือ */
  aside.filter.collapsed .filter-body{display:none}
  .filter-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;background:none;border:none;padding:0;font-family:inherit;font-size:15px;font-weight:600;color:#14181d;cursor:pointer}
  .filter-toggle .chev{transition:.2s;color:#8b929c}
  aside.filter.collapsed .filter-toggle .chev{transform:rotate(-90deg)}
  /* แถบติดต่อลอยล่างจอ */
  .mobilebar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:200;background:#fff;border-top:1px solid #e3e7ec;box-shadow:0 -2px 12px rgba(0,0,0,.08)}
  body.has-mobilebar{padding-bottom:0}
}
@media(min-width:861px){
  .filter-body{display:block !important}
}

/* zoom button บนรูปสินค้า (products.html) */
.thumbWrap{overflow:hidden}
.thumbWrap img{transition:transform .25s}
.thumbWrap:hover img{transform:scale(1.04)}
.zoomBtn{position:absolute;top:10px;right:10px;width:34px;height:34px;border-radius:999px;background:rgba(20,24,29,.55);color:#fff;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transform:translateY(-4px);transition:.18s;backdrop-filter:blur(2px)}
.thumbWrap:hover .zoomBtn{opacity:1;transform:translateY(0)}
.zoomBtn:hover{background:#1f5fbf}
@media(max-width:860px){.zoomBtn{opacity:1;transform:none}} /* มือถือไม่มี hover เลยโชว์ปุ่มไว้เลย */

/* กริดการ์ดสินค้า (products.html) */
.productGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
@media(max-width:640px){
  .productGrid{grid-template-columns:repeat(2,1fr);gap:12px!important}
  .productGrid .card{font-size:14px}
}
@media(max-width:400px){
  .productGrid{grid-template-columns:1fr} /* จอแคบมากๆ ค่อย fallback เป็น 1 คอลัมน์ */
}
