body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  line-height: 1.6;
}

/* ヘッダー */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  background: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  font-size: 2.2rem;
  color: #2979ff;
}

.logo-text h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.logo-text small {
  font-size: 0.8rem;
  color: #888;
  letter-spacing: 1px;
}

nav {
  display: flex;
  gap: 2.5rem;
}

nav a {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

nav a:hover {
  color: #2979ff;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #2979ff;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* ヒーローセクション */
.hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4rem;
  height: 75vh;
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  color: white;
}

.hero-text {
  max-width: 600px;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
  padding: 3rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.hero-text h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-text p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: #e0e0e0;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #2979ff, #1e5fcf);
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(41, 121, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(41, 121, 255, 0.4);
}

/* インベントリセクション */
.inventory {
  padding: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.inventory h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: #fff;
  font-weight: 700;
}

/* 検索・フィルター */
.search-filters {
  background: #1a1a1a;
  padding: 2rem;
  margin-bottom: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.filter-row {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: #ccc;
  font-size: 0.95rem;
}

.filter-group select,
.filter-group input {
  padding: 0.8rem 1rem;
  border: 2px solid #333;
  background: #222;
  color: #fff;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  min-width: 150px;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #2979ff;
}

.btn-filter {
  padding: 0.8rem 1.5rem;
  background: #2979ff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 1.5rem;
}

.btn-filter:hover {
  background: #1e5fcf;
  transform: translateY(-1px);
}

/* 車リスト */
.car-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
  justify-content: center;
  align-items: start;
}

/* 車が少ない場合の中央配置（modern browsers） */
.car-list:has(.car-card:nth-child(-n+3)) {
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(350px, 400px));
  max-width: 1200px;
  margin: 2rem auto 0;
}

/* 1台の場合 */
.car-list:has(.car-card:only-child) {
  grid-template-columns: 1fr;
  max-width: 400px;
  margin: 2rem auto 0;
}

/* 2台の場合 */
.car-list:has(.car-card:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(350px, 400px));
  max-width: 850px;
  margin: 2rem auto 0;
}

/* フォールバック：車が少ない場合のクラスベース調整 */
.car-list.few-cars {
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(350px, 400px));
  max-width: 1200px;
  margin: 2rem auto 0;
}

.car-list.single-car {
  grid-template-columns: 1fr;
  max-width: 400px;
  margin: 2rem auto 0;
}

.car-list.two-cars {
  grid-template-columns: repeat(2, minmax(350px, 400px));
  max-width: 850px;
  margin: 2rem auto 0;
}

.car-card {
  background: linear-gradient(145deg, #1a1a1a, #111);
  border-radius: 16px;
  padding: 1.5rem;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid #333;
}

.car-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  border-color: #2979ff;
}

.car-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.car-card h3 {
  margin: 1rem 0 0.5rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.car-info {
  margin: 1rem 0;
}

.car-info p {
  margin: 0.5rem 0;
  color: #ccc;
  font-size: 1rem;
}

.car-info p strong {
  color: #2979ff;
  font-weight: 600;
}

.car-type-badge {
  display: inline-block;
  background: rgba(41, 121, 255, 0.2);
  color: #2979ff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(41, 121, 255, 0.3);
}

.btn-details {
  display: inline-block;
  margin-top: 1rem;
  background: linear-gradient(135deg, #2979ff, #1e5fcf);
  color: white;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.btn-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(41, 121, 255, 0.4);
}

/* フィーチャー */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  padding: 4rem;
  background: #1a1a1a;
  max-width: 1400px;
  margin: 0 auto;
}

.feature {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(145deg, #222, #1a1a1a);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.feature h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #2979ff;
  font-weight: 700;
}

.feature p {
  color: #bbb;
  font-size: 1rem;
  line-height: 1.6;
}

/* 車詳細ページ */
.car-detail {
  padding: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.car-detail-body {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.car-photo {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.car-info {
  flex: 1;
  min-width: 400px;
}

.car-info p {
  margin-bottom: 1.5rem;
  color: #ccc;
  font-size: 1.1rem;
}

/* フッター */
footer {
  text-align: center;
  padding: 3rem;
  background: #111;
  font-size: 0.9rem;
  color: #777;
  margin-top: 4rem;
  border-top: 1px solid #333;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .header {
    padding: 1.5rem 2rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero {
    padding: 2rem;
    height: auto;
  }
  
  .hero-text {
    padding: 2rem;
  }
  
  .hero-text h2 {
    font-size: 2.5rem;
  }
  
  .inventory {
    padding: 2rem;
  }
  
  .car-list {
    grid-template-columns: 1fr;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .car-detail {
    padding: 2rem;
  }
  
  .car-detail-body {
    flex-direction: column;
  }
}