/* --- Common Styles & Resets --- */

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* --- Main Page Container --- */
.main-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* --- Recommendation Section --- */
.recommendation-section {
    background-color: #ffffff;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    position: relative;
}

.section-title {
    font-family: "Gowun Dodum", sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #fd7e14;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fde4d1;
    display: flex;
    align-items: center;
}
.section-title i {
    margin-right: 12px;
    font-size: 24px;
}

/* --- Recommendation Grid (PC 기본) --- */
.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* PC: 5열 */
    gap: 20px;
}
.recommendation-grid:not(.slick-initialized) .recommendation-item {
    opacity: 0;
    transform: translateY(20px);
}
.recommendation-grid:not(.slick-initialized) .recommendation-item.revealed {
    opacity: 1;
    transform: translateY(0);
}


/* --- Recommendation Item (공통) --- */
.recommendation-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding: 10px;
}
.slick-next:before, .slick-prev:before {
    font-size: 38px !important;
}
.slick-prev:before,.slick-next:before{
    color: #fd7e14 !important;
}

@media (min-width: 1025px) {
    .recommendation-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    }
}

.item-link { display: flex; flex-direction: column; height: 100%; }

.item-image-wrapper {
    width: 100%;
    padding-top: 65%;
    position: relative;
    background-color: #f0f0f0;
    overflow: hidden;
}
.slick-slide img {
    border-radius: 10px !important;
}
.item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.15s ease-in-out, transform 0.3s ease;
    border-radius: 10px;
}
.recommendation-item:hover .item-image {
    transform: scale(1.05);
    border-radius: 10px;
}

.item-info {
    padding: 15px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 120px; /* 내부 컨텐츠 높이 확보 */
}

.item-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px; /* 여백 조정 */
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.4em * 2);
}

.item-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #555;
    margin-bottom: 10px; /* 여백 조정 */
}
.meta-aircon {
    color: #3498db;
    font-weight: 500;
    display: flex;
    align-items: center;
    background-color: #eaf5fb;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 12px;
}
.meta-aircon i { margin-right: 4px; }

.meta-rating {
    color: #f39c12;
    font-weight: 500;
    display: flex;
    align-items: center;
    font-size: 12px;
}
.meta-rating i.fa-star { color: #f1c40f; margin-right: 3px; }

/* [신규] 해시태그 컨테이너 및 개별 태그 스타일 */
.item-hashtags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
    max-height: 48px; /* 약 2줄 높이 제한 */
    overflow: hidden;
}

.hashtag-tag {
    background-color: #fff0e1; /* 주황색 계열의 매우 연한 배경 */
    color: #d95300; /* 짙은 주황색 텍스트 */
    padding: 3px 10px;
    border-radius: 12px; /* 둥근 알약 형태 */
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.5;
}

/* [수정] 부가 정보(additionalInfo) 2줄 말줄임 처리 */
.item-additionalInfo {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.5;
    word-break: break-word; /* 단어 단위로 줄바꿈 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 2줄 제한 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: auto; /* 항상 카드 하단에 위치하도록 */
    min-height: calc(1.5em * 2); /* 2줄 높이 최소 확보 */
}


/* --- 마사지샵 아이템 --- */
.massage-item .item-meta-info.massage-meta {
    font-size: 12px; color: #333; gap: 5px;
}
.massage-item .meta-price { font-weight: 500; }
.massage-item .meta-price span { font-weight: bold; color: #27ae60; }


/* --- 마사지샵 지역 선택 UI --- */
.today-massage-shops-v2 .massage-section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #e0e0e0;
}
.today-massage-shops-v2 .massage-section-header .section-title {
    margin-bottom: 0; padding-bottom: 0; border-bottom: none;
}
.massage-region-selector { display: flex; gap: 10px; }
.region-select-btn {
    padding: 8px 18px; font-size: 15px; font-weight: 500; color: #495057;
    background-color: #f1f3f5; border: 1px solid #dee2e6; border-radius: 20px;
    cursor: pointer; transition: all 0.2s ease-out; outline: none;
}
.region-select-btn:hover { background-color: #e9ecef; border-color: #ced4da; }
.region-select-btn.active {
    background-color: #fd7e14; color: white; border-color: #fd7e14;
    box-shadow: 0 2px 6px rgba(253, 126, 20, 0.3);
}

.massage-content-area { position: relative; }
.massage-region-content-pane { display: none; }
.massage-region-content-pane.active { display: block; }

/* --- "정보 없음" 메시지 --- */
.no-recommendations, .no-recommendations-for-region {
    padding: 40px 20px; text-align: center; color: #6c757d; background-color: #f1f3f5;
    border-radius: 8px; font-size: 16px; min-height: 150px;
    display: flex; justify-content: center; align-items: center; width: 100%;
}
.no-recommendations-for-region p, .no-recommendations p { margin: 0; }

/* --- 반응형 --- */
@media (min-width: 1024px) {
    .main-page-container{ margin-top: 80px; }
}

@media (max-width: 1024px) {
    .main-page-container { padding: 20px 10px; }
    .recommendation-section {
        padding: 10px 0;
        overflow: hidden;
    }
    .item-image-wrapper{
        width: 60%;
        margin: 0 auto;
    }
    .section-title {  display: flex; justify-content: center;font-size: 22px; padding-left: 15px; }
    .section-title i { font-size: 20px; }

    .recommendation-grid.slick-initialized {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }

    .slick-slide {
        padding: 0 20px;
        box-sizing: border-box;
    }
    .slick-slide > div {
        height: 100%;
    }
    .recommendation-item{
        width: 80%;
    }
    .slick-slide .recommendation-item {
        height: 100%;
        margin: 0;
        opacity: 1;
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    .slick-slide .recommendation-item:hover {
        transform: none;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .slick-slide .item-image-wrapper { padding-top: 60%; }
    .slick-slide .item-info { padding: 12px; min-height: 110px; align-items: normal; } /* align-items 수정 */
    .slick-slide .item-name { font-size: 15px; min-height: calc(1.4em * 2); }
    .slick-slide .item-meta-info { font-size: 12px; margin-bottom: 8px; }
    .slick-slide .meta-aircon, .slick-slide .meta-rating { font-size: 11px; }
    .slick-slide .item-hashtags-container { max-height: 42px; } /* 모바일에서 해시태그 높이 제한 */
    .slick-slide .hashtag-tag { font-size: 10px; padding: 2px 8px; }
    .slick-slide .item-additionalInfo {
        font-size: 11px;
        -webkit-line-clamp: 2; /* 모바일에서도 2줄 유지 */
        min-height: calc(1.5em * 2);
    }

    .slick-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 20;
        background-color: rgba(255, 255, 255, 0.9);
        border: 1px solid #ccc;
        color: #fd7e14;
        width: 36px; height: 36px;
        border-radius: 50%;
        cursor: pointer;
        display: flex !important; align-items: center; justify-content: center;
        box-shadow: 0 1px 4px rgba(0,0,0,0.2);
        transition: background-color 0.2s, color 0.2s;
    }
    .recommendation-section .slick-prev { left: 10px; }
    .recommendation-section .slick-next { right: 10px; }

    .slick-arrow:hover { background-color: #fd7e14; color: white; border-color: #fd7e14; }
    .slick-prev::before, .slick-next::before {
        font-family: 'Font Awesome 6 Free'; font-weight: 900;
        font-size: 16px; line-height: 1;
    }
    .slick-prev::before { content: "\f053"; }
    .slick-next::before { content: "\f054"; }
    .slick-disabled { opacity: 0.3; cursor: default; pointer-events: none; }

    .today-massage-shops-v2 .massage-section-header {
        flex-direction: column; align-items: stretch; gap: 15px;
        padding-left: 15px; padding-right: 15px;
    }
    .massage-region-selector {
        display: flex; justify-content: center;
        width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
        padding-bottom: 5px; scrollbar-width: thin; scrollbar-color: #fdc8a0 #f1f3f5;
    }
    .massage-region-selector::-webkit-scrollbar { height: 5px; }
    .massage-region-selector::-webkit-scrollbar-thumb { background: #fdc8a0; border-radius: 3px; }
    .region-select-btn {
        padding: 7px 15px; font-size: 14px; flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .section-title { font-size: 20px; }
    .section-title i { font-size: 18px; }

    .slick-arrow { width: 32px; height: 32px; }
    .recommendation-section .slick-prev { left: 10px; }
    .recommendation-section .slick-next { right: 10px; }
    .slick-prev::before, .slick-next::before { font-size: 14px; }
}

@media (max-width: 480px) {
    .main-page-container { padding: 15px 5px; }
    .section-title { font-size: 18px; padding-left: 10px;}
    .section-title i { font-size: 16px; }
}