/* ============================================================================
 * acgshop storefront styles.
 *
 * DESIGN TOKENS (below) mirror the WP-admin design system for visual consistency.
 * They are the single place to retheme: when the graphic designer's files arrive,
 * remap these variables (and, if needed, the component rules) — templates/markup
 * and class names stay stable, so nothing in PHP/JS has to change.
 * ========================================================================== */
:root {
  --acg-accent:#2271b1;  --acg-accent-d:#135e96;
  --acg-ok:#008a20;      --acg-no:#d63638;
  --acg-ink:#1d2327;     --acg-muted:#646970;
  --acg-border:#dcdcde;  --acg-border-2:#c3c4c7;
  --acg-bg:#f6f7f7;      --acg-card:#fff;
  --acg-radius:8px;      --acg-radius-sm:6px;
  --acg-shadow:0 1px 2px rgba(0,0,0,.05);
}

/* ── shared components (admin-consistent) ─────────────────────────────────── */
.acgshop-btn{display:inline-block;background:var(--acg-accent);color:#fff;border:1px solid var(--acg-accent);
  border-radius:var(--acg-radius-sm);padding:9px 16px;font-size:14px;line-height:1.2;cursor:pointer;text-decoration:none}
.acgshop-btn:hover{background:var(--acg-accent-d);border-color:var(--acg-accent-d);color:#fff}
.acgshop-btn[disabled]{opacity:.5;cursor:default}
.acgshop-btn--ghost{background:var(--acg-card);color:var(--acg-accent)}
.acgshop-btn--ghost:hover{background:var(--acg-bg);color:var(--acg-accent-d)}
.acgshop-linkbtn{background:none;border:0;padding:0;color:var(--acg-accent);font-size:inherit;cursor:pointer;text-decoration:underline}
.acgshop-linkbtn:hover{color:var(--acg-accent-d)}
.acgshop-panel{background:var(--acg-card);border:1px solid var(--acg-border);border-radius:var(--acg-radius);
  padding:18px;box-shadow:var(--acg-shadow);margin-bottom:16px}
.acgshop-panel h3{margin:0 0 12px;font-size:15px}
.acgshop-table{width:100%;border-collapse:collapse;margin:12px 0}
.acgshop-table th,.acgshop-table td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--acg-border)}
.acgshop-table thead th{background:var(--acg-bg);font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:var(--acg-muted)}
.acgshop-dim{color:var(--acg-muted)}
.acgshop-err{color:var(--acg-no)}
.acgshop input,.acgshop select,.acgshop textarea{font:inherit}
input[data-na],[data-co] select,[data-co] input,.acgshop-login input,.acgshop-addcart input,.acgshop-co__addr input{
  border:1px solid var(--acg-border);border-radius:var(--acg-radius-sm);padding:8px 10px;box-sizing:border-box}

/* ── catalog grid / product / nav ─────────────────────────────────────────── */
.acgshop-grid{list-style:none;margin:0;padding:0;display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
.acgshop-card{border:1px solid var(--acg-border);border-radius:var(--acg-radius);padding:.85rem;background:var(--acg-card);
  box-shadow:var(--acg-shadow);display:flex;flex-direction:column;gap:.4rem}
.acgshop-card__link{display:flex;flex-direction:column;gap:.5rem;text-decoration:none;color:inherit}
.acgshop-card__img{width:100%;height:auto;object-fit:contain;aspect-ratio:1/1}
.acgshop-card__name{font-weight:600;line-height:1.25}
.acgshop-card__mfr{font-size:.85em;color:var(--acg-muted)}
.acgshop-card__price{font-weight:700;color:var(--acg-ink)}
.acgshop-count{color:var(--acg-muted);margin:.5rem 0}
.acgshop-pager{display:flex;gap:1rem;align-items:center;margin-top:1.25rem}
.acgshop-pager__pos{color:var(--acg-muted)}
.acgshop-catnav{list-style:none;margin:0;padding-left:1rem}
.acgshop-categories>.acgshop-catnav{padding-left:0}
.acgshop-catnav a{text-decoration:none;color:var(--acg-accent)}
.acgshop-pricebreaks{border-collapse:collapse;margin:1rem 0}
.acgshop-pricebreaks th,.acgshop-pricebreaks td{border:1px solid var(--acg-border);padding:.35rem .75rem;text-align:left}
.acgshop-pricebreaks th{background:var(--acg-bg)}
.acgshop-product__sku{color:var(--acg-muted)}
.acgshop-product__img{max-width:360px;height:auto;border:1px solid var(--acg-border);border-radius:var(--acg-radius)}
.acgshop-search{display:flex;gap:.5rem;margin-bottom:1rem}
.acgshop-error{padding:.6rem .8rem;border-radius:var(--acg-radius-sm);background:#fff4f4;border:1px solid #f0c0c0;color:#8a1f1f}
.acgshop-error--admin{background:#fff8e5;border-color:#e6cf8a;color:#6b5300}
.acgshop-empty{color:var(--acg-muted);font-style:italic}

/* ── selftest ─────────────────────────────────────────────────────────────── */
.acgshop-selftest{margin:1rem 0}
.acgshop-selftest__overall{font-size:.7em;padding:.15rem .5rem;border-radius:4px;margin-left:.5rem;vertical-align:middle}
.acgshop-selftest__overall.is-ok{background:#e6f6e6;color:#1d6b1d}
.acgshop-selftest__overall.is-fail{background:#fbe6e6;color:#8a1f1f}
.acgshop-selftest__endpoint{color:var(--acg-muted);font-size:.9em}
.acgshop-selftest__table{border-collapse:collapse;margin:.5rem 0;width:100%;max-width:720px}
.acgshop-selftest__table th,.acgshop-selftest__table td{border:1px solid var(--acg-border);padding:.4rem .7rem;text-align:left}
.acgshop-selftest__table tr.is-ok td{background:#fbfffb}
.acgshop-selftest__table tr.is-fail td{background:#fff6f6}
.acgshop-selftest__note{color:var(--acg-muted);font-style:italic;font-size:.9em}

/* ── storefront layout ────────────────────────────────────────────────────── */
.acgshop-shop__bar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem;padding-bottom:.5rem;border-bottom:1px solid var(--acg-border)}
.acgshop-crumbs{font-size:.9em;color:var(--acg-muted)}
.acgshop-crumbs a{text-decoration:none;color:var(--acg-accent)}
/* Page-level container: bound the storefront to a centered column so it
   doesn't stretch edge-to-edge inside a full-width theme wrapper. */
.acgshop-page{max-width:1280px;margin:0 auto;padding:16px 20px}

.acgshop-shop__body{display:grid;grid-template-columns:minmax(180px,240px) 1fr;gap:1.5rem;align-items:start}
.acgshop-shop__body--no-nav{grid-template-columns:1fr}
.acgshop-shop__nav{font-size:.92em}
.acgshop-shop__main{min-width:0}
.acgshop-cathead{margin-bottom:1rem}
.acgshop-cathead__name{margin:0 0 .25rem}
.acgshop-cathead__desc{color:var(--acg-muted);margin-bottom:.5rem}
.acgshop-subcats{list-style:none;display:flex;flex-wrap:wrap;gap:.5rem 1rem;padding:0;margin:.5rem 0}
.acgshop-subcats a{text-decoration:none;padding:.2rem .5rem;background:var(--acg-bg);border-radius:4px;color:var(--acg-accent)}
@media(max-width:640px){.acgshop-shop__body{grid-template-columns:1fr}.acgshop-shop__nav{display:none}}

/* ── dealer login / account ───────────────────────────────────────────────── */
.acgshop-login{max-width:360px;margin:1em 0;padding:20px;border:1px solid var(--acg-border);border-radius:var(--acg-radius);background:var(--acg-card);box-shadow:var(--acg-shadow)}
.acgshop-login__title{margin:0 0 12px;font-size:18px}
.acgshop-login__error{color:var(--acg-no);background:#fcebec;padding:8px 12px;border-radius:var(--acg-radius-sm)}
.acgshop-login label{display:block;font-weight:600;margin-bottom:8px}
.acgshop-login input{width:100%}
.acgshop-login button{background:var(--acg-accent);color:#fff;border:0;border-radius:var(--acg-radius-sm);padding:9px 16px;cursor:pointer}
.acgshop-login button:hover{background:var(--acg-accent-d)}
.acgshop-account__hello{font-weight:600;margin-bottom:6px}
.acgshop-account__email{color:var(--acg-muted);font-weight:400}
.acgshop-account__logout{margin:8px 0 20px}
.acgshop-acct{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:800px){.acgshop-acct{grid-template-columns:1fr}}
.acgshop-acct__detail{margin:6px 0 0;padding-left:12px;border-left:2px solid var(--acg-border)}
.acgshop-addrlist{list-style:none;margin:0 0 10px;padding:0}
.acgshop-addrlist li{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid var(--acg-border)}

/* ── cart + add-to-cart ───────────────────────────────────────────────────── */
.acgshop-cart__title,.acgshop-checkout__title{font-size:20px;margin:0 0 12px}
.acgshop-addcart{display:flex;gap:10px;align-items:center;margin:14px 0}
.acgshop-addcart input{width:70px}
.acgshop-cart__table{width:100%;border-collapse:collapse;margin:12px 0}
.acgshop-cart__table th,.acgshop-cart__table td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--acg-border)}
.acgshop-cart__table thead th{background:var(--acg-bg);font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:var(--acg-muted)}
.acgshop-cart__foot{display:flex;justify-content:space-between;align-items:center;margin-top:12px}
.acgshop-cart__subtotal{font-size:16px}
.acgshop-cart__na{opacity:.55}
.acgshop-cart__sku{color:var(--acg-muted);font-size:12px}
.acgshop-cart__login{background:var(--acg-bg);border:1px solid var(--acg-border);border-radius:var(--acg-radius);padding:16px}

/* ── checkout ─────────────────────────────────────────────────────────────── */
.acgshop-co{display:grid;grid-template-columns:1fr 300px;gap:24px;margin-top:12px}
@media(max-width:800px){.acgshop-co{grid-template-columns:1fr}}
.acgshop-co h3{margin:16px 0 8px;font-size:15px}
.acgshop-co__main label{display:block;font-weight:600;margin-bottom:4px}
.acgshop-co__main select,.acgshop-co__main [data-co="po"],.acgshop-co__main [data-co="instr"]{width:100%;max-width:420px}
.acgshop-co__summary{background:var(--acg-bg);border:1px solid var(--acg-border);border-radius:var(--acg-radius);padding:16px;align-self:start}
.acgshop-co__summary h3{margin-top:0}
.acgshop-co__totals{display:grid;grid-template-columns:1fr auto;gap:4px 12px;margin:0 0 12px}
.acgshop-co__totals dt{color:var(--acg-muted)}.acgshop-co__totals dd{margin:0;text-align:right}
.acgshop-co__t{font-weight:700;border-top:2px solid var(--acg-border-2);padding-top:6px}
.acgshop-co__addr{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.acgshop-co__done{background:#edf7ee;border:1px solid var(--acg-ok);border-radius:var(--acg-radius);padding:20px}

/* Unavailable products (stock != Y): greyed, non-purchasable. */
.acgshop-card--unavailable { opacity: .55; }
.acgshop-card--unavailable .acgshop-card__img { filter: grayscale(1); }
.acgshop-card__badge {
  display: inline-block; margin-top: 4px; padding: 1px 8px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  color: #fff; background: #8a8a8a; border-radius: 999px;
}
.acgshop-unavailable { color: #8a8a8a; font-style: italic; }

/* ── category/shoes: subcategory-block layout (FPD dealer) ─────────────────
   Used by templates/custom/fpddealer/category/shoes.php. */
.acgshop-cat-shoes { --shoe-green:#63b74a; --shoe-green-d:#4d9138;
                     --shoe-blue:#1f4e9a; --shoe-tab-bg:#eef3fb;
                     --shoe-tab-active:var(--shoe-blue); }

.acgshop-cat-shoes__banner{display:flex;gap:20px;align-items:flex-start;
  background:var(--acg-card);border:1px solid var(--acg-border);
  border-radius:var(--acg-radius);padding:18px;margin:8px 0 22px;box-shadow:var(--acg-shadow)}
.acgshop-cat-shoes__banner-img{flex:0 0 120px;max-width:120px}
.acgshop-cat-shoes__banner-img img{width:100%;height:auto;display:block;border-radius:var(--acg-radius-sm)}
.acgshop-cat-shoes__banner-body{flex:1;min-width:0}
.acgshop-cat-shoes__title{margin:0 0 8px;color:var(--shoe-blue);
  font-size:26px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;text-align:center}
.acgshop-cat-shoes__desc{color:var(--acg-ink);font-size:14px;line-height:1.5}
.acgshop-cat-shoes__desc p{margin:0 0 8px}
.acgshop-cat-shoes__empty{padding:24px;text-align:center;color:var(--acg-muted)}

.acgshop-shoe-block{background:var(--acg-card);border:1px solid var(--acg-border);
  border-radius:var(--acg-radius);padding:16px 18px 18px;margin:0 0 20px;box-shadow:var(--acg-shadow)}
.acgshop-shoe-block__title{margin:0 0 10px;font-size:18px;font-weight:700;color:var(--acg-ink)}

/* Tab bar: single row, blue underline highlights the active tab. */
.acgshop-shoe-block__tabs{display:flex;flex-wrap:wrap;gap:2px;
  border-bottom:2px solid var(--shoe-tab-active)}
.acgshop-shoe-block__tab{appearance:none;border:0;background:var(--shoe-tab-bg);
  color:var(--acg-ink);font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  padding:9px 14px;cursor:pointer;border-top-left-radius:4px;border-top-right-radius:4px;
  border-right:1px solid #fff}
.acgshop-shoe-block__tab:hover{background:#dde7f4}
.acgshop-shoe-block__tab[aria-expanded="true"]{background:var(--shoe-tab-active);color:#fff}
.acgshop-shoe-block__panel{border:1px solid var(--shoe-tab-active);border-top:0;
  padding:12px 14px;background:#fbfcfe;font-size:13px;color:var(--acg-ink)}
.acgshop-shoe-block__panel[hidden]{display:none}

/* Body: table left, product photo right. */
.acgshop-shoe-block__body{display:grid;grid-template-columns:1fr 180px;gap:18px;
  align-items:start;margin-top:14px}
@media(max-width:720px){.acgshop-shoe-block__body{grid-template-columns:1fr}
  .acgshop-shoe-block__photo{max-width:180px;margin:0 auto}}
.acgshop-shoe-block__photo img{width:100%;height:auto;display:block}

.acgshop-shoe-block__table{width:100%;border-collapse:collapse;font-size:13px}
.acgshop-shoe-block__table thead th{background:var(--shoe-tab-bg);color:var(--shoe-blue);
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;
  text-align:left;padding:8px 10px;border-bottom:2px solid var(--shoe-tab-active)}
.acgshop-shoe-block__table thead th:nth-child(3),
.acgshop-shoe-block__table thead th:nth-child(4),
.acgshop-shoe-block__table thead th:nth-child(5),
.acgshop-shoe-block__table thead th:nth-child(6){text-align:right}
.acgshop-shoe-block__table tbody td{padding:7px 10px;border-bottom:1px solid var(--acg-border)}
.acgshop-shoe-block__table tbody td:nth-child(3),
.acgshop-shoe-block__table tbody td:nth-child(4),
.acgshop-shoe-block__table tbody td:nth-child(5),
.acgshop-shoe-block__table tbody td:nth-child(6){text-align:right}
.acgshop-shoe-block__sku{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12px;color:var(--acg-ink)}
.acgshop-shoe-block__row--na{opacity:.55}
.acgshop-shoe-block__qty{width:60px;text-align:right;padding:3px 6px;
  border:1px solid var(--acg-border-2);border-radius:var(--acg-radius-sm);font-size:13px}
.acgshop-shoe-block__na{color:var(--acg-muted)}

.acgshop-shoe-block__actions{display:flex;justify-content:flex-end;margin-top:10px}
.acgshop-shoe-block .acgshop-btn{background:var(--shoe-green);border-color:var(--shoe-green);
  border-radius:999px;padding:10px 22px;text-transform:uppercase;letter-spacing:.05em;
  font-weight:700;font-size:12px}
.acgshop-shoe-block .acgshop-btn:hover{background:var(--shoe-green-d);border-color:var(--shoe-green-d)}
