:root {
  --primary: #002147;
  --bg: #f8f8f8;
  --white: #fff;
}

* { box-sizing: border-box; margin:0; padding:0; }
body {
  font-family: 'Pretendard', sans-serif;
  background: var(--bg);
  color: #333;
  overflow-x: hidden;
}

/* Header & Footer은 기존 style.css 사용 */

/* 본문 레이아웃 */
.brand-page {
  display: flex;
  flex-direction: column;
  margin-top: 80px; /* 헤더 높이 만큼 여유 */
  min-height: calc(100vh - 80px - 200px); /* 푸터 높이 대략 제외 */
}

/* 좌측 카테고리 */
.brand-categories {
  flex: 0 0 200px;
  background: var(--white);
  padding: 20px;
  border-right: 1px solid #eee;
}
.brand-categories ul {
  list-style: none;
}
.brand-categories li {
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background .2s;
}
.brand-categories li.active,
.brand-categories li:hover {
  background: var(--primary);
  color: #fff;
}

/* 우측 브랜드 리스트 */
.brand-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}
.brand-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform .3s;
}
.brand-item:hover {
  transform: translateY(-4px);
}
.brand-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.brand-info {
  padding: 16px;
}
.brand-info h4 {
  margin: 0 0 8px;
  color: var(--primary);
}
.brand-info p {
  margin: 0;
  color: #555;
}


.brand-top {
  display: flex;
}
.brand-detail {
  background: #fff;
  padding: 24px;
  margin: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-height: 800px;            /* 최소 높이 800px */
  overflow-y: auto;             /* 내용이 넘치면 스크롤 */
}
.brand-detail h2 {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 16px;
}
.brand-detail-content h3 {
  font-size: 20px;
  margin-bottom: 12px;
}
.brand-detail-content p {
  line-height: 1.6;
  white-space: pre-wrap;        /* 줄바꿈 유지 */
}
/* 반응형: 모바일은 카테고리 상단으로 */
@media (max-width: 768px) {
  .brand-page {
    flex-direction: column;
    margin-top: 60px;
  }
  .brand-categories {
    flex: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
    display: flex;
    overflow-x: auto;
  }
  .brand-categories ul {
    display: inline-flex;
    gap: 8px;
  }
  .brand-categories li {
    white-space: nowrap;
    margin-bottom: 0;
  }
  .brand-list {
    padding: 10px 20px;
  }
  .brand-top {
    flex-direction: column;
  }
}
