/* ── Reset & Base ──────────────────────────────────────────── */

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

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #faf7f4;
  color: #3a3a3a;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────── */

.site-header {
  background: #ffffff;
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-bottom: 1px solid #ece6df;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  color: #5c4033;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-tagline {
  margin-top: 0.35rem;
  font-size: 1.05rem;
  color: #8c7a6b;
  font-style: italic;
  white-space: nowrap;
}

/* ── Filter Bar ───────────────────────────────────────────── */

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1rem 0;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.filter-btn {
  padding: 0.35rem 0.85rem;
  border: 1.5px solid #d4ccc4;
  border-radius: 20px;
  background: #ffffff;
  color: #5c4033;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-btn.active {
  background: #5c4033;
  border-color: #5c4033;
  color: #ffffff;
}

.filter-btn-buy.active {
  background: #27ae60;
  border-color: #27ae60;
}

.filter-btn-skip.active {
  background: #e74c3c;
  border-color: #e74c3c;
}

/* ── Product Grid ─────────────────────────────────────────── */

.product-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* ── Product Card ─────────────────────────────────────────── */

.product-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.product-image-wrap {
  position: relative;
}

.product-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

/* ── Verdict Label ────────────────────────────────────────── */

.verdict {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.verdict-buy {
  background: #27ae60;
  color: #ffffff;
}

.verdict-skip {
  background: #e74c3c;
  color: #ffffff;
}

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

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #3a3a3a;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: #5c4033;
  margin-bottom: 1rem;
  white-space: nowrap;
}

.product-button {
  display: inline-block;
  margin-top: auto;
  text-align: center;
  padding: 0.65rem 1.25rem;
  background: #5c4033;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.product-button:hover {
  background: #7a5a48;
}

.product-date {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: #a89888;
  white-space: nowrap;
}

/* ── Empty State ──────────────────────────────────────────── */

.empty-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  font-size: 1.1rem;
  color: #a89888;
  font-style: italic;
}

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 1.75rem 1rem;
  font-size: 0.9rem;
  color: #8c7a6b;
  border-top: 1px solid #ece6df;
  background: #ffffff;
  white-space: nowrap;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 374px) {
  .site-header {
    padding: 1.5rem 0.75rem 1.25rem;
  }

  .site-title {
    font-size: 1.4rem;
  }

  .site-tagline {
    font-size: 0.85rem;
  }

  .product-grid {
    padding: 1rem 0.5rem;
    gap: 1rem;
  }

  .product-info {
    padding: 0.85rem;
  }

  .product-name {
    font-size: 0.85rem;
  }

  .product-price {
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
  }

  .product-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .verdict {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    top: 0.5rem;
    left: 0.5rem;
  }

  .site-footer {
    font-size: 0.75rem;
    padding: 1.25rem 0.75rem;
  }

  .filter-btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }

  .product-date {
    font-size: 0.65rem;
  }
}

@media (min-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem 2rem;
  }

  .site-title {
    font-size: 2.5rem;
  }
}
