.site-content {
  margin: 24px 48px;
}

.vehicle-archive {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.vehicle-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.vehicle-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,.05);
  padding: 12px;
  text-align: center;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vehicle-card .brand-logo {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10; /* 🔹 추가: 이미지 위로 표시 */

}

.vehicle-card .brand-logo img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.vehicle-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: transform 0.4s ease; /* 부드럽게 확대 */
}

.vehicle-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.vehicle-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

.vehicle-badges .badge {
  background: #FFF9EB;
  border-radius: 20px;
  padding: 6px 8px;
  font-size: 14px;
  color: #000;
  line-height: 1;
}

.vehicle-price {
  font-size: 24px;
  font-weight: 700;
  color: #d32f2f;
  margin-top: 6px;
}

#new-vehicle-pagination-container {
  text-align: center;
  margin-top: 24px;
}
#new-vehicle-pagination-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  gap: 6px;
}
#new-vehicle-pagination-container a.page-numbers,
#new-vehicle-pagination-container span.page-numbers {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
}
#new-vehicle-pagination-container span.current {
  background: #333;
  color: #fff;
  border-color: #333;
}

.vehicle-count {
  margin-bottom: 15px;
  font-weight: 600;
  font-size: 16px;
}

/* ────────────── 반응형 / 모바일 ────────────── */

/* 태블릿 이하 (<=1024px) */
@media (max-width: 1024px) {
  .site-content {
    margin: 10px 40px;
  }
  .vehicle-card img {
    height: 200px;
  }
}

/* 모바일 (<=768px) */
@media (max-width: 768px) {
  .site-content {
    margin: 10px 20px; /* 좌우 여백 축소 */
  }
  .vehicle-title {
    font-size: 16px;
  }
  .vehicle-price {
    font-size: 16px;
  }
  .vehicle-badges .badge {
    font-size: 16px;
    padding: 5px 8px;
  }
  #new-vehicle-pagination-container ul {
    flex-wrap: wrap;
    gap: 4px;
  }
  #new-vehicle-pagination-container a.page-numbers,
  #new-vehicle-pagination-container span.page-numbers {
    padding: 5px 10px;
    font-size: 14px;
  }
}

/* 아주 작은 화면 (<=480px) */
@media (max-width: 480px) {
  .site-content {
    margin: 12px;
  }
  .vehicle-grid-container {
    grid-template-columns: 1fr; /* 1열 */
    gap: 15px;
  }
  .vehicle-card img {
    height: 270px;
  }
  .vehicle-title {
    font-size: 18px;
  }
  .vehicle-price {
    font-size: 24px;
  }
}

/* ────────────── 카드 효과 ────────────── */

/* 카드 hover 시 강조 효과 */
.vehicle-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15), 0 0 20px rgba(250, 211, 2, .4);
}

/* 반짝이는 빛 효과 (글로시) */
.vehicle-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0) 60%
  );
  transform: rotate(25deg);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.vehicle-card:hover::after {
  opacity: 1;
  animation: shine 1.2s forwards;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

/* 카드 이미지 확대 효과 */
.vehicle-card:hover img {
  transform: scale(1.08);
}

/* ────────────────────────────────────────────────
   🚘 판매 국가 오버레이 영역 (국기 + 국가명 표시)
   ──────────────────────────────────────────────── */

.kokocar-thumbnail-wrap {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
}

/* 상단 반투명 오버레이 */
.sold-country-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  line-height: 1.2;
  z-index: 20;
  pointer-events: none;
  border-radius: 8px 8px 0 0;
}

/* 내부 컨텐츠 (국기 + 텍스트) */
.sold-country-inner {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 국기 이미지 — 펄럭이는 효과만 남김 */
.vehicle-card .sold-country-overlay .country-flag {
  width: 39px !important;
  height: 26px !important;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  margin-bottom: 0;
  align-self: center;

  /* 🌬️ 핵심: 살짝 펄럭이는 효과 */
  animation: flag-flutter 2.5s ease-in-out infinite;
  transform-origin: left center; /* 왼쪽을 고정하고 오른쪽이 흔들리게 */
  backface-visibility: hidden;
}

/* 국가 이름 (고정) */
.country-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ────────────────────────────────────────────────
   ✨ 애니메이션 정의: 국기 펄럭임 (강도 업그레이드)
   ──────────────────────────────────────────────── */
@keyframes flag-flutter {
  0%, 100% {
    transform: perspective(500px) rotateY(0deg);
  }
  25% {
    transform: perspective(500px) rotateY(15deg) skewY(2deg);
  }
  50% {
    transform: perspective(500px) rotateY(-18deg) skewY(-2deg);
  }
  75% {
    transform: perspective(500px) rotateY(10deg) skewY(1deg);
  }
}
