/* 공통 설정 */
:root { --primary: #FFD700; --text: #333; --bg: #fdfbf7; --border: #e0e0e0; }
body {
    margin: 0; padding: 0; font-family: 'Pretendard', sans-serif;
    background-color: var(--bg); color: var(--text);
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 50px; 
}

/* 안내 박스 (여행사 아님 강조) */
.intro-box {
    text-align: center; background: #eef4ff; color: #4466aa;
    padding: 12px; border-radius: 8px; margin-bottom: 20px;
    font-size: 13px; border: 1px solid #dceeff;
}
.intro-box i { margin-right: 5px; }

/* 헤더 */
.mobile-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: #fff; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border); }
.pc-header { display: none; text-align: center; padding: 50px 0 30px; background: #fff; border-bottom: 1px solid var(--border); }
.logo { font-size: 24px; font-weight: 900; letter-spacing: -1px; color: #222; }
.dot { color: var(--primary); }
.subtitle { font-size: 15px; color: #666; margin-top: 10px; }
.subtitle strong { color: #222; text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; }

/* 필터 */
.filters-wrap { background: #fff; border-bottom: 1px solid var(--border); padding: 15px 0; position: sticky; top: 56px; z-index: 90; }
.filters { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.filter-btn { padding: 8px 16px; border-radius: 20px; border: 1px solid #ddd; background: #fff; color: #555; font-size: 13px; font-weight: 600; transition: 0.2s; cursor: pointer; }
.filter-btn span.count { font-size: 11px; color: #999; margin-left: 2px; }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4); }

/* 메인 컨테이너 */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; transition: padding-bottom 0.3s; }
.container.calc-open { padding-bottom: 350px; } /* 계산기 공간 확보 */

/* 그리드 */
.travel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; justify-content: center; }

/* 카드 디자인 */
.card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 3px solid transparent; transition: all 0.3s; position: relative; display: flex; flex-direction: column; cursor: pointer; }
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.card.active { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2); }

.card-img-box { height: 200px; background: #eee; position: relative; overflow: hidden; }
.card-img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card-img-box .badge { position: absolute; top: 15px; left: 15px; background: rgba(0,0,0,0.7); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 4px; backdrop-filter: blur(2px); }

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-nation { font-size: 12px; font-weight: 700; color: #888; text-transform: uppercase; margin-bottom: 5px; }
.card-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; color: #222; }
.card-desc { font-size: 14px; color: #666; line-height: 1.5; margin-bottom: 15px; }

/* DIY 섹션 */
.diy-section { background: #fcfcfc; padding: 15px; border-radius: 12px; margin-top: auto; border: 1px solid #f0f0f0; }
.diy-head { font-size: 13px; font-weight: 700; color: #444; margin-bottom: 10px; display: block; }
.diy-head i { color: var(--primary); margin-right: 5px; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: #555; cursor: pointer; padding: 6px; border-radius: 6px; transition: 0.2s; background: #fff; border: 1px solid #eee; }
.check-item:hover { border-color: var(--primary); }
.check-item input { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
.check-price { font-size: 11px; color: #888; margin-left: auto; font-weight: 600; }

/* 하단 계산기 바 (중요: 시뮬레이터 느낌) */
.calc-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; box-shadow: 0 -5px 30px rgba(0,0,0,0.15);
    padding: 25px 20px 20px; border-radius: 24px 24px 0 0;
    z-index: 1000; transform: translateY(120%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.calc-bar.show { transform: translateY(0); }

.btn-close-calc { position: absolute; top: 10px; right: 20px; background: none; border: none; font-size: 20px; color: #999; cursor: pointer; padding: 5px; }

.calc-wrap { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.calc-header { border-bottom: 1px solid #eee; padding-bottom: 10px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; }
.calc-title { font-size: 18px; font-weight: 800; color: #222; margin-right: 10px; }

/* 수수료 없음 배지 */
.no-fee-badge {
    font-size: 11px; background: #e8f5e9; color: #2e7d32;
    padding: 4px 8px; border-radius: 4px; font-weight: 700; border: 1px solid #c8e6c9;
}

.calc-info { font-size: 11px; color: #888; margin-left: auto; }

.calc-body { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.calc-controls { display: flex; gap: 15px; }
.control-group label { font-size: 11px; color: #888; font-weight: 700; display: block; margin-bottom: 4px; }
.stepper { display: flex; align-items: center; gap: 10px; background: #f5f5f5; padding: 5px 12px; border-radius: 20px; }
.stepper button { width: 24px; height: 24px; border-radius: 50%; border: none; background: #fff; cursor: pointer; font-weight: bold; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stepper span { font-size: 14px; font-weight: 700; width: 20px; text-align: center; }

.price-display { text-align: right; margin-left: auto; }
.price-label { font-size: 11px; color: #555; display: block; margin-bottom: 2px; }
.final-price { font-size: 24px; font-weight: 900; color: #333; letter-spacing: -0.5px; }

.calc-actions { display: flex; gap: 10px; margin-top: 5px; }
/* 버튼 스타일 변경 (예약하러 가기) */
.btn-check {
    flex: 2; background: #222; color: #fff; padding: 14px; border-radius: 12px;
    text-decoration: none; font-weight: 700; text-align: center;
    display: flex; justify-content: center; align-items: center; gap: 6px;
    transition: 0.2s; font-size: 14px;
}
.btn-check:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-save { flex: 1; background: #fff; border: 1px solid #ddd; color: #333; padding: 14px; border-radius: 12px; font-weight: 700; cursor: pointer; transition: 0.2s; font-size: 14px; }
.btn-save:hover { background: #f5f5f5; }

.calc-disclaimer { font-size: 11px; color: #aaa; margin-top: 5px; text-align: center; }

/* 푸터 */
footer { text-align: center; padding: 40px 20px 80px; background: #f4f4f4; color: #888; font-size: 12px; margin-top: 50px; }
.warning { margin-top: 10px; color: #aaa; line-height: 1.5; }

/* AI */
.ai-float-btn { position: fixed; bottom: 30px; right: 20px; width: 50px; height: 50px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.2); font-size: 24px; color: #fff; cursor: pointer; z-index: 990; transition: transform 0.3s; }
.ai-float-btn:hover { transform: scale(1.1); }
.ai-modal { position: fixed; bottom: 90px; right: 20px; width: 300px; background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); z-index: 1001; display: none; overflow: hidden; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ai-header { background: #222; color: #fff; padding: 12px 15px; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.ai-header button { background: none; border: none; color: #fff; cursor: pointer; }
.ai-chat-box { height: 200px; padding: 15px; overflow-y: auto; background: #f8f8f8; font-size: 13px; }
.msg.ai { background: #fff; padding: 8px 12px; border-radius: 10px; border: 1px solid #eee; margin-bottom: 10px; display: inline-block; }
.msg.user { background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 10px; float: right; margin-bottom: 10px; clear: both; }
.ai-input-area { display: flex; border-top: 1px solid #eee; padding: 8px; background: #fff; }
.ai-input-area input { flex: 1; border: none; outline: none; font-size: 13px; }
.ai-input-area button { background: none; border: none; color: var(--primary); font-size: 16px; cursor: pointer; }

/* 미디어쿼리 */
@media (max-width: 768px) {
    .pc-header { display: none; }
    .filters { justify-content: flex-start; }
    .travel-grid { grid-template-columns: 1fr; }
    .calc-body { flex-direction: column; align-items: flex-start; }
    .calc-controls { width: 100%; justify-content: space-between; }
    .price-display { width: 100%; text-align: right; margin-top: 15px; border-top: 1px solid #f5f5f5; padding-top: 10px; }
    .calc-bar { padding-bottom: 30px; }
}
@media (min-width: 769px) {
    .mobile-header { display: none; }
    .pc-header { display: block; }
}