/* ======================================================
   DESIGN SYSTEM — Oferta das Fábricas v23
   Inclua este arquivo em todas as páginas de categoria
   ====================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #06060a;
  --surface: #0e0e14;
  --surface2: #141420;
  --gold: #c8a84b;
  --gold2: #e4cc85;
  --gold3: #f5e9b8;
  --gold-dim: rgba(200,168,75,.13);
  --gold-border: rgba(200,168,75,.22);
  --gold-glow: rgba(200,168,75,.35);
  --text: #f0ebe0;
  --muted: #7a7060;
  --line: rgba(255,255,255,.07);
  --green: #22c55e;
  --green-bg: rgba(34,197,94,.1);
  --green-border: rgba(34,197,94,.2);
  --red-bg: rgba(220,70,70,.12);
  --red-border: rgba(220,70,70,.22);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 14px 14px 80px;
  min-height: 100dvh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 500px at 50% -5%, rgba(200,168,75,.1) 0%, transparent 60%),
    radial-gradient(ellipse 400px 400px at -5% 60%, rgba(200,168,75,.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
.wrap { max-width: 980px; margin: 0 auto; position: relative; z-index: 1; }

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(6,6,10,.85);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 12px 16px;
  margin: -14px -14px 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

.h-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.h-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color .18s;
}
.h-back:hover { color: var(--gold2); }

.h-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold2);
  text-align: center;
}

.h-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 60px;
  text-align: right;
}

.search-bar {
  margin-top: 10px;
  position: relative;
}
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: .45;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input::placeholder { color: rgba(255,255,255,.22); }
.search-input:focus {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

/* ── GRADE DE CARDS ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

/* ── CARD DE FORNECEDOR ── */
.card {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,.055) 0%, rgba(255,255,255,.02) 100%);
  border: 1px solid var(--line);
  border-top-color: rgba(255,255,255,.1);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,.4);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(200,168,75,.25);
  box-shadow: 0 20px 56px rgba(0,0,0,.5), 0 0 0 1px rgba(200,168,75,.08);
}

/* Thumb do fornecedor */
.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: rgba(0,0,0,.4);
  overflow: hidden;
  position: relative;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: linear-gradient(135deg, rgba(200,168,75,.08), rgba(0,0,0,.3));
}

/* Corpo do card */
.card-body { padding: 14px; }

.card-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 5px;
  padding-right: 36px; /* espaço p/ fav btn */
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 13px;
}

/* Botões de ação */
.card-actions { display: grid; gap: 8px; }

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 13px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, filter .15s;
  text-decoration: none;
}
.btn-action:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn-action:active { transform: translateY(1px); }

.btn-insta {
  background: rgba(225,70,90,.12);
  border-color: rgba(225,70,90,.22);
  color: #ffb3be;
}
.btn-site {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: #a7f3c0;
}
.btn-secondary {
  background: rgba(255,255,255,.05);
  border-color: var(--line);
  color: var(--text);
}
.btn-gold {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold2);
}

/* Botão favorito */
.fav-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: rgba(6,6,10,.7);
  border: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
  transition: background .18s, border-color .18s, transform .15s;
  z-index: 2;
  backdrop-filter: blur(8px);
}
.fav-btn:hover { transform: scale(1.12); }
.fav-btn:active { transform: scale(.96); }
.fav-btn.active {
  background: rgba(200,168,75,.15);
  border-color: var(--gold-border);
}

/* ── PILLS / FILTROS ── */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 18px;
}
.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 99px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
  appearance: none;
  outline: none;
}
.pill:hover { border-color: rgba(200,168,75,.25); }
.pill.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold2);
}

/* ── SEÇÃO TÍTULO ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head h2::before {
  content: '';
  width: 3px; height: 18px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  display: block;
}

/* ── VOLTAR AO TOPO ── */
.to-top {
  position: fixed;
  right: 16px; bottom: 18px;
  z-index: 999;
  display: none;
  width: 46px; height: 46px;
  border-radius: 16px;
  background: rgba(14,14,20,.9);
  border: 1px solid var(--gold-border);
  box-shadow: 0 12px 36px rgba(0,0,0,.5);
  cursor: pointer;
  color: var(--gold2);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  transition: transform .18s;
}
.to-top:hover { transform: translateY(-2px); }
.to-top.show { display: flex; }

/* ── TOAST ── */
.toast {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  top: 14px;
  z-index: 10000;
  display: none;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid var(--green-border);
  background: rgba(6,12,8,.92);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
  white-space: nowrap;
}
.toast.show { display: block; animation: slideDown .3s cubic-bezier(.16,1,.3,1); }
@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  font-size: 14px;
}
.empty-state .empty-ico { font-size: 36px; display: block; margin-bottom: 10px; opacity: .5; }

/* ── RESPONSIVO ── */
@media (max-width: 600px) {
  body { padding: 12px 12px 72px; }
  .grid { grid-template-columns: 1fr; }
  .header { padding: 10px 14px; }
}
