:root {
  --orange: #f5701f;
  --bg: #0a1229;
  --bg-soft: #121f42;
  --text: #eef1fb;
  --text-soft: #98a2c4;
  --border: #243158;
  --danger: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #16234a 0%, var(--bg) 320px);
  line-height: 1.6;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 24px; }
.wrap-wide { max-width: 1080px; }
a { color: var(--orange); }

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
nav a, nav button {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  flex-shrink: 0;
  white-space: nowrap;
}
nav .brand { font-weight: 700; color: var(--orange); flex-shrink: 0; }
.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  margin-left: 16px;
}
nav .nav-cta {
  background: var(--orange);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
}
nav .nav-cta:hover { opacity: 0.9; }

/* 상품 페이지 전용: 좌측 카테고리 메뉴 + 우측 상품 그리드 */
.shop-layout { display: flex; gap: 32px; align-items: flex-start; }
.category-list {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.category-list button {
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
}
.category-list button:hover { background: var(--bg-soft); }
.category-list button.active { background: var(--orange); color: #fff; font-weight: 600; }
.shop-content { flex: 1; min-width: 0; }

h1 { font-size: 22px; }

.card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}
.product-card .thumb {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .thumb svg { width: 40%; height: 40%; }
.product-card .body { padding: 16px; }
.product-card .name { font-weight: 600; margin-bottom: 4px; }
.product-card .price { color: var(--text-soft); font-size: 14px; margin-bottom: 12px; }
.product-card button.primary { width: 100%; }

button.primary {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
}
button.primary:hover { opacity: 0.9; }

input, textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--text-soft); }
textarea { resize: vertical; }

.inquiry-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.inquiry-item:last-child { border-bottom: none; }
.inquiry-meta { font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.inquiry-message { margin-bottom: 12px; white-space: pre-wrap; }
.inquiry-reply-done {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.status-paid { color: var(--orange); font-weight: 600; }
.error { color: var(--danger); font-size: 14px; }
.muted { color: var(--text-soft); font-size: 14px; }

/* 모바일 화면 */
@media (max-width: 640px) {
  .wrap { padding: 16px; }
  nav { padding: 12px 16px; }
  .nav-links { gap: 10px; margin-left: 10px; }
  .shop-layout { flex-direction: column; gap: 16px; }
  .category-list {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .category-list button { flex: 1 1 auto; text-align: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card .body { padding: 12px 10px; }
  .product-card .name { font-size: 13px; }
  .product-card .price { font-size: 12px; }
  h1 { font-size: 19px; }
}
