/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全体設定 */
body {
  font-family: "Helvetica Neue", sans-serif;
  background-color: #fff;
  color: #333;
  font-size: 20px;
  line-height: 1.5;
}

/* ヘッダー */
header {
  display: flex;
  justify-content: space-between; /* ← これでロゴ左・ナビ右 */
  align-items: center;
  padding: 10px 20px;
  background-color: #f8f8f8;
  border-bottom: 1px solid #ddd;
  gap: 20px;  /* ロゴとナビの間 */
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.logo span {
  color: #0066cc;
}

.logo img {
  max-width: 160px;
  height: auto;
}

/* ナビゲーション */
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;  /* メニュー項目間のスペース */
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 16px;
  padding: 6px 12px;
  transition: color 0.3s;
  display: inline-flex;     /* 横並び */
  align-items: center;
  gap: 6px;                 /* 日本語と英語の間 */
}

nav ul li a:hover {
  color: #0066cc;
}

/* メイン全体 */
main {
  padding: 40px 60px;
}

/* ヒーローセクション */
.hero {
  text-align: center;
  margin-bottom: 50px;
}

.hero img {
  max-width: 360px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 16px;
  font-weight: bold;
  color: #222;
}

/* 特徴セクション（PC表示：横並び） */
.features {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  text-align: center;
  padding: 40px 0;
  background-color: #f5f5f5;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 20px;
}

.features div {
  max-width: 240px;
}

.features h2 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
}

.features p {
  font-size: 16px;
  color: #555;
}

/* Aboutセクション */
.about {
  margin-top: 60px;
}

.about h1 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #222;
}

.about p {
  font-size: 14px;
  margin-bottom: 12px;
}

/* フッター */
footer {
  text-align: center;
  padding: 20px 40px;
  background-color: #f2f2f2;
  color: #777;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 0;
  margin: 10px 0 0 0;
}

.footer-nav a {
  text-decoration: none;
  color: #777;
  font-size: 12px;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: #0066cc;
}

footer p {
  font-size: 12px;
}

/* 製品一覧グリッド */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* PC: 4列 */
  gap: 10px;
  justify-items: center;
  margin-top: 10px;
}

.product-grid img {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.product-grid img:hover {
  transform: scale(1.05);
}

/* ───────── レスポンシブ対応 ───────── */

/* スマホ用（〜600px） */
@media screen and (max-width: 600px) {
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
    gap: 10px;
  }

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

  nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  nav ul li a {
    font-size: 14px;
    padding: 6px 8px;
  }

  main {
    padding: 12px 10px;
  }

  .hero img {
    max-width: 80%;
    height: auto;
  }

  .hero p {
    font-size: 12px;
  }

  .features {
    flex-direction: column;    /* 縦並びに */
    align-items: center;       /* 中央寄せ */
    justify-content: center;
    gap: 20px;
    padding: 30px 0;
  }

  .features div {
    max-width: 90%;
    text-align: center;
    margin-bottom: 20px;
  }

  .features h2 {
    font-size: 12px;
  }

  .features p {
    font-size: 12px;
  }

  .about {
    margin-top: 30px;
  }

  .about h1 {
    font-size: 16px;
  }

  .about p {
    font-size: 12px;
  }

  footer {
    padding: 10px;
  }

  /* メニュー言語切替 */
  nav .en {
    display: inline;  /* スマホは英語のみ */
  }
  nav .jp {
    display: none;
  }

  /* 製品一覧 1列表示 */
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* タブレット用（〜900px） */
@media screen and (max-width: 900px) {
  body {
    font-size: 18px;
  }

  main {
    padding: 30px 24px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* 2列 */
  }

  nav ul li a {
    font-size: 16px;
  }

  .features {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px 0;
  }

  .features div {
    max-width: 90%;
    margin-bottom: 20px;
  }

  /* メニュー言語切替：タブレットは日本語表示 */
  nav .en {
    display: none;
  }
  nav .jp {
    display: inline;
  }
}

/* PC用（900px以上） */
@media screen and (min-width: 901px) {
  /* メニューは日本語のみ表示 */
  nav .en {
    display: none;
  }
  nav .jp {
    display: inline;
  }
}

/* メニューの日本語・英語間スペース */
nav ul li a {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* 日本語と英語の間の隙間 */
}

@media screen and (max-width: 600px) {
  nav .en {
    display: inline !important;
    font-size: 12px !important;
  }

  nav .jp {
    display: none !important;
  }

  nav ul li a {
    font-size: 12px;
    padding: 4px 6px;
  }

  header {
    padding: 8px 12px;
  }

  .logo img {
    max-width: 100px;
  }

  nav ul {
    gap: 4px;
  }
}

/* h1を全ページで統一したい場合 */
h1 {
  font-size: 18px;
  font-weight: bold;
  color: #222;
  margin-bottom: 20px;
}

@media screen and (max-width: 600px) {
  h1 {
    font-size: 12px;
  }
}
/* 商品詳細ページ用のスタイル */
.product-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.product-detail h1 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #222;
}

.product-detail img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  border: 1px solid #ccc;
}

.product-detail p {
  font-size: 16px;
  color: #444;
  margin-bottom: 12px;
  line-height: 1.6;
}

/* 商品詳細ページ テーブル表示調整 */
.product-detail table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  margin-bottom: 30px;
  word-break: break-word;
}

.product-detail th,
.product-detail td {
  border: 1px solid #ccc;
  padding: 12px 15px;
  text-align: left;
  font-size: 16px;
}

.product-detail th {
  background-color: #f5f5f5;
}

/* スマホ用調整 */
@media screen and (max-width: 600px) {
  .product-detail table th,
  .product-detail table td {
    font-size: 13px;
    padding: 8px;
  }

  .product-detail h1 {
    font-size: 18px;
    text-align: center;
  }

  .product-detail a {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
  }
}
