@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --primary-color: #22c55e;
  --primary-hover: #16a34a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #38bdf8;
  --danger-color: #ef4444;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --border-radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  padding-bottom: 2rem;
}

header {
  padding: 2rem 1rem;
  text-align: center;
  background: linear-gradient(to bottom, #1e293b, #0f172a);
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-secondary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Filtros */
.filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.category-filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  border: 1px solid #334155;
  background-color: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.sort-select {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid #334155;
  outline: none;
}

/* Grid de Produtos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  border: 1px solid #334155;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.4);
}

.product-img-wrapper {
  position: relative;
  aspect-ratio: 1/1;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  border-radius: 30px;
  font-weight: 600;
  z-index: 10;
}

.badge-highlight { background-color: #eab308; color: #000; }
.badge-warning { background-color: #f97316; color: white; }
.badge-category { top: 10px; left: 10px; right: auto; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }

.product-info {
  padding: 1.2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.product-storage {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.product-battery {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.price-container {
  margin-top: auto;
}

.price-cash {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.2rem;
}

.price-installment {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 1rem;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  padding: 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease;
  width: 100%;
}

.whatsapp-btn:hover {
  background-color: var(--primary-hover);
}

/* Footer do Painel Admin */
.admin-login-link {
  display: block;
  text-align: center;
  margin-top: 4rem;
  color: #334155;
  text-decoration: none;
  font-size: 0.8rem;
}

.admin-login-link:hover {
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 600px) {
  header h1 { font-size: 1.8rem; }
  .filters { flex-direction: column; align-items: stretch; }
  .category-filters { overflow-x: auto; padding-bottom: 0.5rem; }
  .filter-btn { white-space: nowrap; }
}
