/*
 * 酒蔵一覧（archive-brewery.php）
 *
 * 出典: docs/design_handoff_wordpress/reference/brewery-archive.html の <style> を逐語移植。
 * 色・余白・タイポは確定値。参照ごとに :root の値が異なるため統一しない。
 */

:root {
  --bg: #fbfaf7; --bg2: #f4f9fd; --bg3: #ffffff;
  --gold: #c8a060; --gold-dim: #a07840;
  --red: #e63329; --red-bright: #f04040;
  --text: #1a1a2e; --text-dim: #5a6a78;
  --border: rgba(90,140,180,0.22);
  --navy: #0d1929;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Noto Serif JP', serif; background: var(--bg); color: var(--text); line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.mono { font-family: 'Noto Sans JP', sans-serif; }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem; height: 64px;
  background: rgba(251,250,247,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo img { height: 30px; }
.nav-back {
  font-family: 'Noto Sans JP', sans-serif; font-size: 0.78rem; color: var(--text-dim);
  text-decoration: none; letter-spacing: 0.08em; display: flex; align-items: center; gap: 0.4rem; white-space: nowrap;
}
.nav-back:hover { color: var(--red); }

/* ─── HERO / SEARCH ─── */
#hero { padding: 9.5rem 2rem 3rem; text-align: center; }
.hero-eyebrow {
  font-family: 'Noto Sans JP', sans-serif; font-size: 0.72rem; letter-spacing: 0.4em;
  color: var(--gold-dim); text-transform: uppercase; font-weight: 600;
}
#hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 900; margin: 0.8rem 0 1.8rem; letter-spacing: 0.03em; }

.search-bar {
  max-width: 620px; margin: 0 auto 1.4rem; display: flex; align-items: center; gap: 0.6rem;
  border: 1.5px solid var(--text); border-radius: 30px; padding: 0.3rem 0.4rem 0.3rem 1.4rem; background: var(--bg3);
}
.search-bar svg { flex: none; color: var(--text-dim); }
.search-bar input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: 'Noto Sans JP', sans-serif; font-size: 0.92rem; padding: 0.7rem 0; color: var(--text);
}
.search-bar input::placeholder { color: #a8b0b8; }
.search-bar .clear-btn {
  background: none; border: none; color: var(--text-dim); font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.72rem; cursor: pointer; padding: 0.5rem 0.9rem; display: none;
  white-space: nowrap; flex-shrink: 0;
}
.search-bar .clear-btn.show { display: inline-block; }

.filter-row {
  max-width: 780px; margin: 0 auto; display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap;
}
.filter-select {
  font-family: 'Noto Sans JP', sans-serif; font-size: 0.78rem; color: var(--text);
  border: 1px solid var(--border); border-radius: 18px; padding: 0.5rem 1rem;
  background: var(--bg3); appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235a6a78'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2rem;
  white-space: nowrap; flex-shrink: 0;
}

/* ─── RESULT META ─── */
.result-meta {
  max-width: 1160px; margin: 2.2rem auto 1rem; padding: 0 2rem;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: 'Noto Sans JP', sans-serif; font-size: 0.78rem; color: var(--text-dim);
}
.result-meta strong { color: var(--text); font-size: 1rem; font-family: 'Noto Serif JP', serif; }
.result-meta .tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.result-meta .tag {
  background: rgba(200,160,96,0.14); color: var(--gold-dim); padding: 0.2rem 0.7rem; border-radius: 12px;
  display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; flex-shrink: 0;
}
.result-meta .tag button { border: none; background: none; color: var(--gold-dim); cursor: pointer; font-size: 0.85rem; line-height: 1; padding: 0; }

/* ─── GRID ─── */
#grid-section { padding: 0 2rem 5rem; }
.brew-grid {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.1rem;
}
.brew-card {
  display: block; text-decoration: none; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.brew-card:hover { border-color: var(--gold); box-shadow: 0 10px 28px -10px rgba(200,160,96,0.35); transform: translateY(-2px); }
.brew-card .img {
  height: 120px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg,#fffefb,#f7f2e8); padding: 1rem;
}
.brew-card .img img { max-width: 78%; max-height: 78%; object-fit: contain; }
.brew-card .body { padding: 0.9rem 1.1rem 1.1rem; border-top: 1px solid var(--border); }
.brew-card .pref {
  font-family: 'Noto Sans JP', sans-serif; font-size: 0.66rem; color: var(--gold-dim); letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.3rem;
}
.brew-card .pref::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.brew-card h3 { font-size: 1.02rem; font-weight: 800; letter-spacing: 0.02em; margin-bottom: 0.25rem; }
.brew-card .sake { font-family: 'Noto Sans JP', sans-serif; font-size: 0.74rem; color: var(--text-dim); line-height: 1.5; }

.empty-state {
  max-width: 1160px; margin: 3rem auto; text-align: center; padding: 3rem 2rem;
  font-family: 'Noto Sans JP', sans-serif; color: var(--text-dim); display: none;
}
.empty-state.show { display: block; }

/* ─── FOOTER ─── */
footer { background: var(--navy); color: #c9d3da; padding: 3rem 2rem; text-align: center; font-family: 'Noto Sans JP', sans-serif; font-size: 0.78rem; }
footer .fl { color: var(--gold); font-family: 'Noto Serif JP', serif; font-size: 1.1rem; letter-spacing: 0.2em; margin-bottom: 0.9rem; display: block; }

@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  #hero { padding: 8rem 1.2rem 2.4rem; }
  .filter-row { gap: 0.5rem; }
  .brew-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
}

/* ─────────────────────────────────────────────
 * WordPress 実装で足した分（確定値は上を変更していない）
 * ───────────────────────────────────────────── */

/* JS の card.hidden = true を効かせる。.brew-card は display:block を持つため。 */
.brew-card[hidden] { display: none !important; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
