/* 이 부분은 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;
    text-align: left;
    line-height: 1.75;
    font-weight: 600;
    letter-spacing: 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.shopping_wrapper *, .shopping_wrapper *::before { box-sizing: border-box; }

/* 헤더 및 네비게이션 스타일 */
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: 32px;
    margin-bottom: 32px;
}

.shopping-section + .shopping-section {
    margin-top: 32px;
}

.shopping_wrapper .section-title {
    font-size: 30px;
    color: #fd7e14;
    margin: 0 0 24px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 16px;
    line-height: 1.4;
    text-align: left;
    font-weight: 700;
    text-shadow: none;
}

.info-block {
    margin: 0 0 32px;
    padding: 0;
}
.shopping_wrapper .info-block:last-child { margin-bottom: 0; }
.shopping_wrapper .info-block + .info-block {
    border-top: 1px solid #e9ecef;
    padding-top: 28px;
}
.shopping_wrapper .info-block > p { margin: 0 0 20px; }
.shopping_wrapper .info-block h4 {
    margin: 24px 0 12px;
    font-size: 18px;
    line-height: 1.5;
    text-align: left;
}
.shopping_wrapper .shopping-price-note { font-size: 14px; color: #6c5151; }
.shopping-table .price-unit {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #50565c;
}
.shopping_wrapper .table-container:focus-visible {
    outline: 2px solid #fd7e14;
    outline-offset: 3px;
}

.info-block h3 {
    font-size: 22px;
    color: #fd7e14;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.5;
    font-weight: bold;
}

/* --- 테이블 스타일 --- */
.table-container {
    width: 100%;
    overflow-x: auto; /* 가로 스크롤 */
    max-width: 100%;
    margin-top: 15px;
    -webkit-overflow-scrolling: touch; /* 모바일 부드러운 스크롤 */
}

.shopping-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    table-layout: fixed; /* <-- 컬럼 너비 고정 */
}

.shopping-table th,
.shopping-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    line-height: 1.65;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.shopping-table th {
    background-color: #fd7e14;
    color: white;
    font-weight: 600;
    white-space: normal;
    border-radius: 0px;
}

/* 컬럼별 너비 지정 */
.shopping-table th:nth-child(1),
.shopping-table td:nth-child(1) {
    width: 12%; /* 카테고리 */
}
.shopping-table th:nth-child(2),
.shopping-table td:nth-child(2) {
    width: 24%; /* 상품 */
}
.shopping-table th:nth-child(3),
.shopping-table td:nth-child(3) {
    width: 17%; /* 매장 번호 */
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.shopping-table th:nth-child(4),
.shopping-table td:nth-child(4) {
    width: 22%; /* 가격/범위 */
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.shopping-table th:nth-child(5),
.shopping-table td:nth-child(5) {
    width: 25%; /* 비고 */
}


.shopping-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.shopping-table tbody tr:hover {
    background-color: #fff5eb;
}

/* 필터링으로 숨겨진 행 스타일 */
.shopping-table tbody tr.table-row-hidden {
    display: none;
}


.shopping-table td {
    color: #333;
    font-size: 14px;
}

/* 비고 셀 스타일 */
.shopping-table td:last-child {
    font-size: 14px;
    color: #50565c;
}
.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: 24px;
    margin: 0;
}

.tips-list li {
    margin-bottom: 10px;
    line-height: 1.8;
    color: #333;
}

.tips-list strong {
    color: #fd7e14;
}

.avoid-list {
    list-style: none; /* 마커 제거 */
    padding-left: 0;
    margin: 0;
    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: 600;
    position: relative;
    padding-left: 28px;
    overflow-wrap: anywhere;
}

.avoid-list li::before {
    content: '🚨'; /* 이모티콘 마커 */
    position: absolute;
    left: 0;
    top: 0;
}
.tips-list li:last-child, .avoid-list li:last-child { margin-bottom: 0; }

/* 개별 구매 내역 스타일 */
.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 {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: start;
    gap: 20px 24px;
    margin: 24px 0;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}
.shopping-search {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
}
.shopping-search label {
    color: #fd7e14;
    font-size: 16px;
    font-weight: bold;
}
.shopping-search input {
    width: min(100%, 560px);
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid #adb5bd;
    border-radius: 6px;
    background-color: #fff;
    color: #212529;
    font-family: "Gowun Dodum", sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}
.shopping-search input::placeholder { color: #6c757d; opacity: 1; }
.shopping-search input:hover { border-color: #fdac7a; }
.shopping-search input:focus {
    border-color: #fd7e14;
    outline: 3px solid rgba(253, 126, 20, 0.18);
    outline-offset: 1px;
}
.shopping_wrapper .shopping-filter-container h4 {
    margin: 0;
    color: #fd7e14;
    font-size: 16px;
    padding: 7px 0;
    font-weight: bold;
}
.shopping-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    align-items: flex-start;
}

.shopping-filter-btn {
    padding: 6px 12px;
    min-height: 36px;
    max-width: 100%;
    line-height: 1.5;
    text-align: center;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s 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: bold;
}

/* --- 지도 링크 스타일 개선 --- */
.shopping_shoppingMap {
    /* 이 컨테이너는 링크 자체를 중앙에 배치하는 역할 */
    display: flex;
    justify-content: flex-start;
    align-items: center; /* 수직 가운데 정렬 */
    margin: 25px 0; /* 위아래 여백 */
}

.shopping_shoppingMap_a {
    /* 이 링크(a 태그)가 실제 클릭 가능한 블록 */
    display: flex; /* 이미지와 텍스트를 함께 정렬 */
    max-width: 100%;
    line-height: 1.5;
    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; /* 이미지 고정 높이 */
    flex-shrink: 0;
    object-fit: cover; /* 이미지 비율 유지하며 채우기 */
    border-radius: 6px; /* 이미지 둥근 모서리 */
    border: none; /* 이미지 테두리 제거 */
}
/* --- 지도 링크 스타일 개선 끝 --- */


/* --- 반응형 디자인 --- */
@media (max-width: 768px) {
    .shopping_wrapper { padding: 0; }
    .shopping-section {
        margin-top: 0;
        padding: 24px 16px;
        margin-bottom: 20px;
    }
    .shopping-section + .shopping-section { margin-top: 20px; }
    .shopping_wrapper .section-title {
        font-size: 24px;
        margin-bottom: 20px;
        padding-bottom: 14px;
    }
    .shopping_wrapper .info-block { margin-bottom: 24px; }
    .shopping_wrapper .info-block:last-child { margin-bottom: 0; }
    .shopping_wrapper .info-block h3 { font-size: 19px; }
    .shopping_wrapper .info-block h4 { font-size: 17px; }
    .shopping_wrapper .info-block > p { font-size: 14px; }

    /* Keep columns legible; only the table scrolls horizontally. */
    .shopping-table th, .shopping-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
    .shopping-table td:last-child { font-size: 14px; }
    .tips-list { padding-left: 22px; }
    .tips-list li { font-size: 14px; margin-bottom: 12px; }
    .avoid-list { padding: 14px; font-size: 14px; }
    .avoid-list li { margin-bottom: 12px; line-height: 1.8; }
    .tips-list li:last-child, .avoid-list li:last-child { margin-bottom: 0; }

    .shopping-filter-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        margin: 20px 0;
        padding: 16px 0;
    }
    .shopping-search {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
    .shopping-search input { width: 100%; }
    .shopping_wrapper .shopping-filter-container h4 {
        font-size: 16px;
        padding: 0;
    }
    .shopping_wrapper .shopping-filter-container .shopping-filter-buttons + h4 {
        margin-top: 10px;
    }
    .shopping-filter-buttons { gap: 8px; }
    .shopping-filter-btn { padding: 7px 11px; font-size: 14px; }

    .shopping_shoppingMap { margin: 20px 0 24px; }
    .shopping_shoppingMap_a {
        font-size: 16px;
        padding: 12px 16px;
        gap: 12px;
    }
    .shopping_shoppingMap_img { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .shopping_wrapper .table-body-fade-in { animation: none; }
    .shopping_wrapper .shopping_shoppingMap_a,
    .shopping_wrapper .shopping-filter-btn { transition: none; }
}

/* 기존 지도 링크 관련 불필요한 스타일 제거 */
/*
.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;
}
*/
