/* COMMON */
:root {
  --main-color: #4F7A5A;
  --bg-color: #faf7f2;
}

body {
  background: var(--bg-color);
}

#wrap {
  margin-bottom: 7.9rem;
}

.inner {
  width: 100%;
  padding: 0 2.4rem;
  margin: 0 auto;
}

main {
  margin-top: 10.3rem;
  padding-bottom: 4rem;
}

/* HEADER */
header {
  padding: 2.4rem 0 3.2rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  width: 100%;
  background: var(--bg-color);
}
header h1 {
  font-family: 'A2z';
  font-weight: 700;
  font-size: 2rem;
  color: var(--main-color);
  margin-bottom: 1.2rem;
}
header p {
  font-family: 'A2z';
  font-size: 1.4rem;
  color: #756f67;
}

/* FOOTER */
footer {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 999;
  border-top: 1px solid #DED7CD;
  background: var(--bg-color);
}
footer ul {
  display: flex;
  justify-content: space-evenly;
  gap: 2rem;
}
footer ul li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding: 1.3rem 0;
}
footer ul li a img {
  width: 3rem;
  aspect-ratio: 1 / 1;
}
footer ul li a p {
  font-size: 1.4rem;
  font-weight: 600;
  color: #D8CBB8;
  white-space: nowrap;
}
footer ul li.active a p {
  color: var(--main-color);
}

/* 공통 요소 */
.common_list_wrap {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.common_list_wrap li {
  background: #fff;
  border-radius: 1rem;
  padding: 2.4rem;
  box-shadow: 0px 0px 8px 0px #DED7CD;
}
.common_list_wrap li h3 {
  font-family: 'A2z';
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.common_list_wrap li .info_box {
  display: flex;
  align-items: center;
  gap: .8rem;
}
.common_list_wrap li .info_box:first-of-type {
  margin-bottom: .3rem;
}
.common_list_wrap li .info_box p {
  font-size: 1.4rem;
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: break-word;
  color: #756f67;
}
.common_list_wrap li .info_box i {
  display: block;
  width: .3rem;
  aspect-ratio: 1 / 1;
  border-radius: 100%;
  background: #756f67;
}
.common_list_wrap li .info_box .state {
  color: var(--main-color);
  font-weight: 600;
}
.common_list_wrap li .info_box .distance {
  font-weight: 500;
  color: #332f2a;
}
.common_list_wrap li .more_btn {
  display: block;
  width: 100%;
  background: var(--main-color);
  color: #FAF7F2;
  text-align: center;
  border-radius: 1rem;
  font-weight: 600;
  padding: 1.4rem 0;
  font-size: 1.6rem;
  margin-top: 1.8rem;
}

/* index.php */
.home .quick_wrap {
  margin-bottom: 3.2rem;
}
.home .quick_wrap h2 {
  font-family: 'A2z';
  font-weight: 700;
  font-size: 2rem;
  color: var(--main-color);
  margin-bottom: 1.6rem;
}
.home .quick_wrap ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
.home .quick_wrap ul li a {
  display: block;
  padding: 2.2rem 0;
  text-align: center;
  background: #fff;
  font-size: 1.6rem;
  font-family: 'A2z';
  font-weight: 600;
  border-radius: 1rem;
  box-shadow: 0px 0px 8px 0px #DED7CD;
}
.home .list_wrap .title_box {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.home .list_wrap .title_box h2 {
  font-family: 'A2z';
  font-size: 2rem;
  font-weight: 700;
  color: var(--main-color);
}
.home .list_wrap .title_box button img {
  width: 1.8rem;
}

/* search.php */
.search .search_wrap {
  background: #fff;
  border-radius: 3rem;
  padding: 1.3rem 2rem;
}
.search .search_wrap form {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search .search_wrap input[type="text"] {
  width: 100%;
  font-size: 1.5rem;
  outline: none;
}
.search .search_wrap input[type="text"]::placeholder {
  color: #756f67;
}
.search .search_wrap button img {
  width: 2.4rem;
}
.search .filter_wrap {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin: 1.6rem 0 2.4rem;
}
.search .filter_wrap .filter {
  display: block;
  width: 2.4rem;
}
.search .filter_wrap .filter img {
  width: 100%;
}
/* 여기에 overflow 를 걸면 아래로 펼쳐지는 정렬 드롭다운까지 잘린다.
   가로 스크롤은 조건 칩(ul)에만 필요하므로 스크롤은 ul 이 맡는다. */
.search .filter_wrap .filter_box {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  min-width: 0;
}
.search .filter_wrap .filter_box .select_box {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #d8ded4;
  border-radius: 4.5rem;
  padding: .8rem 1.2rem;
  cursor: pointer;
  white-space: nowrap;
}
.search .filter_wrap .filter_box .select_box p {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--main-color);
}
.search .filter_wrap .filter_box .select_box img {
  width: 1.6rem;
}
.search .filter_wrap .filter_box > ul {
  display: flex;
  align-items: center;
  gap: .5rem;
  overflow-x: auto;
  min-width: 0;
  scrollbar-width: none;
}
.search .filter_wrap .filter_box > ul::-webkit-scrollbar {
  display: none;
}
.search .filter_wrap .filter_box > ul > li {
  border: 1px solid #756f67;
  border-radius: 4.5rem;
  padding: .7rem 1.4rem;
  font-size: 1.6rem;
  font-weight: 600;
  color: #756f67;
  white-space: nowrap;
}

/* filter.php */
.filter .category_wrap {
  border-top: 1px solid #DED7CD;
  padding-top: 2.4rem;
}
.filter .category_wrap .category_box:first-of-type {
  margin-bottom: 2.4rem;
}
.filter .category_wrap .category_box h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #756f67;
  margin-bottom: 1.6rem;
}
.filter .category_wrap .category_box ul {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.filter .category_wrap .category_box ul li {
  background: #fff url("../img/icon_arrow_down.png") no-repeat calc(100% - 2.4rem) 50% / 2rem;
  border-radius: 2rem;
  padding: 2.2rem 2.4rem;
}
.filter .category_wrap .category_box ul li select {
  width: 100%;
  border: 0;
  appearance: none;
  outline: none;
  font-size: 1.6rem;
  color: #756f67;
  letter-spacing: inherit;
  background: none;
}

/* detail.php */
.detail {
  margin-top: 2rem;
}
.detail .container {
  border-radius: 2rem 2rem 0 0;
  box-shadow: 0px -10px 10px 0px #23232312;
  padding-top: 2.4rem;
}
.detail .close {
  display: block;
  margin-left: auto;
  margin-bottom: .2rem;
}
.detail .close img {
  width: 2.4rem;
}
.detail .title_wrap {
  border-bottom: 1px solid #DED7CD;
  padding-bottom: 2.4rem;
}
.detail .title_wrap h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.detail .title_wrap .info_box {
  display: flex;
  align-items: center;
  gap: .8rem;
}
.detail .title_wrap .info_box:first-of-type {
  margin-bottom: .8rem;
}
.detail .title_wrap .info_box p {
  font-size: 1.6rem;
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: break-word;
  color: #756f67;
}
.detail .title_wrap .info_box i {
  display: block;
  width: .3rem;
  aspect-ratio: 1 / 1;
  border-radius: 100%;
  background: #756f67;
}
.detail .title_wrap .info_box .state {
  color: var(--main-color);
  font-weight: 600;
}
.detail .title_wrap .info_box .distance {
  font-weight: 500;
  color: #332f2a;
}
.detail .title_wrap .tel_box {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
}
.detail .title_wrap .tel_box p {
  font-size: 1.6rem;
  color: #756f67;
}
.detail .title_wrap .tel_box button img {
  width: 1.6rem; 
}
.detail .time_wrap {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 2.4rem 0;
  border-bottom: 1px solid #DED7CD;
}
.detail .time_wrap > img {
  width: 2.4rem;
}
.detail .time_wrap .table_wrap ul {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding-top: .4rem;
}
.detail .time_wrap .table_wrap ul li {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.detail .time_wrap .table_wrap ul li p,
.detail .time_wrap .table_wrap ul li span {
  font-size: 1.6rem;
  color: #756f67;
}
.detail .icon_wrap {
  padding: 2.4rem .8rem;
  border-bottom: 1px solid #DED7CD;
}
.detail .icon_wrap ul {
  display: flex;
  gap: 3.6rem;
}
.detail .icon_wrap ul li {
  text-align: center;
}
.detail .icon_wrap ul li img {
  width: 3rem; 
}
.detail .icon_wrap ul li p {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--main-color);
  margin-top: .8rem;
}

/* more.php */
.more ul {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.more ul li {
  background: #fff;
  border-radius: 1.6rem;
  padding: 2rem;
}
.more ul li .title_wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.more ul li .title_wrap h2 {
  font-size: 2rem;
  font-weight: 600;
}
.more ul li .title_wrap img {
  width: 2.4rem;
}
.more ul li .content_wrap {
  display: none;
  margin-top: 2rem;
}
.more ul li .content_wrap p {
  font-size: 1.4rem;
  line-height: 2rem;
  color: #77727f;
}
.more ul li .content_wrap p b {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: .35rem;
}

/* map.php */
.map {
  padding-bottom: 0;
}
.map .map_wrap {
  border-top: 1px solid #DED7CD;
  height: calc(100dvh - 30.5rem);
  position: relative;
}
.map .map_box {
  height: 100%;
}
.map .map_box img {
  width: 100%;
  height: 100%;
}
.map .modal_info_wrap {
  background: #fff;
  border-radius: 1rem;
  padding: 2.4rem;
  box-shadow: 0px 0px 8px 0px #DED7CD;
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 4.8rem);
}
.map .modal_info_wrap h3 {
  font-family: 'A2z';
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.map .modal_info_wrap .info_box {
  display: flex;
  align-items: center;
  gap: .8rem;
}
.map .modal_info_wrap .info_box:first-of-type {
  margin-bottom: .3rem;
}
.map .modal_info_wrap .info_box p {
  font-size: 1.4rem;
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: break-word;
  color: #756f67;
}
.map .modal_info_wrap .info_box i {
  display: block;
  width: .3rem;
  aspect-ratio: 1 / 1;
  border-radius: 100%;
  background: #756f67;
}
.map .modal_info_wrap .info_box .state {
  color: var(--main-color);
  font-weight: 600;
}
.map .modal_info_wrap .info_box .distance {
  font-weight: 500;
  color: #332f2a;
}
.map .modal_info_wrap .more_btn {
  display: block;
  width: 100%;
  background: var(--main-color);
  color: #FAF7F2;
  text-align: center;
  border-radius: 1rem;
  font-weight: 600;
  padding: 1.4rem 0;
  font-size: 1.6rem;
  margin-top: 1.8rem;
}
/* =========================================================
   API 연동 후 추가된 요소들
   ========================================================= */

/* 로딩 스피너
   기본은 숨겨두고 .on 으로 켠다. JS로 숨기면 로드 순간 깜빡인다. */
.spinner_wrap {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .7);
  z-index: 9999;
}
.spinner_wrap.on {
  display: block;
}
.spinner_wrap .loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8rem;
  height: 8rem;
  border: .7rem solid #fff;
  border-bottom-color: var(--main-color);
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}
@keyframes rotation {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 영업종료 상태 */
.common_list_wrap li .info_box .state.closed,
.detail .title_wrap .info_box .state.closed,
.map .modal_info_wrap .info_box .state.closed {
  color: #b0433f;
}

/* 더보기 앵커로 내려올 때, 고정 헤더에 첫 항목이 가리지 않게 띄운다. */
.common_list_wrap li[id] {
  scroll-margin-top: 11.5rem;
}

/* 현재 위치 안내 (index.php) */
.cur_region {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: 1.3rem;
  color: #756f67;
  margin-bottom: 1.6rem;
}
.cur_region img {
  width: 1.4rem;
}

/* 결과 없음 */
.empty_box {
  background: #fff;
  border-radius: 1rem;
  padding: 4rem 2.4rem;
  text-align: center;
  box-shadow: 0px 0px 8px 0px #DED7CD;
}
.empty_box p {
  font-size: 1.5rem;
  line-height: 1.6;
  color: #756f67;
  margin-bottom: 2.4rem;
}
.empty_box .more_btn {
  display: block;
  width: 100%;
  background: var(--main-color);
  color: #FAF7F2;
  text-align: center;
  border-radius: 1rem;
  font-weight: 600;
  padding: 1.4rem 0;
  font-size: 1.6rem;
}

/* 목록 더보기 */
.list_more_btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #fff;
  border: 1px solid var(--main-color);
  color: var(--main-color);
  border-radius: 1rem;
  font-weight: 600;
  font-size: 1.6rem;
  padding: 1.4rem 0;
  margin-top: 1.6rem;
}

/* 검색 결과 수 */
.result_count {
  font-size: 1.4rem;
  color: #756f67;
  margin-bottom: 1.2rem;
}
.result_count b {
  font-weight: 700;
  color: var(--main-color);
}

/* 정렬 커스텀 셀렉트 */
.search .filter_wrap .filter_box .select_box {
  position: relative;
}
.search .filter_wrap .filter_box .select_box .select_option {
  display: none;
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  min-width: 100%;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0px 0px 8px 0px #DED7CD;
  padding: .6rem 0;
  z-index: 10;
}
.search .filter_wrap .filter_box .select_box.on .select_option {
  display: block;
}
.search .filter_wrap .filter_box .select_box .select_option li a {
  display: block;
  padding: .9rem 1.6rem;
  font-size: 1.3rem;
  font-weight: 500;
  color: #756f67;
  white-space: nowrap;
}
.search .filter_wrap .filter_box .select_box .select_option li.on a {
  color: var(--main-color);
  font-weight: 700;
}

/* filter.php 폼 */
.search .search_wrap .form_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter .category_wrap .category_help {
  font-size: 1.3rem;
  color: #a29a8f;
  margin-top: .8rem;
}
.filter .category_wrap .apply_btn {
  display: block;
  width: 100%;
  background: var(--main-color);
  color: #FAF7F2;
  text-align: center;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 1.6rem;
  padding: 1.6rem 0;
  margin-top: 3.2rem;
}

/* detail.php 추가 */
.detail .title_wrap .addr_box {
  margin-top: 1.2rem;
}
.detail .title_wrap .addr_box p {
  font-size: 1.5rem;
  line-height: 1.5;
  color: #756f67;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.detail .title_wrap .tel_box p a {
  color: #756f67;
}
.detail .time_wrap .table_wrap ul li.today p,
.detail .time_wrap .table_wrap ul li.today span {
  color: var(--main-color);
  font-weight: 700;
}
.detail .time_wrap .table_wrap ul li span.off {
  color: #b3aca2;
}
.detail .icon_wrap ul li.off img {
  opacity: .25;
}
.detail .icon_wrap ul li.off p {
  color: #b3aca2;
}
.detail .etc_wrap {
  padding: 2.4rem 0;
  border-bottom: 1px solid #DED7CD;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.detail .etc_wrap .etc_box h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--main-color);
  margin-bottom: .6rem;
}
.detail .etc_wrap .etc_box p {
  font-size: 1.4rem;
  line-height: 1.6;
  color: #756f67;
}
.detail .notice_txt {
  font-size: 1.3rem;
  line-height: 1.6;
  color: #a29a8f;
  padding: 2rem 0 0;
}

/* map.php 추가 */
.map .map_box img {
  width: auto;
  height: auto;
  max-width: none;
}
.map .my_pos_btn {
  position: absolute;
  right: 1.6rem;
  bottom: 1.6rem;
  z-index: 5;
  width: 5rem;
  height: 5rem;
}
.map .my_pos_btn img {
  width: 100%;
  height: 100%;
}
.map .modal_info_wrap {
  display: none;
  z-index: 6;
}
.map .modal_info_wrap.on {
  display: block;
}
.map .modal_info_wrap .close {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
}
.map .modal_info_wrap .close img {
  width: 2rem;
}
.map .modal_info_wrap h3 {
  padding-right: 3rem;
}
.map .modal_info_wrap .info_box.no_distance .distance,
.map .modal_info_wrap .info_box.no_distance i {
  display: none;
}
.my_pos_dot {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--main-color);
  border: 2px solid #FAF7F2;
  box-shadow: 0px 0px 20px 0px #4F7A5A;
}

/* more.php 추가 */
.more ul li .title_wrap {
  cursor: pointer;
}
.more ul li .title_wrap img {
  transition: transform .2s;
}
.more ul li.on .title_wrap img {
  transform: rotate(180deg);
}
.more .link_list {
  margin-top: 1.6rem;
}
.more .link_list li {
  background: none;
  padding: 0;
  text-align: center;
}
.more .link_list li a {
  font-size: 1.4rem;
  color: #756f67;
  text-decoration: underline;
}

/* 검색 결과 개수 칩 (map.php) — 조건 칩과 구분되게 메인 컬러로 */
.search .filter_wrap .filter_box > ul > li.count {
  background: var(--main-color);
  border: 1px solid var(--main-color);
  color: #fff;
}

/* 목록 상한에 도달했을 때 안내 (search.php) */
.list_limit_txt {
  text-align: center;
  font-size: 1.3rem;
  line-height: 1.6;
  color: #a29a8f;
  padding: 2rem 0 .5rem;
}

/* 오늘이 공휴일일 때 요일 표에 붙는 표식 (detail.php) */
.detail .time_wrap .table_wrap ul li .holiday_tag {
  font-size: 1.2rem;
  font-weight: 600;
  font-style: normal;
  color: #FAF7F2;
  background: var(--main-color);
  border-radius: .4rem;
  padding: .2rem .6rem;
}
