body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #333;
  font-size: 15px; /* 基本のフォントサイズを少し小さくする */
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.section {
  margin-bottom: 40px;
}
header {
  background-color: #f8f9fa;
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}
header.scrolled {
  padding: 10px 0;
  background-color: rgba(248, 249, 250, 0.95);
}
.logo-container {
  display: flex;
  align-items: center;
}
.logo-container #header-logo {
  height: 100px; /* ロゴの高さを指定します。お好みに合わせて調整してください。 */
  width: auto;
  transition: transform 0.3s ease;
}
.logo-container:hover #header-logo {
  transform: scale(1.05);
}
nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}
nav ul li {
  margin-right: 20px;
}
nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease, transform 0.3s ease;
}
nav ul li a:hover {
  color: #007bff;
}
nav ul li a:not(.active):hover {
  transform: translateY(-2px);
}
nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #007bff;
  transition: width 0.3s ease;
}
nav ul li a:hover::after {
  width: 100%;
}
nav ul li a.active {
  color: #007bff;
}
nav ul li a.active::after {
  width: 100%;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
.cta-section {
  background-color: #e9ecef;
  padding: 30px 0;
  text-align: center;
  margin-bottom: 40px;
}
.page-header {
  background-color: #e9ecef;
  padding: 30px 0;
  text-align: center;
  margin-bottom: 40px;
}
.car-grid, .stock-grid, .sold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.car-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.car-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.car-card img {
  width: 100%;
  height: 160px; /* 高さを大きくする */
  object-fit: contain; /* 画像全体がコンテナに収まるように表示する */
}
.car-info {
  padding: 10px 15px; /* 上下の余白を少し減らす */
}
.car-info h3 {
  margin-top: 0; /* h3の上の余白をなくす */
  margin-bottom: 10px;
}
.car-meta {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
}
.car-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #dc3545;
  margin-bottom: 15px;
  text-align: right;
}
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}
.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}
.btn-secondary {
  background-color: #6c757d;
  color: white;
  border-color: #6c757d;
}
.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #5a6268;
}
footer {
  background-color: #343a40;
  color: white;
  padding: 30px 0;
  text-align: center;
}

/* トップへ戻るボタン */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 98; /* 他のフローティングボタンよりは下 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  border: none;
  cursor: pointer;
}
.back-to-top-btn:hover {
  background-color: #0056b3;
}
.back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    box-shadow: 0 5px 5px rgba(0,0,0,0.1);
  }
  nav ul.show {
    max-height: 300px;
  }
  nav ul li {
    margin: 0;
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
  }
  .mobile-menu-btn {
    display: block;
    position: absolute;
    right: 15px;
    top: 20px;
  }
  header .container {
    position: relative;
    padding-bottom: 10px;
  }
  .car-grid, .stock-grid, .sold-grid {
    grid-template-columns: 1fr;
  }
}