/* ==========================================================================
   East Coast Filters — the catalogue shell.

   The two-column shell shared by every catalogue surface: /shop/, every
   /product-category/ archive, product search and the All Products page. Four
   templates, one layout — woocommerce/archive-product.php for the first three
   and page-all-products.php for the last.

   What this file is NOT is the catalogue itself. The product grid, the result
   count, the sort control, the pagination and the layered-nav filters all went
   with WooCommerce's product loop, which the catalog finder buffers away and
   discards; the finder brings its own rows, chips and styles in
   ecf-custom-mods/assets/finder.css.

   What is left is the shell, the breadcrumb, the rail's shared .ecf-filter
   chrome — used by the job list rail, the category rail and the promo card
   alike — and the phone-width rail toggle.

   The design's provisional navy/orange palette is deliberately NOT used: the
   handoff says to substitute the live brand, so this is the site's green and
   amber from site.css, and Archivo/Inter rather than Barlow.
   ========================================================================== */

/* ---- Shell -------------------------------------------------------------- */
/* Product archives run to the header bar's width rather than the 1200px the
   rest of the site uses: this is the one screen that is a working surface — a
   filter rail beside a grid of parts — and the extra room buys a column.
   --shell is the header's own width (site.css), so the two cannot drift. */
.ecf-shop{
  max-width:var(--shell,var(--container));margin-inline:auto;
  padding:0 var(--gutter) var(--sp-8);
}
.ecf-shop__cols{
  display:grid;grid-template-columns:260px minmax(0,1fr);
  gap:36px;align-items:start;
}

/* ---- Breadcrumb --------------------------------------------------------- */
.ecf-shop__breadcrumb{margin:0 0 var(--sp-5)}
.ecf-shop__breadcrumb .woocommerce-breadcrumb{
  margin:0;padding:14px 0;
  font-size:var(--fs-sm);color:var(--muted);
  border-bottom:1px solid var(--line);
}
.ecf-shop__breadcrumb a{color:var(--muted);text-decoration:none}
.ecf-shop__breadcrumb a:hover{color:var(--green-700);text-decoration:underline}
.ecf-shop__breadcrumb .sep{margin:0 .5em;color:var(--line)}

/* ---- Sidebar ------------------------------------------------------------ */
.ecf-shop__sidebar{position:sticky;top:var(--sp-5)}
.ecf-filter{margin:0 0 var(--sp-6)}
.ecf-filter__title{
  font-family:var(--font-head);font-size:var(--fs-xs);font-weight:800;
  letter-spacing:.12em;text-transform:uppercase;
  color:var(--ink);margin:0 0 var(--sp-3);
  padding-bottom:var(--sp-2);border-bottom:2px solid var(--ink);
}
.ecf-filter ul{list-style:none;margin:0;padding:0}
.ecf-filter li{margin:0}

/* ---- Promo card --------------------------------------------------------- */
.ecf-promo{
  padding:var(--sp-5);background:var(--green-900);border-radius:var(--radius);
}
.ecf-promo__title{
  font-family:var(--font-head);font-size:var(--fs-base);font-weight:800;
  text-transform:uppercase;letter-spacing:.04em;color:#fff;margin:0 0 var(--sp-2);
  border:0;padding:0;
}
.ecf-promo__copy{font-size:var(--fs-sm);line-height:1.55;color:#c3d3c9;margin:0 0 var(--sp-4)}
.ecf-promo__cta{width:100%}

/* ---- Narrow screens ----------------------------------------------------- */
@media (max-width:900px){
  .ecf-shop__cols{grid-template-columns:1fr;gap:var(--sp-5)}
  .ecf-shop__sidebar{position:static}
}
@media (max-width:600px){
  /* The gutter, not a number of its own: the finder's fixed summary bar lines
     its contents up with these rows by reading --gutter, and a bespoke value
     here put the two 4px out of step. */
  .ecf-shop{padding-inline:var(--gutter)}
}


/* ---- Rail toggle (phones) -----------------------------------------------
   The rail stacks above the products below 900px, which pushed the first
   product roughly two and a half screens down. It folds behind a button there
   instead. Printed always and hidden here, so the breakpoint is stated once in
   CSS rather than duplicated in the script. */
.ecf-shop__filters-toggle{
  display:none;
  width:100%;align-items:center;justify-content:space-between;gap:var(--sp-3);
  min-height:52px;padding:0 18px;margin:0 0 var(--sp-4);
  font-family:var(--font-head);font-weight:700;font-size:var(--fs-sm);
  color:var(--green-800);background:var(--white);
  border:1.5px solid var(--line);border-radius:var(--radius-sm);
  cursor:pointer;
}
.ecf-shop__filters-toggle:hover{border-color:var(--green-400)}
.ecf-shop__filters-toggle:focus-visible{
  outline:none;border-color:var(--green-500);box-shadow:0 0 0 3px rgba(59,122,90,.15);
}
/* A chevron that answers to the panel, so the control says which way it goes. */
.ecf-shop__filters-toggle .ecf-shop__filters-toggle-label::after{
  content:"";display:inline-block;margin-left:.5em;
  width:.55em;height:.55em;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:translateY(-2px) rotate(45deg);transition:transform .15s ease;
}
.ecf-shop__filters-toggle[aria-expanded="true"] .ecf-shop__filters-toggle-label::after{
  transform:translateY(2px) rotate(-135deg);
}
/* Count of applied filters, so a closed panel cannot hide that results are
   already narrowed. */
.ecf-shop__filters-toggle-count:empty{display:none}
.ecf-shop__filters-toggle-count{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:22px;height:22px;padding:0 6px;border-radius:999px;
  background:var(--green-700);color:#fff;font-size:var(--fs-xs);font-weight:700;
}

@media (max-width:900px){
  .ecf-shop__filters-toggle{display:flex}
}

