body {
  font-family: sans-serif;
  background-color: #fdfdfd;
  color: #333;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

h1 a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* ヘッダー */
header {
  background-color: #ffb347;
  padding: 10px 20px;
  color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 20px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.main-nav {
  flex: 2;
  text-align: center;
  min-width: 300px;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.site-title {
  flex: 1;
  min-width: 200px;
}

.site-title a {
  text-decoration: none;
  color: white;
  font-size: 28px;
  padding: 8px 20px;
  border-radius: 10px;
  background: linear-gradient(to right, #ffb347, #ff7e5f);
  display: inline-block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
}

.site-title a:hover {
  background: linear-gradient(to right, #ffcc80, #ffa07a);
  transform: scale(1.05);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8em;
  cursor: pointer;
  color: white;
  position: absolute;
  right: 10px;
  top: 15px;
  z-index: 1001;
}

.menu-toggle {
  display: none;
}

/* ナビゲーション */
nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  padding: 0;
  margin: 0;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #333;
}

/* 検索フォーム */
.search-form {
  flex: 1;
  text-align: right;
  min-width: 200px;
}

.search-form input[type="text"],
.search-form select {
  padding: 6px;
  border: none;
  border-radius: 4px;
  font-size: 0.9em;
}

.search-form button {
  padding: 6px 10px;
  margin-top: 3px;
  background-color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-form button:hover {
  background-color: #e2e2e2;
}

main {
  padding: 20px;
}

footer {
  text-align: center;
  padding: 15px;
  background-color: #f0f0f0;
  margin-top: 40px;
}

.tag {
  display: inline-block;
  background-color: #eee;
  padding: 3px 6px;
  margin: 2px;
  border-radius: 5px;
  font-size: 0.9em;
  color: #333;
}

.tag:hover {
  background-color: #cce;
}

.hero {
  background-color: #fff4d6;
  padding: 20px 20px;
  text-align: center;
  color: #444;
  border-bottom: 2px solid #ffd580;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

.hero h2 {
  font-size: 2em;
  margin-bottom: 10px;
}

/* おすすめランダム表示部 */
.featured-group {
  margin-bottom: 50px;
}

.card-container {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.featured-item {
  background-color: #fff6e5;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 15px;
  text-align: center;
  width: 30%;
  transition: transform 0.2s ease;
}

/* .featured-item:hover {
  transform: scale(1.03);
} */

.featured-item img {
  border-radius: 8px;
  max-width: 100%;
  height: auto;
}

.more-link {
  text-align: right;
  margin-top: 10px;
}

.more-link a {
  color: #ff8800;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.2s;
}

.more-link a:hover {
  color: #cc6600;
}

/* フッター */
.site-footer {
  background-color: #ffb347;
  color: white;
  padding: 30px 20px;
  text-align: center;
  margin-top: 40px;
  border-top: 4px solid #ffa07a;
}

.site-footer .footer-content p {
  margin: 10px 0;
}

.site-footer .footer-links a {
  color: white;
  text-decoration: none;
  margin: 0 8px;
  font-weight: bold;
  transition: color 0.3s ease;
}

.site-footer .footer-links a:hover {
  color: #333;
}

/* いいね */
.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  color: #888;
}

.like-btn.liked {
  color: red;
}

/* スケジュールと買い物リスト */

.schedule-section {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.schedule-section h3 {
  margin-top: 0;
  font-size: 18px;
  color: #333;
  border-left: 5px solid #69c;
  padding-left: 10px;
}

.schedule-section ul {
  list-style: none;
  padding-left: 0;
}

.schedule-section li {
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.schedule-section li:last-child {
  border-bottom: none;
}

/* 戻るボタン */

#back-to-top {
  font-family: 'fantasy';
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 1000;
  background-color: #f87171;
  color: #fff;
  font-weight: bold;
  border: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  padding: 0;
  font-size: 48px;
  cursor: pointer;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0s linear 0.8s;
}

#back-to-top:hover {
  background-color: #e11d48;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0s;
}

#back-to-top svg {
  fill: white;
}

/* モバイル対応 */
@media (max-width: 600px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    width: 100%;
    display: none;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  nav ul {
    flex-direction: column;
  }

  nav li {
    margin: 5px 0;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    display: none;
    background-color: #ffb347;
    padding: 10px 0;
  }

  nav ul.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    align-self: flex-end;
    font-size: 36px;
    padding: 15px 7px;
    background: none;
    border: none;
    cursor: pointer;
  }


  .site-title a{
    font-size: 25px;
    margin: 0;
    padding: 5px;
  }
  
  .search-form {
    width: 100%;
    margin-top: 10px;
  }

  .search-form {
    width: 100%;
    text-align: left;
    margin-top: 10px;
  } 

  .search-form input[type="text"] {
    flex: 1;
    width: 100%;
  }

  .category-cards {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
  }

  .site-footer .footer-links {
    display: block;
    line-height: 1.8;
  }

  .featured-item {
    width: 100%;
  }
}