/* ranking_list.css */
.ranking-container { padding: 20px 0; max-width: 1200px; margin: 0 auto; position: relative; }
.ranking-container .title { font-size: 20px; font-weight: bold; margin-bottom: 20px; }
.ranking-container .title span { font-size: 14px; color: #888; font-weight: normal; margin-left: 10px; }

.map-container { padding: 20px 0; max-width: 1200px; margin: 0 auto; position: relative; }
.map-container .title { font-size: 20px; font-weight: bold; margin-bottom: 20px; }
.map-container .title span { font-size: 14px; color: #888; font-weight: normal; margin-left: 10px; }

.category-tabs {
    display: flex;
    gap: 8px;
    margin: 15px 0 0 0;
    overflow-x: auto; /* 모바일에서 가로 스크롤 가능하게 */
    padding-bottom: 5px;
    scrollbar-width: none; /* 파이어폭스 스크롤바 숨김 */
}
.category-tabs::-webkit-scrollbar { display: none; } /* 크롬 스크롤바 숨김 */

.tab-btn {
    padding: 10px 22px;
    border-radius: 25px;
    border: none;
    background-color: #f4f6f8; /* 비활성 배경색 */
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* 활성화된 버튼 스타일 (검정색 배경) */
.tab-btn.active {
    background-color: #000;
    color: #fff;
    font-weight: bold;
}

.tab-btn:hover:not(.active) {
    background-color: #e9ecef;
}

.mySwiper { padding: 10px 5px 40px !important; }
.swiper-slide { width: 240px; height: auto; }

.ranking-wrapper { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; }
.ranking-card { flex: 0 0 calc(20% - 12px); min-width: 200px; }

.thumb-box { 
    position: relative; 
    border-radius: 15px; 
    overflow: hidden; 
    height: 320px; /* 이미지 높이 고정 */
    background: #f0f0f0;
}

.thumb-box img { width: 100%; height: 100%; object-fit: cover; }

/* 숫자 랭킹 디자인 */
.rank-num { 
    position: absolute; left: 10px; bottom: -5px; 
    font-size: 80px; font-weight: 900; color: #fff; 
    text-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    font-style: italic; line-height: 1;
}

.info-box { padding: 15px 5px; }
.info-box .subject { font-size: 16px; margin: 0; color: #333; }
.info-box .status { font-size: 13px; color: #666; margin: 5px 0; }
.info-box .price-info { margin: 5px 0; }
.info-box .discount { color: #ff4d4f; font-weight: bold; margin-right: 5px; }
.info-box .price { font-weight: bold; font-size: 17px; }
.info-box .rating { font-size: 13px; color: #888; }
.info-box .star { color: #ffca28; }


/* Swiper 좌우 화살표 전체 커스텀 */
.swiper-button-next,
.swiper-button-prev {
    width: 45px !important;      /* 버튼 너비 */
    height: 45px !important;     /* 버튼 높이 */
    background-color: #fff !important; /* 배경색 흰색 */
    border-radius: 12px;         /* 둥근 사각형 조절 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* 부드러운 그림자 */
    top: 50%;                    /* 수직 중앙 정렬 */
    transform: translateY(-100%); /* 위치 미세 조정 */
    z-index: 10;
}

/* 기본 화살표 아이콘 제거 및 새로 그리기 */
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px !important;  /* 화살표 크기 */
    font-weight: bold !important;
    color: #000 !important;      /* 화살표 색상 검정 */
}

/* 위치 조정: 이미지 경계선에 걸치게 하고 싶을 때 */
.swiper-button-prev {
    left: 10px !important;
}
.swiper-button-next {
    right: 10px !important;
}

/* 마우스 올렸을 때 효과 (선택사항) */
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: #f8f8f8 !important;
}

.view-all-container {
    max-width: 1200px;
    margin: 0 auto 30px; /* 위쪽 슬라이드와의 간격 */
    padding: 0 15px;
    text-align: center;
}

.btn-view-all {
    display: block;
    width: 80%;
    max-width: 1170px; /* 전체 너비에 맞춤 */
    height: 54px;      /* 이미지와 비슷한 높이감 */
    line-height: 54px;
    border: 1px solid #333; /* 얇은 검정 테두리 */
    border-radius: 10px;    /* 높이의 절반값으로 완전한 라운드 처리 */
    background-color: #fff;
    color: #555;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.2s ease;
	margin:0 auto;
}

/* 텍스트 중 강조되는 부분 (NOL 라이브 부분과 유사) */
.btn-view-all .highlight {
    font-weight: 800;
    color: #000;
    margin-right: 4px;
}

/* 마우스 올렸을 때 효과 */
.btn-view-all:hover {
    background-color: #f9f9f9;
    border-color: #000;
    color: #000;
}

/* 모바일에서는 화살표를 숨기고 싶다면 아래 주석 해제 */
/* @media (max-width: 768px) {
    .swiper-button-next, .swiper-button-prev { display: none; }
} 
*/


/* 기존 map-container 여백 정리 */
.map-container { max-width: 1200px; margin: 40px auto; padding: 0; }
.map-container .title { font-size: 22px; font-weight: bold; margin-bottom: 20px; }
.map-container .title span { font-size: 14px; color: #888; font-weight: normal; margin-left: 10px; }

/* 3단 그리드 레이아웃 */
.esthetic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3개씩 배치 */
    gap: 30px 20px; /* 세로가로 간격 */
}

/* 카드 전체 스타일 */
.esthetic-card {
    display: block;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s ease;
}
.esthetic-card:hover { transform: translateY(-3px); }

/* 이미지 영역 */
.esthetic-card .card-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 2; /* 이미지 비율 3:2 고정 */
    background: #f4f4f4;
}
.esthetic-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 파란색 타임할인 뱃지 */
.esthetic-card .badge-sale {
    position: absolute;
    top: 0; left: 0;
    background-color: #4e5ff2;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    padding: 6px 8px;
    line-height: 1.2;
    border-bottom-right-radius: 8px;
}

/* 정보 영역 */
.esthetic-card .card-info { padding: 15px 5px 0; position: relative; }

/* 카테고리 및 하트 */
.esthetic-card .info-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.esthetic-card .category { font-size: 12px; color: #888; }
.esthetic-card .btn-wish { font-size: 20px; color: #ccc; cursor: pointer; }
.esthetic-card .btn-wish:hover { color: #ff4d4f; } /* 마우스 오버시 빨간 하트 */

/* 제목 및 위치 */
.esthetic-card .subject { font-size: 17px; font-weight: bold; margin: 0 0 5px; color: #222; word-break: keep-all; }
.esthetic-card .location { font-size: 13px; color: #666; margin: 0 0 10px; }

/* 평점 뱃지 */
.esthetic-card .rating-box { display: flex; align-items: center; gap: 6px; }
.esthetic-card .score { 
    background-color: #ffca28; color: #000; 
    font-size: 12px; font-weight: bold; 
    padding: 2px 5px; border-radius: 4px; 
}
.esthetic-card .review-count { font-size: 12px; color: #888; }

/* 우측 하단 가격 정보 */
.esthetic-card .price-wrap {
    margin-top: 15px;
    text-align: right; /* 컨텐츠 우측 정렬 */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.esthetic-card .discount-badge {
    color: #ff4d4f;
    background: #fff0f0;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    margin-bottom: 3px;
}
.esthetic-card .original-price { font-size: 12px; color: #aaa; margin-bottom: 2px; }
.esthetic-card .final-price { font-size: 18px; color: #000; }
.esthetic-card .final-price strong { font-size: 22px; font-weight: 900; }
.esthetic-card .member-label {
    display: inline-block;
    background-color: #3b4251;
    color: #fff;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 3px;
    vertical-align: text-bottom;
    margin-right: 4px;
}

/* 더보기 버튼 컨테이너 */
.load-more-container {
    text-align: center;
    margin-top: 40px;  /* 그리드 목록과의 간격 */
    margin-bottom: 20px;
}

/* 더보기 버튼 디자인 */
.btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* 글자와 아이콘 사이 간격 */
    width: 100%;
    max-width: 340px; /* 너무 넓어지지 않게 최대 너비 고정 */
    height: 52px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 26px; /* 둥근 캡슐 모양 */
    color: #555;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 마우스 올렸을 때 효과 */
.btn-load-more:hover {
    background-color: #f8f9fa;
    border-color: #bbb;
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-load-more i {
    font-size: 18px;
    color: #888;
}

/* 이미지 위 거리 뱃지 */
.badge-distance {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 2;
}
.location i { color: #ff4d4f; margin-right: 3px; }

/* 태블릿/모바일 반응형 처리 */
@media (max-width: 991px) {
    .esthetic-grid { grid-template-columns: repeat(2, 1fr); } /* 2열 */
}

@media (max-width: 576px) {
    .esthetic-grid { grid-template-columns: 1fr; gap: 20px; } /* 1열 */
    .esthetic-card .card-thumb { aspect-ratio: 16 / 9; }
}