/* 이 부분은 total/userTemp의 기본 스타일을 오버라이드하거나 추가하는 내용입니다. */
/* shopping_guide.css로 옮겨도 무방합니다. */
body { font-family: "Gowun Dodum", sans-serif; margin: 0;  color: #333; } /* 배경/텍스트 색상 조정 */
.shopping_wrapper { max-width: 1200px; margin: 0 auto; padding: 20px; } /* 기존 wrapper 클래스명 변경 */

/* 헤더 및 네비게이션 스타일 */
header {
    background-color: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
header h1 {
    margin: 0;
    font-size: 24px;
    color: #fd7e14; /* 테마 색상 */
}
header nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    gap: 20px;
}
header nav a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    padding: 5px 0;
    transition: color 0.3s ease;
}
header nav a:hover {
    color: #fd7e14;
}


/* 기존 touristDestination CSS에서 필요한 부분 복사/수정 */
/* --- 섹션 스타일 --- */
.shopping-section {
    margin-top: 70px;
    background-color: #fff;
    padding: 30px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0; /* 애니메이션 초기 상태 */
    transform: translateY(20px); /* 애니메이션 초기 상태 */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.shopping-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 35px;
    color: #fd7e14;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    display: flex;
    justify-content: center;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.info-block {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fefefe;
    border-left: 4px solid #fd7e14;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-block h3 {
    font-size: 24px;
    color: #fd7e14;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
}

/* --- 테이블 스타일 --- */
.table-container {
    width: 100%;
    overflow-x: auto; /* 가로 스크롤 */
    margin-top: 15px;
    -webkit-overflow-scrolling: touch; /* 모바일 부드러운 스크롤 */
}

.shopping-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px; /* 테이블 최소 너비 설정 (모바일에서 스크롤되도록), 컬럼 합계 너비 고려하여 조정 */
    table-layout: fixed; /* <-- 컬럼 너비 고정 */
}

.shopping-table th,
.shopping-table td {
    padding: 8px 10px; /* 패딩 조정 */
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    word-break: break-word; /* 내용이 길 경우 단어 단위로 줄바꿈 */
}

.shopping-table th {
    background-color: #fd7e14;
    color: white;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 0px;
}

/* 컬럼별 너비 지정 */
.shopping-table th:nth-child(1),
.shopping-table td:nth-child(1) {
    width: 15%; /* 카테고리 */
}
.shopping-table th:nth-child(2),
.shopping-table td:nth-child(2) {
    width: 25%; /* 상품 */
}
.shopping-table th:nth-child(3),
.shopping-table td:nth-child(3) {
    width: 10%; /* 매장 번호 */
}
.shopping-table th:nth-child(4),
.shopping-table td:nth-child(4) {
    width: 20%; /* 가격/범위 */
}
.shopping-table th:nth-child(5),
.shopping-table td:nth-child(5) {
    width: 30%; /* 비고 (나머지) */
}


.shopping-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.shopping-table tbody tr:hover {
    background-color: #dfe0ff;
}

/* 필터링으로 숨겨진 행 스타일 */
.shopping-table tbody tr.table-row-hidden {
    display: none;
}


.shopping-table td {
    color: #555;
    font-size: 14px;
}

/* 비고 셀 스타일 */
.shopping-table td:last-child {
    font-size: 13px;
    color: #6c757d;
}
.shopping-table td strong {
    color: #007bff; /* 강조 색상 */
    font-weight: normal;
}
.shopping-table td .note-highlight {
    color: #28a745; /* 긍정적 강조 */
    font-weight: bold;
}
.shopping-table td .note-caution {
    color: #dc3545; /* 부정적 강조 */
    font-weight: bold;
}

/* 테이블 내용 페이드인 애니메이션 */
@keyframes fadeInTable {
    from { opacity: 0.5; }
    to { opacity: 1; }
}
.shopping-table tbody.table-body-fade-in {
    animation: fadeInTable 0.4s ease-out;
}


/* --- 팁 및 주의사항 스타일 --- */
.tips-list {
    list-style: disc;
    padding-left: 20px;
    margin-top: 15px;
}

.tips-list li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

.tips-list strong {
    color: #fd7e14;
}

.avoid-list {
    list-style: none; /* 마커 제거 */
    padding-left: 0;
    margin-top: 15px;
    border: 1px solid #dc3545; /* 경고 테두리 */
    border-radius: 5px;
    padding: 15px;
    background-color: #f8d7da; /* 경고 배경색 */
}

.avoid-list li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #721c24; /* 경고 텍스트 색상 */
    font-weight: 500;
}

.avoid-list li::before {
    content: '🚨'; /* 이모티콘 마커 */
    margin-right: 8px;
}

/* 개별 구매 내역 스타일 */
.purchase-details {
    margin-top: 20px;
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 5px;
    background-color: #f8f9fa;
    font-size: 14px;
}
.purchase-details h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}
.purchase-details ul {
    list-style: none;
    padding-left: 0;
}
.purchase-details li {
    margin-bottom: 5px;
    line-height: 1.5;
}
.purchase-details li strong {
    color: #0056b3;
}

/* --- 필터 버튼 스타일 --- */
.shopping-filter-container {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #babbff00;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.shopping-filter-container h4 {
    margin-top: 3px;
    margin-bottom: 10px;
    color: #fd7e14;
    font-size: 24px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ced4da;
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
}
.shopping-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px !important;
    margin-top: 10px;
    padding: 10px;
    background-color: #fffaf5;
}

.shopping-filter-btn {
    padding: 6px 12px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    color: #495057;
    font-weight: bold;
    font-family: "Gowun Dodum", sans-serif;
}

.shopping-filter-btn:hover {
    background-color: #fff0e6;
    border-color: #fdac7a;
    box-shadow: 0 2px 5px rgba(253, 126, 20, 0.1);
}

.shopping-filter-btn.active {
    background-color: #fd7e14;
    color: white;
    border-color: #fd7e14;
    font-weight: 500;
}

/* --- 지도 링크 스타일 개선 --- */
.shopping_shoppingMap {
    /* 이 컨테이너는 링크 자체를 중앙에 배치하는 역할 */
    display: flex;
    justify-content: center; /* 수평 가운데 정렬 */
    align-items: center; /* 수직 가운데 정렬 */
    margin: 25px 0; /* 위아래 여백 */
}

.shopping_shoppingMap_a {
    /* 이 링크(a 태그)가 실제 클릭 가능한 블록 */
    display: flex; /* 이미지와 텍스트를 함께 정렬 */
    align-items: center; /* 수직 가운데 정렬 */
    text-decoration: none; /* 밑줄 제거 */
    color: #343a40; /* 글자 색상 */
    font-size: 20px; /* 글자 크기 */
    font-weight: 700; /* 글자 굵기 */
    gap: 15px; /* 이미지와 텍스트 사이 간격 */
    padding: 15px 25px; /* 링크 내부 패딩 */
    background-color: #fff; /* 배경색 */
    border: 1px solid #dee2e6; /* 은은한 테두리 */
    border-radius: 8px; /* 둥근 모서리 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 부드러운 그림자 */
    transition: all 0.3s ease; /* 애니메이션 효과 */
}

.shopping_shoppingMap_a:hover {
    background-color: #f8f9fa; /* 호버 시 배경색 변경 */
    border-color: #fd7e14; /* 호버 시 테두리 색상 변경 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* 호버 시 그림자 강조 */
    transform: translateY(-2px); /* 호버 시 살짝 위로 이동 */
    color: #e8700f; /* 호버 시 글자 색상 변경 */
}

.shopping_shoppingMap_img {
    width: 50px; /* 이미지 고정 너비 */
    height: 50px; /* 이미지 고정 높이 */
    object-fit: cover; /* 이미지 비율 유지하며 채우기 */
    border-radius: 6px; /* 이미지 둥근 모서리 */
    border: none; /* 이미지 테두리 제거 */
}
/* --- 지도 링크 스타일 개선 끝 --- */


/* --- 반응형 디자인 --- */
@media (max-width: 768px) {
    .shopping_wrapper { padding: 0px; }
    header { padding: 10px; }
    header h1 { font-size: 20px; }
    header nav ul { gap: 10px; flex-wrap: wrap; justify-content: center;}
    header nav a { font-size: 14px; }

    .shopping-section {
        margin-top: 0px; /* 모바일 상단 여백 조정 */
        padding: 20px 10px; margin-bottom: 15px; }
    .section-title { font-size: 35px; margin-bottom: 20px; display: flex; justify-content: center;}
    .info-block { padding: 8px; margin-bottom: 20px; }
    .info-block h3 { font-size: 18px; margin-bottom: 10px; }

    .shopping-table th,
    .shopping-table td { padding: 6px 8px; font-size: 11px;} /* 모바일에서 패딩/폰트 크기 더 줄임 */

    /* 모바일 컬럼 너비 조정 (필요시) */
    .shopping-table th:nth-child(1),
    .shopping-table td:nth-child(1) { width: 18%; } /* 카테고리 너비 조정 */
    .shopping-table th:nth-child(2),
    .shopping-table td:nth-child(2) { width: 28%; } /* 상품 너비 조정 */
    .shopping-table th:nth-child(3),
    .shopping-table td:nth-child(3) { width: 10%; } /* 매장 번호 */
    .shopping-table th:nth-child(4),
    .shopping-table td:nth-child(4) { width: 19%; } /* 가격/범위 조정 */
    .shopping-table th:nth-child(5),
    .shopping-table td:nth-child(5) { width: 25%; } /* 비고 조정 (남은 공간) */
    /* 총합이 100% 근처가 되도록 조정, min-width는 그대로 유지하여 스크롤 유도 */
    .shopping-table { min-width: 600px; /* 모바일에서 테이블 최소 너비 조정 */ }


    .shopping-table td:last-child {
        font-size: 10px;
    }

    .tips-list { padding-left: 15px; }
    .tips-list li { margin-bottom: 8px; font-size: 13px; }
    .avoid-list { padding: 10px; font-size: 13px; }
    .avoid-list li { margin-bottom: 5px; }
    .avoid-list li::before { margin-right: 5px; }

    .purchase-details { padding: 10px; font-size: 13px; }
    .purchase-details h4 { font-size: 15px; }
    .purchase-details li { margin-bottom: 3px; }

    .shopping-filter-container { padding: 10px; margin-bottom: 15px;}
    .shopping-filter-container h4 { font-size: 15px; margin-bottom: 8px;}
    .shopping-filter-buttons { gap: 6px;}
    .shopping-filter-btn { padding: 5px 10px; font-size: 11px;}

    /* --- 모바일 지도 링크 스타일 조정 --- */
    .shopping_shoppingMap {
        margin: 15px 0; /* 모바일 위아래 여백 조정 */
    }
    .shopping_shoppingMap_a {
        font-size: 16px; /* 모바일 글자 크기 */
        padding: 10px 15px; /* 모바일 내부 패딩 */
        gap: 10px; /* 모바일 이미지-텍스트 간격 */
    }
    .shopping_shoppingMap_img {
        width: 40px; /* 모바일 이미지 크기 */
        height: 40px;
    }
    /* --- 모바일 지도 링크 스타일 조정 끝 --- */
}

/* 기존 지도 링크 관련 불필요한 스타일 제거 */
/*
.shopping_shoppingMap{
    cursor: pointer;
    border-radius: 5px;
}
.shopping_shoppingMap_a{
    font-size: 32px;
    display: flex;
    color: black;
    font-weight: bold;
    cursor: pointer;
    justify-content: center;
    align-items: center;

}
.shopping_shoppingMap_img{
    margin-right: 10px;
    border-radius: 5px;
    border: 3px solid #fd7e14;
}
*/