/* --- 基本設定 --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Hiragino Sans", "Noto Sans CJK JP", "Original Yu Gothic", "Yu Gothic",
    sans-serif;
  color: #333;
  background-color: #fff;
  line-height: 1.5;
}

/* ▼▼▼ 追加：見出しの共通設定 ▼▼▼ */
h1,
h2,
h3 {
  font-weight: bold;
  color: #333;
  line-height: 1.4;
}

/* デフォルトのサイズ感（スマホ基準） */
h1 {
  font-size: 22px;
  margin-bottom: 10px;
}
h2 {
  font-size: 20px;
  margin-bottom: 15px;
}
h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
/* ▲▲▲ 追加ここまで ▲▲▲ */

.container {
  width: 100%;
  margin: 0 auto;
  max-width: 1024px;
  background-color: #fff;
}

/* --- ヘッダー (ソースBに合わせて調整) --- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.header-inner {
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-logo {
  display: block;
  width: 100px;
  height: auto;
}
.login-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  color: #666;
  cursor: pointer;
  text-decoration: none;
}
.login-link i {
  font-size: 16px;
  margin-bottom: 2px;
}

/* --- メインコンテンツ --- */
main {
  padding: 0 15px 40px;
}

/* 1. 店舗トップバナー */
.shop-top-header {
  margin-top: 15px;
  margin-bottom: 20px;
}

/* ▼ 修正: ページタイトルを少し大きく(16px->22px) */
.shop-page-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.banner-placeholder {
  width: 100%;
  aspect-ratio: 355 / 170;
  background-color: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.shop-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 2. メニューセクション共通 (横スクロール仕様) */
.menu-section {
  margin-bottom: 30px;
}

/* ▼ 修正: セクションタイトルを強調(16px->18px + 下線) */
.section-title {
  font-size: 18px;
  font-weight: bold;
  margin-top: 25px;
  margin-bottom: 12px;
  color: #333;
}

/* 横スクロールコンテナ */
.horizontal-scroll-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 15px;
  margin-right: -15px;
  padding-right: 15px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.horizontal-scroll-container::-webkit-scrollbar {
  display: none;
}

/* メニューカード (固定幅で横並び) */
.menu-card {
  flex: 0 0 140px;
  width: 140px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.menu-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
}
.menu-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 順位バッジ */
.rank-badge {
  position: absolute;
  top: 0;
  left: 5px;
  width: 20px;
  height: 25px;
  background-color: #eab336;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 4px;
  clip-path: polygon(0% 0%, 100% 0%, 100% 80%, 50% 100%, 0% 80%);
  z-index: 2;
}
.img-icon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
}

.menu-name {
  font-size: 12px;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.menu-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
}
.rating-wrap {
  font-size: 10px;
  color: #666;
}
.rating-wrap i {
  color: #ff9900;
  margin-right: 2px;
}
.menu-price {
  font-size: 12px;
  font-weight: bold;
  color: #333;
}

/* 3. エリア検索セクション */
.area-search-section {
  background-color: #f9f9f9;
  margin: 0 -15px 30px;
  padding: 20px 15px;
}

/* ▼ 修正: エリア検索タイトル調整 */
.area-search-title {
  font-size: 18px; /* 16->18px */
  font-weight: bold;
  margin-bottom: 15px;
}

.area-group {
  margin-bottom: 20px;
}
.area-group:last-child {
  margin-bottom: 0;
}
.area-group-title {
  font-size: 13px; /* 12->13px */
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* タグスタイル */
.area-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s;
}

.area-tag.inactive {
  background: #f0f0f0;
  border: 1px solid transparent;
  color: #aaa;
  pointer-events: none;
}

.area-tag.active {
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
}
.area-tag.active:hover {
  background-color: #eee;
}

/* 4. 店舗リストセクション */
.branch-section {
  margin-bottom: 40px;
}
.branch-region-wrapper {
  margin-bottom: 30px;
  padding-top: 20px;
  margin-top: -20px;
}
.branch-region-title {
  font-size: 16px; /* 14->16px */
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  margin-bottom: 0;
  background: #fff;
}
.branch-list {
  list-style: none;
}
.branch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.branch-info {
  flex: 1;
}
.branch-name {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
}
.branch-meta {
  font-size: 11px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 10px;
}
.branch-rating i {
  color: #ff4500;
  margin-right: 2px;
}
.branch-arrow {
  color: #aaa;
  font-size: 12px;
  margin-left: 10px;
}

/* 新設：メニュー全体の大見出し */
.menu-grand-title {
  font-size: 22px; /* 20->22px */
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #333;
  line-height: 1.4;
}

/* =========================================
    ここから：新宿区検索結果ページ用の追加CSS
    ========================================= */

/* カテゴリナビ */
/* (重複する基本リセット等は上の定義が適用されます) */

/* カテゴリナビ */
.category-nav {
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar {
  display: none;
}

.category-nav ul {
  display: flex;
  gap: 10px;
  list-style: none;
}

.category-nav a {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  font-weight: bold;
  background: #fff;
  transition: background-color 0.2s;
}
.category-nav a:hover {
  background-color: #f9f9f9;
}
.category-nav a i {
  margin-right: 5px;
  color: #777;
}

/* タイトルとフィルタ */
.page-header {
  margin-top: 15px;
  margin-bottom: 20px;
}

/* ▼ 修正: h1を18pxから22pxに統一 */
h1 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 8px;
  line-height: 1.4;
}

.result-count {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #666;
}

.area-filter-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.filter-buttons {
  display: flex;
  gap: 10px;
}
.filter-buttons button {
  flex: 1;
  padding: 10px;
  background: #fff;
  border: 1px solid #333;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.filter-buttons button:hover {
  background-color: #f0f0f0;
}

/* 店舗リスト (デフォルトは縦並び) */
.shop-list {
  display: block;
}

/* 店舗カード */
.shop-card {
  margin-bottom: 30px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding-bottom: 15px;
  overflow: hidden;
  position: relative; /* 内部要素の基準位置 */
  display: flex;
  flex-direction: column;
}

.shop-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 355 / 170;
  margin-bottom: 8px;
}

.placeholder-img {
  width: 100%;
  height: 100%;
  background-color: #888;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
}

.status-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  background: rgba(80, 80, 80, 0.95);
  color: #fff;
  font-size: 10px;
  padding: 4px 8px;
  border-top-right-radius: 4px;
}

.shop-info {
  padding: 0 10px;
  margin-bottom: 10px;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.shop-name {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.4;
}

.delivery-time {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  margin-left: 10px;
}

.shop-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.rating {
  font-weight: bold;
}
.rating i {
  color: #333;
  margin-right: 2px;
}
.review-count {
  color: #888;
  font-weight: normal;
  margin-left: 4px;
}

.delivery-fee {
  display: flex;
  align-items: center;
  gap: 5px;
}
.delivery-fee .strike {
  text-decoration: line-through;
  color: #aaa;
  font-size: 10px;
}

/* 商品カルーセル */
.product-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 10px 10px;
  margin-bottom: auto; /* ボタンを下端に押しやるために余白自動 */
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.product-carousel::-webkit-scrollbar {
  display: none;
}

.product-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  flex-shrink: 0;
  cursor: pointer;
}

.product-img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background-color: #ccc;
  margin-bottom: 5px;
  transition: transform 0.2s;
}
.product-item:hover .product-img {
  transform: scale(1.05);
}

.product-name {
  font-size: 10px;
  font-weight: bold;
  color: #333;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 他の店舗の簡易リスト（開閉パネル） */
.other-stores-panel {
  background-color: #f8f8f8;
  margin: 0 10px 10px;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.other-stores-title {
  font-size: 11px;
  font-weight: bold;
  color: #666;
  margin-bottom: 5px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 3px;
}

.other-stores-list {
  list-style: none;
}

.other-stores-list li {
  font-size: 12px;
  color: #333;
  padding: 3px 0;
  border-bottom: 1px dashed #eee;
}
.other-stores-list li:last-child {
  border-bottom: none;
}

/* ブランドリンクボタン */
.brand-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 0 10px;
  text-align: center;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  color: #666;
  font-size: 12px;
  transition: all 0.2s;
}
.brand-link:hover {
  background-color: #f5f5f5;
  color: #333;
}
.brand-link i {
  transition: transform 0.3s;
}

/* SEO・フッター */
.seo-section {
  margin-top: 30px;
}
.seo-section h3 {
  font-size: 18px; /* 16->18px */
  font-weight: bold;
  margin-bottom: 15px;
  border-bottom: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.tag-list li a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  font-size: 12px;
  font-weight: bold;
}

/* パンくずリスト */
.breadcrumbs {
  margin-top: 40px;
  padding: 20px 15px;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
  margin-left: -15px;
  margin-right: -15px;
}
.breadcrumbs ol {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 8px;
}
.breadcrumbs a,
.breadcrumbs span,
.breadcrumbs i {
  font-size: 10px;
  color: #888;
  text-decoration: none;
}

/* ==================================================
    追加：ランキングセクション用CSS
    ================================================== */
.ranking-section {
  margin-bottom: 30px;
}

.ranking-title {
  font-size: 18px; /* 維持(または20px) */
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}

/* 横スクロールエリア */
.ranking-scroll-wrapper {
  display: flex;
  overflow-x: auto;
  padding-bottom: 10px;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.ranking-scroll-wrapper::-webkit-scrollbar {
  display: none;
}
.ranking-scroll-wrapper {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ランキングカード */
.ranking-card {
  flex: 0 0 140px; /* カード幅固定 */
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s;
}
.ranking-card:hover {
  transform: translateY(-2px);
}

/* 順位バッジ */
.rank-badge {
  position: absolute;
  top: 0;
  left: 10px;
  width: 24px;
  height: 32px;
  background-color: #eab336; /* 金色 */
  color: white;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 5px;
  z-index: 10;
  clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 50% 100%, 0% 85%);
}

/* 画像エリア */
.ranking-img-area {
  width: 100%;
  height: 100px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ranking-img-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ハートアイコン */
.ranking-fav-icon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

/* 詳細テキストエリア */
.ranking-details {
  padding: 8px;
}

.ranking-menu-name {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin: 0 0 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 評価 */
.ranking-rating-area {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
}
.ranking-rating-area .star-icon {
  color: #e8553e;
  margin-right: 2px;
}
.ranking-score {
  font-weight: bold;
  color: #333;
  margin-right: 4px;
}

/* 価格 */
.ranking-price {
  font-size: 14px;
  font-weight: bold;
  text-align: right;
  color: #333;
}

/* SVGアイコン用の簡易スタイル */
.icon-star {
  width: 14px;
  height: 14px;
  color: #ffcc00; /* 星の色 */
  vertical-align: middle;
  margin-bottom: 2px;
}
.icon-camera {
  width: 16px;
  height: 16px;
  fill: currentColor; /* 親要素の色を継承 */
}
.icon-arrow {
  width: 14px;
  height: 14px;
  color: #999;
  vertical-align: middle;
}
/* img-icon内の配置調整 */
.img-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-card {
  cursor: pointer;
}

/* --- ▼ 追加: モーダル（ポップアップ）のスタイル --- */
.modal-overlay {
  display: none; /* 初期状態は非表示 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* 背景を暗く */
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-content {
  background: #fff;
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 5px;
}

.modal-banner {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 16px;
  display: block;
}

.modal-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

.modal-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-cta-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background-color: #d32f2f; /* menuのブランドカラー */
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 99px;
  font-size: 16px;
  box-sizing: border-box;
}
.modal-cta-btn:hover {
  background-color: #b71c1c;
}

/* 注釈テキスト */
.note-text {
  font-size: 11px;
  color: #999;
  margin-top: 8px;
  margin-bottom: 15px;
}

/* --------------------------------------------------
    PC / タブレット向けレスポンシブ対応 (768px以上)
    -------------------------------------------------- */
@media (min-width: 768px) {
  .breadcrumbs {
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
  }

  .area-search-section {
    margin: 0 0 30px;
    border-radius: 8px;
  }
  .banner-placeholder {
    height: 300px;
  }

  .page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
  }

  /* ▼▼▼ PC用フォントサイズ拡大 ▼▼▼ */
  h1,
  .shop-page-title,
  .menu-grand-title {
    font-size: 28px; /* 大見出しを28pxに */
    margin-right: 10px;
  }

  h2,
  .section-title,
  .area-search-title {
    font-size: 24px; /* 中見出しを24pxに */
  }

  h3,
  .branch-region-title,
  .ranking-title {
    font-size: 20px; /* 小見出しを20pxに */
  }
  /* ▲▲▲ PC用設定ここまで ▲▲▲ */

  .filter-section {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .area-filter-title {
    margin-bottom: 0;
    margin-right: 10px;
  }
  .filter-buttons button {
    width: auto;
    padding: 8px 16px;
  }

  /* ショップリストをPCでは「横2列」に固定 */
  .shop-list {
    display: grid;
    /* 横2列固定 (auto-fillだと画面幅によって3列になるためrepeat(2, 1fr)を指定) */
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .shop-card {
    margin-bottom: 0;
    height: 100%; /* 高さ揃え */
  }

  .shop-thumbnail {
    aspect-ratio: 355 / 170;
  }
}
