/* ✅ 모든 요소에 박스 모델 설정 및 기본 여백 제거 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ✅ 기본 본문 스타일 */
body {
  font-family: Arial, sans-serif; /* 기본 폰트 */
  padding: 20px;                  /* 전체 여백 */
}

/* ✅ 메인 레이아웃: 좌우 분할을 위한 flex 레이아웃 */
.main-container {
  display: flex;
  gap: 20px;                      /* 좌우 여백 */
}

/* ✅ 반응형: 모바일에서는 좌우 → 위아래 정렬 */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }
}

/* ✅ 오른쪽 콘텐츠 영역 (추천 상품, 광고 영역) */
.right-content {
  flex: 1;
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* ✅ 상품 전체 목록 컨테이너 (가로 정렬, 자동 줄바꿈) */
.container {
  display: flex;
  flex-wrap: wrap;               /* 줄바꿈 허용 */
  justify-content: center;       /* 가운데 정렬 */
  gap: 20px;                     /* 아이템 간 간격 */
  margin-top: 50px;              /* 위 여백 */
}

/* ✅ 개별 상품 박스 스타일 */
.product {
  display: inline-block;
  width: 300px;
  height: 400px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
}

/* ✅ 이미지 슬라이더 영역 (캐러셀) */
.carousel {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: start;
  overflow: hidden;
}

/* ✅ 제목/가격 외의 정보 감추기용 클래스 */
.info-hide {
  display: none;
}

/* ✅ 캐러셀 이미지 기본 스타일 (전환 효과 포함) */
.carousel-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-in-out, opacity 0.5s ease-in-out;
}

/* ✅ 캐러셀 내부 이미지 */
.carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  position: absolute;
  transition: opacity 0.5s ease-in-out;
}

/* ✅ 하단 썸네일 이미지 컨테이너 (좌우 스크롤) */
.thumbnail-container {
  display: flex;
  gap: 10px;
  max-width: 100%;
  overflow: auto;
  justify-content: center;
  margin-top: 10px;
}

/* ✅ 썸네일 이미지 스타일 */
.thumbnail-container img {
  width: 60px;
  height: 60px;
  border-radius: 5px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid #ddd;
}

/* ✅ 캐러셀 썸네일 스타일 */
.thumbnail {
  width: 50px;
  height: 50px;
  margin-right: 5px;
  border: 2px solid transparent;
  transition: transform 0.2s ease-in-out;
}

/* ✅ 캐러셀 이미지에 마우스를 올렸을 때 확대 효과 */
.carousel-image:hover {
  transform: scale(1.05);
}

/* ✅ 개별 정보 박스 스타일 (제목/내용 구조) */
.info-box {
  display: flex;
  align-items: start;
  justify-content: space-between;
  background: white;
  padding: 5px;
  border-radius: 5px;
}

/* ✅ 정보 제목 (왼쪽) */
.info-title {
  font-weight: bold;
  color: #333;
  width: 80px; /* 고정 너비 */
}

/* ✅ 정보 내용 (오른쪽) */
.info-content {
  flex-grow: 1;
  text-align: left;
  color: #555;
}

/* ✅ 제목 링크 스타일 */
.info-content a {
  text-decoration: none;
  color: #007bff;
  font-weight: bold;
}

/* ✅ 이미지 하단 설명 텍스트 */
.carousel-item {
  position: relative;
  text-align: center;
}

.image-caption {
  font-size: 14px;
  color: #666;
  background: rgba(255, 255, 255, 0.8);
  padding: 5px;
  margin-top: 5px;
  display: block;
  border-radius: 5px;
}

/* ✅ 동영상 카드 스타일 (컨테이너 내 카드 박스) */
.video-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  text-align: center;
}

/* ✅ 동영상 iframe 또는 embed 박스 */
.video-container {
  width: 100%;
  height: 200px;
}

/* ✅ 동영상 관련 버튼 영역 (수정/삭제 등) */
.video-actions {
  margin-top: 10px;
}

/* ✅ 동영상 필터/정렬 도구 영역 */
.video-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* ✅ 다크 모드 설정: 배경과 글자 색 반전 */
body.dark-mode {
  background-color: #121212;
  color: #f0f0f0;
}

/* ✅ 다크 모드에서 동영상 카드 배경 변경 */
.dark-mode .video-card {
  background-color: #1e1e1e;
}

/* ✅ 동영상 카드 내 링크 스타일 */
.video-card a {
  text-decoration: none;
  color: inherit; /* 현재 글자색 유지 */
}

/* ✅ 링크 호버 시 밑줄 추가 */
.video-card a:hover {
  text-decoration: underline;
}
