/* ============================================
   사용자 콘텐츠 페이지 공통 스타일
   브랜드 컬러: #2DD4A8
   ============================================ */

.content-main {
    min-height: calc(100vh - 160px);
    padding: 40px 20px;
}

.content-container {
    max-width: 960px;
    margin: 0 auto;
}

.content-page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.content-page-desc {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 32px;
}

/* 빈 상태 */
.content-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 80px 20px;
    color: #94a3b8;
}

.content-empty svg {
    opacity: 0.4;
}

.content-empty p {
    font-size: 15px;
}

/* 푸터 */
.content-footer {
    text-align: center;
    padding: 24px;
    color: #94a3b8;
    font-size: 13px;
    border-top: 1px solid #e2e8f0;
}

/* 카테고리 필터 */
.content-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 8px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #2DD4A8;
    color: #2DD4A8;
}

.filter-btn.active {
    background: #2DD4A8;
    border-color: #2DD4A8;
    color: #fff;
}

/* 상품 그리드 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f1f5f9;
}

.product-card-placeholder {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #cbd5e1;
}

.product-card-body {
    padding: 14px;
}

.product-card-category {
    font-size: 12px;
    color: #2DD4A8;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
}

/* 공지사항 리스트 */
.notice-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 32px;
}

.notice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    border-bottom: 1px solid #e2e8f0;
}

.notice-item:first-child {
    border-top: 2px solid #1a1a2e;
}

.notice-item:hover {
    background: #f0fdf9;
}

.notice-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.notice-pin {
    width: 18px;
    height: 18px;
    color: #2DD4A8;
    flex-shrink: 0;
}

.notice-item-title {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-item.pinned .notice-item-title {
    font-weight: 700;
}

.notice-item-date {
    font-size: 13px;
    color: #94a3b8;
    flex-shrink: 0;
    margin-left: 16px;
    white-space: nowrap;
}

/* 공지 상세 모달 */
.notice-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.notice-detail-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.notice-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.notice-detail-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    flex: 1;
    margin-right: 12px;
}

.notice-detail-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.notice-detail-meta {
    padding: 12px 24px;
    font-size: 13px;
    color: #94a3b8;
}

.notice-detail-body {
    padding: 0 24px 24px;
    line-height: 1.8;
    font-size: 15px;
    color: #334155;
}

/* FAQ 아코디언 */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    font-family: inherit;
}

.faq-question:hover {
    background: #f8fffe;
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.2s;
    color: #94a3b8;
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 20px 18px;
    font-size: 14px;
    color: #475569;
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    display: block;
}

/* 커뮤니티 리스트 */
.community-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.community-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.community-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.community-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.community-card-category {
    padding: 2px 10px;
    background: #e6f9f3;
    color: #1fae8e;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

.community-card-date {
    font-size: 12px;
    color: #94a3b8;
}

.community-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
    line-height: 1.4;
}

.community-card-preview {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.community-card-footer {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 13px;
    color: #94a3b8;
}

/* 페이지네이션 */
.content-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.page-btn:hover {
    border-color: #2DD4A8;
    color: #2DD4A8;
}

.page-btn.active {
    background: #2DD4A8;
    border-color: #2DD4A8;
    color: #fff;
    font-weight: 600;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 반응형 */
@media (max-width: 768px) {
    .content-main {
        padding: 24px 16px;
    }

    .content-page-title {
        font-size: 22px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   상품 상세
   ============================================ */
.detail-back {
    margin-bottom: 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link:hover {
    color: #2DD4A8;
}

.product-detail-top {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
}

.product-detail-img-wrap {
    width: 360px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
}

.product-detail-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-detail-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.product-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-detail-category {
    font-size: 14px;
    color: #2DD4A8;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.product-detail-name {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin-bottom: 20px;
}

.product-detail-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #2DD4A8;
    color: #fff;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    width: fit-content;
}

.product-detail-link-btn:hover {
    background: #1fae8e;
}

.product-detail-desc {
    padding: 24px 0;
    border-top: 1px solid #e2e8f0;
    line-height: 1.8;
    font-size: 15px;
    color: #334155;
}

@media (max-width: 768px) {
    .product-detail-top {
        flex-direction: column;
        gap: 20px;
    }

    .product-detail-img-wrap {
        width: 100%;
    }

    .product-detail-name {
        font-size: 20px;
    }
}

/* ============================================
   커뮤니티 상세
   ============================================ */
.community-detail-header {
    margin-bottom: 24px;
}

.community-detail-category {
    display: inline-block;
    padding: 4px 12px;
    background: #e6f9f3;
    color: #1fae8e;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 12px;
}

.community-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
    margin-bottom: 12px;
}

.community-detail-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #94a3b8;
}

.community-detail-body {
    padding: 24px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.8;
    font-size: 15px;
    color: #334155;
    min-height: 120px;
}

/* 댓글 섹션 */
.comment-section {
    padding-top: 24px;
}

.comment-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 16px;
}

.comment-title span {
    color: #2DD4A8;
}

.comment-write {
    margin-bottom: 20px;
}

.comment-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.comment-textarea:focus {
    outline: none;
    border-color: #2DD4A8;
}

.comment-write-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.comment-submit-btn {
    padding: 8px 20px;
    background: #2DD4A8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-submit-btn:hover {
    background: #1fae8e;
}

.comment-submit-btn.small {
    padding: 6px 14px;
    font-size: 13px;
}

.comment-cancel-btn {
    padding: 6px 14px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.comment-login-msg {
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
}

.comment-login-msg a {
    color: #2DD4A8;
    font-weight: 600;
    text-decoration: none;
}

.comment-list {
    display: flex;
    flex-direction: column;
}

.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.comment-item.reply {
    padding-left: 24px;
    border-left: 2px solid #e6f9f3;
    margin-left: 16px;
}

.comment-replies {
    margin-left: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.comment-date {
    font-size: 12px;
    color: #94a3b8;
}

.comment-body {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.comment-reply-btn {
    margin-top: 6px;
    padding: 0;
    border: none;
    background: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.comment-reply-btn:hover {
    color: #2DD4A8;
}

.reply-form-wrap {
    margin-top: 10px;
}

.reply-textarea {
    min-height: 60px;
}

.comment-empty {
    text-align: center;
    padding: 32px;
    color: #94a3b8;
    font-size: 14px;
}

/* ============================================
   글쓰기
   ============================================ */
.content-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.write-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #2DD4A8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.write-btn:hover {
    background: #1fae8e;
}

.write-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
}

.write-form-group {
    margin-bottom: 18px;
}

.write-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.write-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.write-input:focus {
    outline: none;
    border-color: #2DD4A8;
}

.write-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    cursor: pointer;
}

.write-editor {
    min-height: 250px;
    border-radius: 8px;
}

.write-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.write-cancel-btn {
    padding: 10px 24px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.write-submit-btn {
    padding: 10px 24px;
    background: #2DD4A8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.write-submit-btn:hover {
    background: #1fae8e;
}

.write-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 커뮤니티 상세/글쓰기 반응형 */
@media (max-width: 768px) {
    .community-detail-title {
        font-size: 18px;
    }

    .community-detail-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .comment-item.reply {
        padding-left: 16px;
        margin-left: 8px;
    }
}
