/* ============================================================
   member_common.css — 会員システム共通スタイル v2
   テーマ: 明るく親しみやすい配色（オレンジブランド）
   モバイルファースト・レスポンシブ
   ============================================================ */

/* ---------- CSS 変数 ---------- */
:root {
  --primary:         #F97316;
  --primary-mid:     #FB923C;
  --primary-light:   #FED7AA;
  --primary-xlight:  #FFF7ED;
  --primary-dark:    #C2410C;
  --secondary:       #059669;
  --danger:          #DC2626;
  --danger-light:    rgba(220,38,38,.1);
  --success:         #16A34A;
  --success-light:   rgba(22,163,74,.1);
  --bg:              #FFFBF7;
  --bg-card:         #FFFFFF;
  --bg-muted:        #FFF7ED;
  --text-main:       #1C1917;
  --text-sub:        #57534E;
  --text-light:      #A8A29E;
  --border:          #E7E5E4;
  --border-focus:    #F97316;
  --shadow-sm:       0 1px 4px rgba(0,0,0,.07);
  --shadow:          0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:       0 8px 32px rgba(0,0,0,.13);
  --shadow-orange:   0 4px 20px rgba(249,115,22,.22);
  --radius:          8px;
  --radius-lg:       14px;
  --radius-pill:     999px;
  --font:            'Hiragino Kaku Gothic ProN', 'Meiryo', 'Yu Gothic', sans-serif;
  --transition:      .2s ease-out;
}

/* ---------- リセット・ベース ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
.main { flex: 1; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font); }

/* ---------- レイアウト ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- ヘッダー ---------- */
.m-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.m-header::after {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-mid) 40%, transparent 100%);
}
.m-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 12px;
}
.m-header__logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-decoration: none;
}
.m-header__logo:hover { text-decoration: none; opacity: .85; }
.m-header__logo span { font-size: .68rem; color: var(--text-light); font-weight: 400; }
.m-header__nav { display: flex; align-items: center; gap: 2px; }
.m-header__nav a {
  font-size: .875rem;
  color: var(--text-sub);
  padding: 5px 10px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.m-header__nav a:hover { background: var(--primary-xlight); color: var(--primary); text-decoration: none; }
.m-header__nav a.is-active {
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-xlight);
}
.m-header__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: var(--text-sub);
  white-space: nowrap;
}
.m-header__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #FFECD6);
  border: 1.5px solid var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: var(--primary-dark);
  flex-shrink: 0;
}

/* ---------- パンくず ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .8125rem;
  color: var(--text-light);
  padding: 10px 0;
}
.breadcrumb a { color: var(--text-sub); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb__sep { color: var(--border); }

/* ---------- ページタイトル ---------- */
.page-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.page-title__sub { font-size: .875rem; color: var(--text-sub); font-weight: 400; }

/* ---------- 検索フィルターパネル ---------- */
.search-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.search-panel__title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.search-panel__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.search-panel__actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- フォーム部品 ---------- */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-sub);
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-family: var(--font);
  color: var(--text-main);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
.form-control::placeholder { color: var(--text-light); }
.form-control--select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a8a29e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check-label { font-size: .9rem; color: var(--text-main); cursor: pointer; }

.form-radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
.form-radio { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.form-radio input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; }
.form-radio span { font-size: .9rem; }

/* ---------- アラート ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert-success { background: var(--success-light); border: 1px solid rgba(22,163,74,.3); color: var(--success); }
.alert-danger  { background: var(--danger-light);  border: 1px solid rgba(220,38,38,.3);  color: var(--danger); }
.alert-warning { background: var(--primary-xlight); border: 1px solid rgba(249,115,22,.3); color: var(--primary-dark); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  border: none;
  transition: background var(--transition), box-shadow var(--transition), transform .1s ease-out;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(249,115,22,.28);
}
.btn-primary:hover {
  background: #EA6C10;
  box-shadow: var(--shadow-orange);
  color: #fff;
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-xlight); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text-sub);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-muted); border-color: var(--primary-light); text-decoration: none; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: .8125rem; }
.btn-full { width: 100%; }

/* ---------- バッジ ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-primary { background: var(--primary-xlight); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-muted   { background: var(--bg-muted); color: var(--text-sub); border: 1px solid var(--border); }

/* ---------- 結果カウント・ソート ---------- */
.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.results-count { font-size: .9375rem; color: var(--text-sub); }
.results-count strong { color: var(--primary); font-size: 1.1rem; }
.results-sort { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--text-sub); }
.results-sort select {
  padding: 5px 28px 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  font-family: var(--font);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a8a29e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* ---------- 店舗カード ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.shop-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.shop-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}
.shop-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, #FED7AA 0%, #FEF3C7 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  color: var(--primary);
  flex-shrink: 0;
}
.shop-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.shop-card__category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .73rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-xlight);
  border: 1px solid rgba(249,115,22,.2);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  align-self: flex-start;
}
.shop-card__name { font-size: 1.0625rem; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.shop-card__catch { font-size: .8125rem; color: var(--text-sub); margin-bottom: 10px; }
.shop-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.shop-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .8125rem;
  color: var(--text-sub);
}
.shop-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #D97706;
  font-size: .9375rem;
}
.shop-card__stars { color: #FBBF24; letter-spacing: -2px; }
.shop-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.shop-card__price { font-size: .9rem; color: var(--text-sub); }
.shop-card__price strong { color: var(--text-main); font-size: 1rem; }
.shop-card__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  color: var(--text-sub);
  border: 1px solid var(--border);
}
.tag--primary { background: var(--primary-xlight); color: var(--primary-dark); border-color: rgba(249,115,22,.2); }

/* ---------- ページング ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination__btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text-sub);
  background: var(--bg-card);
  transition: all var(--transition);
}
.pagination__btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination__btn--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(249,115,22,.3);
}

/* ---------- 空状態 ---------- */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.empty-state__icon {
  font-size: 3.5rem;
  margin-bottom: 14px;
  display: block;
}
.empty-state__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}
.empty-state__text,
.empty-state__desc {
  font-size: .9rem;
  color: var(--text-sub);
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- フッター ---------- */
.m-footer {
  background: #1C1917;
  color: #78716C;
  text-align: center;
  padding: 28px 16px;
  margin-top: 64px;
  font-size: .8125rem;
  line-height: 1.9;
}
.m-footer a { color: #57534E; }
.m-footer a:hover { color: var(--primary); text-decoration: none; }

/* ---------- 画像プレースホルダー ---------- */
.img-placeholder {
  background-color: #F6EDE4;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(0,0,0,.02) 8px,
    rgba(0,0,0,.02) 16px
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #C9B4A0;
  flex-shrink: 0;
  position: relative;
}
.img-placeholder__icon { opacity: .5; }
.img-placeholder__label {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .08em;
}
.card-img-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

/* ---------- カードフッター ---------- */
.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card-footer__left { flex: 1; min-width: 0; }

/* ---------- ユーティリティ ---------- */
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-sub); }
.fw-bold     { font-weight: 700; }
.d-flex      { display: flex; }
.align-center { align-items: center; }
.gap-2       { gap: 8px; }

/* ---------- モバイル: ヘッダーナビ非表示（≤639px） ---------- */
@media (max-width: 639px) {
  .m-header__logo { font-size: .95rem; }
  .m-header__nav  { display: none; }
  .m-header__user span { display: none; }
}

/* ---------- 超小画面（≤399px） ---------- */
@media (max-width: 399px) {
  .search-panel__actions { flex-direction: column; }
  .search-panel__actions .btn { flex: none; width: 100%; }
}

/* ---------- タブレット以上（≥640px） ---------- */
@media (min-width: 640px) {
  .search-panel__grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid          { grid-template-columns: repeat(2, 1fr); }
  .shop-card { flex-direction: row; }
  .shop-card__img { width: 160px; height: auto; min-height: 140px; }
}

/* ---------- デスクトップ（≥1024px） ---------- */
@media (min-width: 1024px) {
  .container { padding: 0 32px; }
  .m-header__inner { height: 64px; }
  .m-header__logo { font-size: 1.2rem; }
  .search-panel__grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-card { flex-direction: column; }
  .shop-card__img { width: 100%; height: 200px; }
  .layout-main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
  }
  .search-panel { margin-bottom: 0; position: sticky; top: 80px; }
}
