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

:root {
  --wine: #7a1e3c;
  --wine-dark: #4a1c2c;
  --bg: #f7f5f2;
  --text: #2b1b14;
}

body {
  font-family: 'Segoe UI', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

/* ---------- 상단 바 (검색/상세/스토리 공용) ---------- */
.topbar {
  background: #000;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-logo { height: 40px; display: block; }

.back-link { color: #ddd; font-size: 14px; }

.search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  flex: 1;
  max-width: 480px;
}

.search-bar input {
  flex: 1;
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  outline: none;
}

.search-bar button {
  border: none;
  background: var(--wine);
  color: #fff;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 15px;
}

/* ---------- 메인(홈) ---------- */
.hero {
  min-height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px 20px;
  text-align: center;
}

.hero-logo { max-width: 340px; width: 90%; }

.hero .search-bar { width: 100%; max-width: 460px; }

.menu-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 460px;
}

.menu-list a {
  background: var(--wine);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
}

.menu-list a:hover { background: #93254c; }

/* ---------- 검색결과 페이지 ---------- */
.result-info {
  padding: 16px 20px 0;
  color: #666;
  font-size: 14px;
}

.wine-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}

.wine-table th, .wine-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.wine-table th {
  background: var(--wine-dark);
  color: #fff;
  position: sticky;
  top: 0;
}

.wine-table tbody tr:hover { background: #f1e9ec; cursor: pointer; }

.wine-table .thumb {
  width: 44px; height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
}

.wine-table .empty { padding: 40px; color: #999; }

@media (max-width: 720px) {
  .wine-table { display: block; overflow-x: auto; }
}

/* ---------- 와인 상세 페이지 ---------- */
.wine-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
}

@media (max-width: 720px) {
  .wine-detail { grid-template-columns: 1fr; }
}

.wine-photo img {
  width: 100%;
  border-radius: 10px;
  background: #eee;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.wine-info .code { color: #999; font-size: 13px; margin-bottom: 4px; }
.wine-info h1 { font-size: 26px; margin-bottom: 4px; }
.wine-info .name-en { color: #777; margin-bottom: 12px; }
.wine-info .price { font-size: 22px; font-weight: bold; color: var(--wine); margin-bottom: 20px; }

.attr-list { list-style: none; border-top: 1px solid #eee; }
.attr-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}
.attr-list .label { color: #888; }
.attr-list .value { font-weight: 500; }

.location-box { margin-top: 24px; }
.location-label { font-size: 14px; color: #888; margin-bottom: 8px; }
.location-slots { display: flex; gap: 6px; }
.slot {
  width: 24px; height: 40px;
  border-radius: 4px;
  background: #e4dde0;
}
.slot.active { background: var(--wine); }

/* ---------- 스토리 페이지 ---------- */
.story-page { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; text-align: center; }
.story-hero.placeholder {
  font-size: 64px;
  background: var(--wine-dark);
  color: #fff;
  border-radius: 12px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.story-page h1 { font-size: 24px; margin-bottom: 20px; }
.placeholder-block {
  border: 1px dashed #ccc;
  border-radius: 8px;
  padding: 40px 20px;
  color: #999;
}
