:root {
  --primary-color: #2AC1BC;
  --secondary-color: #fa0050;
  --text-color: #333;
  --light-gray: #f5f5f5;
  --mid-gray: #dbdbdb;
  --dark-gray: #8e8e8e;
  --background-color: #fff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --wow-color: #3f60e7;
}
.main_wrap { max-width: 480px; margin: 0 auto;}
.fa-undo-alt {padding-top: 20px;}
.inner {max-width: 480px; margin: 0 auto;}
.m_btm {
    display: flex;
    justify-content: space-around;
    background: #fff;
    padding-top: 10px;
    padding-bottom: 10px;
    position: fixed;
    z-index: 998;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    max-width:480px; /* 원하는 최대 너비 */
    width: 100%;
    border-top: 1px solid #e6e6e6;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.category-list {
    display: flex;
    padding: 15px;
    flex-wrap: wrap;
    justify-content: space-between;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    background-color: #fff;
    gap: 10px;
    width: 100%;
    align-items: center;
}
.category-list::after {
    content: "";
    flex: auto; /* 남은 공간을 자동으로 채움 */
}
.category-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-list .category {
    flex-basis: 16.666%; /* 5개씩 한 줄에 표시 (100% ÷ 5) */
    margin-bottom: 10px; /* 아래 여백 */
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center; /* 가로축 중앙 정렬 */
    text-align: center; /* 텍스트도 중앙 정렬 */
}
.category-list .category a {
    text-decoration: none;
    color: inherit;
}
.category-list .category .img {
    display: flex;
    max-width: 50px;
    justify-content: center; /* 가로 중앙 정렬 */
    align-items: center; /* 세로 중앙 정렬 */
    width: 100%; /* 부모 너비 채우기 */
    margin-bottom: 8px; /* 이미지와 텍스트 사이 간격 */
}
.category-list .category .img img {
    max-width: 100%; /* 컨테이너 크기에 맞게 조정 */
    height: auto; /* 비율 유지 */
    display: block; /* 인라인 요소의 여백 제거 */
    margin: 0 auto; /* 추가 중앙 정렬 */
}
.category-list .category span {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 12px;
}

.category-list .category.empty {
    visibility: hidden; /* 보이지 않게 하되 공간은 차지 */
    height: auto;       /* 높이를 0에서 auto로 변경 */
    margin-bottom: 10px; /* 다른 요소와 동일한 여백 유지 */
}

.category-list .category.selected span {
    color: var(--primary-color);
    font-weight: 500;
}

/* 메인 콘텐츠 영역 */
.main-content {
    background-color: #f4f4f4;
    padding-top: 15px;
    padding-bottom: 80px;
}

.section-title {
    padding: 0 15px 15px 15px;
}

.section-title h2 {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

/* 레스토랑 아이템 스타일 - 이미지 첨부본과 유사하게 조정 */
.restaurant-list {
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.restaurant-item {
    display: block;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    position: relative;
}

.restaurant-image {
    width: 100%;
    height: 0;
    padding-bottom: 56%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.restaurant-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.restaurant-name {
    font-size: 17px;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    color: #333;
}

.restaurant-meta {
    display: flex;
    flex-direction: row;
    gap: 3px;
    justify-content: space-between;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.rating .star {
    color: #ffce00;
    margin-right: 3px;
    font-size: 13px;
}

.rating .score {
    font-weight: bold;
    margin-right: 3px;
    font-size: 13px;
    color: #333;
}

.rating .score, .rating .review-count, .rating .distance {
    color: #8e8e8e;
    font-size: 12px;
}
.rating .delivery-type {font-size: 13px;}
.rating .distance, .rating .delivery-type { margin-left:10px;}

.restaurant-details {
    color: #8e8e8e;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.restaurant-details .dot {
    margin: 0 5px;
    color: #ccc;
}

.closed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
}

/* 프로모션 배너 스타일 */
.promotion-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgb(14, 75, 155);
    color: white;
    padding: 8px 0 7px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
}

.promotion-banner .wow {
    display: inline-block;
    background-color: #fff;
    color: rgb(14, 75, 155);
    padding: 2px 8px;
    border-radius: 20px;
    margin-right: 6px;
    font-size: 12px;
    vertical-align: middle;
}

/* 주소 설정 모달 스타일 */
.address-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 1000;
    overflow-y: auto;
}

.address-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.address-modal-title {
    font-size: 18px;
    font-weight: bold;
    flex: 1;
    text-align: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    color: #333;
    width: 24px;
}

.location {
  margin-top: 10px;
  display: flex;
  align-items: center;
  font-weight: bold;
}

.location .address {
  margin: 0 5px;
}

.address-search-container {
    padding: 15px;
    background: #f5f5f5;
}

.address-search-box {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 8px;
    padding: 0;
    width: 100%;
    margin-bottom: 10px;
    overflow: hidden;
}

.address-search-box .icon-container {
    padding: 12px 15px;
    color: #666;
}

.address-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 12px 0;
    outline: none;
}

.search-btn {
    background-color: #4B89FF;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.search-btn:hover {
    background-color: #3B7AF0;
}

.search-btn i {
    margin-right: 5px;
}

.current-location-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    background: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.current-location-btn i {
    margin-right: 8px;
    color: #4B89FF;
}

/* 쉬운 주소 검색 방법 가이드 */
.easy-search-guide {
    padding: 15px;
}

.guide-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #333;
}

.search-method {
    margin-bottom: 15px;
}

.search-method h4 {
    font-size: 13px;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: #333;
}

.search-method .example {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* 검색 결과 영역 */
#searchResults {
    padding: 0 15px;
}

/* 상세주소 입력 영역 */
.address-input-container {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

.detail-address-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.save-address-btn {
    width: 100%;
    padding: 12px 0;
    background-color: #2D7AF6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.save-address-btn:hover {
    background-color: #2567d3;
}

/* 현재 위치 버튼 */
.add-address-btn {
    margin-top: 15px;
}

/* 주소 검색 API 임베드 스타일 */
#daumPostcodeEmbed {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

/* 주소검색 API iframe 내부 스타일 조정 */
#daumPostcodeEmbed iframe {
    width: 100% !important;
    height: 100% !important;
}

/* 모달 컨텐츠 스크롤 가능하도록 */
.address-modal-content {
    height: calc(100% - 60px); /* 헤더 높이 제외 */
    overflow-y: auto;
    padding-bottom: 20px;
}

/* 검색 결과가 보이는 동안 스크롤 숨김 처리 */
.address-modal.search-active {
    overflow: hidden;
}

/* 모바일 최적화 */
@media (max-width: 480px) {
    #daumPostcodeEmbed {
        height: 350px; /* 모바일에서는 더 작게 */
    }
}

.search-bar {
    margin: 15px 0;
    padding: 0 15px;
}

.search-input {
    display: flex;
    align-items: center;
    background-color: var(--light-gray);
    padding: 10px 15px;
    border-radius: 8px;
    position: relative;
}

/* 검색 버튼 스타일 */
.search-input input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #333;
}

.search-submit-btn {
    position: absolute;
    right: 10px;
    top: 17px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fa0050;
    font-size: 16px;
    cursor: pointer;
}

.search-input input:focus {
    outline: none;
}

/* 검색 결과 영역 스타일 */
.search-results-container {
    padding: 0;
    background: #fff;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8f8f8;
}

.search-result-item .address-type {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.search-result-item .address-main {
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
    font-weight: 500;
}

.search-result-item .address-detail {
    font-size: 13px;
    color: #8e8e8e;
}

.search-result-item .address-detail .zipcode {
    color: #2D7AF6;
    margin-right: 8px;
}

.no-results {
    text-align: center;
    padding: 50px 0;
    margin: 20px 0;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.no-results p {
    margin: 10px 0;
    color: #666;
    font-size: 16px;
}

.no-results .btn-reset {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #fa0050;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.no-results .btn-reset:hover {
    background-color: #ff3c7b;
}

/* 로그인 모달 스타일 */
.login-modal {
    display: none;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: 90vh;
    background-color: #fff;
    z-index: 2000;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.login-modal-content {
    padding: 0;
}

.login-header {
    background-color: #0e4b9b;
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    border-radius: 20px 20px 0 0;
}

.wow-badge {
    display: inline-block;
    background-color: #fff;
    color: #0e4b9b;
    padding: 3px 8px;
    border-radius: 20px;
    margin-right: 6px;
    font-size: 12px;
    vertical-align: middle;
}

.login-form {
    padding: 30px 20px;
}

.login-form h2 {
    margin: 0 0 15px 0;
    font-size: 20px;
    text-align: center;
}

.login-desc {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.login-button {
    width: 100%;
    background-color: #2D7AF6;
    color: white;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
}

.login-links {
    margin-top: 20px;
    text-align: center;
}

.login-links a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
}

.login-links a strong {
    color: #2D7AF6;
}

.login-modal-close {
    margin-top: 30px;
    text-align: center;
}

.login-modal-close button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 30px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

/* 레스토랑 아이템에 클릭 이벤트 추가 */
.restaurant-item {
    cursor: pointer;
}

.close-modal:hover {
    background-color: #ff3c7b;
}