/* Shared product catalog cards — home + products list */

.stitch-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  margin-bottom: 0;
}

.stitch-catalog-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  height: 100%;
  border: 1px solid rgb(198 198 205 / 40%);
  background: var(--surface);
  border-radius: var(--radius, 4px);
  overflow: hidden;
  transition: border-color 0.22s ease;
}

.stitch-catalog-card:hover {
  border-color: rgb(15 23 42 / 22%);
}

.stitch-catalog-media {
  position: relative;
  margin: 0;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(ellipse 72% 58% at 50% 56%, #ffffff 0%, #eef1f5 100%);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgb(198 198 205 / 28%);
}

.stitch-catalog-media a {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
}

.stitch-catalog-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition: transform 0.45s ease;
}

.stitch-catalog-card:hover .stitch-catalog-media img {
  transform: scale(1.04);
}

.stitch-catalog-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 14px;
  padding: 20px 20px 24px;
  min-height: 0;
  background: var(--surface);
}

.stitch-catalog-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
}

.stitch-catalog-title-row h2 {
  margin: 0;
  font-size: var(--text-title);
  line-height: 1.2;
  letter-spacing: var(--tracking-title, -0.03em);
}

.stitch-catalog-title-row h2 a:hover {
  color: var(--brand-bronze);
}

.stitch-catalog-badge {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--brand-bronze, #8f5f42);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.stitch-catalog-tagline {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--lh-body);
  color: var(--muted);
}

.stitch-catalog-features-label {
  display: none;
}

.stitch-catalog-specs {
  margin: 0;
  border-top: 0;
}

.stitch-catalog-spec {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 0;
  font-size: var(--text-sm);
  line-height: 1.45;
}

.stitch-catalog-spec dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.stitch-catalog-spec dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stitch-catalog-meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.stitch-catalog-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.stitch-catalog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius, 4px);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.stitch-catalog-btn.is-quote {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 16px;
  background: var(--primary, #0b1219);
  border-color: var(--primary, #0b1219);
  color: #fff;
}

.stitch-catalog-btn.is-quote:hover {
  background: var(--brand-bronze, #8f5f42);
  border-color: var(--brand-bronze, #8f5f42);
  color: #fff;
}

.stitch-catalog-btn.is-cart {
  flex: 0 0 44px;
  width: 44px;
  padding: 0;
  background: var(--surface, #fff);
  border-color: rgb(17 26 36 / 14%);
  color: var(--ink, #0c1117);
}

.stitch-catalog-btn.is-cart:hover {
  border-color: var(--primary, #0b1219);
  color: var(--primary, #0b1219);
  background: var(--surface-low, #f4f5f7);
}

.stitch-catalog-btn.is-cart svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Legacy text-link style kept for product detail related rows */
.stitch-catalog-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: auto;
  padding-top: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  border-bottom: 1px solid rgb(15 23 42 / 25%);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
  background: none;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.stitch-catalog-link:hover {
  color: var(--brand-bronze);
  border-bottom-color: rgb(154 104 71 / 55%);
}

.stitch-catalog-empty {
  padding: 48px 0;
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
}

.stitch-catalog-empty a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stitch-catalog-empty a:hover {
  color: var(--brand-bronze);
}

.best-seller-marks {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.best-seller-deal {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 76px;
  padding: 12px 14px 14px;
  background: var(--brand-bronze, #8f5f42);
  color: #fff;
  border-radius: 0 0 0 var(--radius, 4px);
  text-align: center;
}

.best-seller-deal strong {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.best-seller-deal span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.88;
}

.best-seller-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  background: rgb(255 255 255 / 96%);
  border: 1px solid rgb(17 26 36 / 10%);
  border-radius: var(--radius, 4px);
  color: var(--ink, #0c1117);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

#bestsellers .stitch-catalog-card.is-bestseller:nth-child(1) .best-seller-deal,
#bestsellers .stitch-catalog-card.is-bestseller:nth-child(2) .best-seller-deal,
#bestsellers .stitch-catalog-card.is-bestseller:nth-child(3) .best-seller-deal {
  background: linear-gradient(160deg, #a56d48 0%, #8f5f42 55%, #734a32 100%);
}

@media (min-width: 768px) {
  .stitch-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1100px) {
  .stitch-catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .stitch-catalog-card {
    gap: 0;
  }

  .stitch-catalog-body {
    gap: 10px;
    padding: 12px 10px 16px;
  }

  .stitch-catalog-title-row h2 {
    font-size: 1rem;
  }

  .stitch-catalog-tagline,
  .stitch-catalog-spec {
    font-size: 14px;
  }
}
