/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ===== CONTAINER PRINCIPAL ===== */
.container-principal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===========================================================
   BARRA DE FILTROS  —  busca (esquerda)  |  ordenar (direita)
   =========================================================== */
.filtros-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 60px;
  margin-bottom: 20px;
}

/* ===== BUSCA (esquerda, preenche o espaço) ===== */
.busca-box {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 600px;
  height: 48px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.busca-box:focus-within {
  border-color: #ff6600;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.busca-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  flex-shrink: 0;
  font-size: 15px;
  opacity: 0.45;
  transition: opacity 0.25s ease;
}

.busca-box:focus-within .busca-icon {
  opacity: 0.85;
}

.busca-box input {
  flex: 1;
  height: 100%;
  padding: 0 12px 0 0;
  border: none;
  outline: none;
  font-size: 14px;
  color: #1f2937;
  background: transparent;
  font-family: inherit;
}

.busca-box input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* ===== ORDENAR (direita) ===== */
.ordenar-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ordenar-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.ordenar-box select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #f9fafb;
  font-size: 14px;
  font-family: inherit;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.ordenar-box select:focus {
  outline: none;
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* ===== CATEGORIAS ===== */
.categorias {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 32px;
  padding: 16px 0;
  flex-wrap: wrap;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}

.cat {
  cursor: pointer;
  color: #6b7280;
  font-weight: 500;
  font-size: 13px;
  padding: 7px 18px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  background: #f3f4f6;
  transition: all 0.2s ease;
  user-select: none;
}

.cat:hover {
  color: #ff6600;
  background: #fff7ed;
  border-color: #fdba74;
}

.cat.active {
  color: #fff;
  background: #ff6600;
  font-weight: 600;
  border-color: #ff6600;
}

/* ===== GRID ===== */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

/* ===== CARD ===== */
.card {
  width: calc(33.333% - 24px);
  max-width: 380px;
  height: 420px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.04);
}

/* OVERLAY */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.25) 45%,
    rgba(0, 0, 0, 0.02) 100%
  );
}

/* CONTEÚDO */
.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 22px;
  color: #fff;
  z-index: 2;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 6px;
  font-weight: 700;
  line-height: 1.3;
}

/* PREÇO */
.preco-label {
  color: #fbbf24;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 2px;
}

.preco {
  font-size: 24px;
  font-weight: 800;
}

/* BOTÃO */
.btn {
  margin-top: 10px;
  display: inline-block;
  background: #ff6600;
  color: #fff;
  padding: 9px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  background: #e65c00;
  transform: translateY(-1px);
  color: #fff;
}

/* ===== SKELETON ===== */
.skeleton {
  background: #f3f4f6;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-card {
  height: 420px;
}

/* ===== ANIMAÇÃO FADE IN ===== */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
  .card {
    width: calc(50% - 14px);
  }
}

@media (max-width: 768px) {
  .card {
    width: 100%;
    max-width: 100%;
  }

  .filtros-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 30px;
  }

  .busca-box {
    max-width: 100%;
  }

  .ordenar-box {
    justify-content: flex-end;
  }

  .categorias {
    justify-content: center;
    gap: 6px;
  }

  .cat {
    font-size: 12px;
    padding: 6px 14px;
  }
}