:root {
  --bg: #faf8f5;
  --surface: #fff;
  --text: #2c2a26;
  --text-muted: #6b6560;
  --accent: #b86b4a;
  --accent-soft: #e8d5cc;
  --border: #e8e4df;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(44, 42, 38, 0.06);
  --shadow-hover: 0 8px 30px rgba(44, 42, 38, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.site-title {
  margin: 0;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.02em;
}

.site-subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 500;
}

.categories-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.category-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.category-btn:hover {
  color: var(--text);
  border-color: var(--accent-soft);
  background: var(--accent-soft);
}

.category-btn.active {
  color: var(--surface);
  background: var(--accent);
  border-color: var(--accent);
}

.category-btn .count {
  font-weight: 400;
  opacity: 0.85;
}

.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.product-image-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--white);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.product-name {
  margin: 0 0 0.5rem;
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}

.product-description {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  flex: 1;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.tag strong {
  font-weight: 500;
  color: var(--text);
}

.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.product-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  background: var(--surface);
  transition: background 0.2s, color 0.2s;
}

.product-link:hover {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}

.empty-state,
.error {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

.error {
  color: var(--accent);
}

.pix-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.pix-title {
  margin: 0 0 0.5rem;
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
}

.pix-description {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pix-key-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.pix-key-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-align: left;
}

.pix-key-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pix-key-value {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  padding: 0.5rem 0;
  background: var(--bg);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  word-break: break-all;
  color: var(--text);
  border: 1px solid var(--border);
}

.pix-copy-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--surface);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.pix-copy-btn:hover {
  background: #a35d3f;
}

.pix-copy-btn.copied {
  background: #5a8f5a;
}

.pix-key-holder {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: left;
}

@media (max-width: 600px) {
  .header {
    padding: 2rem 1rem 1.5rem;
  }

  .categories-nav {
    padding: 1rem;
  }

  .main {
    padding: 1.5rem 1rem 3rem;
  }

  .products-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}
