/* =====================================================================
   Asset Bank — machine list (commerce/show-all-items.php), 2026 redesign.
   Needs ab-site.css (tokens, reset, breadcrumb) and ab-cards.css.
   ===================================================================== */
.ab-listpage{background:var(--ab-ground)}
.ab-listhead{padding:26px 0 2px}
.ab-listhead .ab-crumb{color:var(--ab-muted)}
.ab-listhead .ab-crumb a:hover{color:var(--ab-ink)}
.ab-listhead h1{font-size:23px;font-weight:700;letter-spacing:.01em;margin-top:8px}

/* active filters as removable tags */
.ab-scoperow{display:flex;align-items:center;gap:10px 12px;flex-wrap:wrap;margin-top:11px}
.ab-scopelbl{flex:none;font-size:12.5px;font-weight:700;color:var(--ab-muted)}
.ab-chips{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
.ab-scopechip{display:inline-flex;align-items:center;gap:9px;background:#EAF1FF;color:var(--ab-blue);
  border:1px solid #C3D4FF;border-radius:999px;padding:6px 13px 6px 16px;font-size:13.5px;font-weight:700;line-height:1.4;
  transition:background .16s,border-color .16s}
a.ab-scopechip:hover{background:#DBE6FF;border-color:#9DB8FF;color:var(--ab-blue)}
.ab-scopechip .ab-ico{width:15px;height:15px;stroke-width:2.6}
.ab-scopehint{font-size:12.5px;color:var(--ab-muted)}

/* filter bar */
.ab-filterbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:16px 0 2px}
.ab-filterbar select,.ab-filterbar input{border:1px solid #D9DEE5;border-radius:7px;background:#fff;height:38px;
  padding:0 11px;font-size:13.5px;line-height:1.4;color:var(--ab-ink);min-width:0}
.ab-filterbar select{flex:0 1 160px}
.ab-filterbar select[name="status"]{flex-basis:186px}
.ab-filterbar.ab-catonly select{flex:0 0 210px}
.ab-filterbar select:disabled{color:#A8B0BC;background:#FAFBFC}
.ab-filterbar input{flex:0 1 200px}
.ab-filterbar input::placeholder{color:#A8AEB8}
.ab-filterbar select:focus,.ab-filterbar input:focus{outline:2px solid #CDE6F3;border-color:var(--ab-sea)}
.ab-filterbar button,.ab-filterbar .ab-clear{border:0;border-radius:7px;height:38px;padding:0 16px;font-size:13.5px;font-weight:700;line-height:38px;
  color:#fff;background:var(--ab-sea);white-space:nowrap;transition:background .16s}
.ab-filterbar button:hover,.ab-filterbar a.ab-clear:hover{background:#016A94;color:#fff}
/* Wide enough for one line (the list column is 1014px): the controls share the
   row instead of keeping fixed widths, with tighter padding. Narrower screens
   keep wrapping as before. */
@media (min-width:1000px){
  .ab-filterbar{flex-wrap:nowrap;gap:8px}
  .ab-filterbar select,.ab-filterbar input{flex:1 1 0;padding:0 8px;font-size:13px}
  /* Category and Subcategory get the most room: their names are the longest
     values ("CNC Machine Tools", "CNC Grinding Machines"). Status and Sort keep
     just enough for their usual options. */
  .ab-filterbar select[name="status"],.ab-filterbar select[name="sort_by"]{flex:1.2 1 0}
  .ab-filterbar select[name="category_id"]{flex:1.45 1 0}
  .ab-filterbar select[name="sub_category_id"]{flex:1 1 0}
  .ab-filterbar select[name="maker"]{flex:.95 1 0}
  .ab-filterbar input{flex:1.15 1 0}
  /* Longer wording in two languages: the Japanese status ("販売状況：販売中")
     and the Indonesian price sort ("Harga: rendah ke tinggi"). */
  .lang-jp .ab-filterbar select[name="status"]{flex-grow:1.45}
  .lang-id .ab-filterbar select[name="sort_by"]{flex-grow:1.7}
  /* Sold Items has only the category box: keep it a normal width, not the whole row */
  .ab-filterbar.ab-catonly select[name]{flex:0 0 260px}
  .ab-filterbar.ab-catonly select{flex:1 1 0}
  .ab-filterbar button,.ab-filterbar .ab-clear{flex:none;padding:0 12px;font-size:13px}
}
.ab-listcount{padding:14px 0 0;font-size:13.5px;color:var(--ab-muted)}

/* results */
/* .ab-wrap (ab-site.css, loaded later) resets padding with a shorthand, so match both classes */
.ab-wrap.ab-listfoot{padding-bottom:56px}
/* This page only: a narrower column than the 1920px site, so the five cards per
   row stay about 190px wide on a normal laptop window (1432px) and on large
   monitors: 5 x 190 + 4 x 16px gaps + 2 x 24px padding = 1062px. */
.ab-listpage .ab-wrap{max-width:1062px}
.ab-listgrid{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;padding:20px 0 12px}
.ab-listempty{text-align:center;padding:44px 20px 46px;max-width:60ch;margin:0 auto}
.ab-listempty>.ab-ico{width:46px;height:46px;color:#B6C2D2;stroke-width:1.4;margin:0 auto}
.ab-listempty h3{font-size:20px;font-weight:900;margin:16px 0 10px}
.ab-listempty p{color:var(--ab-muted);font-size:14.5px;line-height:1.9}
.ab-listempty a{display:inline-flex;align-items:center;gap:9px;margin-top:22px;background:var(--ab-orange);color:#fff;
  font-weight:700;font-size:15px;line-height:1.4;padding:13px 30px;border-radius:var(--ab-r-m)}
.ab-listempty a:hover{background:var(--ab-orange-d);color:#fff}
.ab-listempty a .ab-ico{width:17px;height:17px}
.ab-listalso h2{font-size:19px;font-weight:700;padding-bottom:11px;border-bottom:1px solid var(--ab-line)}

/* pagination */
.ab-pager{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap;padding:18px 0 0}
.ab-pager a,.ab-pager span{min-width:40px;height:40px;padding:0 8px;border-radius:8px;display:grid;place-items:center;font-family:var(--ab-lat);font-weight:600;font-size:14px}
.ab-pager a{background:#fff;border:1px solid var(--ab-line);color:var(--ab-ink-2)}
.ab-pager a:hover{border-color:#AFBDCE;color:var(--ab-ink)}
.ab-pager a.on{background:var(--ab-blue);border-color:var(--ab-blue);color:#fff}
.ab-pager a.off{opacity:.4;pointer-events:none}
.ab-pager .ab-ico{width:16px;height:16px;stroke-width:2.4}
.ab-pager .gap{color:var(--ab-muted);min-width:20px}
.ab-pager .where{display:none;color:var(--ab-muted)}

/* Laptops: keep the wide-screen look (five small cards per row) instead of
   switching to four and then three big cards; the card text steps down so it
   still fits. Four per row only below 900px, three on phones (below). */
@media (min-width:761px) and (max-width:1180px){
  .ab-listgrid{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
  .ab-listgrid .ab-card .bd{padding:9px 10px 10px;gap:5px}
  .ab-listgrid .ab-card h3{font-size:12.5px}
  .ab-listgrid .ab-card .price{font-size:14px}
  .ab-listgrid .ab-card .price.ask{font-size:12.5px}
}
@media (min-width:761px) and (max-width:899px){.ab-listgrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:760px){
  .ab-listhead{padding:16px 0 2px}
  .ab-listhead h1{font-size:20px}
  .ab-filterbar{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 0 2px}
  .ab-filterbar select,.ab-filterbar input{width:100%;font-size:16px;height:40px}
  .ab-filterbar input,.ab-filterbar button,.ab-filterbar .ab-clear{grid-column:1/-1;text-align:center}
  .ab-scopehint{display:none}
  /* phones: three small cards per row */
  .ab-listgrid{grid-template-columns:repeat(3,1fr);gap:8px;padding:14px 0 10px}
  .ab-listgrid .ab-card .price{font-size:clamp(8.5px,2.65vw,10.5px);letter-spacing:0}
  .ab-pager .num,.ab-pager .gap{display:none}
  .ab-pager .where{display:grid}
}
