/* ============================================================
   Home Office OS LLC — Products Page Styles
   Filter tabs, card grid, product cards, animations
   ============================================================ */

/* ════════════════════════════════════════
   PAGE HERO
   ════════════════════════════════════════ */

.products-hero {
  position: relative;
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-2xl);
  text-align: center;
  overflow: hidden;
}

/* Radial glow behind title */
.products-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(192, 57, 43, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.products-hero .container {
  position: relative;
  z-index: 1;
}

.products-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.products-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  line-height: var(--line-height-relaxed);
}

.products-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

/* ════════════════════════════════════════
   FILTER BAR
   ════════════════════════════════════════ */

.filter-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: rgba(12, 18, 34, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-primary);
  padding: var(--space-md) 0;
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.filter-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.filter-tab.active {
  color: white;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* ════════════════════════════════════════
   PRODUCT GRID
   ════════════════════════════════════════ */

.products-section {
  padding: var(--space-2xl) 0 var(--space-4xl);
  min-height: 60vh;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.products-empty {
  text-align: center;
  padding: var(--space-4xl) 0;
  color: var(--text-muted);
  font-size: var(--font-size-lg);
}

/* ════════════════════════════════════════
   PRODUCT CARD
   ════════════════════════════════════════ */

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-slow);
  position: relative;
  animation: card-enter 0.4s ease-out both;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-highlight);
}

/* Shine sweep on hover */
.product-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
  z-index: 5;
}

.product-card:hover::after {
  left: 150%;
  transition: left var(--transition-slower);
}

/* Staggered card entrance */
@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Card Header (category gradient) ── */
.product-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  color: white;
  position: relative;
  min-height: 64px;
}

.product-card-header.cat-taxtech   { background: var(--gradient-taxtech); }
.product-card-header.cat-regtech   { background: var(--gradient-regtech); }
.product-card-header.cat-insurtech { background: var(--gradient-insurtech); }
.product-card-header.cat-policy    { background: var(--gradient-policy); }
.product-card-header.cat-lifestyle { background: var(--gradient-lifestyle); }
.product-card-header.cat-global    { background: var(--gradient-global); }

.product-card-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card-icon {
  transform: scale(1.15) rotate(-5deg);
}

.product-card-header h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: white;
  flex: 1;
  line-height: var(--line-height-tight);
}

.product-card-status {
  font-size: var(--font-size-xs);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: var(--font-weight-medium);
}

/* ── Card Body ── */
.product-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-card-tagline {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

.product-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: var(--space-sm);
}

.product-card-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Card Footer ── */
.product-card-footer {
  border-top: 1px solid var(--border-primary);
  padding: 12px var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--color-primary-light);
  font-weight: var(--font-weight-medium);
}

.product-card-domain {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

.product-card-arrow {
  transition: transform var(--transition-fast);
}

.product-card:hover .product-card-arrow {
  transform: translateX(4px);
}

/* ── Maturity mini-bar on dev cards ── */
.product-card-maturity {
  margin-top: var(--space-sm);
}

.product-card-maturity-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.product-card-maturity-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), var(--color-success));
  transition: width 0.6s ease-out;
}

.product-card-maturity-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

/* ── Flagship card special treatment ── */
.product-card.flagship-card-special {
  border-color: rgba(192, 57, 43, 0.3);
  box-shadow: var(--shadow-glow-blue);
}

.product-card.flagship-card-special:hover {
  box-shadow: 0 10px 40px rgba(192, 57, 43, 0.2);
}

/* ════════════════════════════════════════
   MODAL ADDITIONS (product-specific)
   ════════════════════════════════════════ */

/* Country grid for global expansion */
.country-grid-section {
  margin-top: var(--space-md);
}

.country-grid-section h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-primary);
}

.country-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-lg);
}

.country-tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Modal maturity bar */
.modal-maturity {
  padding: 0 var(--space-xl) var(--space-md);
}

.modal-maturity-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
}

.modal-maturity-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.modal-maturity-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), var(--color-success));
  transition: width 0.8s ease-out;
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .products-hero {
    padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-lg);
  }

  .products-hero-title {
    font-size: var(--font-size-3xl);
  }

  .filter-bar {
    padding: var(--space-sm) 0;
  }

  .filter-tab {
    padding: 6px 14px;
    font-size: var(--font-size-xs);
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .products-section {
    padding: var(--space-lg) 0 var(--space-2xl);
  }
}

@media (max-width: 480px) {
  .products-hero-stats {
    flex-direction: column;
    align-items: center;
  }
}
