/* ============================================================
   PRODUCTS PAGE CSS — products.css (Redesigned & Stunning)
   ============================================================ */

/* ── HERO ────────────────────────────── */
.products-hero {
  position: relative;
  padding: calc(var(--nav-h) + 80px) var(--page-pad) 120px;
  background: var(--ivory);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Background */
.ph-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(232, 160, 32, 0.03) 0%, transparent 60%);
  z-index: 0;
}

.ph-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 31, 61, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 31, 61, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 80% at 50% 30%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 30%, black 20%, transparent 80%);
  z-index: 0;
}

.ph-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.ph-label {
  display: inline-block;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 100px;
  background: rgba(232, 160, 32, 0.1);
  border: 1px solid rgba(232, 160, 32, 0.2);
  margin-bottom: 24px;
}

.ph-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.ph-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--teal), #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ph-desc {
  font-size: 20px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* Floating Abstract Orbs */
.ph-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  z-index: 1;
  animation: floatOrb 10s infinite alternate ease-in-out;
}

.ph-orb-1 {
  width: 200px; height: 200px;
  background: var(--teal);
  top: 10%; left: 15%;
}

.ph-orb-2 {
  width: 300px; height: 300px;
  background: #6366f1;
  bottom: -10%; right: 10%;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-30px) scale(1.1); }
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 56px;
  position: relative;
  z-index: 10;
}

.filter-btn {
  padding: 12px 28px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(250, 250, 247, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(15, 31, 61, 0.05);
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(135deg, var(--teal), #6366f1);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.3);
}

/* ── FEATURED PRODUCT ───────────────────────────────────── */
.featured-section {
  padding: 120px var(--page-pad);
  background: var(--ivory-2);
  position: relative;
  overflow: hidden;
}

/* Decorative background glowing orbs */
.featured-section::before {
  content: '';
  position: absolute;
  top: -200px;
  left: -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.featured-section::after {
  content: '';
  position: absolute;
  bottom: -300px;
  right: -200px;
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.featured-section .container {
  position: relative;
  z-index: 2;
}

.featured-section .section-label {
  color: var(--teal);
}

.featured-card {
  background: var(--ivory);
  border-radius: 40px;
  padding: 80px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s;
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 40px 80px rgba(15, 31, 61, 0.15);
  border-color: var(--teal);
}

.feat-label {
  display: inline-block;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(14, 165, 233, 0.15));
  color: #a5b4fc;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 100px;
  margin-bottom: 28px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.feat-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 900;
  background: linear-gradient(to right, var(--navy), var(--navy-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.feat-desc {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 48px;
  font-weight: 400;
}

.feat-stats {
  display: flex;
  gap: 40px;
}

.feat-stat {
  padding-left: 24px;
  border-left: 2px solid rgba(99, 102, 241, 0.5);
  position: relative;
}

/* Subtle glow on the line */
.feat-stat::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  opacity: 0;
  transition: opacity 0.3s;
}

.featured-card:hover .feat-stat::before {
  opacity: 1;
}

.feat-stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: var(--navy);
  display: block;
  letter-spacing: -1px;
}

.feat-stat-lbl {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-top: 4px;
  display: block;
}

/* Modules List inside Featured Card */
.feat-right {
  position: relative;
}

.modules-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.module-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--ivory);
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.module-row:hover {
  background: var(--ivory-3);
  transform: translateX(10px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 10px 30px rgba(15, 31, 61, 0.08);
}

.module-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ivory-2);
  border-radius: 16px;
  font-size: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(15,31,61,0.05);
  transition: transform 0.3s ease, background 0.3s;
}

.module-row:hover .module-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.1));
  transform: scale(1.1) rotate(5deg);
  border-color: rgba(14, 165, 233, 0.4);
}

.module-name {
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.module-sub {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}


/* ── PRODUCT GRID OVERHAUL ────────────────────────────────── */
.all-products-section {
  padding: 120px var(--page-pad);
  background: var(--ivory);
  position: relative;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 64px;
}

/* Premium Glass Cards */
.product-card {
  background: var(--ivory-2);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Gradient glow effect behind the card that activates on hover */
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(14, 165, 233, 0.05), rgba(232, 160, 32, 0.05));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
  pointer-events: none;
}

.product-card > * {
  position: relative;
  z-index: 1;
}

.product-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 30px 60px rgba(15, 31, 61, 0.15), 0 0 40px rgba(14, 165, 233, 0.05);
  border-color: var(--teal);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-type-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
}

.product-card-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.product-card-desc {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
  flex-grow: 1;
}

.product-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 24px;
}

.p-tag {
  background: var(--ivory);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.3s ease;
}

.product-card:hover .p-tag {
  background: var(--ivory-3);
  border-color: var(--teal);
  color: var(--navy);
}

/* Redesign the link button inside cards */
.product-card .btn-text {
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--border);
  transition: all 0.3s ease;
  margin-top: auto;
}

.product-card:hover .btn-text {
  color: var(--teal);
  border-bottom-color: var(--teal);
  transform: translateX(4px);
}

/* ── HORIZONTAL PRODUCT CARD VARIANT ──────────────────────── */
.product-card.horizontal {
  grid-column: 1 / -1; /* spans full width */
  flex-direction: row;
  align-items: center;
  gap: 60px;
  padding: 60px;
}

.product-card.horizontal::before {
  /* give the horizontal card a unique gradient glow */
  background: linear-gradient(135deg, rgba(232, 160, 32, 0.05), rgba(14, 165, 233, 0.05));
}

.horizontal .pc-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.horizontal .pc-right {
  flex: 0.8;
  display: flex;
  justify-content: flex-end;
}

.horizontal .pc-hero-img {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card.horizontal:hover .pc-hero-img {
  transform: rotate(0) scale(1.05);
}

.horizontal .product-card-desc {
  font-size: 18px;
  margin-bottom: 16px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1200px) {
  .featured-card {
    padding: 60px;
    gap: 40px;
  }
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .featured-card {
    grid-template-columns: 1fr;
  }
  
  .feat-right {
    order: 2;
  }
}

@media (max-width: 768px) {
  .featured-card {
    padding: 40px 32px;
  }
  
  .feat-title {
    font-size: 32px;
  }
  
  .feat-stats {
    flex-wrap: wrap;
    gap: 24px;
  }
  
  .product-card.horizontal {
    flex-direction: column;
    padding: 40px 32px;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .product-card {
    padding: 32px 24px;
  }
}