@charset "utf-8";

/* 전체 레이아웃 (반응형) */

.store-locator {
  display: flex;
  flex-direction: column;
  gap: 50px 0;
  margin: 0 auto;
  width: 100%;
  max-width: 920px;
}


#storeMapContainerWrapper {
  width: 100%;
  border-radius: 20px;
}

#storeMapContainerWrapper #kakaoMap {
  height: 450px;
  border-radius: 15px;
  overflow: hidden;
}


.store-locator-wrap {
  width: 100%;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 40px;
}

/* 지도 위 버튼 (전체보기) */
.btn-map-reset {
  position: absolute;
  bottom: 15px; /* 우측 하단으로 이동 */
  right: 15px; 
  z-index: 10; /* 지도보다 위에 표시 */
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-map-reset:hover {
  background: #f8f8f8;
  color: #000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-map-reset i {
  color: #666;
}

/* 1. 상단 검색창 */
.store-search {
  margin-bottom: 40px;
}

.search-input-box {
  position: relative;
  width: 100%;
  height: 55px;
  border: 1px solid #999;
  border-radius: 10px;
  /* 둥근 검색창 */
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.search-input-box input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
}

/* 공통 버튼 스타일 */
.search-input-box button {
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
}

/* 돋보기 버튼 */
#btnSearchStore {
  color: #333;
}

/* 리셋 버튼 */
.btn-reset {
  color: #ccc;
  margin-right: 10px;
  font-size: 18px !important;
}

.btn-reset:hover {
  color: #999;
}

/* 2. 본문 (좌측 메뉴, 우측 리스트) */
.store-body {
  display: flex;
  gap: 40px;
  justify-content: space-between;
  /* 좌우 간격 */
  min-height: 400px;
}

/* [좌측] 지역 메뉴 */
.region-menu {
  width: 180px;
  flex-shrink: 0;
}

.region-menu ul {
  display: inline-block;
  list-style: none;
  padding: 0;
  margin: 0;
}

.region-menu li {
  margin-bottom: 10px;
}

.region-menu li:last-of-type {
  margin-bottom: 0;
}

.btn-region {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 25px;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  background: none;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}

/* 활성화 상태 (검은색 배경) */
.btn-region.active,
.btn-region:hover {
  background: #222;
  color: #fff;
}

/* [우측] 리스트 콘텐츠 */
.store-content {
  flex-grow: 1;
  display: flex;
  width: 100%;
  max-width: 600px;
  flex-direction: column;
  justify-content: space-between;
}

/* 리스트 헤더 (회색 바) */
.list-header {
  width: 100%;
  height: 45px;
  background: #F3F3F3;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  margin-bottom: 15px;
}

/* 커스텀 드롭다운 스타일 */
.custom-dropdown {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.custom-dropdown .arrow {
  color: #888;
  transition: transform 0.3s;
}

.custom-dropdown.active .arrow {
  transform: rotate(180deg);
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: -15px; /* 헤더 padding 보정 */
  width: calc(100% + 30px); /* 헤더 꽉 차게 */
  background: #fff;
  border-radius: 5px;
  list-style: none;
  padding: 5px 0;
  margin: 0;
  display: none; /* JS로 토글 */
  z-index: 100;
  overflow: hidden;
  border: 1px solid #f1f1f1;
}

.dropdown-list.show {
  display: block;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-list li {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
  color: #555;
  font-weight: 500;
}

.dropdown-list li:hover {
  background: #f8f9fa;
  color: #000;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.dot.open { background: #E8522E; }
.dot.preparing { background: #CACCCB; }

/* 리스트 아이템 */
.store-items {
  flex-grow: 1;
}

/* 스크롤바 디자인 */
.store-items::-webkit-scrollbar {
  width: 6px;
}

.store-items::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.store-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 5px;
  font-size: 18px;
  cursor: default;
}

.item-name {
  color: #000;
  font-weight: 400;
}

.item-badge {
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
}

/* 배지 색상 */
.badge-open {
  background: #E8522E;
}

.badge-coming {
  background: #CACCCB;
}

.loading-msg {
  text-align: center;
  padding: 20px;
  color: #999;
}

.empty-msg {
  text-align: center;
  padding: 30px;
  color: #aaa;
}

/* 페이지네이션 */
.store-pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
}

.btn-page {
  border: 1px solid #ddd;
  background: #fff;
  color: #555;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-page:hover {
  background: #f1f1f1;
}

.btn-page.active {
  background: #333;
  color: #fff;
  border-color: #333;
  font-weight: bold;
}

/* 페이지네이션 비활성화 버튼 */
.btn-page[disabled] {
  opacity: 0.3;
  cursor: default;
  background: #f9f9f9;
}

.btn-page[disabled]:hover {
  background: #f9f9f9;
}



/* 반응형 (모바일) */
@media (max-width: 768px) {
  #storeMapContainerWrapper #kakaoMap{
    height: 350px;
  }

  
  .store-locator {
    gap: 30px 0;
  }
  
  .store-locator-wrap {
    padding: 25px 15px;
  }

  .store-body {
    flex-direction: column;
    gap: 20px;
    min-height: auto;
  }

  .region-menu {
    width: 100%;
    overflow-x: auto;
  }

  .region-menu ul {
    display: flex;
    /* 가로 스크롤 메뉴로 변경 */
    gap: 5px;
    padding-bottom: 5px;
  }

  .btn-region {
    width: auto;
    white-space: nowrap;
  }

  .search-input-box {
    height: 45px;
  }

  .store-search {
    margin-bottom: 20px;
  }

  .region-menu li {
    margin-bottom: 0;
  }

  .btn-region {
    padding: 6px 20px;
    font-size: 15px;
  }

  .store-item {
    padding: 6px 5px;
    font-size: 14px;
  }

  .item-badge {
    font-size: 12px;
  }

}

/* 지도 영역 스타일 */
#storeMapContainer {
  width: 100%;
  height: 400px;
  margin-bottom: 40px;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  #storeMapContainer {
    height: 250px;
    /* 모바일에서는 높이 축소 */
    margin-bottom: 20px;
  }
}

/* 지도 커스텀 오버레이 */
.store-overlay {
  margin-bottom: 65px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 0px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 10px 30px;
  text-align: left;
  font-family: "Noto Sans KR", sans-serif;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(5px);
}

/* 말풍선 꼬리 */
.store-overlay::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #fff;
  border-width: 10px 10px 0;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

/* 헤더 영역 (매장명) */
.store-overlay .overlay-header {
  background: linear-gradient(135deg, #E8522E 0%, #ff6b4a 100%);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-overlay .overlay-header i {
  color: #fff;
  font-size: 22px;
  opacity: 0.95;
}

.store-overlay .overlay-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  padding: 0;
  flex: 1;
  word-break: keep-all;
  line-height: 1.3;
  white-space: normal;
}

/* 본문 영역 */
.store-overlay .overlay-body {
  padding: 10px 15px;
  max-height: 200px; /* 최대 높이 제한 */
  overflow-y: auto; /* 내용이 많으면 스크롤 */
}

/* 스크롤바 스타일 (Webkit 브라우저) */
.store-overlay .overlay-body::-webkit-scrollbar {
  width: 6px;
}

.store-overlay .overlay-body::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.store-overlay .overlay-body::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.store-overlay .overlay-body::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

/* 정보 행 */
.store-overlay .info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.store-overlay .info-row:last-child {
  margin-bottom: 0;
}

.store-overlay .info-row i {
  color: #999;
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.store-overlay .info-row span,
.store-overlay .info-row a {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  white-space: normal;
  min-width: 0;
  flex: 1;
}

/* 주소 행 */
.store-overlay .address-row i {
  color: #E8522E;
}

/* 전화번호 행 */
.store-overlay .phone-row {
  align-items: center;
}

.store-overlay .phone-row a {
  color: #2c93f0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.store-overlay .phone-row a:hover {
  color: #1976d2;
}

.store-overlay .phone-row i {
  color: #2c93f0;
}

/* 카카오맵 버튼 */
.store-overlay .btn-kakaomap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 30px);
  margin: 0 15px 15px;
  padding: 8px 0;
  background: linear-gradient(135deg, #FEE500 0%, #FFD400 100%);
  color: #3c1e1e;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s;
}

.store-overlay .btn-kakaomap:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(254, 229, 0, 0.4);
}

.store-overlay .btn-kakaomap i {
  font-size: 16px;
}

/* 닫기 버튼 */
.store-overlay .close {
  position: absolute;
  top: 5px;
  right: 12px;
  width: 32px;
  height: 32px;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  backdrop-filter: blur(5px);
}

.store-overlay .close:hover {
  transform: rotate(90deg);
}

.store-overlay .close i {
  font-size: 16px;
}

/* 리스트 아이템 활성화 상태 */
.store-item.active .item-name { 
  font-weight: 700;
  color: #E8522E;
}

/* .store-item.active .item-name::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 0;
  width: 5px;
  height: 5px;
  background: #E8522E;
  border-radius: 100px;
} */


@media (max-width: 768px) {
  .store-overlay {
    margin-bottom: 50px;
    max-width: 75vw !important;
    min-width: 60vw !important;
  }
  
  .store-overlay .overlay-header {
    gap: 10px;
    padding: 10px;
  }
  
  .store-overlay .overlay-header h3 {
    font-size: 14px;
  }
  
  .store-overlay .overlay-header i {
    font-size: 18px;
  }
  
  .store-overlay .overlay-body {
    padding: 10px;
  }
  
  .store-overlay .info-row {
    margin-bottom: 5px;
  }
  .store-overlay .info-row span, .store-overlay .info-row a {
    font-size: 12px;
  }
  
  .store-overlay .btn-kakaomap {
    width: calc(100% - 30px);
    margin: 0 15px 10px;
    padding: 8px 0;
    font-size: 12px;
  }
  
  .store-overlay .close {
    width: 28px;
    height: 28px;
    right: 10px;
  }
  
  .store-overlay .close i {
    font-size: 14px;
  }
}