/* ============================================================
   PRODUCT.CSS — Products Page Styles
   AI Tools Directory
   ============================================================ */

/* ── Hero Section ─────────────────────────────────────────── */
.product-hero {
  padding-top: var(--space-20);
  padding-bottom: var(--space-16);
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
  text-align: center;
  border-bottom: 1px solid var(--color-border-light);
}

/* Ambient Orbs [Same as Home] */
.hero__orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  filter: blur(80px);
  opacity: 0.15;
  border-radius: var(--radius-full);
}

.orb--1 {
  width: 400px;
  height: 400px;
  background: var(--color-primary);
  top: -100px;
  left: -100px;
  animation: orb-float 20s infinite alternate ease-in-out;
}

.orb--2 {
  width: 500px;
  height: 500px;
  background: #ec4899;
  bottom: -150px;
  right: -50px;
  animation: orb-float 25s infinite alternate-reverse ease-in-out;
}

.orb--3 {
  width: 300px;
  height: 300px;
  background: #8b5cf6;
  top: 50%;
  right: 15%;
  animation: orb-float 18s infinite alternate ease-in-out 2s;
}

@keyframes orb-float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 40px) scale(1.1); }
}

.product-hero__inner {
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-block;
  padding: var(--space-2) var(--space-5);
  background: rgba(99, 102, 241, 0.08);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  animation: fade-in-up 0.8s ease backwards;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: var(--weight-black);
  margin-bottom: var(--space-4);
  line-height: 1.1;
  animation: fade-in-up 0.8s ease backwards 0.2s;
}

.highlight {
  position: relative;
  color: var(--color-primary);
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 8%;
  left: 0;
  width: 100%;
  height: 0.2em;
  background: var(--color-primary);
  opacity: 0.15;
  z-index: -1;
  border-radius: var(--radius-full);
}

.hero__tagline {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  animation: fade-in-up 0.8s ease backwards 0.4s;
}

/* ── Product Search ───────────────────────────────────────── */
.product-search {
  max-width: 650px;
  margin-inline: auto;
  animation: fade-in-up 0.8s ease backwards 0.6s;
}

.product-search__bar {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-1);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.product-search__bar:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-xl);
  transform: translateY(-2px);
}

.product-search__icon {
  padding-left: var(--space-5);
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

.product-search__input {
  flex: 1;
  padding: var(--space-4) var(--space-5);
  border: none;
  background: none;
  font-size: var(--text-base);
  color: var(--color-text-primary);
  outline: none;
}

.product-search__input::placeholder {
  color: var(--color-text-muted);
}

/* ── Products Section ─────────────────────────────────────── */
.products-section {
  padding-block: var(--space-16) var(--space-20);
  background: var(--color-bg);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
  min-height: 200px;
}

/* ── Product Card ─────────────────────────────────────────── */
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: all var(--transition-base);
  border: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  height: auto;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.product-card__icon-wrap {
  width: 44px;
  height: 44px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.product-card:hover .product-card__icon-wrap {
  background: var(--color-primary);
}

.product-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: color var(--transition-base);
}

.product-card__icon svg {
  width: 20px;
  height: 20px;
}

.product-card:hover .product-card__icon {
  color: #fff;
}

.product-card__content {
  flex: 1;
  min-width: 0;
}

.product-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: 0;
  line-height: 1.3;
}



/* ── Loader & No Results ───────────────────────────────────── */
.grid-loader {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-20);
  color: var(--color-text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(99, 102, 241, 0.1);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.no-results {
  text-align: center;
  padding: var(--space-20) 0;
  grid-column: 1 / -1;
}

.no-results__content {
  max-width: 400px;
  margin-inline: auto;
}

.no-results__icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-4);
  opacity: 0.3;
}

.no-results h3 {
  margin-bottom: var(--space-2);
}

.no-results p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .product-hero {
    padding-top: var(--space-12);
    padding-bottom: var(--space-10);
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .product-card {
    padding: var(--space-6);
  }
}
