/**
 * ============================================================================
 * CATALOGO.CSS - ESTILOS DA PÁGINA PÚBLICA DE CATÁLOGO
 * ============================================================================
 * 
 * Este arquivo contém estilos específicos para a página de catálogo público
 * (index.html). Inclui:
 * - Header com logo, busca e redes sociais
 * - Hero section com gradiente
 * - Filtros e ordenação
 * - Grid de produtos com cards
 * - Footer
 * - Estados vazios
 * - Responsividade mobile
 * 
 * Estrutura:
 * 1. Header
 * 2. Hero Section
 * 3. Filtros
 * 4. Produtos
 * 5. Footer
 * 6. Empty State
 * 7. Responsividade
 */

/* ============================================================================
 * 1. HEADER - CABEÇALHO DO CATÁLOGO
 * ============================================================================
 * Header sticky com logo, busca e links de redes sociais.
 */

.header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;             /* Fica fixo ao rolar */
  top: 0;
  z-index: 100;                 /* Acima de outros elementos */
  box-shadow: var(--shadow);
}

/* Conteúdo do Header - Flex para alinhar itens */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 0;
}

/* Seção da Logo e Nome */
.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo Imagem */
.logo {
  width: 50px;
  height: 50px;
  object-fit: contain;          /* Mantém proporção */
  border-radius: var(--radius);
}

/* Título da Logo */
.logo-section h1 {
  margin: 0;
  font-size: 1.25rem;
}

/* Slogan/Tagline */
.slogan {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Ações do Header - Busca e Redes Sociais */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;                      /* Ocupa espaço disponível */
  max-width: 600px;
}

/* Input de Busca */
.search-input {
  flex: 1;                      /* Ocupa espaço disponível */
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

/* Container de Links Sociais */
.social-links {
  display: flex;
  gap: 0.5rem;
}

/* Ícone Social Individual */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--secondary);
  color: var(--text);
  text-decoration: none;
  font-size: 1.125rem;
  transition: all 0.2s ease;
}

.social-icon:hover {
  background: var(--primary);   /* Fica azul ao passar mouse */
  color: white;
}

/* ============================================================================
 * 2. HERO SECTION - SEÇÃO DESTACADA
 * ============================================================================
 * Hero com gradiente e animação de onda.
 */

.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;             /* Esconde onda que sai dos limites */
}

/* Pseudo-elemento para animação de onda */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* SVG de onda como background */
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.1)"/></svg>') repeat-x;
  background-size: 600px 120px;
  animation: wave 15s linear infinite;
}

/* Animação de onda */
@keyframes wave {
  0% { background-position: 0 0; }
  100% { background-position: 600px 0; }
}

/* Conteúdo do Hero - Acima da onda */
.hero-content {
  position: relative;
  z-index: 1;                   /* Acima da onda */
}

/* Título do Hero */
.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* Descrição do Hero */
.hero p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* ============================================================================
 * 3. FILTROS - SEÇÃO DE FILTROS E ORDENAÇÃO
 * ============================================================================
 * Filtros por categoria e ordenação de produtos.
 */

.filters-section {
  background: white;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

/* Container de Filtros */
.filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;              /* Quebra em múltiplas linhas */
  align-items: center;
}

/* Botão de Filtro */
.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;        /* Totalmente arredondado */
  background: white;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Filtro Ativo */
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Toolbar - Ordenação */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Select de Ordenação */
.sort-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

/* ============================================================================
 * 4. PRODUTOS - GRID E CARDS DE PRODUTOS
 * ============================================================================
 * Layout de produtos em grid responsivo com cards interativos.
 */

.produtos-section {
  padding: 2rem 0;
  /* Removido max-height e overflow-y para evitar 2 barras de rolagem */
}

/* Barra de rolagem para Chrome, Edge, Safari */
.produtos-section::-webkit-scrollbar {
  width: 10px;
}

.produtos-section::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.produtos-section::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.produtos-section::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

/* Card do Produto */
.product-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px); /* Sobe ligeiramente */
}

/* Imagem do Produto */
.product-image {
  width: 100%;
  aspect-ratio: 1;              /* Quadrado */
  object-fit: contain;          /* Mantém proporção */
  background: var(--secondary);
  padding: 1rem;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.product-image:hover {
  transform: scale(1.05);       /* Zoom ao passar mouse */
}

/* Wrapper da Imagem */
.product-image-wrapper {
  width: 100%;
  overflow: hidden;
}

/* Link da Imagem */
.product-image-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Imagem Indisponível - Overlay */
.product-image.unavailable::after {
  content: 'Indisponível';
  position: absolute;
  inset: 0;                     /* Cobre toda a imagem */
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Informações do Produto */
.product-info {
  padding: 1rem;
  flex: 1;                      /* Ocupa espaço disponível */
  display: flex;
  flex-direction: column;
}

/* Header do Produto - Categoria + Botão Favoritar */
.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Categoria do Produto */
.product-category {
  display: inline-block;
  background: #dbeafe;          /* Azul claro */
  color: #1e40af;               /* Azul escuro */
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  width: fit-content;
}

/* Nome do Produto */
.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;        /* Máximo 2 linhas */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Descrição do Produto */
.product-description {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;        /* Máximo 2 linhas */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Container de Preços */
.product-prices {
  margin-bottom: 0.75rem;
  space-y: 0.25rem;
}

/* Linha de Preço */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

/* Label do Preço */
.price-label {
  color: var(--text-light);
  font-size: 0.75rem;
}

/* Valor do Preço */
.price-value {
  font-weight: 700;
  color: var(--success);        /* Verde */
  font-size: 1.125rem;
}

/* Preço Shopee */
.price-value.shopee {
  color: #ee8000;               /* Laranja Shopee */
  font-size: 1rem;
}

/* Ações do Produto - Botões */
.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;             /* Fica no final do card */
}

/* Botões WhatsApp e Shopee */
.btn-whatsapp,
.btn-shopee {
  flex: 1;                      /* Divide espaço igualmente */
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

/* Botão WhatsApp - Verde */
.btn-whatsapp {
  background: #25d366;
}

.btn-whatsapp:hover {
  background: #1fad4f;
}

/* Botão Shopee - Laranja */
.btn-shopee {
  background: #ee8000;
}

.btn-shopee:hover {
  background: #d67a00;
}

/* ============================================================================
 * 5. FOOTER - RODAPÉ
 * ============================================================================
 * Rodapé com informações e links sociais.
 */

.footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 0.25rem 0;
  /*margin-top: 3rem;*/
  text-align: center;
}

/* Texto do Footer */
.footer p {
  margin: 0 0 1rem 0;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Container de Redes Sociais */
.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* Link Social do Footer */
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;           /* Circular */
  background: var(--secondary);
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.footer-social-link:hover {
  background: var(--primary);
  color: white;
}

/* ============================================================================
 * 6. EMPTY STATE - ESTADO VAZIO
 * ============================================================================
 * Mensagem quando não há produtos para exibir.
 */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

/* Ícone do Empty State */
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Título do Empty State */
.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Descrição do Empty State */
.empty-state p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* ============================================================================
 * 7. RESPONSIVIDADE
 * ============================================================================
 * Breakpoints para adaptar layout em telas menores.
 */

/* Tablets (até 768px) */
@media (max-width: 768px) {
  /* Header em coluna */
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  /* Ações ocupam toda a largura */
  .header-actions {
    width: 100%;
    max-width: none;
  }

  /* Hero menor */
  .hero h2 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  /* Grid 4 colunas em 2 */
  .grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  /* Filtros com scroll horizontal */
  .filters {
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .filter-btn {
    white-space: nowrap;
  }
}

/* Mobile (até 480px) */
@media (max-width: 480px) {
  /* Logo menor */
  .logo {
    width: 40px;
    height: 40px;
  }

  /* Título menor */
  .logo-section h1 {
    font-size: 1rem;
  }

  /* Esconde busca em mobile */
  .search-input {
    display: none;
  }

  /* Hero ainda menor */
  .hero h2 {
    font-size: 1.5rem;
  }

  /* Grid 2 colunas */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Botões em coluna */
  .product-actions {
    flex-direction: column;
  }

  .btn-whatsapp,
  .btn-shopee {
    width: 100%;
  }
}


/* ============================================================================
 * BOTÃO DE FAVORITAR
 * ============================================================================
 * Estilos para o botão de adicionar/remover favoritos nos cards de produtos
 */

.btn-favorito-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.btn-favorito-icon:hover {
  transform: scale(1.1);
}

.favorito-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.btn-favorito-icon.favorito-ativo .favorito-icon {
  filter: drop-shadow(0 0 4px rgba(220, 38, 38, 0.5));
}

/* Notificações de favorito */
.notificacao {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  animation: slideIn 0.3s ease;
}

.notificacao-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.notificacao-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.notificacao-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.notificacao.removendo {
  animation: slideOut 0.3s ease;
}
