/* ==========================================================================
   Home Connect - category / product-listing 2026

   Loads only on the listing template. Depends on home-2026.css for the design
   tokens and the shared chrome (promo bar, header, nav, drawer, footer,
   buttons). Everything here is prefixed .hc- and scoped to .hc-list where it
   could otherwise reach the homepage.

   Card geometry matches the homepage deliberately: 7 / 6 image, 5px radius,
   same border and hover lift, so a product looks the same wherever it appears.
   ========================================================================== */

/* --- Listing head -------------------------------------------------------- */
.hc-lhead { background: var(--hc-grey); border-bottom: 1px solid var(--hc-line); padding: 30px 0 26px; }
.hc-crumb { font-size: 13px; color: var(--hc-ink-3); display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.hc-crumb a { color: var(--hc-ink-2); }
.hc-crumb a:hover { color: var(--hc-navy); text-decoration: underline; }
.hc-lhead__h1 {
  font-size: clamp(26px, 3vw, 40px); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.01em; color: var(--hc-ink); margin-top: 10px;
}
.hc-lhead__desc { margin-top: 12px; max-width: 72ch; color: var(--hc-ink-2); font-size: 15.5px; line-height: 1.6; }

/* --- Category rail ------------------------------------------------------- */
.hc-rail { border-bottom: 1px solid var(--hc-line); background: #fff; }
.hc-rail ul {
  display: flex; gap: 9px; overflow-x: auto; padding: 14px 0;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hc-rail ul::-webkit-scrollbar { display: none; }
.hc-chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 9px 15px; border: 1px solid var(--hc-line); border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: var(--hc-ink-2); background: #fff;
  transition: border-color .14s, color .14s, background .14s;
}
.hc-chip:hover { border-color: var(--hc-navy); color: var(--hc-ink); }
.hc-chip.is-on { background: var(--hc-navy); border-color: var(--hc-navy); color: #fff; }
.hc-chip__n { font-size: 11.5px; font-weight: 700; opacity: .72; }

/* --- Toolbar ------------------------------------------------------------- */
.hc-ltools {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; padding: 26px 0 20px;
}
.hc-ltools__count { font-size: 14px; color: var(--hc-ink-2); }
.hc-ltools__sort { display: flex; align-items: center; gap: 10px; }
.hc-ltools__sort label { font-size: 13.5px; font-weight: 700; color: var(--hc-ink-2); }
/* 16px, not 14px. Below 16px iOS Safari zooms the viewport the moment the
   control takes focus, and this select sits on /shop/ and every product
   category archive - the store's primary browse path on a phone. */
.hc-ltools__sort select {
  font: inherit; font-size: 16px; color: var(--hc-ink); background: #fff;
  border: 1px solid var(--hc-line); border-radius: var(--hc-r);
  padding: 10px 14px; min-height: 44px; cursor: pointer;
}
.hc-ltools__sort select:focus { outline: none; box-shadow: 0 0 0 3px var(--hc-gold-l); }

/* --- Grid ---------------------------------------------------------------- */
.hc-pgrid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  padding-bottom: 8px;
}
@media (max-width: 1180px) { .hc-pgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .hc-pgrid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 420px)  { .hc-pgrid { gap: 12px; } }

/* --- Card ---------------------------------------------------------------- */
.hc-pcard {
  position: relative; display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--hc-line); border-radius: var(--hc-r); overflow: hidden;
  transition: box-shadow .16s, border-color .16s, transform .16s;
}
.hc-pcard { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
/* v22: matched to the approved homepage product card (v20) so a card behaves the
   same wherever it appears - same lift, same shadow, and the CTA fills on hover.
   NOTE: archive cards deliberately do NOT swap imagery. The homepage swap is a
   progressive enhancement that only fires where a product's own gallery holds a
   second legitimate photograph; the archive card has no such per-product asset
   logic, so adding a swap here would mean inventing imagery. It stays truthful:
   one real image per card. */
@media (hover: hover) and (pointer: fine) {
  .hc-pcard:hover { box-shadow: 0 14px 34px rgba(12, 31, 56, .13); border-color: #CFD5DC; transform: translateY(-4px); }
  .hc-pcard:hover .hc-pcard__cta { background: var(--hc-navy); border-color: var(--hc-navy); color: #fff; }
}
.hc-pcard:focus-within { box-shadow: 0 14px 34px rgba(12, 31, 56, .13); }

.hc-pcard__img {
  position: relative; display: block; aspect-ratio: 7 / 6;
  background: var(--hc-grey); overflow: hidden;
}
/* Absolute so the wrapper's aspect-ratio always wins - a percentage height on a
   flow child leaves the box sized by the image's own intrinsic ratio. */
.hc-pcard__img img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease;
}
@media (hover: hover) and (pointer: fine) { .hc-pcard:hover .hc-pcard__img img { transform: scale(1.04); } }

.hc-pcard__body { display: flex; flex-direction: column; flex: 1; gap: 5px; padding: 15px 15px 17px; }
.hc-pcard__name { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--hc-ink); }
.hc-pcard__name a { color: inherit; }
.hc-pcard__spec { font-size: 12.5px; color: var(--hc-ink-3); }
.hc-pcard__price { margin-top: auto; padding-top: 11px; font-size: 21px; font-weight: 800; color: var(--hc-ink); letter-spacing: -.01em; }
.hc-pcard__price .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; }
.hc-pcard__price del { font-size: 13px; font-weight: 600; color: var(--hc-ink-3); margin-right: 7px; }
.hc-pcard__price ins { text-decoration: none; color: var(--hc-red); }
/* The Measurement Price Calculator appends its unit suffix inside the price
   markup. It sits inline and legible so "$3.19 sq. ft." reads as one price:
   the rate, not the box total, is the advertised price of flooring. As a faint
   block underneath, the bare figure read as if it were the whole price. */
.hc-pcard__price small,
.hc-pcard__price .woocommerce-price-suffix,
.hc-pcard__unit {
  display: inline; font-size: 13px; font-weight: 700;
  color: var(--hc-ink-2); letter-spacing: 0; margin-left: 3px;
}

/* A package price is not a rate, so it does not get a rate's visual weight.
   Applied only when the price carries no unit of its own. */
.hc-pcard__price.is-package { font-size: 18px; }

/* Secondary line: box total and coverage. Real figures, quiet treatment. */
.hc-pcard__cov { font-size: 12.5px; color: var(--hc-ink-3); }
.hc-pcard__box { white-space: nowrap; }
.hc-pcard__cov .woocommerce-Price-amount { font-size: inherit; font-weight: 700; color: var(--hc-ink-2); }
.hc-pcard__cta { margin-top: 13px; width: 100%; }

/* The whole card is one hit target; the visible CTA is decorative so screen
   readers hear a single link per product rather than three. */
.hc-pcard__hit { position: absolute; inset: 0; z-index: 2; }
.hc-pcard__hit:focus-visible { outline: 3px solid var(--hc-gold-l); outline-offset: -3px; border-radius: var(--hc-r); }
.hc-pcard__name a { position: relative; z-index: 3; }

.hc-flag {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--hc-red); color: #fff; font-size: 10px; font-weight: 800;
  letter-spacing: .10em; text-transform: uppercase; padding: 5px 9px; border-radius: 3px;
}
.hc-flag--out { left: auto; right: 10px; background: var(--hc-ink-2); }

/* --- Pagination ---------------------------------------------------------- */
.hc-pager { padding: 34px 0 8px; }
.hc-pager ul { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hc-pager a,
.hc-pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; min-height: 46px; padding: 0 14px;
  border: 1px solid var(--hc-line); border-radius: var(--hc-r);
  font-size: 14.5px; font-weight: 700; color: var(--hc-ink-2); background: #fff;
}
.hc-pager a:hover { border-color: var(--hc-navy); color: var(--hc-ink); }
.hc-pager .current { background: var(--hc-navy); border-color: var(--hc-navy); color: #fff; }
.hc-pager .dots { border-color: transparent; background: transparent; }

/* --- Empty state --------------------------------------------------------- */
.hc-lempty { padding: 54px 0 64px; font-size: 16px; color: var(--hc-ink-2); text-align: center; }

/* --- Mobile -------------------------------------------------------------- */
@media (max-width: 700px) {
  .hc-lhead { padding: 22px 0 20px; }
  .hc-ltools { padding: 20px 0 16px; gap: 12px; }
  .hc-ltools__count { width: 100%; }
  .hc-ltools__sort { width: 100%; }
  .hc-ltools__sort select { flex: 1; }
  .hc-pcard__body { padding: 12px 12px 14px; }
  .hc-pcard__price { font-size: 18px; padding-top: 9px; }
  .hc-pcard__price.is-package { font-size: 16px; }
  .hc-pcard__price small,
  .hc-pcard__price .woocommerce-price-suffix,
  .hc-pcard__unit { font-size: 12px; }
  .hc-pcard__name { font-size: 14px; }
  .hc-rail ul { padding: 11px 0; }
}
