/* ==========================================
   ZENMOAT — Catalog Styles (catalog.html)
   ========================================== */

/* === HERO === */
.hero {
  text-align: center;
  padding: 72px 32px 64px;
  border-bottom: 2px solid #111;
}
.hero-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #999;
  margin-bottom: 24px;
}
.hero-h1 {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 14px;
  color: #666;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* === FILTER BAR === */
.filter-bar {
  position: sticky;
  top: 52px;
  z-index: 90;
  background: #f5f5ef;
  border-bottom: 2px solid #111;
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  color: #888;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  margin-bottom: -2px;
}
.filter-tab:hover   { color: #111; background: #efefea; }
.filter-tab.active  { color: #111; border-bottom: 3px solid #111; background: #fff; }

/* === CATALOG === */
.catalog { padding: 48px 32px; }
.category { margin-bottom: 56px; }
.category:last-child { margin-bottom: 0; }

.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.category-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #bbb;
  white-space: nowrap;
  flex-shrink: 0;
}
.category-line { flex: 1; height: 1px; background: #ddd; }

/* App grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid #111;
}
.app-card {
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  cursor: default;
}
a.app-card { cursor: pointer; }
.app-card:nth-child(3n) { border-right: none; }
.app-card:hover { background: #111; }
.app-card:hover .card-icon,
.app-card:hover .card-name,
.app-card:hover .card-desc,
.app-card:hover .card-tags { color: #fff !important; }

.card-icon { font-size: 24px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.card-body { min-width: 0; }
.card-name {
  font-size: 13px;
  font-weight: 800;
  color: #111;
  margin-bottom: 4px;
  line-height: 1.3;
}
.card-name .soon {
  font-size: 10px;
  font-weight: 600;
  color: #bbb;
  margin-left: 4px;
}
.card-desc {
  font-size: 11px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 8px;
}
.card-tags {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ccc;
}
.app-card.coming-soon { opacity: 0.5; }

/* Remove bottom border from last row of each grid (3-card grids: single row) */
.grid-finance .app-card                      { border-bottom: none; }
.grid-compliance .app-card                  { border-bottom: none; }
.grid-operations .app-card                  { border-bottom: none; }
.grid-hr .app-card                          { border-bottom: none; }
.grid-customer .app-card                    { border-bottom: none; }
.grid-intelligence .app-card               { border-bottom: none; }

/* grid-sme has 4 cards on a 3-col grid (row 1: 3 cards, row 2: 1 card) —
   row 1 needs a bottom border to separate from row 2, row 2 (last) doesn't. */
.grid-sme .app-card                         { border-bottom: 2px solid #111; }
.grid-sme .app-card:nth-child(n+4)          { border-bottom: none; }

/* === BOTTOM CTA === */
.bottom-cta {
  background: #111;
  padding: 56px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}
.cta-heading {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.2;
}
.cta-heading .dim { color: #888; }
.cta-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}
.btn-cta-white { padding: 11px 22px; }
.btn-cta-ghost { padding: 11px 18px; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .hero { padding: 48px 16px 40px; }
  .hero-h1 { font-size: 32px; letter-spacing: -2px; }

  .filter-bar { padding: 0 4px; }

  .catalog { padding: 32px 16px; }
  .app-grid { grid-template-columns: repeat(2, 1fr); }

  /* Reset 3-col, apply 2-col border rules */
  .app-card:nth-child(3n)  { border-right: 2px solid #111; }
  .app-card:nth-child(2n)  { border-right: none; }
  .app-card:last-child     { border-right: none; }

  /* Recalculate last-row bottom borders for 2-col layout (all 3-card grids) */
  .grid-finance .app-card,
  .grid-compliance .app-card,
  .grid-operations .app-card,
  .grid-hr .app-card,
  .grid-customer .app-card,
  .grid-intelligence .app-card,
  .grid-sme .app-card                        { border-bottom: 2px solid #111; }

  .grid-finance .app-card:nth-child(n+3),
  .grid-compliance .app-card:nth-child(n+3),
  .grid-operations .app-card:nth-child(n+3),
  .grid-hr .app-card:nth-child(n+3),
  .grid-customer .app-card:nth-child(n+3),
  .grid-intelligence .app-card:nth-child(n+3),
  .grid-sme .app-card:nth-child(n+3)          { border-bottom: none; }

  .bottom-cta {
    flex-direction: column;
    text-align: center;
    gap: 24px;
    padding: 40px 16px;
  }
  .cta-btns { flex-direction: column; width: 100%; }
  .btn-cta-white,
  .btn-cta-ghost { width: 100%; }
}
