/**
 * ページ専用のCSS
 * 各ページのスタイルを定義
 */

/* 店舗検索・予測変換 */
.store-search-container {
  position: relative;
}

.store-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.store-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.store-select-hidden {
  display: none;
}

.store-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #3b82f6;
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.store-suggestion {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #e5e7eb;
}

.store-suggestion:last-child {
  border-bottom: none;
}

.store-suggestion:hover {
  background-color: #f3f4f6;
}

.store-suggestion-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.store-suggestion-address {
  font-size: 0.875rem;
  color: #6b7280;
}

/* ヒーローセクション */
.hero-section {
  background: linear-gradient(to right, #3b82f6, #2563eb);
  color: white;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.hero-section h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .hero-section h1 {
    font-size: 2.25rem;
  }
}

.hero-section p {
  color: #dbeafe;
  font-size: 1.125rem;
  line-height: 1.75rem;
}

/* 検索オプションカード（HomePage用） */
.search-option-card {
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px;
  min-height: 200px;
  width: 100%;
}

.search-option-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.search-option-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px) scale(1.01);
}

.search-option-card:hover::before {
  left: 100%;
}

.search-option-card:active {
  transform: translateY(-4px) scale(1.01);
}

.search-option-card.product {
  background: linear-gradient(to bottom right, #3b82f6, #2563eb);
  color: white;
  border-color: #60a5fa;
}

.search-option-card.product:hover {
  border-color: #93c5fd;
}

.search-option-card.location {
  background: linear-gradient(to bottom right, #10b981, #059669);
  color: white;
  border-color: #34d399;
}

.search-option-card.location:hover {
  border-color: #6ee7b7;
}

.search-option-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.search-option-card .card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-align: center;
  width: 100%;
}

.search-option-card .card-description {
  font-size: 0.875rem;
  line-height: 1.5rem;
  margin-bottom: 0.75rem;
  text-align: center;
  width: 100%;
}

.search-option-card.product .card-description {
  color: #dbeafe;
}

.search-option-card.location .card-description {
  color: #d1fae5;
}

.search-option-card .card-info {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

/* セクション見出し */
.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 2px;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
}

/* 空状態メッセージ */
.empty-state {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.empty-state .empty-text {
  color: #6b7280;
}

/* 戻るボタン */
.btn-back {
  background-color: #f3f4f6;
  color: #374151;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
}

.btn-back:hover {
  background-color: #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 情報ボックス */
.info-box {
  border-left-width: 5px;
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: currentColor;
  opacity: 0.2;
}

.info-box.blue {
  background: linear-gradient(to right, #eff6ff 0%, #dbeafe 100%);
  border-color: #3b82f6;
  color: #1e40af;
}

.info-box.green {
  background: linear-gradient(to right, #f0fdf4 0%, #dcfce7 100%);
  border-color: #10b981;
  color: #065f46;
}

.info-box p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 検索入力 */
.search-input {
  width: 100%;
  padding-left: 3.5rem;
  padding-right: 6rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border: 2px solid #d1d5db;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6;
  border-color: #3b82f6;
}

/* .btn-search は components.css で定義されています */

/* 店舗詳細ページ */
.store-detail-card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* お気に入りボタン */
.btn-favorite {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
}

.btn-favorite.active {
  background-color: #ef4444;
  color: white;
}

.btn-favorite.active:hover {
  background-color: #dc2626;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-favorite.inactive {
  background-color: white;
  border: 2px solid #fca5a5;
  color: #dc2626;
}

.btn-favorite.inactive:hover {
  background-color: #fef2f2;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 商品カード */
.item-card {
  background-color: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 0.5rem;
  padding: 1.25rem;
  transition: all 0.2s;
}

.item-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 検索結果ページ */
.search-result-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  transition: all 0.2s;
}

.search-result-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.filter-panel {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
}

.filter-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.filter-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6;
  border-color: #3b82f6;
}

.filter-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.filter-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6;
  border-color: #3b82f6;
}

/* Genre Page */
.genre-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.genre-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.genre-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.genres-section {
  margin-top: 32px;
}

.genres-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
}

.genres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  justify-items: center;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .genres-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

/* Genre Stores Page */
.genre-stores-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.genre-stores-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.genre-stores-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.genre-icon-large {
  font-size: 2.5rem;
  line-height: 1;
}

.genre-stores-map,
.map-container {
  height: 200px;
  min-height: 180px;
  max-height: 240px;
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .genre-stores-map,
  .map-container {
    height: 220px;
    max-height: 220px;
  }
}

/* 近くの店舗一覧・ホームのチラシグリッド（常に2カラム・カード同サイズ） */
.stores-grid,
#stores-container,
#today-flyers-container {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.stores-grid > .store-card,
#stores-container > .store-card,
#today-flyers-container > .store-card {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 360px) {
  .stores-grid,
  #stores-container,
  #today-flyers-container {
    gap: 0.5rem;
  }
}

/* 店舗詳細：チラシ画像 */
.store-detail-flyer-wrap {
  max-height: 220px;
  overflow: hidden;
  background-color: #f3f4f6;
}

.store-detail-flyer {
  width: 100%;
  height: 220px;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .store-detail-flyer-wrap,
  .store-detail-flyer {
    max-height: 260px;
    height: 260px;
  }
}

/* 店舗詳細ページの地図コンテナ */
#store-detail-map {
  width: 100% !important;
  height: 220px !important;
  min-height: 200px !important;
  max-height: 240px !important;
  display: block !important;
  position: relative;
}

.genre-stores-list-section {
  margin-top: 24px;
}

.genre-stores-list-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
}

.stores-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.genre-store-item {
  background-color: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.genre-store-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
  transition: left 0.5s;
}

.genre-store-item:hover {
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15), 0 4px 8px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  transform: translateY(-4px);
  background-color: #f8fafc;
}

.genre-store-item:hover::before {
  left: 100%;
}

.genre-store-item:active {
  transform: translateY(-2px);
}

.store-item-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.store-item-name {
  font-size: 1.125rem;
  color: #1f2937;
  margin-bottom: 4px;
}

.store-item-name b {
  color: #1f2937;
}

.store-item-product {
  font-size: 1rem;
  color: #374151;
  margin-bottom: 4px;
}

.store-item-product b {
  color: #dc2626;
  font-size: 1.125rem;
}

.store-item-distance {
  font-size: 0.875rem;
  color: #6b7280;
}

/* 管理者用アップロードページ */
.admin-upload-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

/* 使い方ページ */
.how-to-use-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.upload-form-card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.content-card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6;
  border-color: #3b82f6;
}

.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.form-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6;
  border-color: #3b82f6;
}

.form-file-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.form-file-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6;
  border-color: #3b82f6;
}

.form-help {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.preview-area {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.preview-area.hidden {
  display: none;
}

.preview-container {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 2px solid #e5e7eb;
}

.preview-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
}

.preview-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.75rem;
}

.preview-info {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.upload-status {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.upload-status.hidden {
  display: none;
}

.upload-status.success {
  background-color: #dcfce7;
  color: #16a34a;
  border: 2px solid #86efac;
}

.upload-status.error {
  background-color: #fee2e2;
  color: #dc2626;
  border: 2px solid #fca5a5;
}

.upload-status.loading {
  background-color: #dbeafe;
  color: #2563eb;
  border: 2px solid #93c5fd;
}

