/**
 * 상점 하단 근처매장 — 검색 리스트와 동일 구조, 700px 영역 정렬
 */

.content-delivery #nearby.contentContrainer,
#nearby.contentContrainer {
  width: 100% !important;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  overflow: visible !important;
  height: auto !important;
  box-sizing: border-box;
}

#nearby-title {
  width: 100% !important;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

#nearby-list.searchResult {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
  width: 100%;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

#nearby-list.searchResult > a.s_result {
  display: block;
  width: 100%;
  box-sizing: border-box;
  color: #333;
  text-decoration: none;
  padding: 22px 0 26px;
  border-bottom: 1px solid #dee3eb;
}

#nearby-list.searchResult > a.s_result:last-child {
  border-bottom: 0;
  padding-bottom: 8px;
}

#nearby-list.searchResult li.result {
  list-style: none;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 16px;
}

#nearby-list.searchResult .thum,
#nearby-list.searchResult .infoline,
#nearby-list.searchResult .optionLine,
#nearby-list.searchResult .nearby_contact {
  max-width: none !important;
}

/* 썸네일(아이콘 박스) — 약간 확대 */
#nearby-list.searchResult .thum {
  flex: 0 0 130px;
  width: 130px !important;
  max-width: 130px !important;
  min-width: 130px !important;
  height: 165px;
  float: none !important;
  display: block !important;
  background-color: #f8f8f8;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 4px;
}

#nearby-list.searchResult .infoline {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

#nearby-list.searchResult .place_name {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  padding: 0;
  line-height: 1.35;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

#nearby-list.searchResult .optionLine {
  width: 100%;
  min-height: 24px;
  margin: 0 0 10px;
  line-height: 1;
}

#nearby-list.searchResult .optionMark {
  display: inline-block;
  height: 24px;
  line-height: 23px;
  font-size: 13px;
  border-radius: 2px;
  margin: 0 5px 4px 0;
  padding: 0 8px;
  color: #fff;
  font-weight: 700;
  float: none !important;
  vertical-align: top;
}

#nearby-list.searchResult .hours_true { background-color: #333; }
#nearby-list.searchResult .hours_false { background-color: #999; }
#nearby-list.searchResult .delevery_chk { background-color: #ff6565; }

/* 소개·메뉴: 최대 2줄 */
#nearby-list.searchResult .intro {
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  font-size: 15px;
  color: #666;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  height: auto;
  max-height: 2.95em;
}

#nearby-list.searchResult .mainMenu {
  color: #ff6565;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 12px;
  padding: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  height: auto;
  max-height: 2.95em;
}

#nearby-list.searchResult .mainMenu:empty {
  display: none;
  margin: 0;
}

/* new_main.css .number = 장바구니 수량버튼(30x30) 과 충돌 → nearby_contact 사용 */
#nearby-list.searchResult .nearby_contact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 12px;
  width: 100%;
  margin: 8px 0 0;
  padding: 0;
  float: none !important;
  clear: both !important;
}

#nearby-list.searchResult a.nearby_tel {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  width: auto !important;
  height: auto !important;
  min-width: 0;
  max-width: none !important;
  float: none !important;
  font-size: 14px;
  color: #333 !important;
  border: 1px solid #333 !important;
  padding: 8px 12px !important;
  border-radius: 5px;
  line-height: 1.3 !important;
  text-align: left !important;
  white-space: nowrap;
  text-decoration: none;
  background: #fff;
  box-sizing: border-box;
}

#nearby-list.searchResult a.nearby_tel i {
  font-size: 14px;
}

#nearby-list.searchResult .nearby_address {
  flex: 1 1 200px;
  min-width: 0;
  display: block;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin: 0 !important;
  padding: 2px 0;
  float: none !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}

#nearby-list.searchResult .nearby_address i {
  margin-right: 4px;
  color: #666;
}

/* 풀HD·PC (1221px~): 700px 영역 안에서 가로 정렬 유지 */
@media only screen and (min-width: 1221px) {
  #nearby-list.searchResult li.result {
    gap: 18px;
  }

  #nearby-list.searchResult .thum {
    flex: 0 0 135px;
    width: 135px !important;
    max-width: 135px !important;
    min-width: 135px !important;
    height: 170px;
  }

  #nearby-list.searchResult .place_name {
    font-size: 23px;
  }
}

/* 모바일: 썸네일 위 + 좌우 여백 (main.php contentContrainer 90% 와 맞춤) */
@media only screen and (max-width: 1220px) {
  .content-delivery #nearby.contentContrainer,
  #nearby.contentContrainer {
    width: 90% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  #nearby-title {
    width: 90% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 2px;
    box-sizing: border-box;
  }

  #nearby-list.searchResult {
    width: 90% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 8px 0 0;
    box-sizing: border-box;
  }

  #nearby-list.searchResult > a.s_result {
    padding: 18px 0 22px;
  }

  #nearby-list.searchResult li.result {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px;
  }

  #nearby-list.searchResult .infoline {
    padding: 4px 2px 6px;
    width: 100% !important;
  }

  #nearby-list.searchResult .thum {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 170px;
  }

  #nearby-list.searchResult .place_name {
    font-size: 20px;
  }

  #nearby-list.searchResult .nearby_contact {
    padding: 0 2px;
  }

  #nearby-list.searchResult .nearby_address {
    flex: 1 1 100%;
  }
}

/* 배달형 메인(700px) 태블릿: 가로 유지 */
@media only screen and (min-width: 600px) and (max-width: 1220px) {
  #nearby.contentContrainer #nearby-list.searchResult li.result {
    flex-direction: row !important;
    align-items: center !important;
  }

  #nearby.contentContrainer #nearby-list.searchResult .thum {
    flex: 0 0 130px;
    width: 130px !important;
    max-width: 130px !important;
    min-width: 130px !important;
    height: 165px;
  }
}
