/* =============================================
   Product Catalog – brand styles (LIGHT THEME)
   Navy #1E3A8A / Gold #C8960C | Mobile-first
   Mirrors /works/ sm:grid-cols-2 lg:grid-cols-3 gap-6
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #F5F5F7;
  color: #0F172A;
  min-height: 100vh;
}

/* ── Container ── */
.cat-wrap {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ── */
.cat-header {
  background: #ffffff;
  padding: 16px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(138, 106, 42, 0.18);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.cat-header .cat-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cat-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F172A;
}

.cat-back {
  color: #1E3A8A;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}

.cat-back:hover {
  color: #C8960C;
}

/* ── Grid ── */
.cat-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  padding-bottom: 48px;
}

@media (min-width: 640px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Card ── */
.cat-card {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 2px 12px rgba(15, 23, 42, 0.06);
  outline: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.cat-card:hover {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), 0 8px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

/* ── Thumbnail ── */
.cat-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}

.cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Badges overlaid on image ── */
.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 99px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge.oss {
  background: rgba(30, 58, 138, 0.88);
  color: #dbeafe;
}

.badge.saas {
  background: rgba(200, 150, 12, 0.92);
  color: #1a1200;
}

.status {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.80);
  color: #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ── Body below image ── */
.cat-body {
  flex: 1;
  min-height: 0;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-body h2 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tagline {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh {
  font-size: 0.75rem;
  color: #64748b;
}

/* ── Links ── */
.cat-link {
  display: inline-block;
  margin-top: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #C8960C;
  text-decoration: none;
  transition: color 0.15s;
}

.cat-link:hover {
  color: #8A6A2A;
}

.cat-link.disabled {
  color: #94a3b8;
  cursor: default;
}

/* ── Empty state ── */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #94a3b8;
  padding: 48px 0;
  font-size: 0.9375rem;
}
