@charset "UTF-8";
/* ============================================
   키다리에어컨 - 고객 후기
   색상/폰트는 common.css 의 CSS 변수를 그대로 사용한다.
   ============================================ */

/* ── 섹션 ─────────────────────────────────── */
.review-section {
    padding: 72px 0;
    background: var(--bg, #F8FBFE);
}

/* ── 평점 요약 (h2 바로 아래) ───────────────
   JSON-LD aggregateRating 과 같은 DB 집계 값을 화면에도 노출한다. */
.review-rating-summary {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.review-rating-star {
    color: #F5A623;              /* 금색 — .review-stars 와 동일 */
    font-size: 20px;
    line-height: 1;
}

.review-rating-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy, #1E3A5F);
}

.review-rating-max {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-500, #64748B);
}

.review-rating-count {
    font-size: 14px;
    color: var(--gray-500, #64748B);
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);   /* 데스크톱 3열 */
    gap: 20px;
    margin-top: 32px;
}

/* ── 카드 ─────────────────────────────────── */
.review-card {
    background: var(--white, #fff);
    border: 1px solid var(--gray-200, #E2E8F0);
    border-radius: 14px;
    padding: 24px 22px;
    box-shadow: 0 2px 10px rgba(30, 58, 95, 0.06);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.review-card:hover {
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.10);
    transform: translateY(-2px);
}

.review-stars {
    color: #F5A623;              /* 금색 */
    font-size: 17px;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

/* 기본 3줄 미리보기 → .expanded 에서 전체 노출 */
.review-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text, #1E3A5F);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: keep-all;
}

.review-card.expanded .review-text {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.review-more {
    align-self: flex-start;
    background: none;
    border: 0;
    padding: 0 0 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #3B8DD4);
    cursor: pointer;
}

.review-more:hover { text-decoration: underline; }

/* ── 작성자 ───────────────────────────────── */
.reviewer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--gray-100, #F1F5F9);
}

.reviewer-avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary, #3B8DD4);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reviewer-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.reviewer-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy, #1E3A5F);
}

.reviewer-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-light, #5A7A9A);
}

.reviewer-area::after {
    content: '·';
    margin-left: 6px;
    color: var(--gray-300, #CBD5E1);
}

/* ── 사장님 답변 ──────────────────────────── */
.review-reply {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--primary-light, #E8F4FC);
    border-radius: 10px;
}

.review-reply-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark, #2E7BC0);
    margin-bottom: 4px;
}

.review-reply p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text, #1E3A5F);
    word-break: keep-all;
}

/* ── 후기 0건 안내 (메인 전용) ─────────────── */
.review-empty {
    margin-top: 32px;
    padding: 44px 24px;
    background: var(--white, #fff);
    border: 1px dashed var(--gray-300, #CBD5E1);
    border-radius: 14px;
    text-align: center;
}

.review-empty-ico {
    font-size: 34px;
    color: var(--gray-300, #CBD5E1);
    margin-bottom: 14px;
    display: block;
}

.review-empty-text {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--text-light, #5A7A9A);
    word-break: keep-all;
}

/* ── 후기 쓰기 버튼 ───────────────────────── */
.review-cta { text-align: center; margin-top: 32px; }

.review-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 28px;
}

/* ============================================
   작성 모달
   ============================================ */
.review-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 30, 50, 0.55);
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

.review-modal-overlay.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.review-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--gray-100, #F1F5F9);
}

.review-modal-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy, #1E3A5F);
}

.review-modal-close {
    background: none;
    border: 0;
    font-size: 18px;
    line-height: 1;
    color: var(--gray-400, #94A3B8);
    cursor: pointer;
    padding: 4px 6px;
}

.review-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
}

.review-field { margin-bottom: 18px; }

.review-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--navy, #1E3A5F);
    margin-bottom: 8px;
}

.review-req { color: #E24C4B; }

.review-field input[type="text"],
.review-field select,
.review-field textarea {
    width: 100%;
    border: 1px solid var(--gray-300, #CBD5E1);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;               /* 16px 미만이면 iOS 가 폼 포커스 시 확대 → 15px 유지 시 주의 */
    color: var(--text, #1E3A5F);
    background: #fff;
}

.review-field textarea { resize: vertical; line-height: 1.6; }

.review-field input:focus,
.review-field select:focus,
.review-field textarea:focus {
    outline: none;
    border-color: var(--primary, #3B8DD4);
    box-shadow: 0 0 0 3px rgba(59, 141, 212, 0.15);
}

.review-counter {
    text-align: right;
    font-size: 12px;
    color: var(--gray-400, #94A3B8);
    margin-top: 6px;
}

/* 별점 선택 */
.review-star-picker { display: flex; gap: 4px; }

.star-btn {
    background: none;
    border: 0;
    padding: 2px 4px;
    font-size: 30px;
    line-height: 1;
    color: var(--gray-300, #CBD5E1);
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}

.star-btn:hover { transform: scale(1.12); }
.star-btn.on { color: #F5A623; }

.review-modal-foot {
    display: flex;
    gap: 10px;
    padding: 14px 22px 20px;
    border-top: 1px solid var(--gray-100, #F1F5F9);
}

.review-modal-foot .btn {
    flex: 1;
    min-height: 48px;
    justify-content: center;
}

.btn-outline-gray {
    background: #fff;
    color: var(--text-light, #5A7A9A);
    border: 1px solid var(--gray-300, #CBD5E1);
}

/* ── 토스트 ───────────────────────────────── */
.review-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(16px);
    background: rgba(30, 58, 95, 0.94);
    color: #fff;
    font-size: 14.5px;
    padding: 14px 22px;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 2100;
    max-width: calc(100% - 40px);
    text-align: center;
}

.review-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   반응형
   ============================================ */
@media (max-width: 1024px) {
    .review-grid { grid-template-columns: repeat(2, 1fr); }   /* 태블릿 2열 */
}

@media (max-width: 768px) {
    .review-section { padding: 48px 0; }
    .review-grid {
        grid-template-columns: 1fr;                            /* 모바일 1열 */
        gap: 14px;
        margin-top: 24px;
    }
    .review-card { padding: 20px 18px; }

    /* 모달: 화면 하단에서 올라오는 시트 형태가 모바일에서 조작이 쉽다 */
    .review-modal-overlay { padding: 0; align-items: flex-end; }
    .review-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
    }
    .star-btn { font-size: 34px; padding: 4px 6px; }           /* 터치 타깃 확대 */
    .review-toast { bottom: 24px; }
}
