/* ============================================================
   상품 Q&A 커뮤니티 페이지 — mobile-first
   ============================================================ */

.qna-page {
    padding: 24px 0 60px;
}

.qna-page__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--mute-1);
    text-align: center;
    margin-bottom: 24px;
}

/* 상단 액션 바 */
.qna-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.qna-top-bar__total {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.qna-top-bar__total-label { color: var(--mute-2); }
.qna-top-bar__total-count { font-weight: 700; color: #000; }

.qna-top-bar__write {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: var(--mute-1, #333);
    color: #fff;
    font-size: 13px;
    font-family: var(--font);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.qna-top-bar__write:hover { opacity: 0.85; }

/* 테이블 */
.qna-table {
    border-top: 2px solid var(--mute-1, #333);
    border-bottom: 1px solid var(--mute-3, #777);
    margin-bottom: 30px;
}

/* 모바일: 헤더 숨김 */
.qna-table__head { display: none; }

.qna-table__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--mute-6, #eee);
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}

.qna-table__row:hover { background: #fafafa; }

/* 모바일: 번호/작성자/날짜 숨김 */
.qna-table__col--num,
.qna-table__col--author,
.qna-table__col--date {
    display: none;
}

.qna-table__col--status {
    width: 52px;
    flex-shrink: 0;
    text-align: center;
}

.qna-table__col--title {
    flex: 1;
    min-width: 0;
}

.qna-table__col--product {
    width: 40px;
    flex-shrink: 0;
}

/* 상태 뱃지 */
.qna-status {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.qna-status--waiting {
    background: #fff3cd;
    color: #856404;
}

.qna-status--answered {
    background: #d1e7dd;
    color: #0f5132;
}

/* 제목 */
.qna-table__title {
    font-size: 14px;
    color: var(--mute-1);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.qna-table__title--secret {
    color: var(--mute-3);
}

.qna-table__lock {
    display: inline-block;
    margin-right: 4px;
    vertical-align: middle;
    opacity: 0.5;
}

/* 상품 썸네일 */
.qna-table__product-thumb {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

/* 작성자 */
.qna-table__author {
    font-size: 13px;
    color: var(--mute-2);
    text-align: center;
}

/* 날짜 */
.qna-table__date {
    font-size: 13px;
    color: var(--mute-2);
    text-align: center;
}

/* 번호 */
.qna-table__num {
    font-size: 14px;
    color: var(--mute-1);
    text-align: center;
}

/* 빈 목록 */
.qna-empty {
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
    color: var(--mute-3);
    border-bottom: 1px solid var(--mute-6);
}

/* 페이지네이션 (notice.css .pagination 공유) */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pagination__btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mute-6);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--mute-3);
    letter-spacing: -0.28px;
    text-decoration: none;
}

.pagination__btn--arrow {
    border: none;
    background: none;
}

.pagination__btn--active {
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    color: var(--mute-1);
    border: none;
}

/* 작성 모달 오버레이 */
.qna-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
}

.qna-modal-overlay.is-open {
    display: flex;
}

.qna-modal {
    background: #fff;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px 12px 0 0;
    padding: 24px 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qna-modal__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--mute-1);
    margin-bottom: 4px;
}

.qna-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--mute-3);
    line-height: 1;
}

.qna-modal__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qna-form__row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.qna-form__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--mute-1);
}

.qna-form__input,
.qna-form__textarea {
    width: 100%;
    border: 1px solid var(--mute-4, #ccc);
    padding: 10px 12px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--mute-1);
    box-sizing: border-box;
    background: #fff;
}

.qna-form__input:focus,
.qna-form__textarea:focus {
    outline: none;
    border-color: var(--mute-1);
}

.qna-form__textarea {
    resize: vertical;
    min-height: 120px;
}

.qna-form__check-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--mute-2);
    cursor: pointer;
    user-select: none;
}

.qna-form__submit {
    width: 100%;
    height: 46px;
    background: var(--mute-1, #333);
    color: #fff;
    border: none;
    font-size: 15px;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 4px;
}

.qna-form__submit:hover { opacity: 0.85; }

/* ── 데스크탑 오버라이드 ─────────────────────────────────── */
@media (min-width: 1280px) {
    .qna-page {
        padding: 50px 0 80px;
    }

    .qna-page__title {
        font-size: 28px;
        margin-bottom: 50px;
    }

    .qna-top-bar {
        margin-bottom: 10px;
    }

    .qna-top-bar__total { font-size: 14px; }

    /* 테이블 헤더 표시 */
    .qna-table__head {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 14px 0;
        background: #f3f4f5;
        border-bottom: 1px solid var(--mute-3);
        font-size: 15px;
        color: var(--mute-1);
        text-align: center;
    }

    .qna-table__row {
        gap: 20px;
        padding: 14px 0;
    }

    /* 모든 컬럼 표시 */
    .qna-table__col--num,
    .qna-table__col--author,
    .qna-table__col--date {
        display: block;
    }

    .qna-table__col--num {
        width: 60px;
        flex-shrink: 0;
        text-align: center;
    }

    .qna-table__col--status {
        width: 70px;
    }

    .qna-table__col--product {
        width: 50px;
    }

    .qna-table__col--author {
        width: 100px;
        flex-shrink: 0;
        text-align: center;
    }

    .qna-table__col--date {
        width: 100px;
        flex-shrink: 0;
        text-align: center;
    }

    .qna-table__title { font-size: 15px; }
    .qna-table__product-thumb { width: 44px; height: 44px; }

    /* 모달: 중앙 팝업으로 */
    .qna-modal-overlay {
        align-items: center;
    }

    .qna-modal {
        border-radius: 12px;
        padding: 32px;
        max-height: 80vh;
    }
}
