/* 基本リセット */
* {
  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;
}

/* ラッパー */
.container {
  width: 100%;
  margin: 0 auto;
  /* PC表示時に広がりすぎないよう制限 */
  max-width: 1024px;
}

/* ヘッダー */
.site-header {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.header-inner {
  padding: 10px 15px 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

/* ロゴ画像の調整 */
.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;
}
.login-link i {
  font-size: 16px;
  margin-bottom: 2px;
}

/* カテゴリナビ */
.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;
}

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

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

/* --- ▼▼▼ hタグ調整ここから ▼▼▼ --- */
h1 {
  font-size: 22px; /* 18pxからアップ */
  font-weight: bold;
  margin-bottom: 8px;
  line-height: 1.4;
  color: #222;
}

h2 {
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 2px solid #f5f5f5; /* 下線で区切り */
  color: #333;
}

h3 {
  font-size: 16px;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 10px;
  color: #333;
}
/* --- ▲▲▲ hタグ調整ここまで ▲▲▲ --- */

.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;
  text-decoration: none;
  color: inherit;
}

.shop-thumbnail {
  position: relative;
  width: 100%;
  height: 170px;
  margin-bottom: 8px;
  overflow: hidden;
  background-color: #f0f0f0;
}

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

.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;
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  flex-shrink: 0;
  cursor: pointer;
}

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

.product-name {
  font-size: 10px;
  font-weight: bold;
  color: #333;
  text-align: center;
  width: 100%;
  line-height: 1.3;
  max-height: 26px; /* 10px * 1.3 * 2行 = 26px */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

/* 他の店舗の簡易リスト（開閉パネル） */
.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 {
  /* 個別のh3定義がある場合はそれが優先されますが、
    今回は上記で汎用h3を定義したのでここは継承、
    または個別に微調整したい場合は以下のように記述 */
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  border-bottom: none; /* SEOセクションでは下線消すなど任意 */
}

.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;
}
@media (min-width: 768px) {
  .breadcrumbs {
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
  }
}
.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;
}

/* --------------------------------------------------
    PC / タブレット向けレスポンシブ対応 (768px以上)
-------------------------------------------------- */
@media (min-width: 768px) {
  .page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
  }

  /* --- ▼▼▼ PC時のhタグ調整 ▼▼▼ --- */
  h1 {
    font-size: 28px; /* PCではさらに大きく */
    margin-right: 15px;
    margin-bottom: 0;
  }

  h2 {
    font-size: 24px;
    margin-top: 40px;
  }

  h3 {
    font-size: 10px;
  }
  /* --- ▲▲▲ PC時のhタグ調整ここまで ▲▲▲ --- */

  .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 {
    height: 220px;
  }
}

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

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

/* 横スクロールエリア */
.ranking-scroll-wrapper {
  display: flex;
  overflow-x: auto;
  padding-bottom: 12px;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
  align-items: flex-start; /* カードの高さを揃えない */
}
.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;
  text-decoration: none;
  color: inherit;
}
.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;
  flex-shrink: 0; /* 画像エリアが縮小・伸縮しないように */
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.ranking-img-area img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

/* ハートアイコン */
.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: 6px 8px 8px 8px;
  display: flex;
  flex-direction: column;
}

.ranking-menu-name {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin: 0 0 3px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  height: 33.8px; /* 固定高さで常に2行分を確保 */
  min-height: 33.8px; /* 13px * 1.3 * 2行 */
}

/* 店名 */
.ranking-shop-name {
  font-size: 11px;
  color: #666;
  margin: 0 0 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 評価 */
.ranking-rating-area {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #666;
  margin-bottom: 0;
}
.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;
}

/* --- 既存のスタイル --- */
.ranking-fav-icon svg {
  width: 16px;
  height: 16px;
  color: #999;
}
.star-icon {
  width: 14px;
  height: 14px;
  color: #ffcc00;
  vertical-align: middle;
}

/* --- クリック可能であることを示すスタイル --- */
.ranking-card,
.shop-card,
.product-item {
  cursor: pointer;
  transition: opacity 0.2s;
}
.ranking-card:hover,
.shop-card:hover,
.product-item:hover {
  opacity: 0.8;
}

/* --- モーダル（ポップアップ）のスタイル --- */
.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: #e61e0a; /* 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;
}

/* ページトップに戻るボタン */
.scroll-top-wrapper {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 0;
}

.scroll-top-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #ccc;
  background: #fff;
  color: #999;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scroll-top-btn:hover {
  background-color: #f0f0f0;
  color: #666;
  border-color: #aaa;
}

/* --------------------------------------------------
    ハンバーガーメニュー
    -------------------------------------------------- */

/* ハンバーガーボタン */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 100;
}

.hamburger-btn__line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #333;
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* メニューオーバーレイ */
.hamburger-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 10000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hamburger-menu.active {
  display: block;
}

.menu-content-wrapper {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* 閉じるボタン */
.close-section {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0;
}

.close-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button svg {
  width: 24px;
  height: 24px;
}

/* ロゴ */
.hamburger-menu .menu-logo {
  display: block;
  margin-bottom: 30px;
}

.hamburger-menu .menu-logo img {
  width: 120px;
  height: auto;
}

/* ナビゲーションセクション */
.hamburger-menu .navigation-section {
  margin-bottom: 30px;
}

.hamburger-menu .nav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s;
}

.hamburger-menu .nav-item:first-child {
  border-top: 1px solid #f0f0f0;
}

.hamburger-menu .nav-text {
  font-size: 16px;
  font-weight: bold;
}

.hamburger-menu .nav-item__arrow {
  display: flex;
  align-items: center;
}

.hamburger-menu .nav-item__arrow svg {
  width: 17px;
  height: 15px;
}

/* アクションボタンセクション */
.hamburger-menu .action-buttons-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
  margin-bottom: 30px;
}

.hamburger-menu .action-button {
  display: block;
  border: 1.5px solid #43c66f;
  border-radius: 4px;
  padding: 16px 20px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s;
}

.hamburger-menu .action-button:hover {
  background-color: #f9fff9;
}

.hamburger-menu .button-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hamburger-menu .button-text {
  font-size: 14px;
  font-weight: bold;
}

.hamburger-menu .button-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 10px;
}

.hamburger-menu .button-icon svg {
  width: 20px;
  height: 20px;
}

/* 企業情報セクション */
.hamburger-menu .bottom-sections {
  margin-top: 20px;
}

.hamburger-menu .company-section {
  margin-bottom: 20px;
}

.hamburger-menu .company-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.hamburger-menu .company-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px 10px 0;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
}

.hamburger-menu .company-icon {
  display: flex;
  align-items: center;
}

.hamburger-menu .company-icon svg {
  width: 16px;
  height: 16px;
}

/* お問い合わせリンク */
.hamburger-menu .contact-links {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hamburger-menu .contact-item {
  text-decoration: underline;
  color: #333;
  font-size: 13px;
  line-height: 1.6;
}

.hamburger-menu .contact-text {
  font-size: 13px;
}

/* SNSセクション */
.hamburger-menu .sns {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-bottom: 20px;
}

.hamburger-menu .sns__text {
  font-size: 16px;
  color: #333;
}

.hamburger-menu .social-icons {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.hamburger-menu .social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger-menu .social-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
