/* =============================================================================
 * Soukara — Product card meta chrome.
 *
 * The shared base/interaction rules for .sx-card, .sx-cimg, .sx-fav and .sx-add
 * live in storefront.css (each class fully defined in one place, next to its
 * hover/transition rules). This file holds only what is specific to the product
 * card's meta region and variants:
 *   - the image well + badge stack layout
 *   - the meta / price / rating layout
 *   - the .sx-fav positional modifiers and the .sx-rating internals
 *   - the dark-variant text-colour overrides
 *   - the .sx-cname .sx-link contextual override (a compound card selector,
 *     not a redeclaration of the global .sx-link)
 * ========================================================================== */

/* ---- Image well ---------------------------------------------------------- */
.sx-cwrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--slate-950);
  aspect-ratio: 4 / 5;
}
.sx-cmedia {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- Badge stack (top-left) --------------------------------------------- */
.sx-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  pointer-events: none;
}
.sx-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 5px;
  font-family: var(--font-mono);
  line-height: 1;
}

/* ---- Wishlist / quick-view positional modifiers ------------------------- */
.sx-fav--wish  { top: 10px; color: var(--clay-600); }
.sx-fav--quick { top: 54px; color: var(--slate-700); }
.sx-fav--wish.is-active { color: var(--clay-500); }

/* ---- Meta block ---------------------------------------------------------- */
.sx-cmeta { padding: 14px 2px 0; }
.sx-cmaker {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}
.sx-cname {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.12;
  margin: 5px 0 0;
  letter-spacing: -.01em;
}
.sx-cname .sx-link {
  text-decoration: none;
  color: var(--text-strong);
}

.sx-cfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

/* Price (WooCommerce get_price_html markup). */
.sx-cprice {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-strong);
}
.sx-cprice del {
  font-size: 12.5px;
  text-decoration: line-through;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  margin-left: 8px;
  font-weight: 400;
}
.sx-cprice ins {
  text-decoration: none;
  color: inherit;
}
.sx-cprice del .woocommerce-Price-amount { color: inherit; }

/* ---- Rating row ---------------------------------------------------------- */
.sx-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.sx-star {
  display: block;
  fill: none;
  stroke: var(--sand-300);
  stroke-width: 1.5px;
}
.sx-star.is-on {
  fill: var(--amber-500);
  stroke: var(--amber-500);
}
.sx-rating__count {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* =============================================================================
 * Dark variant (on-sale dark band) — text colours only.
 * Mirrors the handoff renderVals(): name→cream, maker→sand-300,
 * price→cream, compare (del) → rgba(white,.55), count hidden by PHP.
 * ========================================================================== */
.sx-card--dark .sx-cname .sx-link { color: var(--cream); }
.sx-card--dark .sx-cmaker         { color: var(--sand-300); }
.sx-card--dark .sx-cprice         { color: var(--cream); }
.sx-card--dark .sx-cprice ins     { color: var(--cream); }
.sx-card--dark .sx-cprice del,
.sx-card--dark .sx-cprice del .woocommerce-Price-amount { color: rgba(255, 255, 255, .55); }
