/**
 * Account4All — Shop / category archive redesign · Stage 2 (v1.5.0)
 * -------------------------------------------------------------------------
 * CSS-only restyle; no template edits. Scoped to the WC archive body classes.
 * The product card block (.has-background-white.is-border-radius-20.p-3) is
 * the shared structural signature of ALL THREE card render paths
 * (content-product.php, functions.php shortcode grid, partials/slide.php),
 * so one component rule set covers them consistently wherever this sheet
 * (or a later stage) is enqueued. Token-only colors (dark-ready).
 */

/* Scope helper: shop archive + product taxonomies. */
body.post-type-archive-product,
body.tax-product_cat,
body.tax-product_tag {
  background: var(--bg-soft) !important;
}

/* ---- Archive header ----------------------------------------------------- */
body.post-type-archive-product .woocommerce-products-header .title,
body.tax-product_cat .woocommerce-products-header .title,
body.tax-product_tag .woocommerce-products-header .title {
  font-size: 24px;
  font-weight: var(--fw-extrabold);
  color: var(--ink-900);
}
body.tax-product_cat .archive-image-wrapper {
  border-radius: var(--r-xl) !important;
  box-shadow: var(--sh-card);
}

/* Result count + ordering row */
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count {
  color: var(--fg-3);
  font-size: 12.5px;
}
body.post-type-archive-product .woocommerce-ordering select,
body.tax-product_cat .woocommerce-ordering select,
body.tax-product_tag .woocommerce-ordering select {
  min-height: 40px;
  background-color: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 0 12px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--fg-1);
}
body.post-type-archive-product .woocommerce-ordering select:focus,
body.tax-product_cat .woocommerce-ordering select:focus,
body.tax-product_tag .woocommerce-ordering select:focus {
  border-color: var(--brand-blue-accent);
  box-shadow: var(--focus-ring);
  outline: none;
}

/* ---- Product card (shared component, all render paths) ------------------ */
.page-archive .a4a-product-card,
.page-archive .has-background-white.is-border-radius-20.p-3 {
  border: 1px solid var(--line);
  border-radius: var(--r-lg) !important;
  box-shadow: var(--sh-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.page-archive .column.product:hover .a4a-product-card,
.page-archive .column.product:hover .has-background-white.is-border-radius-20.p-3 {
  transform: translateY(-4px);
  border-color: var(--pale-lilac);
  box-shadow: var(--sh-card-2);
}
.page-archive .a4a-product-card figure.image img {
  border-radius: var(--r-md) !important;
  width: 100%;
  height: auto;
}
.page-archive .a4a-product-card h2 {
  font-size: 13.5px;
  font-weight: var(--fw-bold);
  color: var(--fg-1);
  line-height: var(--lh-snug);
  padding-top: 12px !important;
  flex: 1;
}
/* Sale badge */
.page-archive .sale-tag.tag.is-danger {
  background: var(--danger);
  color: var(--surface);
  border-radius: var(--r-pill);
  font-weight: var(--fw-bold);
}
/* Price block */
.page-archive .a4a-product-card .is-price-dashed {
  color: var(--fg-4);
  font-size: 11.5px;
}
.page-archive .a4a-product-card .has-text-danger {
  color: var(--danger) !important;
  font-weight: var(--fw-extrabold);
  font-size: 13.5px;
}
.page-archive .a4a-product-card .has-text-grey,
.page-archive .a4a-product-card .has-text-dark {
  font-size: 12.5px;
}
/* CTA pill: old black button -> brand pill */
.page-archive .a4a-product-card .button.is-dark {
  background-color: var(--brand-blue);
  border: 0;
  border-radius: var(--r-pill);
  color: var(--surface);
  font-size: 11.5px;
  font-weight: var(--fw-bold);
  padding-inline: 16px;
  box-shadow: 0 6px 18px rgba(0, 10, 255, 0.22);
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.page-archive .a4a-product-card .button.is-dark:hover {
  background-color: var(--brand-blue-hover);
  box-shadow: none;
  color: var(--surface);
}
.page-archive .a4a-product-card .button.is-dark:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---- Pagination ---------------------------------------------------------- */
body.post-type-archive-product nav.pagination .page-numbers,
body.tax-product_cat nav.pagination .page-numbers,
body.tax-product_tag nav.pagination .page-numbers {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--fg-2);
  font-size: 13px;
  font-weight: var(--fw-bold);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
body.post-type-archive-product nav.pagination .page-numbers:hover,
body.tax-product_cat nav.pagination .page-numbers:hover,
body.tax-product_tag nav.pagination .page-numbers:hover {
  border-color: var(--pale-lilac);
  background: var(--bg-lilac);
  color: var(--brand-blue);
}
body.post-type-archive-product nav.pagination .page-numbers.current,
body.tax-product_cat nav.pagination .page-numbers.current,
body.tax-product_tag nav.pagination .page-numbers.current {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: var(--surface);
  box-shadow: 0 6px 18px rgba(0, 10, 255, 0.22);
}
body.post-type-archive-product nav.pagination .page-numbers.dots,
body.tax-product_cat nav.pagination .page-numbers.dots,
body.tax-product_tag nav.pagination .page-numbers.dots {
  border: 0;
  background: none;
}

/* ---- Archive description / no-products ---------------------------------- */
body.post-type-archive-product article.subtitle.box,
body.tax-product_cat article.subtitle.box,
body.tax-product_tag article.subtitle.box,
body.post-type-archive-product .box.has-background-white.my-6,
body.tax-product_cat .box.has-background-white.my-6,
body.tax-product_tag .box.has-background-white.my-6 {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-card);
  color: var(--fg-2);
  line-height: var(--lh-body);
}
body.post-type-archive-product article.subtitle.box h3,
body.tax-product_cat article.subtitle.box h3,
body.tax-product_tag article.subtitle.box h3 {
  color: var(--ink-900);
}
body.tax-product_cat .term-description,
body.post-type-archive-product .term-description {
  color: var(--fg-2);
  line-height: var(--lh-body);
}
body.tax-product_cat .term-description h2,
body.tax-product_cat .term-description h3 {
  color: var(--ink-900);
  font-weight: var(--fw-extrabold);
}
body.tax-product_cat .term-description a,
body.post-type-archive-product .term-description a {
  color: var(--brand-blue-accent);
}

/* ---- Responsive: 2-up cards on mobile ------------------------------------ */
@media screen and (max-width: 768px) {
  body.post-type-archive-product .page-archive > .column.product,
  body.tax-product_cat .page-archive > .column.product,
  body.tax-product_tag .page-archive > .column.product {
    width: 50%;
    flex: none;
  }
  .page-archive .a4a-product-card h2,
  .page-archive .has-background-white.is-border-radius-20.p-3 h2 {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-archive .a4a-product-card,
  .page-archive .has-background-white.is-border-radius-20.p-3 {
    transition-duration: 0.001ms !important;
  }
}
