/* [PAIRIN Master Design System vFinal_Fixed] */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&family=Pretendard:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #FAF9F6;
    --white: #FFFFFF;
    --text-main: #2C2C2C;
    --text-sub: #555555;
    --primary: #722F37;
    --primary-light: #F3E5E6;
    --secondary: #D4AF37;
    --line: #E5E3DF;
    
    --radius-s: 4px;
    --radius-m: 12px;
    --radius-l: 24px;
    --shadow: 0 10px 30px rgba(0,0,0,0.06);
    --max-width: 600px;
    --header-height: 60px;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: #EAE8E4; /* PC 배경 */
    color: var(--text-main);
    margin: 0; padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex; justify-content: center; 
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul, li { list-style: none; padding: 0; margin: 0; }
.hidden { display: none !important; }
.serif { font-family: 'Montserrat', sans-serif; letter-spacing: -0.02em; }

/* --- 레이아웃 (기본) --- */
.container {
    width: 100%; 
    max-width: var(--max-width); 
    background-color: var(--bg-color);
    min-height: 100vh; 
    position: relative; 
    padding-top: var(--header-height); /* 헤더 공간 */
    padding-bottom: 80px; /* 하단바 공간 */
    box-shadow: 0 0 50px rgba(0,0,0,0.05);
    box-sizing: border-box;
    margin: 0 auto;
}



/* --- 헤더 (무조건 상단 고정) --- */
.header {
    position: fixed; 
    top: 0; 
    left: 0;
    right: 0;
    margin: 0 auto;    
    width: 100%; 
    max-width: var(--max-width); 
    height: var(--header-height);
    background: rgba(249, 249, 249, 0.95); 
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; 
    border-bottom: 1px solid rgba(0,0,0,0.05);
}


.logo { 
    font-family: 'Pretendard', sans-serif; 
    font-weight: 800; font-size: 20px; 
    color: var(--text-main); letter-spacing: -0.03em; 
    text-transform: uppercase;
}
.menu-btn { position: absolute; font-size: 20px; color: var(--text-main); cursor: pointer; padding: 10px; }
.menu-btn.left { left: 10px; }
.menu-btn.right { right: 10px; }

/* --- 하단 바 (무조건 하단 고정) --- */
.bottom-bar {
    position: fixed; 
    bottom: 0; 
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%; 
    max-width: var(--max-width);
    padding: 12px 24px; 
    background: var(--white); 
    border-top: 1px solid var(--line); 
    z-index: 1000;
    display: flex; gap: 10px; align-items: center; 
    box-sizing: border-box;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}


/* 버튼 스타일 */
.check-btn-small { flex: 1; background: #fff; border: 1px solid var(--line); color: var(--text-sub); padding: 16px; border-radius: var(--radius-s); font-weight: 600; text-align: center; font-size: 14px; cursor: pointer; height: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center;}
.main-btn-large { flex: 3; background: var(--primary); color: white; padding: 16px; border-radius: var(--radius-s); font-weight: 700; border:none; font-size: 16px; cursor: pointer; box-shadow: 0 4px 15px rgba(106, 66, 70, 0.3); }

/* --- 메인 콘텐츠 스타일 --- */
.product-hero { position: relative; height: 360px; }
.product-hero img { width: 100%; height: 100%; object-fit: cover; }

.product-info { padding: 30px 24px; background: var(--bg-color); }
.tag-box { display: flex; gap: 8px; margin-bottom: 12px; }
.tag { display: inline-block; background: var(--secondary); color: var(--white); padding: 4px 10px; border-radius: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.title { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 800; margin: 0 0 10px 0; line-height: 1.3; color: var(--text-main); letter-spacing: -0.02em; }
.price { font-size: 20px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.price span { font-size: 14px; color: #999; font-weight: 400; text-decoration: line-through; }

/* --- 탭 메뉴 (Sticky) --- */
.tabs { 
    display: flex; background: var(--bg-color); 
    position: sticky; top: var(--header-height); 
    z-index: 900; border-bottom: 1px solid var(--line); padding: 0 5px;
}

.tab-btn { flex: 1; padding: 15px 0; text-align: center; font-size: 14px; color: #999; font-weight: 500; cursor: pointer; transition: 0.3s; border-bottom: 2px solid transparent; letter-spacing: -0.5px; }
.tab-btn.active { color: var(--primary); font-weight: 700; border-bottom: 2px solid var(--primary); }

.tab-content { padding: 40px 24px; background: var(--bg-color); min-height: 300px; animation: fadeIn 0.3s; }
.tab-content h3 { font-family: 'Montserrat', sans-serif; letter-spacing: -0.01em; font-size: 18px; margin: 30px 0 15px; font-weight: 700; color: var(--text-main); border-left: 3px solid var(--primary); padding-left: 10px; }
.tab-content h3:first-child { margin-top: 0; }
.tab-content p { font-size: 15px; color: var(--text-sub); line-height: 1.7; margin-bottom: 20px; }
.tab-content img { width: 100%; border-radius: var(--radius-m); margin: 10px 0 20px 0; }

/* --- 요소들 --- */
.promise-box { background: var(--primary-light); padding: 25px; border-radius: var(--radius-m); border: 1px solid rgba(106, 66, 70, 0.1); }
.promise-list li { margin-bottom: 10px; padding-left: 20px; position: relative; font-size: 14px; color: var(--text-main); }
.promise-list li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: bold; }

.biz-table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--text-sub); margin-bottom: 20px;}
.biz-table th { text-align: left; padding: 6px 0; width: 70px; color: var(--text-main); font-weight: 600; vertical-align: top; }
.biz-table td { padding: 6px 0; line-height: 1.5; }

/* --- 모달 (Bottom Sheet) --- */
.overlay { 
    position: fixed; top: 0; 
    left: 50%; transform: translateX(-50%); 
    width: 100%; max-width: var(--max-width); height: 100%;
    background: rgba(44, 44, 44, 0.6); z-index: 2000; 
    display: none; backdrop-filter: blur(3px); 
}

.bottom-sheet {
    position: fixed; bottom: -100%; 
    left: 50%; transform: translateX(-50%); 
    width: 100%; max-width: var(--max-width);
    background: var(--white); border-radius: 20px 20px 0 0; z-index: 2100;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh; overflow-y: auto; 
    padding: 30px 24px; padding-bottom: 50px; 
    box-sizing: border-box;
}

.sheet-header { display: flex; justify-content: space-between; margin-bottom: 30px; align-items: center; }
.sheet-title { font-size: 20px; font-weight: 700; font-family: 'Montserrat', sans-serif; color: var(--primary); letter-spacing: -0.02em; }

.label { font-size: 13px; font-weight: 700; color: var(--text-sub); margin-bottom: 8px; display: block; text-transform: uppercase; letter-spacing: 0.05em; }
.input-box, .select-box {
    width: 100%; height: 50px; /* 높이 고정 */
    padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-s);
    font-size: 16px; box-sizing: border-box; outline: none; background: #FAFAFA;
    transition: 0.3s; margin-bottom: 24px; color: var(--text-main);
    display: flex; align-items: center;
}
.input-box:focus { border-color: var(--primary); background: #fff; }

.gender-group { display: flex; gap: 10px; margin-bottom: 24px; }
.gender-btn {
    flex: 1; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-s);
    text-align: center; cursor: pointer; font-weight: 600; background: #FAFAFA; color: #999;
}
.gender-btn.selected { border: 1px solid var(--primary); background: var(--primary-light); color: var(--primary); }

/* [수정됨] 인증번호 그룹 스타일 (찌그러짐 방지) */
.auth-group { display: flex; gap: 10px; margin-bottom: 24px; align-items: center; }
.auth-group .input-box { margin-bottom: 0; flex: 1; }
.btn-auth { 
    width: auto; 
    min-width: 100px; /* 최소 너비 확보 */
    height: 50px; /* 입력창과 동일 높이 */
    padding: 0 15px; 
    background: var(--secondary); color: white; 
    border: none; border-radius: var(--radius-s); 
    font-size: 13px; cursor: pointer; font-weight: 600; 
    white-space: nowrap; /* 줄바꿈 방지 */
    flex-shrink: 0; /* 찌그러짐 방지 */
}

.btn-primary {
    display: inline-block; width: 100%; padding: 16px 0;
    background-color: var(--primary); color: var(--white);
    font-size: 16px; font-weight: 600; text-align: center;
    border-radius: var(--radius-s); border: none; cursor: pointer; transition: 0.2s;
}
.btn-primary:disabled { background-color: #ccc; cursor: not-allowed; }

/* --- 푸터 --- */
.footer { background-color: #F2F0ED; padding: 40px 24px 120px; margin-top: 40px; border-top: 1px solid #E5E3DF; text-align: center; }
.footer-logo { font-family: 'Pretendard', sans-serif; font-weight: 800; font-size: 18px; color: var(--text-main); margin-bottom: 15px; display: inline-block; letter-spacing: -0.03em; }
.footer-info { font-size: 12px; color: #999; line-height: 1.6; margin-bottom: 20px; }
.footer-desc { font-size: 11px; color: #888; line-height: 1.5; margin-bottom: 20px; background-color: rgba(0,0,0,0.03); padding: 15px; border-radius: 8px; text-align: left; }
.copyright { font-size: 10px; color: #bbb; letter-spacing: 0.05em; }

/* --- 완료 및 조회 --- */
.success-screen { text-align: center; padding: 30px 0; animation: fadeIn 0.5s; }
.receipt-icon { font-size: 50px; color: var(--primary); margin-bottom: 20px; }
.receipt-title { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 700; margin-bottom: 10px; color: var(--text-main); letter-spacing: -0.03em; }
.receipt-desc { font-size: 14px; color: var(--text-sub); margin-bottom: 30px; }
.receipt-box { background: #fff; border: 1px solid var(--line); padding: 30px 24px; border-radius: 20px; text-align: left; margin-bottom: 30px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.receipt-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--primary); }
.receipt-row { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 15px; color: var(--text-sub); }
.receipt-row.total { border-top: 1px dashed var(--line); padding-top: 20px; margin-top: 20px; font-weight: 700; color: var(--primary); font-size: 20px; }
.copy-btn-small { background: var(--line); border: none; padding: 4px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; margin-left: 8px; color: var(--text-main); font-weight: 600; }

/* check.html */
.check-container { padding: 30px 24px; }
/* [수정됨] status-card 스타일 (깨짐 방지) */
.status-card { 
    border: 1px solid var(--line); 
    padding: 20px; 
    border-radius: var(--radius-m); 
    margin-bottom: 15px; 
    background: white; 
    /* display: flex;  <-- 이놈이 범인입니다! 삭제! */
    /* justify-content: space-between; <-- 얘도 삭제! */
    /* align-items: center; <-- 얘도 삭제! */
    display: block; /* 세로 배치를 위해 블록 요소로 변경 */
    box-shadow: var(--shadow); 
    position: relative; /* 내부 배치 안정화 */
}
.date-text { font-weight: 700; font-size: 16px; color: var(--text-main); margin-bottom: 4px; }
.price-text { font-size: 14px; color: var(--secondary); }
.status-badge { padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; }
.st-wait { background: #fff3cd; color: #856404; } 
.st-check { background: var(--primary-light); color: var(--primary); }
.st-ok { background: #d4edda; color: #155724; } 
.st-end { background: #e2e3e5; color: #383d41; }
.st-refund { background: #FFF0F0; color: #670606; }

/* [Check Page] 인증번호 입력칸 버튼 찌그러짐 방지 */
#codeBox {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

#codeBox .input-box {
    margin-bottom: 0 !important; /* 기존 마진 제거 */
    flex: 1; /* 남은 공간 차지 */
}

#codeBox button {
    flex-shrink: 0; /* ★ 핵심: 절대 찌그러지지 않음 */
    white-space: nowrap; /* 글자 줄바꿈 금지 */
    width: auto; 
    min-width: 80px; /* 최소 너비 확보 */
    height: 50px; /* 인풋창과 높이 맞춤 */
    padding: 0 15px;
    border: none;
    border-radius: 4px; /* radius-s 값 */
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* [강조 박스 스타일 추가] */
.notice-card {
    background-color: #FFF5F5; /* 연한 붉은 배경 */
    border: 1px solid #FFC9C9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.notice-card h4 {
    margin: 0 0 10px 0;
    color: #E03131; /* 진한 빨강 */
    font-size: 15px;
    display: flex; align-items: center; gap: 6px;
}
.notice-card ul {
    list-style: none; padding: 0; margin: 0;
}
.notice-card li {
    position: relative; padding-left: 18px;
    font-size: 13px; color: #495057; margin-bottom: 6px; line-height: 1.5;
}
.notice-card li::before {
    content: '•'; position: absolute; left: 0; color: #FA5252;
}
.highlight-text {
    font-weight: 700; text-decoration: underline; text-underline-position: under;
}

/* --- Q&A 카드 스타일 (Details/Summary 기반) --- */
.qna-card {
    background: var(--white);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-m); /* 12px */
    padding: 15px 20px;
    margin-bottom: 5px;
    box-shadow: 0 4px 10px rgba(106, 66, 70, 0.05); /* 은은한 쉐도우 */
    transition: all 0.3s ease;
}

.qna-card summary {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    list-style: none; /* 기본 화살표 제거 */
    position: relative;
    padding-right: 20px; /* 화살표 공간 확보 */
}

/* Custom 화살표 스타일 */
.qna-card summary::after {
    content: '\f078'; /* FontAwesome Chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    font-size: 12px;
    color: var(--secondary);
    transition: transform 0.3s;
}

.qna-card[open] summary::after {
    transform: rotate(180deg);
}

.qna-card p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
    margin: 15px 0 0 0; /* Summary와 간격 */
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    word-break: keep-all;
}

.qna-card p:first-of-type {
    margin-top: 15px;
}




/* --- 스켈레톤 로딩 애니메이션 --- */
.skeleton-card {
    background: #fff;
    border: 1px solid #E5E3DF;
    border-radius: 12px;
    padding: 20px;
    height: 120px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}
.skeleton-card::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}
.sk-box { background: #E9ECEF; border-radius: 4px; margin-bottom: 8px; }
@keyframes shimmer {
    100% { transform: translateX(100%); }
}



/* ========================================= */
/* [FIX] Check 페이지 전용 스타일 (충돌 방지) */
/* ========================================= */

/* 1. 예약 카드 레이아웃 깨짐 방지 (강제 적용) */
.check-container .status-card {
    display: block !important; /* 가로 정렬 강제 해제 */
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

/* 2. 후기 모달 전용 배경 (기존 .overlay와 분리) */
.custom-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none; /* JS로 제어 */
    align-items: center; /* 수직 중앙 정렬 */
    justify-content: center; /* 수평 중앙 정렬 */
    backdrop-filter: blur(2px);
}

/* 3. 후기 모달 전용 박스 (기존 .bottom-sheet와 분리) */
.custom-modal-box {
    background: #fff;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    animation: popIn 0.3s ease-out forwards;
}


/* ========================================= */
/* [FIX] Check 페이지 전용 스타일 & 버튼 수정 */
/* ========================================= */

/* 1. 예약 카드 레이아웃 깨짐 방지 */
.check-container .status-card {
    display: block !important; 
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

/* 2. [핵심] 인증번호 받기 버튼 찌그러짐 방지 */
.auth-group { 
    display: flex; 
    gap: 8px; 
    align-items: center; 
    margin-bottom: 24px; 
}

.auth-group .input-box {
    margin-bottom: 0 !important; /* 마진 충돌 제거 */
    flex: 1; /* 남은 공간 차지 */
}

.auth-group .btn-auth {
    /* 기존 스타일 덮어쓰기 */
    width: auto !important;
    min-width: 110px; /* 최소 너비 확보 */
    height: 50px; /* 인풋창과 높이 맞춤 */
    padding: 0 15px;
    
    background: var(--secondary);
    color: white;
    font-weight: 600;
    font-size: 13px;
    border-radius: var(--radius-s);
    border: none;
    cursor: pointer;
    
    flex-shrink: 0; /* ★ 핵심: 절대 찌그러지지 않음 */
    white-space: nowrap; /* 줄바꿈 금지 */
}

/* 3. 인증번호 입력 후 확인 버튼 그룹 */
#authConfirmBox {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: -10px; /* 간격 조절 */
    margin-bottom: 24px;
}
#authConfirmBox .input-box { margin-bottom: 0 !important; flex: 1; }
#authConfirmBox button {
    flex-shrink: 0;
    width: auto;
    min-width: 80px;
    height: 50px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-s);
    cursor: pointer;
}

/* 4. 체크 페이지 전용 카드 스타일 */
.check-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

/* 5. 모달 (피드백) 스타일 */
.custom-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 3000;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(2px);
}
.custom-modal-box {
    background: #fff; width: 90%; max-width: 400px; padding: 25px;
    border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative; animation: popIn 0.3s ease-out forwards;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }




/* 팝업 등장 애니메이션 */
@keyframes popIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}




@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }