/* --- Common Styles & Resets --- */


/* --- Detail Page Container --- */
.detail-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px; /* 모바일 기본 패딩, PC에서 더 커짐 */
    background-color: #ffffff;
}

/* PC 환경에서 헤더 높이만큼 마진 추가 및 디자인 */
@media (min-width: 769px) {
    .detail-page-container {
        margin-top: 80px; /* 헤더 높이 고려 (userTemp에 따라 조절) */
        margin-bottom: 40px;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    }
}

/* --- Page Header (샵 이름) --- */
.detail-header {
    text-align: center;
    padding: 12.5px 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #fd7e14;
}
.detail-header h1 {
    font-size: 28px; /* 기본 폰트 크기 */
    font-weight: 700;
    color: #fd7e14;
    margin: 0 0 4px 0;
    font-family: "Gowun Dodum", sans-serif;
}
.detail-header .sub-name { /* 부가 이름 스타일 (필요시 사용) */
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* --- Common Detail Section (지도, 정보, 갤러리 등) --- */
.detail-map-wrapper,
.info-section,
.gallery-section,
.no-map-placeholder, /* 지도 없을 때 */
.no-gallery-placeholder, /* 갤러리 없을 때 */
.no-info-placeholder /* 정보 없을 때 */
{
    margin-bottom: 20px; /* 섹션 간 간격 증가 */
    padding: 15px; /* 섹션 내부 패딩 증가 */
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.detail-map-wrapper:last-of-type,
.info-section:last-of-type,
.gallery-section:last-of-type {
    margin-bottom: 0;
}

/* 각 섹션 내부 제목 (h3) */
.detail-map-wrapper h3,
.info-section h3,
.gallery-section h3 {
    font-size: 20px; /* 제목 폰트 크기 조정 */
    font-weight: 600;
    color: #343a40;
    margin-top: 0;
    margin-bottom: 12px; /* 제목과 내용 간 간격 */
    padding-bottom: 8px; /* 제목 밑줄과의 간격 */
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
}
.detail-map-wrapper h3 i,
.info-section h3 i,
.gallery-section h3 i {
    margin-right: 8px; /* 아이콘과 텍스트 간격 */
    color: #fd7e14; /* 아이콘 색상 */
    font-size: 18px; /* 아이콘 크기 */
}

/* --- 1. Map Section --- */
.detail-map-wrapper iframe {
    width: 100%;
    height: 350px;
    border-radius: 8px;
    border: none;
}
.no-map-placeholder p,
.no-gallery-placeholder p,
.no-info-placeholder { /* p 태그가 아닌 경우도 있어서 .no-info-placeholder 자체에 스타일 */
    padding: 15px;
    text-align: center;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 16px;
    margin:0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.no-map-placeholder p i,
.no-gallery-placeholder p i,
.no-info-placeholder i {
    margin-right: 6px;
    font-size: 18px;
}
/* 모바일 전용 지도 섹션 (기본 숨김) */
.mobile-map-section {
    display: none; /* 모바일에서만 보이도록 아래 @media 에서 설정 */
    margin-top: 15px;
}
.mobile-map-section h4 { /* 모바일 지도 제목 스타일 */
    font-size: 17px;
    font-weight: 600;
    color: #343a40;
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}
.mobile-map-section h4 i {
    margin-right: 6px;
    color: #fd7e14;
    font-size: 16px;
}
.mobile-map-section iframe {
    width: 100%;
    height: 220px; /* 모바일 지도 높이 */
    border-radius: 8px;
    border: none;
}

/* --- 2. Basic Info Section --- */
.info-section .info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.info-section .info-list li {
    display: flex;
    align-items: flex-start; /* 레이블과 값이 여러 줄일 경우 상단 정렬 */
    padding: 8px 0; /* 항목 간 간격 */
    border-bottom: 1px dashed #e9ecef;
    font-size: 15px; /* 기본 폰트 크기 */
}
.info-section .info-list li:last-child {
    border-bottom: none;
}
.info-section .info-label {
    min-width: 100px; /* 레이블 최소 너비 */
    font-weight: 500;
    color: #495057;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-top: 1px; /* 아이콘과 텍스트 미세조정 */
}
.info-section .info-label i {
    margin-right: 6px;
    color: #868e96; /* 레이블 아이콘 색상 */
    width: 18px;
    text-align: center;
}
.info-section .info-value {
    color: #212529;
    word-break: break-word;
    flex-grow: 1;
}
.info-section .info-value.rating {
    color: #fd7e14; /* 평점 색상 */
    font-weight: bold;
    display: flex;
    align-items: center;
}
.info-section .info-value.rating i.fa-star { /* 평점 별 아이콘 */
    color: #ffc107; /* 채워진 별 색상 */
    margin-right: 3px;
    font-size: 1em; /* 텍스트 크기에 맞춤 */
}
.info-section .info-value.hashtags .tag {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-right: 5px;
    margin-bottom: 5px; /* 여러 줄일 경우 대비 */
}
.info-section .info-value.hashtags .detail-tag-discount {
    background-color: #fff3e0; /* 주황 계열 연한색 */
    color: #e65100; /* 주황 계열 진한색 */
    border: 1px solid #ffe0b2;
}
.info-section .info-value.hashtags .detail-tag-pickup {
    background-color: #e8f5e9; /* 초록 계열 연한색 */
    color: #1b5e20; /* 초록 계열 진한색 */
    border: 1px solid #c8e6c9;
}

.copy-btn {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 2.5px 8px; /* 패딩 조정 */
    font-size: 12px; /* 폰트 크기 조정 */
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    margin-left: 8px; /* 앞 내용과의 간격 */
    vertical-align: middle; /* 텍스트 옆에 잘 정렬되도록 */
}
.copy-btn:hover {
    background-color: #e2e6ea;
    border-color: #b8c0c7;
}
.copy-btn.copied {
    background-color: #28a745;
    color: white;
    border-color: #1f7a3d;
}
.copy-btn i { margin-right: 3px; } /* 아이콘과 '복사' 텍스트 간격 */
.copy-btn.copied i.fa-copy { display: none; }
.copy-btn i.fa-check { display: none; } /* 기본 숨김 */
.copy-btn.copied i.fa-check { display: inline-block; }


/* --- 3. Description Section (할인, 픽업, 기타 정보 등) --- */
.info-section .description-text {
    font-size: 15px;
    line-height: 1.7; /* 가독성 좋게 줄간격 조정 */
    color: #343a40;
    white-space: pre-wrap;
    background-color: #f8f9fa; /* 연한 배경 */
    padding: 12px 15px; /* 패딩 조정 */
    border-radius: 8px;
    border: 1px solid #e9ecef; /* 테두리 추가 */
}
.info-section .description-text.no-info-placeholder {
    color: #6c757d;
    /* background-color: transparent; */ /* 이미 no-info-placeholder 공통 스타일 있음 */
    /* border: none; */
}


/* --- 4. Menu Section (대표 메뉴) --- */
.info-section.menu-section .massageShop_menu_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* 반응형 그리드 */
    gap: 15px;
}
.massageShop_menu_item { /* JS에서 생성되는 메뉴 아이템 */
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.massageShop_menu_item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}
.massageShop_menu_item strong {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}
.massageShop_menu_item .price {
    display: block;
    font-size: 1em;
    color: #fd7e14;
    font-weight: bold;
    margin-bottom: 8px;
}
.massageShop_menu_item .desc {
    display: block;
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
}
/* animated-border 클래스는 JS에서 추가, 필요시 여기에 스타일 정의 */
.massageShop_menu_item.animated-border {
    /* 예시: border-left: 3px solid #fd7e14; */
}


/* --- 5. Photo Gallery Section --- */
.gallery-section .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* 반응형 그리드 */
    gap: 12px;
}
.gallery-section .gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1 / 1; /* 정사각형 비율 유지 */
    background-color: #e9ecef; /* 이미지 로딩 전 배경색 */
}
.gallery-section .gallery-item:hover .gallery-image {
    transform: scale(1.1);
}
.gallery-section .gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 이미지가 비율을 유지하며 꽉 차도록 */
    transition: transform 0.3s ease;
    cursor: pointer; /* 메뉴 이미지는 JS에서 모달 띄움 */
}
.gallery-section.menu-gallery-section .gallery-image { /* 메뉴 이미지는 클릭 가능 표시 */
    cursor: zoom-in;
}


/* --- Page Actions (하단 버튼들) --- */
.detail-actions {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}
.action-btn {
    display: inline-block;
    padding: 8px 20px; /* 버튼 크기 조정 */
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.25s ease;
    margin: 5px;
    border: none;
    cursor: pointer;
    font-family: "Gowun Dodum", sans-serif;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.action-btn i { margin-right: 6px; }
.action-btn.btn-primary { background-color: #fd7e14; color: white; }
.action-btn.btn-primary:hover { background-color: #e66a09; box-shadow: 0 5px 12px rgba(0,0,0,0.18); transform: translateY(-2px); }
.action-btn.btn-secondary { background-color: #6c757d; color: white; }
.action-btn.btn-secondary:hover { background-color: #5a6268; box-shadow: 0 5px 12px rgba(0,0,0,0.18); transform: translateY(-2px); }


/* --- "정보 없음" 컨테이너 --- */
.not-found-container {
    text-align: center;
    padding: 40px 15px;
    min-height: calc(70vh - 80px); /* 뷰포트 높이 기준으로 최소 높이 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fff; /* 기본 페이지 컨테이너와 유사하게 */
    margin: 20px auto; /* PC에서 detail-page-container와 유사한 마진 */
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.not-found-container h2 {
    color: #dc3545;
    font-size: 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}
.not-found-container h2 i {
    margin-right: 8px;
    font-size: 1.2em;
}
.not-found-container p {
    font-size: 17px;
    color: #555;
    margin-bottom: 20px;
}

/* --- Image Modal (기존 add-content에 있음) --- */
.image-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; /* JS로 제어 */
    justify-content: center;
    align-items: center;
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.image-modal-backdrop.visible {
    display: flex; /* JS에서 flex로 변경 */
    opacity: 1;
}
.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease-out;
}
.image-modal-content img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.image-modal-close-btn {
    position: absolute;
    top: -15px; /* 이미지 바깥 위쪽 */
    right: -15px; /* 이미지 바깥 오른쪽 */
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 38px; /* 수직 중앙 정렬 */
    text-align: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.image-modal-close-btn:hover {
    transform: scale(1.1);
    background-color: rgba(0,0,0,0.7);
}
body.modal-open {
    overflow: hidden; /* 스크롤 방지 */
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* --- 반응형 스타일 --- */
/* 태블릿 (769px ~ 991px) */
@media (max-width: 991px) {
    .detail-page-container {
        max-width: 100%; /* 태블릿에서는 꽉차게 */
        padding: 15px;
        margin-top: 20px; /* 헤더 고려 마진 감소 */
    }
    .detail-header h1 { font-size: 26px; }
    .detail-map-wrapper, .info-section, .gallery-section { padding: 12px; }
    .info-section h3, .gallery-section h3 { font-size: 19px; }
    .info-section .info-list li { font-size: 14px; }
    .info-section .info-label { min-width: 90px; }
    .gallery-section .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .detail-map-wrapper iframe { height: 300px; }
}

/* 모바일 (최대 768px) */
@media (max-width: 768px) {
    .detail-page-container {
        padding: 10px;
        border-radius: 0;
        box-shadow: none;
        margin-top: 0; /* 모바일에서는 상단에 붙임 (userTemp에 따라 조절) */
        margin-bottom: 0;
    }
    .detail-header {
        padding: 10px 7.5px;
        margin-bottom: 10px;
    }
    .detail-header h1 { font-size: 22px; }

    .detail-map-wrapper, .info-section, .gallery-section {
        padding: 10px;
        margin-bottom: 15px;
        border-left: none;
        border-right: none;
        border-radius: 0; /* 모바일에서는 섹션 테두리 둥글게 안함 */
    }
    .info-section h3, .gallery-section h3 { font-size: 18px; }

    /* 모바일에서 PC 지도는 숨기고 모바일 지도 보이기 */
    .detail-map-wrapper { display: none; }
    .mobile-map-section { display: block; }


    .info-section .info-label {
        min-width: auto; /* 레이블 너비 자동 */
        margin-bottom: 3px;
        font-weight: bold; /* 모바일에서 레이블 강조 */
    }
    .info-section .info-list li {
        flex-direction: column; /* 레이블과 값을 수직으로 쌓음 */
        align-items: flex-start;
        padding: 6px 0;
    }
    .info-section .info-value { margin-top: 2px; }
    .info-section .address-item { flex-direction: row; align-items: center; } /* 주소는 한 줄로 */
    .info-section .address-item .info-label { margin-bottom: 0; } /* 주소 레이블 마진 제거 */

    .gallery-section .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* 이미지 크기 더 작게 */
        gap: 8px;
    }

    .detail-actions { margin-top: 20px; padding-top: 15px; }
    .action-btn {
        padding: 10px 15px;
        font-size: 14px;
        display: block; /* 버튼을 블록 요소로 만들어 전체 너비 차지 */
        width: 100%;
        box-sizing: border-box; /* 패딩, 테두리 포함 너비 계산 */
    }
    .action-btn + .action-btn { margin-top: 8px; margin-left: 0; } /* 버튼 간 세로 간격 */

    .not-found-container {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
        min-height: 80vh; /* 모바일에서 좀 더 꽉차게 */
    }
    .not-found-container h2 { font-size: 20px; }
    .not-found-container p { font-size: 16px; }
}