/* BASIC css start */
:root {
  --color-main: #0C025B;
  --color-accent-bg: #F4F6FE;
  --color-border: #D3DAF2;
  --color-bg: #fff;
  --header-height: 120px;
  --aside-width: 210px;
  --banner-width: 200px;
  --banner-height: 90px;
  --searchbar-maxwidth: 900px;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-xs: 12px;
}

/* 전체 기본 */
html, body {
  width: 100vw; min-width: 320px;
  margin: 0; padding: 0;
  font-family: 'Pretendard', 'Montserrat', 'Noto Sans KR', sans-serif;
  font-size: var(--font-size-base);
  background: var(--color-bg);
  color: var(--color-main);
  box-sizing: border-box;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { cursor: pointer; border: none; background: none; outline: none; }

/* ===== ASIDE ===== */
aside {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--aside-width);
  height: 100vh;
  background: var(--color-bg);
  border-right: 1.5px solid var(--color-border);
  box-sizing: border-box;
  z-index: 110;
  overflow-y: auto;
  transition: width 0.3s, transform 0.3s;
}
.asi_inner {
  display: flex; flex-direction: column;
  height: 100%; padding: 0 0 30px 0;
}
.aside-title {
  font-size: 15px; color: #A1A7C5; margin-top: 20px;
  padding: 10px 18px 0px 15px; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 600;
}
aside nav { margin-top: 44px; }
aside nav ul { display: flex; flex-direction: column; }
aside nav li { position: relative; }
aside nav .main_m > li { margin-bottom: 12px; }
aside nav li a {
  display: block; padding: 7px 12px; font-size: 15px;
  font-weight: 600; border-radius: 7px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  transition: background 0.13s, color 0.13s;
}
aside nav li:hover > a, aside nav li:focus-within > a {
  background: var(--color-accent-bg); color: var(--color-main) !important;
}
aside nav li.active > a, aside nav li.selected > a {
  background: var(--color-accent-bg); color: var(--color-main) !important;
  font-weight: 700; border-left: 4px solid var(--color-main);
  box-shadow: 0 2px 8px 0 rgba(12,2,91,0.06);
}
aside nav .sub1_m, aside nav .sub2_m {
  display: none; position: absolute; top: 0; left: 100%; min-width: 170px;
  background: #fff; border: 1.5px solid var(--color-border);
  border-radius: 8px; box-shadow: 0 2px 12px 0 rgba(12,2,91,0.06);
  z-index: 30; padding: 6px 0;
}
aside nav .main_m > li:hover > .sub1_m:not(:empty) { display: block; }
aside nav .sub1_m > li:hover > .sub2_m:not(:empty) { display: block; }
aside nav .sub1_m li a, aside nav .sub2_m li a {
  font-size: 13px; font-weight: 500; color: #555;
  padding: 7px 16px; border-radius: 6px;
}
aside nav .sub1_m li:hover > a, aside nav .sub2_m li:hover > a {
  background: var(--color-accent-bg); color: var(--color-main) !important;
}

/* ===== 헤더 전체 ===== */
#header {
  position: fixed;
  top: 0; left: var(--aside-width);
  width: calc(100vw - var(--aside-width));
  height: var(--header-height);
  background: var(--color-bg);
  border-bottom: 1.5px solid var(--color-border);
  z-index: 120;
  min-width: 320px;
  transition: left 0.3s, width 0.3s, height 0.3s;
  box-shadow: 0 2px 14px 0 rgba(0,0,0,0.01);
}
.head_inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: 1700px;
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 2.8vw;
  box-sizing: border-box;
}

/* 로고 */
.header_logo {
  display: flex; align-items: center; flex-shrink: 0; min-width: 130px;
}
.header_logo img {
  display: block;
  height: 58px;
  max-width: 210px;
  width: auto;
  object-fit: contain;
}

/* ---- 메인 중앙: 검색창 + 버튼 ---- */
.header_center {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  position: relative;
}
.header_search_box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: var(--searchbar-maxwidth);
  margin: 0 auto;
}

/* ==== header_user(로그인 등) ==== */
.header_user {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 1px;
  min-height: 32px;
}
.user_icon_btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; min-width: 32px; padding: 0 11px;
  font-weight: 600; font-size: var(--font-size-xs);
  border-radius: 15px;
  background: none;
  color: var(--color-main);
  border: none;
  transition: background 0.14s, color 0.14s;
}
.user_icon_btn:hover, .user_icon_btn:focus {
  background: var(--color-accent-bg);
  color: var(--color-main);
}

/* ==== 검색창 ==== */
form[name="search"] {
  width: 100%;
  max-width: 900px; /* 시원한 느낌을 위해 너비 확장 */
  margin: 0 auto;
}

form[name="search"] fieldset {
  border: 1.5px solid #EAEAEA; /* 무겁지 않은 옅은 테두리 */
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 28px; /* 부드러운 라운딩 값 */
  box-shadow: none; /* 그림자 완전 제거 */
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* 검색창에 포커스 시 테두리 색상과 은은한 그림자로 강조 */
form[name="search"]:focus-within fieldset {
  border-color: #0C025B; /* 사이트 메인 컬러 */
  box-shadow: 0 0 0 4px rgba(12, 2, 91, 0.05);
}

form[name="search"] legend {
  display: none;
}

.MS_search_word,
.search_auto_completion {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  font-size: 1rem;
  /* 이 부분의 첫 번째 값(상하 여백)을 줄이세요 */
  padding: 8px 20px; /* 기존 12px -> 8px 로 수정 */
  outline: none;
  min-width: 0;
  color: #222;
}

.MS_search_word::placeholder {
  color: #A0A0A0; /* 플레이스홀더 색상 조정 */
}

/* 검색 버튼 */
.search_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #888;
  border: none;
  border-radius: 50%;
  /* 이 부분의 width와 height 값을 줄이세요 */
  width: 38px; /* 기존 44px -> 38px 로 수정 */
  height: 38px; /* 기존 44px -> 38px 로 수정 */
  margin: 0;
  padding-right: 8px;
  box-shadow: none;
  transition: color 0.17s;
  cursor: pointer;
}

.search_btn:hover,
.search_btn:focus {
  background: #F4F6FE; /* 사이트 액센트 컬러 */
  color: #0C025B; /* 사이트 메인 컬러 */
}

/* 아이콘 교체 (더 심플하고 세련된 SVG) */
.search_btn::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  /* currentColor를 사용하여 CSS의 color 속성으로 아이콘 색상을 제어 */
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat center/contain;
}

/* ==== 문의/견적/MSDS 버튼 (남색 배경) ==== */
.search_sub_buttons {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  width: 100%;
  justify-content: flex-end;
}

.search_sub_buttons a {
  display: inline-block;
  font-size: 12px;
  font-weight: 500; /* 흰색 글씨에 어울리게 두께 조정 */
  padding: 6px 16px;
  background: var(--color-main, #0C0E5B); /* 요청하신 메인 컬러로 배경 변경 */
  color: #fff; /* 글자색을 흰색으로 변경 */
  border-radius: 16px;
  border: 1px solid transparent;
  outline: none;
  transition: opacity 0.2s;
  text-align: center;
  box-shadow: none;
}

.search_sub_buttons a:hover,
.search_sub_buttons a:focus {
  opacity: 0.8; /* 마우스를 올리면 살짝 밝아지는 효과 */
}

/* ===== 우측 배너 ===== */
.header_banner {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: var(--banner-width);
  min-width: 120px;
  height: var(--banner-height);
  background: #ddd;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
  margin-left: 16px;
}
.header_banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 반응형 (태블릿 이하) ===== */
@media (max-width: 1200px) {
  #header { left: 0; width: 100vw; }
  .head_inner { max-width: 100vw; gap: 18px; }
  .header_banner { width: 130px; height: 64px; min-width: 64px;}
  .header_logo img { height: 38px; max-width: 120px;}
  .header_search_box { max-width: 90vw; }
}
@media (max-width: 900px) {
  aside { display: none; }
  #header { left: 0; width: 100vw; }
  .main_layout { margin-left: 0; }
  .header_banner { display: none; }
  .head_inner { padding: 0 2vw; gap: 6px;}
  .header_logo img { height: 28px; max-width: 90px;}
  .header_user { font-size: 11.5px; gap: 7px;}
  .search_bar { height: 36px; border-radius: 13px; padding: 0 9px; }
  .search_sub_buttons { gap: 7px; margin-top: 7px;}
  .search_sub_buttons a { font-size: 11.5px; padding: 5px 10px; min-width: 48px; border-radius: 11px;}
}

@media (max-width: 600px) {
  .head_inner { flex-direction: column; align-items: stretch; height: auto; }
  .header_center, .header_search_box { width: 100%; max-width: 99vw; }
  .header_user { justify-content: flex-end; margin-bottom: 5px;}
  .search_bar { width: 99vw; min-width: 0; padding: 0 2vw;}
  .search_sub_buttons { width: 99vw; gap: 4px;}
}

/* ===== 본문 마진 ===== */
.main_layout {
  margin-left: var(--aside-width);
  padding-top: var(--header-height);
  transition: margin-left 0.3s, padding-top 0.3s;
}
@media (max-width: 900px) { .main_layout { margin-left: 0; } }

/* BASIC css end */

