* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  background: #222; /* 기존 검은색 유지 */
  color: white;
  padding: 15px;
  text-align: center;
  position: relative;
}

/* 기본 레이아웃 설정 */
.container {
  display: flex;
}

/* 기본적으로 aside는 왼쪽에 위치 */
aside {
  /* position: fixed; */
  left: 0;
  top: 0;
  width: 250px;
  padding: 20px;
  background: #fff;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  min-height: 100vh; /* 최소 높이 화면 전체 */
  height: 100%; /* content가 길어질 경우 확장 */
  overflow-y: auto; /* 내용이 넘칠 경우 스크롤 */
}

/* 모바일에서는 aside 숨김 */
@media (max-width: 768px) {
  aside {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    transform: translateX(-100%);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    background: #fff;
    z-index: 1000;
  }

  /* 햄버거 버튼 (모바일에서만 보임) */
  .menu-button {
    display: block;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    left: 10px;
    top: 10px;
    background: none;
    border: none;
    z-index: 1100;
  }

  /* 닫기 버튼 (모바일에서만 보임) */
  .close-button {
    display: block;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    z-index: 1100;
  }

  /* aside가 열렸을 때 */
  .aside-open {
    transform: translateX(0);
  }

  /* 어두운 배경 (aside가 열렸을 때 표시) */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 900;
  }

  /* overlay가 활성화되면 표시 */
  .overlay.active {
    display: block;
  }
}

/* 기본적으로 햄버거 & 닫기 버튼 숨김 */
.menu-button {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  color: white; /* 흰색으로 변경 */
  z-index: 1100;
}

.close-button {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 1100;
}

.menu-button,
.close-button {
  display: none;
}

/* 모바일에서만 버튼 보이도록 설정 */
@media (max-width: 768px) {
  .menu-button,
  .close-button {
    display: block;
  }
}

/* aside가 열릴 때 */
@media (max-width: 768px) {
  aside {
    transform: translateX(-100%);
    position: fixed;
    height: 100%;
    background: #fff;
    width: 250px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }

  /* 햄버거 버튼은 aside 뒤쪽에서만 보이도록 */
  .menu-button {
    z-index: 900;
  }

  /* overlay 배경 */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 900;
  }

  /* overlay가 활성화되면 표시 */
  .overlay.active {
    display: block;
  }
}

nav ul {
  list-style: none;
}

nav ul li {
  margin: 10px 0;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-size: 1.1rem;
}

nav ul li a:hover {
  color: #007bff;
}

.category {
  font-weight: bold;
  margin-top: 20px;
}

main {
  flex: 1;
  padding: 2rem;
}

/* 이미지 리스트 뷰 스타일 */
.list-view {
  display: flex;
  flex-wrap: wrap; /* 줄이 부족하면 자동 줄 바꿈 */
  gap: 10px; /* 이미지 간격 */
  justify-content: center; /* 중앙 정렬 */
  padding: 10px;
}

.list-view img {
  width: calc(33.33% - 10px); /* 3개씩 정렬 */
  max-width: 300px;
  height: auto;
  object-fit: cover;
}

/* 태블릿 사이즈에서는 2개씩 정렬 */
@media (max-width: 900px) {
  .list-view img {
    width: calc(50% - 10px);
  }
}

/* 모바일에서는 1개씩 정렬 */
@media (max-width: 600px) {
  .list-view img {
    width: 100%;
  }
}

/* 슬라이드 스타일 */
.slider-view {
  display: flex;
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  position: relative;
}

.slider-view img {
  width: 100%;
  display: none;
}

.slider-view img:first-child {
  display: block;
}
