/* BASIC css start */
/* ==========================================================================
   ZOUND 헤더 / 사이드메뉴 / 검색 레이어 / 스마트 파인더 (optimized)
   ========================================================================== */

:root {
  --header-height: 140px;
  --accent-red: #bf2526;
}

/* ---------- 공통 ---------- */
html.no-scroll,
body.no-scroll { overflow: hidden; touch-action: none; }

body { padding-top: var(--header-height); }

.sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--cw-color-white);
}

/* ---------- 상단 배너 ---------- */
.top-bar { display: flex; align-items: center; justify-content: center; height: 40px; background-color: var(--cw-point-color-pri); }
.top-bar a { text-decoration: none; color: var(--cw-color-white); font-size: .875rem; font-weight: 700; line-height: 20px; }
#topbanner .topSlider li.txt a { font-family: var(--bs-body-font-family); }
#topbanner.is-hidden { display: none !important; } /* 스크롤 시 JS가 토글 */

/* ---------- 헤더 ---------- */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  position: relative;
  border-bottom: none;
}
/* 화면 전체 폭 회색 밑줄 */
.header-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background-color: var(--cw-color-30);
  z-index: 1;
}

.header-logo { flex-shrink: 0; line-height: 0; width: 125px; margin-bottom: 18px; }
.header-logo a { font-size: 2.25rem; font-weight: 800; color: var(--cw-heading-color); line-height: normal; text-decoration: none; }
.header-logo a img { width: 100%; height: 100%; object-fit: contain; }

.header-logo,
.header-icons { order: 1; padding-top: 25px; }

.header-icons { display: flex; gap: 10px; flex-shrink: 0; font-size: 1.125rem; }
.header-icons a { text-decoration: none; position: relative; }
.header-icons a .notification {
  position: absolute;
  top: 3px;
  right: -3px;
  padding: 0 5px;
  border-radius: 100%;
  background-color: var(--cw-point-color);
  color: #fff;
  line-height: 16px;
  font-size: .75rem;
  font-weight: 700;
}

/* 메인 메뉴 (가로 스크롤) */
.header-nav {
  order: 2;
  display: flex;
  flex: 0 0 100%;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 20px;
  min-width: 0;
  margin-top: 10px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-user-select: none;
  user-select: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav:active,
.header-nav.dragging { cursor: grabbing; }

.header-nav a {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  padding-bottom: 15px; /* 회색 줄까지의 거리 */
  color: var(--cw-heading-color);
  font-size: 16px !important;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}
/* 선택된 메뉴 밑줄 (회색 줄 위에 덮음) */
.header-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #000;
  z-index: 2;
}

/* 우측 메뉴 (이벤트/고객센터) */
.right_menu { margin-left: auto; display: flex; align-items: flex-start; flex-shrink: 0; padding-left: 32px; }
.right_menu ul { display: flex; align-items: center; gap: 20px; margin: 0; padding: 0; list-style: none; }
.right_menu ul li { display: flex; align-items: center; }
.right_menu ul li a {
  display: block;
  flex-shrink: 0;
  padding-bottom: 15px;
  color: var(--cw-heading-color);
  font-size: 16px !important;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}
.red-menu { color: var(--accent-red) !important; font-weight: bold; }

/* ---------- 사이드 메뉴 ---------- */
.side-menu-wrap {
  position: fixed;
  top: 0;
  right: -100%;
  width: 360px;
  height: 100vh;
  padding: 18px 24px 60px;
  overflow-y: auto;
  z-index: 100;
  transition: right .3s ease;
  background: var(--cw-color-white);
}
.side-menu-wrap.active { display: block; right: 0; }
.side-menu-wrap a { text-decoration: none; color: var(--cw-heading-color); }

.menu-header { position: relative; padding: 18px 0 20px; }
.side-menu-close {
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border: none;
  outline: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 18L18 6M6 6L18 18' stroke='%23999999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat;
}
.menu-util { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--cw-color-30); }
.menu-util a { font-size: .875rem; }
.menu-util a:not(:first-child)::before { content: ''; display: inline-block; width: 1px; height: 12px; margin-right: 14px; vertical-align: middle; background: var(--cw-color-30); }

.side-menu-list ul { display: flex; flex-direction: column; gap: 20px; }
.side-menu-list ul li a { display: block; width: 95%; font-size: 16px; font-weight: 500; white-space: normal; word-break: break-word; overflow-wrap: break-word; }

.side-menu-list .has-sub { position: relative; }
.side-menu-list .has-sub .ico-toggle { position: absolute; right: 0; top: 3px; display: block; width: 16px; height: 16px; cursor: pointer; }
.side-menu-list .has-sub .ico-plus { background: url("//skin.makeshop.co.kr/skin/rw_shop/images/icons/bullet_plus.svg") no-repeat; }
.side-menu-list .has-sub.open > .ico-toggle { background: url("//skin.makeshop.co.kr/skin/rw_shop/images/icons/bullet_minus.svg") no-repeat; }
.side-menu-list .has-sub .submenu { display: none; padding: 20px 15px 10px; }
.side-menu-list .has-sub.open > .submenu { display: flex; } /* JS는 .open 클래스만 토글 */
.side-menu-list .has-sub .submenu li a { color: var(--cw-color-80); font-size: .9rem; font-weight: 400; }
.side-menu-list .has-sub .submenu li a:hover { color: var(--accent-red); }
.side-menu-list .has-sub .submenu li a.active { color: var(--accent-red); font-weight: 700; }

.side-menu-list .category > li { position: relative; }
.side-menu-list .category > li > a { position: relative; padding-left: 5px; }
.side-menu-list .category > li > a.active::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: #000;
}

.side-menu-list .board { margin-top: 30px; padding: 30px 0 0; border-top: 1px solid #f0f0f0; }
.side-menu-list .board li a { padding-left: 5px; }
.side-menu-list .board li:nth-child(3) { display: none; } /* 세 번째 게시판 메뉴 숨김 */

/* 이벤트 메뉴 */
.side-menu-list .event-cate-grid { display: none; margin-top: 10px; }
.side-menu-list .side-event.active .event-cate-grid { display: flex; gap: 10px; }
.side-menu-list .event-item { flex: 1; text-align: center; }
.side-menu-list .event-item img { display: block; width: 100%; border-radius: 10px; }
.side-menu-list .text-wrap p { margin-top: 6px; font-size: 13px; }

.side-overlay { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; opacity: 0; visibility: hidden; transition: opacity .3s ease; background: rgba(0, 0, 0, .7); z-index: 98; }
.side-overlay.active { opacity: 1; visibility: visible; }

.fixed-menu--md { display: none; z-index: 99; }

/* ---------- 고정 버튼 ---------- */
.floating-wrap { position: fixed; bottom: 80px; right: 2%; display: flex; flex-direction: column; z-index: 99; }
.floating-btns { opacity: 0; visibility: hidden; transition: opacity .3s ease; }
.floating-btns.always-show,
.floating-btns.toggle-show.show { opacity: 1; visibility: visible; }
.floating-btns .floating-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--cw-color-20); background: var(--cw-color-white); }
.floating-btns .btn-smart-finder { background: #fff url("//skin.makeshop.co.kr/skin/rw_shop/images/icons/ico_smart_finder.svg") no-repeat center / 16px 16px; }
.floating-btns .btn-go-top { background: #fff url("//skin.makeshop.co.kr/skin/rw_shop/images/icons/ico_arrow_expand.svg") no-repeat center / 14px 14px; }

/* ---------- 다찾다 검색 파인더 ---------- */
.side-sfinder-wrap textarea { font-size: 16px !important; }
.side-sfinder-wrap {
  position: fixed;
  top: 0;
  right: -100%;
  width: var(--cw-size-360);
  max-width: 100%;
  height: 100%;
  padding-bottom: var(--cw-size-48);
  overflow: hidden;
  z-index: 101;
  transition: right .3s ease;
  background: var(--cw-color-white);
}
.side-sfinder-wrap.active { display: block; right: 0; }

.sfinder-header { z-index: 1; position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: var(--cw-size-17) var(--cw-size-24); border-bottom: 1px solid var(--cw-color-30); background-color: var(--cw-color-white); }
.sfinder-header .sfider-title { font-size: var(--cw-size-18); font-weight: 700; line-height: var(--cw-size-26); }
.sfinder-header .side-sfinder-close { width: var(--cw-size-24); height: var(--cw-size-24); border: none; outline: none; background: url('//skin.makeshop.co.kr/skin/rw_shop/images/icons/ico_x.svg') no-repeat center; filter: invert(59%) sepia(0%) saturate(413%) hue-rotate(281deg) brightness(115%) contrast(55%); }

.side-sfinder-list .option li { border-bottom: 1px solid var(--cw-color-30); }
.side-sfinder-list .option li .option-title { position: relative; padding: var(--cw-size-12) var(--cw-size-24); border-bottom: 1px solid var(--cw-color-20); font-size: var(--cw-size-16); font-weight: 700; line-height: var(--cw-size-24); cursor: pointer; }
.side-sfinder-list .option li .option-title::after { content: ""; display: block; position: absolute; top: 0; right: 0; transform: translate(calc(var(--cw-size-24) * -1), var(--cw-size-16)); width: var(--cw-size-16); height: var(--cw-size-16); background: url('//skin.makeshop.co.kr/skin/rw_shop/images/icons/ico_arrow_cheveron-down.svg') no-repeat center; }
.side-sfinder-list .option li .option-title.on::after { background-image: url('//skin.makeshop.co.kr/skin/rw_shop/images/icons/ico_arrow_cheveron-up.svg'); }
.side-sfinder-list .option li .option-title.on + .finder-subs { display: block; }

.side-sfinder-list .option li .finder-subs { display: none; padding: var(--cw-size-16) var(--cw-size-24); background-color: var(--cw-color-10); }
.side-sfinder-list .option li .finder-subs .class-none { display: flex; flex-wrap: wrap; gap: 4px; }
.side-sfinder-list .option li .finder-subs .form-check-label { display: grid; }
.side-sfinder-list .option li .finder-subs :where(.finder-category, .finder-size) { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--cw-size-4); }
.side-sfinder-list .option li .finder-subs :where(.finder-price) { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--cw-size-4); }
.side-sfinder-list .option li .finder-subs :where(.finder-color) { display: flex; flex-wrap: wrap; gap: var(--cw-size-8); }

.side-sfinder-list .option li .finder-subs .finder-options:not(.color-picker) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--cw-size-8) var(--cw-size-16);
  border: 1px solid var(--cw-color-30);
  border-radius: var(--cw-size-24);
  font-size: var(--cw-size-12);
  line-height: var(--cw-size-16);
  word-break: break-all;
  background-color: var(--cw-color-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-sfinder-list .option li .finder-subs .finder-options:not(.color-picker).on { border-color: var(--cw-heading-color); font-weight: 700; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .25); }

/* 색상 칩: 색상값은 --fc 변수로만 지정 */
.side-sfinder-list .option li .finder-subs .finder-option-color.color-picker { display: inline-flex; width: var(--cw-size-32); height: var(--cw-size-32); border-radius: var(--cw-size-50); text-indent: -9999px; }
.side-sfinder-list .option li .finder-subs .finder-option-color[class*="finder-option-color-"] { background-color: var(--fc); }
.side-sfinder-list .option li .finder-subs .finder-option-color.finder-option-color-white { border: 1px solid var(--cw-color-30); }
.side-sfinder-list .option li .finder-subs .finder-option-color.color-picker.on::after { content: ""; display: inline-flex; width: 100%; height: 100%; background: url('//skin.makeshop.co.kr/skin/rw_shop/images/icons/ico_check.svg') no-repeat center / var(--cw-size-20); }
.side-sfinder-list .option li .finder-subs .finder-option-color.color-picker:not(.finder-option-color-white).on::after { filter: invert(1) brightness(2); }

.finder-option-color-black       { --fc: #000; }
.finder-option-color-white       { --fc: #fff; }
.finder-option-color-gray        { --fc: #808080; }
.finder-option-color-beige       { --fc: #e5d0b2; }
.finder-option-color-brown       { --fc: #aa6810; }
.finder-option-color-navy        { --fc: #425583; }
.finder-option-color-blue        { --fc: #0000ff; }
.finder-option-color-light-blue  { --fc: #62acff; }
.finder-option-color-red         { --fc: #ff0000; }
.finder-option-color-orange      { --fc: #ffa500; }
.finder-option-color-yellow      { --fc: #ffff00; }
.finder-option-color-pink        { --fc: #ffc0cb; }
.finder-option-color-purple      { --fc: #800080; }
.finder-option-color-jaju        { --fc: #a63f7f; }
.finder-option-color-khaki       { --fc: #2f5e2f; }
.finder-option-color-green       { --fc: #008000; }
.finder-option-color-light-green { --fc: #72dd95; }
.finder-option-color-silver      { --fc: #dfdfdf; }
.finder-option-color-gold        { --fc: #cfbc4e; }
.finder-option-color-apricot     { --fc: #fbceb1; }

.side-sfinder-list .option li .finder-subs .finder-price .finder-price-input { position: relative; grid-column: 1 / 3; display: flex; align-items: center; column-gap: var(--cw-size-4); padding-top: var(--cw-size-30); }
.side-sfinder-list .option li .finder-subs .finder-price .finder-price-input::before { content: "직접입력"; position: absolute; top: var(--cw-size-4); left: 0; display: block; font-size: var(--cw-size-14); font-weight: 700; line-height: var(--cw-size-20); }
.side-sfinder-list .option li .finder-subs .finder-price .finder-price-input label { display: flex; align-items: center; height: var(--cw-size-40); padding: 0 var(--cw-size-12); border: 1px solid var(--cw-color-30); border-radius: var(--cw-border-radius); font-size: var(--cw-size-14); background: var(--cw-color-white); }
.side-sfinder-list .option li .finder-subs .finder-price .finder-price-input label .cw-textfield { width: 100%; padding: 0; border: 0; text-align: right; }

.side-sfinder-btns { z-index: 1; position: fixed; bottom: 0; display: grid; grid-template-columns: var(--cw-size-120) var(--cw-size-240); }
.side-sfinder-btns :where(.btn) { padding: 0; border-radius: 0; }
.side-sfinder-btns .btn-gray { border: 0; }
.side-sfinder-btns .finder-count { color: var(--cw-point-color); }

/* ---------- 검색 레이어 ---------- */
.search_btn { padding: 0; border: 0; background: none; cursor: pointer; }
.search_btn img { pointer-events: none; }

.search_wrap {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 500px;
  max-height: 100%;
  border-bottom: 1px solid #ccc;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 11;
}
.search_wrap.on { opacity: 1; visibility: visible; }

.search_wrap .inner { position: relative; width: 100%; max-width: 550px; margin: 10px auto; padding: 5px 15px; box-sizing: border-box; }
.search_wrap .inner .search_input { display: flex; align-items: center; width: 100%; }
.search_wrap .inner .search_input input {
  width: 100%;
  height: 48px;
  border: none;
  border-bottom: 1px solid #121212;
  border-radius: 0;
  outline: none;
  background-color: transparent;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.search_close { position: absolute; top: 20px; right: 20px; padding: 0; border: none; background: none; cursor: pointer; }

/* 추천 / 인기 검색어 */
.keyword { display: flex; justify-content: center; align-items: flex-start; gap: 10px; width: 100%; max-width: 400px; margin: 20px auto 0; box-sizing: border-box; }
.keyword .recmd_search,
.keyword .search_hot_keywords { flex: 1; margin-right: 20px; padding: 0 1px; box-sizing: border-box; }

.keyword .recmd_search { display: flex; flex-direction: column; width: 100%; min-width: 300px; max-width: 800px; min-height: 150px; padding: 10px; border: 1px solid #000; }
.keyword .recmd_search h3 { margin: 0 0 6px; color: #000; font-size: 14px; font-weight: 600; }
.keyword .recmd_search ul { display: flex; flex-direction: column; gap: 5px; margin: 5px; padding: 0; list-style: none; }
.keyword .recmd_search ul li a { display: inline-block; padding: 3px 12px; color: #000; font-size: 13px; text-decoration: none; transition: all .2s ease; }
.keyword .recmd_search ul li a:hover { background-color: #eee; border-radius: 4px; }

.search_hot_keywords ul li a { color: #000; font-size: 10px; text-decoration: none; white-space: nowrap; }
.search_hot_keywords ul li a:hover { background: #eee; border-radius: 1px; }

/* ==========================================================================
   반응형
   ========================================================================== */

/* 태블릿 + 모바일 공통 (하단 고정 메뉴) */
@media (max-width: 991.98px) {
  .fixed-menu--md { position: fixed; bottom: 0; width: 100%; display: block; border-top: 1px solid var(--cw-color-10); background: var(--cw-color-white); }
  .fixed-menu--md .navi-btns { display: flex; justify-content: space-between; align-items: center; }
  .fixed-menu--md .navi-btns a { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 42px; color: var(--cw-color-60); font-size: 12px; text-align: center; text-decoration: none; }
  .fixed-menu--md .navi-btns img { display: block; width: 1.5rem; height: 1.5rem; margin-bottom: 2px; }
  .floating-btns { bottom: 7%; }
}

/* 태블릿 */
@media (min-width: 768px) and (max-width: 991.98px) {
  .header-container {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: 30px;
    padding-right: 30px;
  }
  .header-logo,
  .header-icons { gap: 18px; align-items: center; }
  .header-logo a { font-size: 1.5rem; }
  .header-icons a:not(.basket):not(.search_btn) { display: none; }
  .header-icons img { width: 30px !important; height: 30px !important; object-fit: contain; }
  .header-icons a .notification { top: 5px; right: -5px; }

  .fixed-menu--md { padding: 15px 30px; }
}

/* 모바일 */
@media (max-width: 767.98px) {
  :root { --header-height: 110px; }

  #topbanner { display: none; }

  .header-container { padding: 0 10px; gap: 0; }
  .header-logo { margin-top: 8px; }
  .header-logo a { font-size: 1rem; }
  .header-logo a img { width: 80%; height: 80%; object-fit: contain; }
  .header-icons { margin-top: -10px; }
  .header-icons a:not(.basket):not(.search_btn) { display: none; }
  .header-icons img { width: 24px; height: 24px; }
  .header-icons a .notification { top: 5px; right: -5px; }

  /* 사이드 메뉴: 전체 폭 */
  .side-menu-wrap { width: 100%; height: calc(100dvh - 65px); }
  .menu-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; padding: 8px; border-bottom: 1px solid var(--cw-color-30); }
  .side-menu-close { position: static; }
  .menu-util { padding: 0; border-bottom: none; }

  /* 검색 레이어 */
  .search_close { position: static; display: flex; justify-content: center; align-items: center; margin: 30px auto; padding: 0; border: none; outline: none; box-shadow: none; background: none; }
  .search_close img { display: block; }

  .keyword .recmd_search,
  .keyword .search_hot_keywords { display: flex; flex-direction: column; flex: 1; width: 50%; min-width: 0; margin: 0; padding-left: 17px; box-sizing: border-box; }
  .keyword .recmd_search { margin-right: 17px; }
  .keyword .recmd_search h3 { font-size: 15px; }
  .keyword .recmd_search ul { gap: 3px; }
  .keyword .recmd_search ul li a { padding: 3px 10px; font-size: 13px; }

  /* 하단 고정 메뉴 */
  .fixed-menu--md { padding: 15px 20px; z-index: 1000; }
  .fixed-menu--md .navi-btns a { min-width: auto; }
}
/* BASIC css end */

