/* style.css - minimal */
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP"; margin:0; background:#f5f7fb; color:#222;}
.container { max-width:980px; margin:24px auto; padding:16px;}
h1 { margin:0 0 16px;}
.card { background:#fff; padding:14px; border-radius:8px; box-shadow:0 1px 4px rgba(0,0,0,0.05); margin-bottom:12px;}
.row { display:flex; gap:8px; align-items:center; margin-top:8px;}
.axis { display:flex; gap:8px; align-items:center; margin:8px 0;}
.axis label { width:70px; }
.product { display:flex; gap:12px; align-items:flex-start;}
.product img { width:140px; height:140px; object-fit:contain; border:1px solid #eee; padding:8px; background:#fff;}
.grid { display:flex; flex-wrap:wrap; gap:12px; margin-top:8px;}
.rakuten-card { width:180px; background:#fff; padding:8px; border-radius:6px; text-align:left; box-shadow:0 1px 3px rgba(0,0,0,0.06); }
.rakuten-card img { width:100%; height:120px; object-fit:cover; }
.muted { color:#666; font-size:0.9em;}
button { padding:8px 12px; border-radius:6px; border:1px solid #ccc; background:#fff; cursor:pointer;}
/* ============================== */
/* 🔐 ログイン画面レイアウト */
/* ============================== */

body.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-container {
  width: 320px;
  padding: 28px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  text-align: center;
}

.login-container input {
  width: 90%;
  padding: 10px;
  margin: 10px 0;
  font-size: 16px;
}

.login-container button {
  width: 95%;
  padding: 10px;
  margin-top: 10px;
}

.sub {
  background: #e6e6e6;
}
/* === 追加：中央寄せコンテナ === */
.main-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

/* 入力欄や見出しの幅を揃える */
.section {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
/* ===============================
   初期ロード時のチラつき防止
=============================== */

body.preload {
  visibility: hidden;
}

/* =========================
   厳選検索UI
========================= */
.search-wrapper {
  position: relative;
}

.search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

#searchPanels {
  display: none;          /* 初期は閉じる */
  gap: 12px;
  margin-top: 8px;
  align-items: flex-start;
}

#searchPanels.is-open {
  display: flex;          /* 開いたときだけ表示 */
}

#categoryArea,
#featuredArea {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  box-sizing: border-box;
}

#categoryArea {
  width: 180px;
}

#featuredArea {
  width: 360px;
}

#categoryArea button,
#featuredArea .featured-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px;
  border: none;
  background: #fff;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}

#categoryArea button:hover,
#featuredArea .featured-item:hover {
  background: #f5f5f5;
}

#featuredArea .featured-title {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #444;
}

/* =========================
   商品カード
========================= */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.product-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-image {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: #fff;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-body {
  padding: 10px;
}

.card-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
}

.card-price {
  font-size: 13px;
  color: #333;
  margin-bottom: 8px;
}

.card-summary {
  padding-left: 18px;
  margin: 0;
  font-size: 12px;
  color: #555;
}

/* =========================
   ビジョン補助リンク
========================= */
.vision-helper {
  font-size: 13px;
  margin-top: 8px;
  color: #666;
}

.vision-helper a {
  color: #2a5bd7;
  text-decoration: none;
}

.vision-helper a:hover {
  text-decoration: underline;
}

.history-link {
  margin-left: 12px;
  font-size: 14px;
  color: #2a5bd7;
  text-decoration: none;
}

.history-link:hover {
  text-decoration: underline;
}
