/* ── Reset & 기본 ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Noto Sans KR", sans-serif;
  background: #fff;
  color: #000;
  overflow-x: hidden;
}
/* highlight-brand 텍스트 색상 설정 */
.highlight-brand {
  color: #5cb2da;       /* 원하는 색상 코드로 변경 */
}

/* ── 기본(PC) 레이아웃 ── */
.container {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "content-header content-header"
    "sidebar content";
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* 1) 제목·설명 */
.content-header {
  grid-area: content-header;
}
.series-title {
  font-size: 30px;
  margin-bottom: 8px;
}
.highlight {
  color: #5cb2da;
}
.description {
  font-size: 19px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 24px;
}

/* 2) 사이드바(모델 리스트) */
.sidebar {
  grid-area: sidebar;
}
.model-list {
  list-style: none;
}
.model-item {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.model-item.selected {
  background: #5cb2da;
  color: #fff;
  border-color: #5cb2da;
  font-weight: bold;
}

/* 3) 액세서리 그리드 (PC: 3열) */
.content {
  grid-area: content;
  display: flex;
  flex-direction: column;
}
.accessory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 16px;
  justify-items: center;
}
.accessory-card {
  width: 100%;
  max-width: 230px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, outline-offset 0.2s;
}
/* 선택되지 않은 카드만 흐릿하게 */
.accessory-card:not(.selected) {
  opacity: 0.6;                /* 투명도 60% */
  transition: opacity 0.3s;    /* 호버 시 부드럽게 */
}
.accessory-card.selected {
  outline: 3px solid #5cb2da;
  outline-offset: -1px;
}
.accessory-image {
  position: relative;
  aspect-ratio: 1/1;
  background: #eee;
  overflow: hidden;
}
.accessory-image img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plus-icon {
  position: absolute;
  top: 2px;
  right: 10px;
  font-size: 25px;
  color: #9c9c9c;
  z-index: 2;
}

/* — PC 기본 텍스트 스타일 — */
.accessory-info {
  padding: 8px;
  text-align: left;
}
.accessory-info .accessory-name {
  font-size: 17px;
  margin-bottom: 2px;
  margin-left: 5px;
}
/* 모델명 뒤에 연한 회색 배경 넣기 */
.accessory-info .accessory-model {
  display: inline-block;           /* 텍스트 너비에 맞춰 배경이 감싸도록 */
  background-color: #f0f0f0;       /* 연한 회색 배경 (원하시면 #e0e0e0 등으로 조절) */
  padding: 0px 2px;                /* 상하 0px, 좌우 2px 여백 */
  border-radius: 0px;              /* 모서리 둥글게 */
  color: #9c9c9c; 
  font-size: 14px;
  margin-bottom: 10px;
  margin-left: 5px;
}
.accessory-info .message {
  font-size: 15px;
  margin-top: 6px;
  margin-left: 5px;
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: normal;
}
.accessory-info .message.best {
  color: #5cb2da;
  font-weight: bold;
}
.accessory-info .message.not {
  color: #888;
}

/* ── 모바일 전용 오버라이드 (≤768px) ── */
@media (max-width: 768px) {
  /* 1) 컨테이너 블록 흐름 */
  .container {
    display: block;
    padding: 16px;
  }

  /* 2) 제목·설명 */
  .content-header {
    margin-bottom: 16px;
  }
  .series-title {
    font-size: 24px;
  }
  .description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
  }

  /* 3) 모델 리스트 → 2열 그리드 */
  .sidebar {
    margin-bottom: 24px;
  }
  .model-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0px;     /* 행(위아래) 간격 */
    column-gap: 8px;  /* 열(좌우) 간격 */
  }

  /* 4) 액세서리 그리드 → 2열 */
  .content {
    display: block;
  }
  .accessory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* 5) accessory-info를 flex+gap으로 고정 */
  .accessory-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
  }

  /* 7) 모바일 전용 텍스트 크기 & 색상 */
  .accessory-info .accessory-name {
  font-size: 13px;
  margin-bottom: 2px;
  margin-left: 3px !important;
  }  
  .accessory-info .accessory-model {
    display: inline-block;           /* 텍스트 너비에 맞춰 배경이 감싸도록 */
    background-color: #f0f0f0;    /* 연한 회색 배경 (원하시면 #e0e0e0 등으로 조절) */
    padding: 0px 2px;              /* 상하 0px, 좌우 2px 여백 */
    border-radius: 0px;              /* 모서리 둥글게 */
    color: #9c9c9c;
    font-size: 11px;
    margin-bottom: 15px;
    margin-left: 3px !important;
  }
  .accessory-info .message {
    font-size: 12px;
    line-height: 1.3;
    color: #888;
    font-weight: normal;
    margin-top: 10px;
    margin-left: 3px !important;
  }
  .accessory-info .message.best {
    font-weight: bold;
    color: #5cb2da !important;
  }
}

/* 액세서리 그리드에 페이드 트랜지션 적용 */
.accessory-grid {
  opacity: 1;                             /* 초기엔 완전 보이도록 */
  transition: opacity 0.4s ease-in-out;   /* 0.4초 동안 부드럽게 변화 */
}


