/*
 * Sign America Storefront - catalog presentation.
 * Scoped to body.sa-storefront (shop + category pages) so nothing leaks.
 *
 * Look: the reference the owner picked - serif product names, small red
 * category caps, price right-aligned with its unit underneath, a terse spec
 * line, a full-width outlined "Configure & order" button, square image with
 * a badge top-left and a "+" circle bottom-right.
 */

:root {
  --sa-navy: #0A1628;
  --sa-red: #C8102E;
  --sa-ink: #1b2432;
  --sa-muted: #6b7280;
  --sa-line: #e5e7eb;
  --sa-serif: Georgia, "Times New Roman", "Source Serif Pro", serif;
}

/* ---------- The theme's hover action bar (cart / wishlist / blank circle) ---------- */
body.sa-storefront .product-wrapper .product-action,
body.sa-storefront .product-wrapper .yith-wcwl-add-to-wishlist,
body.sa-storefront .product-wrapper .pinterest-for-woocommerce-image-wrapper { display: none !important; }

/* The theme's own "Showing all N results" + "Default sorting" row - replaced by the bar */
body.sa-storefront .woocommerce-result-count,
body.sa-storefront form.woocommerce-ordering,
body.sa-storefront .product-area .shop-top-bar,
body.sa-storefront .product-area .product-sorting { display: none !important; }

/* ---------- Heading + filter bar ---------- */
body.sa-storefront .sa-sf-head { margin: 8px 0 22px; }
body.sa-storefront .sa-sf-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sa-red); margin-bottom: 10px; }
body.sa-storefront .sa-sf-title-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
body.sa-storefront .sa-sf-h {
  font-family: var(--sa-serif); font-weight: 500; font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.05; color: var(--sa-navy); margin: 0; letter-spacing: -.01em; }
body.sa-storefront .sa-sf-sub {
  max-width: 420px; margin: 0 0 6px; color: var(--sa-muted); font-size: 14px; line-height: 1.5; text-align: right; }

body.sa-storefront .sa-sf-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 26px; padding: 14px 0; border-top: 1px solid var(--sa-line); border-bottom: 1px solid var(--sa-line); }
body.sa-storefront .sa-sf-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
body.sa-storefront .sa-sf-tab {
  display: inline-block; padding: 9px 14px; border-radius: 4px; font-size: 12px; font-weight: 800;
  letter-spacing: .02em; color: var(--sa-ink); text-decoration: none; line-height: 1;
  transition: background .15s, color .15s; }
body.sa-storefront .sa-sf-tab:hover { background: #f3f4f6; color: var(--sa-navy); }
body.sa-storefront .sa-sf-tab.is-active { background: var(--sa-navy); color: #fff; }
body.sa-storefront .sa-sf-right { display: flex; align-items: center; gap: 14px; }
body.sa-storefront .sa-sf-count { font-size: 12px; color: var(--sa-muted); }
body.sa-storefront .sa-sf-sort {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-weight: 700;
  font-size: 13px; color: var(--sa-ink); padding: 6px 22px 6px 6px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%231b2432' stroke-width='1.6'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center; }

/* ---------- Product cards ---------- */
body.sa-storefront .product-wrapper.product { text-align: left !important; margin-bottom: 44px; }
body.sa-storefront .product-wrapper .product__img {
  position: relative; overflow: hidden; border-radius: 4px; background: #f3f4f6; }
body.sa-storefront .product-wrapper .product__img img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; border-radius: 4px;
  transition: transform .5s ease; }
body.sa-storefront .product-wrapper:hover .product__img img { transform: scale(1.03); }

/* "+" circle, bottom-right of the image (decorative - the whole image is the link) */
body.sa-storefront .product-wrapper .product__img::after {
  content: "+"; position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px;
  border-radius: 50%; background: #fff; color: var(--sa-navy); font-size: 22px; font-weight: 600;
  line-height: 38px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.18); pointer-events: none; }

/* badge, top-left */
body.sa-storefront .sa-sf-badge {
  position: absolute; left: 12px; top: 12px; z-index: 2; background: #fff; color: var(--sa-navy);
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 10px; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.12); }

body.sa-storefront .product-wrapper .product__content { padding-top: 14px !important; text-align: left !important; }
body.sa-storefront .sa-sf-cat {
  font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sa-red); margin-bottom: 6px; }
body.sa-storefront .sa-sf-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
body.sa-storefront .sa-sf-row .woocommerce-loop-product__title,
body.sa-storefront .sa-sf-row h4.pro-title,
body.sa-storefront .sa-sf-row h4.pro-title a {
  font-family: var(--sa-serif) !important; font-weight: 500 !important; font-size: 20px !important; line-height: 1.25;
  color: var(--sa-navy); margin: 0; flex: 1 1 auto; letter-spacing: 0; }
body.sa-storefront .sa-sf-row h4 a { color: inherit; text-decoration: none; }
body.sa-storefront .sa-sf-row h4 a:hover { color: var(--sa-red); }
body.sa-storefront .sa-sf-price { flex: 0 0 auto; text-align: right; }
body.sa-storefront .sa-sf-price .price {
  display: flex; flex-direction: column; align-items: flex-end;
  font-size: 17px; line-height: 1.1; margin: 0; }
body.sa-storefront .sa-sf-price .price,
body.sa-storefront .sa-sf-price .price .woocommerce-Price-amount,
body.sa-storefront .sa-sf-price .price bdi,
body.sa-storefront .sa-sf-price .price .woocommerce-Price-currencySymbol {
  color: var(--sa-navy) !important; font-weight: 800 !important; }
body.sa-storefront .sa-sf-price .price del { display: none; }
body.sa-storefront .sa-sf-price .price ins { text-decoration: none; }
/* the theme prints "/ sq ft" after the amount - make it the small line under the price */
body.sa-storefront .sa-sf-price .price > *:not(.woocommerce-Price-amount):not(ins):not(del),
body.sa-storefront .sa-sf-price .price .sa-unit { font-size: 10px; font-weight: 600; color: var(--sa-muted); margin-top: 3px; }
body.sa-storefront .sa-sf-spec { font-size: 11px; color: var(--sa-muted); margin-top: 8px; letter-spacing: .01em; }

body.sa-storefront .sa-sf-cta {
  display: flex; align-items: center; justify-content: space-between; margin-top: 16px;
  padding: 12px 16px; border: 1px solid var(--sa-line); border-radius: 2px; background: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--sa-navy); text-decoration: none;
  transition: border-color .15s, background .15s, color .15s; }
body.sa-storefront .sa-sf-cta span { font-size: 16px; line-height: 1; transition: transform .15s; }
body.sa-storefront .sa-sf-cta:hover { border-color: var(--sa-navy); background: var(--sa-navy); color: #fff; }
body.sa-storefront .sa-sf-cta:hover span { transform: translateX(3px); }

/* Hide any leftover theme add-to-cart / wishlist text links under the price */
body.sa-storefront .product-wrapper .product__content > a.button,
body.sa-storefront .product-wrapper .product__content .add_to_cart_button { display: none !important; }

/* The Extra Product Options plugin renders its whole option form ("Options
   Amount $0.00 / Final Total") inside the catalog loop. That belongs on the
   product page, not on a card. */
body.sa-storefront .product-wrapper .tc-after-shop-loop,
body.sa-storefront .product-wrapper .tm-has-options,
body.sa-storefront .product-wrapper form.cart { display: none !important; }

/* price unit printed by the theme */
body.sa-storefront .sa-sf-price .price .rp-unit { font-size: 10px; font-weight: 600; color: var(--sa-muted); margin-top: 3px; }
body.sa-storefront .sa-sf-price .price small:empty { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  body.sa-storefront .sa-sf-sub { text-align: left; }
}
@media (max-width: 575px) {
  body.sa-storefront .sa-sf-bar { gap: 10px; }
  body.sa-storefront .sa-sf-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  body.sa-storefront .sa-sf-tab { white-space: nowrap; }
  body.sa-storefront .sa-sf-right { width: 100%; justify-content: space-between; }
}
