* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f6f8;
  color: #222;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a2e;
  color: white;
  padding: 14px 20px;
}
.topbar .logo { color: white; text-decoration: none; font-weight: 700; font-size: 18px; }
.topbar nav a {
  color: #ddd;
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
  font-weight: 600;
}
.topbar nav a:hover { color: white; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  cursor: pointer;
}
.filter-btn.active { background: #ff4757; border-color: #ff4757; color: white; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.product-card {
  background: white;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}
.product-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-2px); }
.product-card.featured { border: 2px solid #ffb400; }
.product-card .thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #f0f0f0; }
.product-card .p-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .p-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .p-price { font-size: 15px; font-weight: 800; color: #ff4757; }
.product-card .p-price .discount { font-size: 12px; margin-right: 4px; background: #ff4757; color: white; padding: 2px 5px; border-radius: 3px; }
.product-card .p-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #888; margin-top: auto; }
.badge { font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: 700; }
.badge.coupang { background: #fff0f0; color: #dd0000; }
.badge.naver { background: #e9f9ec; color: #03c75a; }
.badge.toss { background: #eef2ff; color: #1b64da; }
.empty { text-align: center; color: #999; padding: 60px 0; font-size: 14px; }

.form-box { background: white; border: 1px solid #eee; border-radius: 10px; padding: 24px; max-width: 480px; margin: 0 auto; }
.form-box h1 { font-size: 18px; margin: 0 0 18px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #333; }
.form-group input, .form-group select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.form-group .hint { font-size: 11px; color: #999; margin-top: 4px; }
.form-box button[type="submit"] {
  width: 100%;
  padding: 11px;
  background: #ff4757;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}
.alert { padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.alert.error { background: #fdecea; color: #b3261e; }
.alert.success { background: #e6f7ea; color: #1b7a3b; }

table.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; font-size: 13px; }
table.admin-table th, table.admin-table td { padding: 8px 10px; border-bottom: 1px solid #eee; text-align: left; }
table.admin-table th { background: #fafafa; font-size: 12px; color: #666; }
table.admin-table tr.banned { background: #fff5f5; }
.mini-btn { padding: 4px 9px; font-size: 11px; border-radius: 4px; border: 1px solid #ddd; background: white; cursor: pointer; }
.mini-btn.danger { color: #dd0000; border-color: #f3c2c2; }
h2.section-title { font-size: 15px; margin: 28px 0 10px; }
