/* ==========================================================================
   CATÁLOGO — CosméticoPro
   Integrado com a paleta de cores do styles.css
   Prefixo "cat-" nas classes para evitar conflito de seletores
   ========================================================================== */


/* ==========================================================================
   CONTAINER LOCAL
   ========================================================================== */

.cat-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ==========================================================================
   BOTÃO GENÉRICO DO CATÁLOGO
   ========================================================================== */

.cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cat-btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
}

.cat-btn--whatsapp:hover {
  background: var(--color-whatsapp-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-whatsapp);
}

.cat-btn--lg {
  padding: 16px 36px;
  font-size: 1rem;
}


/* ==========================================================================
   1. HERO — Área de busca
   ========================================================================== */

.cat-hero {
  position: relative;
  padding: 140px 0 60px;
  text-align: center;
  overflow: hidden;
  background: var(--color-dark);
}

.cat-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(232, 157, 64, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(248, 241, 157, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.cat-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--color-accent);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 24px;
}

.cat-hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800;
  color: var(--color-bg);
  line-height: 1.2;
  margin-bottom: 12px;
}

.cat-hero__title span {
  color: var(--color-accent);
}

.cat-hero__sub {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.6;
}


/* ==========================================================================
   2. BARRA DE BUSCA
   ========================================================================== */

.cat-search {
  position: relative;
  max-width: 640px;
  margin: 0 auto 28px;
}

.cat-search__icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color 0.3s ease;
}

.cat-search__input {
  width: 100%;
  padding: 18px 52px 18px 56px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--color-bg);
  outline: none;
  transition: all 0.3s ease;
}

.cat-search__input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.cat-search__input:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(232, 157, 64, 0.15);
}

.cat-search:focus-within .cat-search__icon {
  color: var(--color-accent);
}

.cat-search__clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.cat-search__clear.visible {
  display: flex;
}

.cat-search__clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}


/* ==========================================================================
   3. TAGS / SUGESTÕES RÁPIDAS
   ========================================================================== */

.cat-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-tags__label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

.cat-tag {
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cat-tag:hover,
.cat-tag.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-dark);
  font-weight: 600;
}


/* ==========================================================================
   4. SEÇÃO DE RESULTADOS
   ========================================================================== */

.cat-results {
  padding: 48px 0 60px;
  background: var(--color-bg-soft);
  min-height: 50vh;
}

.cat-results__header {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.cat-results__header.visible {
  display: flex;
}

.cat-results__count {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.cat-results__count strong {
  color: var(--color-text);
}

.cat-results__reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid var(--color-border);
  border-radius: 50px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cat-results__reset:hover {
  border-color: var(--color-dark);
  color: var(--color-dark);
}


/* ==========================================================================
   5. GRID
   ========================================================================== */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}


/* ==========================================================================
   6. CARD DE PRODUTO
   ========================================================================== */

.cat-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: catCardIn 0.4s ease forwards;
}

/* Stagger (delay escalonado nos cards) */
.cat-card:nth-child(1)  { animation-delay: 0s; }
.cat-card:nth-child(2)  { animation-delay: 0.05s; }
.cat-card:nth-child(3)  { animation-delay: 0.1s; }
.cat-card:nth-child(4)  { animation-delay: 0.15s; }
.cat-card:nth-child(5)  { animation-delay: 0.2s; }
.cat-card:nth-child(6)  { animation-delay: 0.25s; }
.cat-card:nth-child(7)  { animation-delay: 0.3s; }
.cat-card:nth-child(8)  { animation-delay: 0.35s; }
.cat-card:nth-child(9)  { animation-delay: 0.4s; }
.cat-card:nth-child(10) { animation-delay: 0.45s; }
.cat-card:nth-child(11) { animation-delay: 0.5s; }
.cat-card:nth-child(12) { animation-delay: 0.55s; }

@keyframes catCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

/* ── Imagem do card ── */
.cat-card__img {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: var(--color-bg-soft);
}

.cat-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cat-card:hover .cat-card__img img {
  transform: scale(1.05);
}

/* ── Badge de categoria ── */
.cat-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}

/* Cores das categorias usando paleta do site */
.cat-card__badge--tratamento   { background: var(--color-dark); }
.cat-card__badge--hidratacao   { background: var(--color-teal); }
.cat-card__badge--coloracao    { background: var(--color-primary-dark); }
.cat-card__badge--alisamento   { background: var(--color-secondary-dark); }
.cat-card__badge--finalizacao  { background: var(--color-green); }
.cat-card__badge--homecare     { background: var(--color-orange); }
.cat-card__badge--descoloracao { background: var(--color-primary-darker); }

/* ── Body do card ── */
.cat-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cat-card__name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.cat-card__line {
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.cat-card__line strong {
  color: var(--color-accent-dark);
}

.cat-card__desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  color: var(--color-text-light);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 16px;
}

/* ── CTA WhatsApp do card ── */
.cat-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 0;
  background: var(--color-whatsapp);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: auto;
}

.cat-card__cta:hover {
  background: var(--color-whatsapp-dark);
  box-shadow: var(--shadow-whatsapp);
}


/* ==========================================================================
   7. ESTADOS — Vazio e Inicial
   ========================================================================== */

.cat-empty,
.cat-initial {
  text-align: center;
  padding: 60px 20px;
}

.cat-empty {
  display: none;
}

.cat-empty__icon,
.cat-initial__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--color-text-muted);
}

.cat-empty h3,
.cat-initial h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.cat-empty p,
.cat-initial p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}


/* ==========================================================================
   8. CTA FINAL
   ========================================================================== */

.cat-cta {
  padding: 60px 0;
  background: var(--color-bg);
}

.cat-cta__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 48px;
  background: var(--gradient-hero);
  border-radius: 16px;
  border: 1px solid rgba(232, 157, 64, 0.1);
}

.cat-cta__text h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-bg);
  margin-bottom: 8px;
}

.cat-cta__text p {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  max-width: 480px;
}

.cat-cta__text strong {
  color: var(--color-accent);
}


/* ==========================================================================
   9. RESPONSIVO
   ========================================================================== */

@media (max-width: 768px) {
  .cat-hero {
    padding: 120px 0 48px;
  }

  .cat-search__input {
    padding: 16px 48px 16px 50px;
    font-size: 0.92rem;
  }

  .cat-tags {
    gap: 6px;
  }

  .cat-tag {
    font-size: 0.72rem;
    padding: 6px 12px;
  }

  .cat-results {
    padding: 32px 0 48px;
  }

  .cat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .cat-card__img {
    height: 160px;
  }

  .cat-card__body {
    padding: 14px 14px 16px;
  }

  .cat-card__name {
    font-size: 0.88rem;
  }

  .cat-card__desc {
    font-size: 0.78rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cat-card__cta {
    font-size: 0.78rem;
    padding: 9px 0;
  }

  .cat-cta__box {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .cat-results__header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .cat-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cat-card__img {
    height: 200px;
  }

  .cat-hero__badge {
    font-size: 0.65rem;
    padding: 6px 14px;
  }
}
