/* ============================================================
   SUN TOOLS V3 — COMMERCE
   ============================================================
   Real presentation layer over WooCommerce's own default templates
   (Shop, Category/Brand archives, Search, Single Product, Cart,
   Checkout, My Account) — this theme has no template overrides for
   any of these, so WooCommerce's real markup/classes are targeted
   directly, the same way header.css targets this theme's own markup.
   ============================================================ */

/* WooCommerce's own template (this theme has no override) wraps every
   Shop/Category/Brand/Search/Single-Product/Cart/Checkout/Account page
   in #primary.content-area with zero width constraint or side
   padding of its own — unlike every other page on the site, which
   gets both from .st3-container. Without this, content runs flush to
   the physical viewport edge (most visible on narrow screens, where
   RTL-right-aligned text sits with zero gutter against the edge). */
#primary.content-area {
  max-width: var(--st3-container);
  margin-inline: auto;
  padding-inline: var(--st3-container-pad);
  padding-block: 0 var(--st3-space-9);
}

.st3-commerce-breadcrumb { padding-block: var(--st3-space-4) 0; }

/* ---------- Page title (WooCommerce's own page-title wrapper) ---------- */
.woocommerce-products-header,
.page-title-wrap {
  padding-block: var(--st3-space-3) var(--st3-space-6);
}
.woocommerce-products-header__title,
h1.entry-title {
  font-size: var(--st3-text-2xl);
}
.term-description {
  color: var(--st3-body);
  max-width: 70ch;
  margin-top: var(--st3-space-2);
}

/* ---------- Brand archive header (real logo + real count) ---------- */
.st3-brand-archive-header {
  display: flex;
  align-items: center;
  gap: var(--st3-space-5);
  padding-block: var(--st3-space-5);
  margin-bottom: var(--st3-space-3);
  border-bottom: 1px solid var(--st3-border);
}
.st3-brand-archive-header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  padding: var(--st3-space-3);
  background: var(--st3-white);
  border: 1px solid var(--st3-border);
  border-radius: var(--st3-radius);
}
.st3-brand-archive-header__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.st3-brand-archive-header__text h1 { font-size: var(--st3-text-2xl); margin-bottom: 4px; }
.st3-brand-archive-header__count { font-size: var(--st3-text-sm); color: var(--st3-muted); font-weight: 600; }
.st3-brand-archive-header__desc { color: var(--st3-body); max-width: 70ch; margin-top: var(--st3-space-2); }
@media (max-width: 600px) {
  .st3-brand-archive-header { gap: var(--st3-space-3); }
  .st3-brand-archive-header__logo { width: 68px; height: 68px; }
  .st3-brand-archive-header__text h1 { font-size: var(--st3-text-xl); }
}

/* ---------- Shop toolbar ---------- */
.st3-shop-toolbar {
  margin-bottom: var(--st3-space-3);
}
.st3-shop-toolbar__filters {
  display: flex;
  gap: var(--st3-space-2);
  padding-bottom: var(--st3-space-2);
}
.st3-cat-filter {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--st3-border);
  border-radius: 999px;
  font-size: var(--st3-text-sm);
  font-weight: 600;
  color: var(--st3-body);
  white-space: nowrap;
  transition: border-color var(--st3-fast) var(--st3-ease), background-color var(--st3-fast) var(--st3-ease), color var(--st3-fast) var(--st3-ease);
}
.st3-cat-filter:hover { border-color: var(--st3-ink); color: var(--st3-ink); }
.st3-cat-filter.is-active { background: var(--st3-ink); border-color: var(--st3-ink); color: var(--st3-white); }

/* ---------- Brand + price facets ---------- */
.st3-shop-facets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--st3-space-2);
  padding: var(--st3-space-3);
  background: var(--st3-surface);
  border: 1px solid var(--st3-border);
  border-radius: var(--st3-radius);
  margin-top: var(--st3-space-2);
}
.st3-shop-facets__field { display: flex; }
.st3-shop-facets__select,
.st3-shop-facets__field--price input {
  height: 38px;
  padding-inline: var(--st3-space-3);
  border: 1px solid var(--st3-border);
  border-radius: var(--st3-radius-sm);
  background: var(--st3-white);
  font-family: var(--st3-font);
  font-size: var(--st3-text-sm);
  color: var(--st3-ink);
}
.st3-shop-facets__select { min-width: 180px; }
.st3-shop-facets__field--price input { width: 110px; }
.st3-shop-facets__apply {
  height: 38px;
  padding-inline: var(--st3-space-4);
  border: none;
  border-radius: var(--st3-radius-sm);
  background: var(--st3-red);
  color: var(--st3-white);
  font-size: var(--st3-text-sm);
  font-weight: 700;
  cursor: pointer;
}
.st3-shop-facets__apply:hover { background: var(--st3-red-dark); }
.st3-shop-facets__clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--st3-text-sm);
  font-weight: 600;
  color: var(--st3-muted);
}
.st3-shop-facets__clear svg { width: 13px; height: 13px; }
.st3-shop-facets__clear:hover { color: var(--st3-red); }

.st3-shop-toolbar__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--st3-space-4);
  padding-block: var(--st3-space-3);
  border-block: 1px solid var(--st3-border);
  margin-bottom: var(--st3-space-5);
  font-size: var(--st3-text-sm);
  color: var(--st3-muted);
}
.st3-shop-toolbar__meta .orderby {
  padding: 8px 12px;
  border: 1px solid var(--st3-border);
  border-radius: var(--st3-radius-sm);
  font-family: var(--st3-font);
  font-size: var(--st3-text-sm);
  background: var(--st3-white);
}

/* ---------- Empty state ---------- */
.st3-shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--st3-space-3);
  max-width: 480px;
  margin-inline: auto;
  padding-block: var(--st3-space-9);
}
.st3-shop-empty__icon { width: 40px; height: 40px; color: var(--st3-muted); }
.st3-shop-empty p { color: var(--st3-body); margin-bottom: var(--st3-space-2); }

/* ---------- Product grid (classic WooCommerce loop) ----------
   Reuses the exact .st3-product-card component built for the
   homepage — one card grammar everywhere a product is listed. */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--st3-space-4);
  list-style: none;
  margin: 0 0 var(--st3-space-6) !important;
  padding: 0;
}
/* WooCommerce core's own stylesheet puts a `content:" "; display:table`
   clearfix on ul.products::before/::after for its default float-based
   grid. In a CSS Grid container those pseudo-elements become real grid
   items — ::before was silently eating the first cell, pushing every
   real product one slot later and leaving row 1 one card short (3
   instead of 4) with a phantom empty first cell. Neutralize both. */
ul.products::before,
ul.products::after {
  content: none !important;
  display: none !important;
}
ul.products li.product {
  border: 1px solid var(--st3-border);
  border-radius: var(--st3-radius);
  overflow: hidden;
  background: var(--st3-white);
  transition: border-color var(--st3-fast) var(--st3-ease), box-shadow var(--st3-fast) var(--st3-ease);
  padding: 0 !important;
  width: auto !important;
  margin: 0 !important;
}
ul.products li.product:hover { border-color: var(--st3-dark); box-shadow: var(--st3-shadow-md); }
ul.products li.product a.woocommerce-LoopProduct-link {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--st3-soft-gray);
}
ul.products li.product img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--st3-space-4);
  box-sizing: border-box;
}
ul.products li.product .woocommerce-loop-product__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: var(--st3-space-3) var(--st3-space-3) 0;
  font-size: var(--st3-text-base);
  font-weight: 600;
  color: var(--st3-ink);
  line-height: 1.4;
  min-height: calc(var(--st3-text-base) * 1.4 * 2 + var(--st3-space-3));
}
ul.products li.product .price {
  display: block;
  padding: 4px var(--st3-space-3) var(--st3-space-3);
  font-weight: 700;
  font-size: var(--st3-text-base);
  color: var(--st3-red);
}
ul.products li.product .price del { color: var(--st3-muted); opacity: .7; font-weight: 400; margin-inline-end: 6px; }
ul.products li.product .button {
  display: block;
  margin: 0 var(--st3-space-3) var(--st3-space-3);
  padding: 10px;
  text-align: center;
  background: var(--st3-dark);
  color: var(--st3-white) !important;
  border-radius: var(--st3-radius-sm);
  font-size: var(--st3-text-sm);
  font-weight: 600;
}
ul.products li.product .button:hover { background: var(--st3-red); }
ul.products li.product .star-rating { margin: 4px var(--st3-space-3) 0; font-size: var(--st3-text-xs); }

.woocommerce-pagination { margin-top: var(--st3-space-6); }
.woocommerce-pagination ul.page-numbers {
  display: flex;
  gap: var(--st3-space-2);
  list-style: none;
  padding: 0;
}
.woocommerce-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding-inline: 8px;
  border: 1px solid var(--st3-border);
  border-radius: var(--st3-radius-sm);
  color: var(--st3-ink);
  font-size: var(--st3-text-sm);
  font-weight: 600;
}
.woocommerce-pagination .page-numbers.current { background: var(--st3-ink); color: var(--st3-white); border-color: var(--st3-ink); }
.woocommerce-pagination a.page-numbers:hover { border-color: var(--st3-ink); }

@media (max-width: 1024px) { ul.products { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 768px) { ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: var(--st3-space-3); } }

/* ============================================================
   SINGLE PRODUCT
   ============================================================ */
.single-product div.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--st3-space-8);
  align-items: start;
}
.single-product div.product > * { min-width: 0; } /* grid items default to
  min-width:auto — without this, a long unbroken product title refuses to
  shrink below its natural width and forces the whole grid past the
  viewport on narrow screens instead of wrapping. */
@media (max-width: 768px) {
  .single-product div.product { grid-template-columns: 1fr; gap: var(--st3-space-5); }
}
.single-product .woocommerce-product-gallery { background: var(--st3-soft-gray); border-radius: var(--st3-radius-lg); overflow: hidden; }
.single-product .woocommerce-product-gallery img { width: 100%; height: auto; object-fit: contain; }
.single-product .woocommerce-product-gallery--without-images {
  display: flex; align-items: center; justify-content: center; min-height: 360px; position: relative;
}
.single-product .woocommerce-product-gallery--without-images img { opacity: .35; max-width: 40%; }
.single-product .woocommerce-product-gallery--without-images::after {
  content: "بانتظار صورة المنتج"; position: absolute; bottom: var(--st3-space-3); inset-inline: 0;
  text-align: center; font-size: var(--st3-text-sm); color: var(--st3-muted);
}

.single-product .product_title { font-size: var(--st3-text-2xl); margin-bottom: var(--st3-space-2); }
.single-product .st3-product-brand { font-size: var(--st3-text-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-bottom: var(--st3-space-2); }
.single-product .st3-product-brand a { color: var(--st3-muted); }
.single-product .st3-product-brand a:hover { color: var(--st3-red); }
.single-product p.price { font-size: var(--st3-text-xl); font-weight: 700; color: var(--st3-red); margin: var(--st3-space-3) 0; }
.single-product .st3-product-unit { font-size: var(--st3-text-sm); color: var(--st3-muted); margin-top: -4px; margin-bottom: var(--st3-space-3); }
.single-product form.cart {
  display: flex;
  align-items: center;
  gap: var(--st3-space-3);
  margin-block: var(--st3-space-5);
}
.single-product form.cart .quantity input {
  width: 64px;
  padding: 11px;
  border: 1px solid var(--st3-border);
  border-radius: var(--st3-radius);
  text-align: center;
  font-family: var(--st3-font);
}
.single-product form.cart button.single_add_to_cart_button {
  flex: 1 1 auto;
  padding: 13px var(--st3-space-6);
  background: var(--st3-dark);
  color: var(--st3-white);
  border: none;
  border-radius: var(--st3-radius);
  font-weight: 700;
  font-size: var(--st3-text-base);
  cursor: pointer;
}
.single-product form.cart button.single_add_to_cart_button:hover { background: var(--st3-red); }
.single-product .product_meta {
  margin-top: var(--st3-space-5);
  padding-top: var(--st3-space-4);
  border-top: 1px solid var(--st3-border);
  font-size: var(--st3-text-sm);
  color: var(--st3-muted);
}

.single-product .woocommerce-tabs { grid-column: 1 / -1; margin-top: var(--st3-space-8); }
.single-product .woocommerce-tabs ul.tabs { display: flex; gap: var(--st3-space-6); border-bottom: 1px solid var(--st3-border); list-style: none; padding: 0; margin-bottom: var(--st3-space-5); }
.single-product .woocommerce-tabs ul.tabs li { padding-bottom: var(--st3-space-3); }
.single-product .woocommerce-tabs ul.tabs li a { font-weight: 700; color: var(--st3-muted); }
.single-product .woocommerce-tabs ul.tabs li.active a { color: var(--st3-ink); }
.single-product .woocommerce-tabs table.shop_attributes { width: 100%; border-collapse: collapse; }
.single-product .woocommerce-tabs table.shop_attributes tr { border-bottom: 1px solid var(--st3-border); }
.single-product .woocommerce-tabs table.shop_attributes tr:nth-child(even) { background: var(--st3-soft-gray); }
.single-product .woocommerce-tabs table.shop_attributes th,
.single-product .woocommerce-tabs table.shop_attributes td { padding: 12px var(--st3-space-2); text-align: start; }

.single-product .related.products { grid-column: 1 / -1; margin-top: var(--st3-space-9); }
.single-product .related.products > h2 { font-size: var(--st3-text-xl); margin-bottom: var(--st3-space-5); }

@media (max-width: 1024px) {
  .single-product div.product { grid-template-columns: 1fr; }
}

/* Sticky mobile purchase bar */
.st3-sticky-buy { display: none; }
@media (max-width: 768px) {
  .st3-sticky-buy:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between; gap: var(--st3-space-3);
    position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
    padding: var(--st3-space-3) var(--st3-space-4);
    background: var(--st3-white); border-top: 1px solid var(--st3-border);
    box-shadow: 0 -8px 24px -12px rgba(21,21,21,.15);
  }
  .st3-sticky-buy__info { display: flex; flex-direction: column; min-width: 0; }
  .st3-sticky-buy__title { font-size: var(--st3-text-sm); color: var(--st3-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .st3-sticky-buy__price { font-weight: 700; color: var(--st3-red); }
}

/* ============================================================
   CART & CHECKOUT (WooCommerce Blocks)
   ============================================================ */
.wc-block-cart, .wc-block-checkout { font-family: var(--st3-font); }
.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img { border-radius: var(--st3-radius-sm); background: var(--st3-soft-gray); }
.wc-block-components-product-name { color: var(--st3-ink); font-weight: 600; }
.wc-block-components-totals-item__value,
.wc-block-components-product-price { color: var(--st3-ink); }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { color: var(--st3-red); font-weight: 700; font-size: var(--st3-text-lg); }

.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-components-button.wp-element-button:not(.is-link),
#place_order {
  background: var(--st3-dark) !important;
  border-color: var(--st3-dark) !important;
  color: var(--st3-white) !important;
  border-radius: var(--st3-radius) !important;
  font-family: var(--st3-font) !important;
  font-weight: 700 !important;
}
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
#place_order:hover { background: var(--st3-red) !important; border-color: var(--st3-red) !important; }

.wc-block-components-panel__button,
.wc-block-checkout__form h2,
.cart-collaterals h2 { font-family: var(--st3-font); }

.woocommerce-cart-form table.shop_table,
.woocommerce-checkout table.shop_table { border-collapse: collapse; width: 100%; }
.woocommerce-cart-form table.shop_table th { text-align: start; padding: var(--st3-space-3); border-bottom: 2px solid var(--st3-border); font-size: var(--st3-text-sm); color: var(--st3-muted); }
.woocommerce-cart-form table.shop_table td { padding: var(--st3-space-3); border-bottom: 1px solid var(--st3-border); vertical-align: middle; }
.woocommerce-cart-form .product-thumbnail img { width: 64px; border-radius: var(--st3-radius-sm); background: var(--st3-soft-gray); }
.woocommerce-cart-form .quantity input { width: 60px; padding: 8px; border: 1px solid var(--st3-border); border-radius: var(--st3-radius-sm); text-align: center; }
.woocommerce-cart-form .product-remove a { color: var(--st3-muted); font-size: 20px; }
.woocommerce-cart-form .product-remove a:hover { color: var(--st3-red); }
.cart-collaterals .cart_totals { max-width: 420px; margin-inline-start: auto; }
.cart_totals table.shop_table th { color: var(--st3-body); font-weight: 600; }
.cart_totals table.shop_table td { text-align: end; font-weight: 700; }
.wc-proceed-to-checkout a.checkout-button {
  display: block; text-align: center; padding: var(--st3-space-3);
  background: var(--st3-dark); color: var(--st3-white); border-radius: var(--st3-radius); font-weight: 700; margin-top: var(--st3-space-3);
}
.wc-proceed-to-checkout a.checkout-button:hover { background: var(--st3-red); }

/* ============================================================
   ACCOUNT / AUTHENTICATION (classic WooCommerce templates)
   ============================================================
   WooCommerce's own woocommerce-layout.css floats .col-1/.col-2 (with
   an RTL override flipping the float direction) — fighting that with
   display:grid on the parent produced an unreliable layout (grid
   track sizes computed correctly, but children stayed float-positioned
   instead of becoming grid items in practice). Flexbox on the parent
   plus `!important` to cancel the inherited float is the robust fix:
   floats are simply irrelevant once the children are flex items, no
   float/grid interaction left to fight. */
#customer_login.col2-set {
  display: flex;
  align-items: flex-start;
  gap: var(--st3-space-8);
  max-width: 900px;
  margin-inline: auto;
  padding-block: var(--st3-space-7);
}
#customer_login .u-column1,
#customer_login .u-column2 {
  float: none !important;
  width: 50% !important;
  background: var(--st3-white);
  border: 1px solid var(--st3-border);
  border-radius: var(--st3-radius-lg);
  padding: var(--st3-space-6);
}
#customer_login h2 { font-size: var(--st3-text-lg); margin-bottom: var(--st3-space-5); }
#customer_login .u-column2 p:first-of-type { color: var(--st3-muted); font-size: var(--st3-text-sm); margin-bottom: var(--st3-space-4); }

.woocommerce-form-row { margin-bottom: var(--st3-space-3); }
.woocommerce-form-row label { display: block; font-weight: 600; font-size: var(--st3-text-sm); margin-bottom: 6px; }
.woocommerce form .woocommerce-Input,
.woocommerce-checkout .input-text,
.woocommerce-checkout select { width: 100%; padding: 11px 14px; border: 1px solid var(--st3-border); border-radius: var(--st3-radius); font-family: var(--st3-font); }
.woocommerce form .woocommerce-Button,
.woocommerce form button.button {
  width: 100%; padding: 12px var(--st3-space-4); background: var(--st3-dark); color: var(--st3-white) !important;
  border: none; border-radius: var(--st3-radius); font-weight: 700; cursor: pointer;
}
.woocommerce form .woocommerce-Button:hover, .woocommerce form button.button:hover { background: var(--st3-red); }
.woocommerce-LostPassword { margin-top: var(--st3-space-3); font-size: var(--st3-text-sm); text-align: center; }

@media (max-width: 768px) {
  #customer_login.col2-set { flex-direction: column; }
  #customer_login .u-column1,
  #customer_login .u-column2 { width: 100% !important; }
}

/* ---------- My Account dashboard (logged in) ---------- */
.woocommerce-account .woocommerce {
  display: flex;
  align-items: flex-start;
  gap: var(--st3-space-8);
  padding-block: var(--st3-space-6) var(--st3-space-9);
}
.woocommerce-account .woocommerce-MyAccount-navigation {
  float: none !important;
  width: 260px !important;
  flex: 0 0 260px;
}
.woocommerce-account .woocommerce-MyAccount-content {
  float: none !important;
  width: auto !important;
  flex: 1 1 auto;
  min-width: 0;
}
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--st3-border); border-radius: var(--st3-radius-lg); overflow: hidden; background: var(--st3-white); }
.woocommerce-MyAccount-navigation-link a {
  display: flex; align-items: center; gap: var(--st3-space-3);
  padding: var(--st3-space-3) var(--st3-space-4); font-weight: 600; font-size: var(--st3-text-sm);
  color: var(--st3-body); border-bottom: 1px solid var(--st3-border);
}
.woocommerce-MyAccount-navigation-link a::before {
  content: ""; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--st3-border); transition: background-color var(--st3-fast) var(--st3-ease);
}
.woocommerce-MyAccount-navigation-link:last-child a { border-bottom: none; }
.woocommerce-MyAccount-navigation-link a:hover { background: var(--st3-soft-gray); color: var(--st3-ink); }
.woocommerce-MyAccount-navigation-link--dashboard a,
.woocommerce-MyAccount-navigation-link.is-active a { color: var(--st3-red); background: var(--st3-soft-gray); }
.woocommerce-MyAccount-navigation-link--dashboard a::before,
.woocommerce-MyAccount-navigation-link.is-active a::before { background: var(--st3-red); }
.woocommerce-MyAccount-navigation-link--customer-logout a { color: var(--st3-muted); }
.woocommerce-MyAccount-content { font-size: var(--st3-text-base); color: var(--st3-body); line-height: var(--st3-leading-loose); }
.woocommerce-MyAccount-content > p:first-child { font-size: var(--st3-text-lg); font-weight: 700; color: var(--st3-ink); margin-bottom: var(--st3-space-3); }
.account-orders-table th, .account-orders-table td { padding: var(--st3-space-2); }

@media (max-width: 768px) {
  .woocommerce-account .woocommerce { flex-direction: column; }
  .woocommerce-account .woocommerce-MyAccount-navigation { width: 100% !important; flex-basis: auto; }
}

/* WooCommerce core ships its own default notice styling underneath
   this — a blue #1e85be top border plus a matching blue icon-font
   glyph on ::before (both meant for its own default theme, not ours).
   Our border-inline-start below only added a second accent instead of
   replacing the first, so a stray blue bar/icon sat next to our real
   dark/red one. border:none here resets every side before the
   inline-start re-adds the one we actually want, and the icon is
   dropped rather than recolored — restrained text-only notices match
   the rest of the site (no icon-heavy WooCommerce default look). */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews {
  display: flex; align-items: center; gap: var(--st3-space-3); list-style: none;
  margin: 0 0 var(--st3-space-4); padding: var(--st3-space-3);
  background: var(--st3-soft-gray); border: none; border-inline-start: 3px solid var(--st3-dark);
  border-radius: var(--st3-radius-sm); font-size: var(--st3-text-sm); color: var(--st3-ink);
}
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before, .woocommerce-noreviews::before {
  display: none;
}
.woocommerce-error { border-inline-start-color: var(--st3-red); }
/* !important on both properties, not just color: WooCommerce's own
   `.woocommerce a.button` rule (an extra element-type selector) is
   more specific than a plain two-class selector and was winning the
   background alone, leaving our white text on ITS pale default
   background — unreadable. Forcing both together keeps them paired. */
.woocommerce-message .button, .woocommerce-info .button {
  order: 2; margin-inline-start: auto; flex-shrink: 0; width: auto;
  padding: 8px 18px; background: var(--st3-ink) !important; color: var(--st3-white) !important;
  border-radius: var(--st3-radius-sm); font-weight: 600; font-size: var(--st3-text-sm);
}

/* ============================================================
   INDUSTRY SOLUTION PAGE (taxonomy-industry.php)
   ============================================================
   A genuine editorial solution page, not an empty WooCommerce
   archive loop — real sector needs, real linked categories, real
   CTA. Reuses #primary.content-area's container width above. */
.st3-industry-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 280px;
  border-radius: var(--st3-radius-lg);
  overflow: hidden;
  margin-bottom: var(--st3-space-8);
  background: var(--st3-dark);
}
.st3-industry-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.st3-industry-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,15,15,.88) 0%, rgba(15,15,15,.35) 60%, rgba(15,15,15,.1) 100%);
}
.st3-industry-hero__body {
  position: relative;
  z-index: 1;
  padding: var(--st3-space-7);
  color: var(--st3-white);
  max-width: 720px;
}
.st3-industry-hero__eyebrow {
  display: block;
  font-size: var(--st3-text-xs);
  font-weight: 700;
  color: var(--st3-red);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: var(--st3-space-2);
}
.st3-industry-hero__body h1 { font-size: var(--st3-text-2xl); margin: 0 0 var(--st3-space-3); }
.st3-industry-hero__body p { font-size: var(--st3-text-base); color: rgba(255,255,255,.85); max-width: 56ch; }

.st3-industry-body { display: flex; flex-direction: column; gap: var(--st3-space-8); padding-bottom: var(--st3-space-9); }
.st3-industry-section h2 { font-size: var(--st3-text-xl); margin: 0 0 var(--st3-space-4); }
.st3-industry-section__sub { color: var(--st3-muted); margin: calc(var(--st3-space-4) * -1) 0 var(--st3-space-4); }

.st3-industry-needs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--st3-space-3); }
.st3-industry-needs li {
  display: flex;
  align-items: flex-start;
  gap: var(--st3-space-3);
  padding: var(--st3-space-4);
  background: var(--st3-surface);
  border-radius: var(--st3-radius);
  font-size: var(--st3-text-sm);
  color: var(--st3-body);
}
.st3-industry-needs__icon { flex-shrink: 0; width: 20px; height: 20px; color: var(--st3-red); margin-top: 2px; }

.st3-industry-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--st3-space-4); }
.st3-industry-cats__tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 1 / 1;
  border-radius: var(--st3-radius);
  overflow: hidden;
  background: var(--st3-soft-gray);
}
.st3-industry-cats__tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--st3-base-speed) var(--st3-ease);
}
.st3-industry-cats__tile:hover img { transform: scale(1.06); }
.st3-industry-cats__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,15,15,.8) 0%, transparent 60%);
}
.st3-industry-cats__label {
  position: relative; z-index: 1; padding: var(--st3-space-3);
  color: var(--st3-white); font-weight: 700; font-size: var(--st3-text-sm);
}

.st3-industry-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--st3-space-5);
  padding: var(--st3-space-6);
  background: var(--st3-dark);
  border-radius: var(--st3-radius-lg);
  color: var(--st3-white);
}
.st3-industry-cta__text h2 { margin: 0 0 var(--st3-space-2); font-size: var(--st3-text-lg); }
.st3-industry-cta__text p { margin: 0; color: rgba(255,255,255,.75); max-width: 56ch; font-size: var(--st3-text-sm); }
.st3-industry-cta__actions { display: flex; gap: var(--st3-space-3); flex-wrap: wrap; }

@media (max-width: 768px) {
  .st3-industry-hero { min-height: 220px; }
  .st3-industry-hero__body { padding: var(--st3-space-5); }
  .st3-industry-cats { grid-template-columns: repeat(2, 1fr); }
}
