/* AhaMall Board Styles — Clean Line Style */
:root {
    --brand: #DCA54A;
    --brand-alt: #D98C10;
    --heading: #0F172A;
    --text: #4A4A4A;
    --bg-sub: #FAF5E5;
    --bg-base: #FFFFFF;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --red: #E53935;
}

/* Astra override */
body.page-slug-notice .entry-header,
body.page-slug-support .entry-header { display: none !important; }
body.page-slug-notice.ast-separate-container .ast-article-single,
body.page-slug-notice.ast-separate-container .ast-article-post,
body.page-slug-support.ast-separate-container .ast-article-single,
body.page-slug-support.ast-separate-container .ast-article-post {
    background: transparent !important; padding: 0 !important; border: none !important; box-shadow: none !important;
}
body.page-slug-notice .entry-content,
body.page-slug-support .entry-content { padding: 0 !important; margin: 0 !important; }

/* Board container */
.ahm-board { max-width: 900px; margin: 0 auto; padding: 40px 20px 60px; font-family: 'Noto Sans KR', 'Poppins', sans-serif; }

/* Header */
.ahm-board-header { margin-bottom: 28px; text-align: center; }
.ahm-board-title { font-size: 34px; font-weight: 700; color: var(--heading); margin: 0 0 8px; }
.ahm-board-desc { font-size: 14px; color: var(--text); margin: 0; }

/* Toolbar */
.ahm-board-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0; padding-bottom: 10px; }
.ahm-board-count { font-size: 13px; color: var(--text); }
.ahm-board-count b { color: var(--heading); }
.ahm-board-toolbar-right { display: flex; align-items: center; gap: 10px; }
.ahm-board-sort {
    padding: 5px 10px; border: 1px solid var(--border); border-radius: 3px;
    font-size: 12px; color: var(--text); background: var(--bg-base); cursor: pointer;
    font-family: inherit;
}

/* ===== Table — 깔끔한 라인 스타일 ===== */
.ahm-board-table { width: 100%; border-collapse: collapse; border-left: none; border-right: none; }
.ahm-board-table th, .ahm-board-table td { border-left: none !important; border-right: none !important; }
.ahm-board-table thead { border-top: 2px solid var(--heading); border-bottom: 1px solid var(--heading); }
.ahm-board-table th {
    padding: 11px 8px; font-size: 13px; font-weight: 500; color: var(--text);
    text-align: center; background: transparent; border: none;
}
.ahm-board-table tbody tr { border-bottom: 1px solid var(--border-light); }
.ahm-board-table tbody tr:hover { background: #fafafa; }
.ahm-board-table td {
    padding: 11px 8px; font-size: 13px; color: var(--text);
    text-align: center; border: none;
}
.col-num { width: 50px; color: #999; }
.col-title { text-align: left !important; }
.col-author { width: 80px; font-size: 12px; color: #888; }
.col-date { width: 90px; font-size: 12px; color: #888; }
.col-like { width: 55px; font-size: 12px; color: #888; }
.col-views { width: 45px; font-size: 12px; color: #888; }
.ahm-board-table td.col-title a { color: var(--heading); text-decoration: none; font-weight: 400; }
.ahm-board-table td.col-title a:hover { color: var(--brand); }
.ahm-board-badge {
    display: inline-block; padding: 1px 6px; background: var(--brand); color: #fff;
    border-radius: 2px; font-size: 10px; font-weight: 700; margin-right: 6px; vertical-align: middle;
}
.ahm-board-comment-count { color: var(--brand); font-size: 12px; margin-left: 3px; }
.ahm-board-empty { padding: 40px !important; color: #aaa !important; text-align: center !important; font-size: 13px !important; }

/* Write button — 우측 하단 */
.ahm-board-write-btn {
    display: inline-block; padding: 7px 18px; background: var(--brand); color: #fff;
    border-radius: 3px; font-size: 12px; font-weight: 600; text-decoration: none; transition: background 0.2s;
}
.ahm-board-write-btn:hover { background: var(--brand-alt); color: #fff; }

/* Bottom area: write btn under table */
.ahm-board-bottom { display: flex; justify-content: flex-end; margin-top: 12px; margin-bottom: 16px; }

/* Pagination */
.ahm-board-pagination { margin-top: 16px; text-align: center; }
.ahm-board-pagination .page-numbers {
    display: inline-block; padding: 5px 10px; margin: 0 1px;
    font-size: 12px; color: var(--text); text-decoration: none; transition: color 0.15s;
    border: 1px solid transparent; border-radius: 3px;
}
.ahm-board-pagination .page-numbers.current { background: var(--heading); color: #fff; border-color: var(--heading); }
.ahm-board-pagination .page-numbers:hover:not(.current) { color: var(--brand); }

/* Search */
.ahm-board-search {
    display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 16px;
}
.ahm-board-search select {
    padding: 6px 8px; border: 1px solid var(--border); border-radius: 3px;
    font-size: 12px; color: var(--text); font-family: inherit; background: var(--bg-base);
}
.ahm-board-search input {
    padding: 6px 10px; border: 1px solid var(--border); border-radius: 3px;
    font-size: 12px; color: var(--heading); width: 180px; font-family: inherit;
}
.ahm-board-search input:focus { border-color: var(--brand); outline: none; }
.ahm-board-search button {
    padding: 6px 14px; border: 1px solid var(--border); border-radius: 3px;
    background: var(--bg-base); font-size: 12px; color: var(--text); cursor: pointer;
    font-family: inherit; transition: all 0.15s;
}
.ahm-board-search button:hover { border-color: var(--brand); color: var(--brand); }

/* ===== View (단일 글) ===== */
.ahm-board-view { border-top: 2px solid var(--heading); }
.ahm-board-view-header { padding: 18px 0; border-bottom: 1px solid var(--border); }
.ahm-board-view-title { font-size: 18px; font-weight: 700; color: var(--heading); margin: 0 0 8px; }
.ahm-board-view-meta { display: flex; gap: 14px; font-size: 12px; color: #888; }
.ahm-board-view-meta b { color: var(--heading); font-weight: 500; }
.ahm-board-view-content { padding: 28px 0; min-height: 180px; font-size: 14px; color: var(--text); line-height: 1.8; border-bottom: 1px solid var(--border); }
.ahm-board-view-actions { display: flex; justify-content: center; padding: 18px 0; }
.ahm-board-like-btn {
    display: flex; align-items: center; gap: 5px; padding: 8px 24px;
    border: 1px solid var(--border); border-radius: 20px; background: transparent;
    color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
}
.ahm-board-like-btn:hover { border-color: var(--brand); color: var(--brand); }
.ahm-board-like-btn:hover svg { stroke: var(--brand); }
.ahm-board-view-nav { display: flex; justify-content: space-between; padding: 14px 0; }
.ahm-board-view-nav-right { display: flex; gap: 6px; }

/* Buttons */
.ahm-board-btn {
    display: inline-block; padding: 7px 18px; border: 1px solid var(--border);
    border-radius: 3px; font-size: 12px; color: var(--text); text-decoration: none;
    background: var(--bg-base); cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.ahm-board-btn:hover { border-color: var(--brand); color: var(--brand); }
.ahm-board-btn-primary { background: var(--brand); color: #fff !important; border-color: var(--brand); }
.ahm-board-btn-primary:hover { background: var(--brand-alt); }
.ahm-board-delete-btn:hover { border-color: var(--red); color: var(--red); }

/* ===== Write form ===== */
.ahm-board-write { border-top: 2px solid var(--heading); padding-top: 20px; }
.ahm-board-write-field { margin-bottom: 16px; }
.ahm-board-write-field label { display: block; font-size: 13px; font-weight: 600; color: var(--heading); margin-bottom: 5px; }
.ahm-board-write-field input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px;
    font-size: 14px; color: var(--heading); font-family: inherit; box-sizing: border-box;
}
.ahm-board-write-field textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 4px;
    font-size: 14px; color: var(--heading); font-family: inherit; resize: vertical; box-sizing: border-box;
    line-height: 1.7;
}
.ahm-board-write-field input:focus,
.ahm-board-write-field textarea:focus { border-color: var(--brand); outline: none; }
.ahm-board-write-actions { display: flex; justify-content: flex-end; gap: 6px; }

/* Result */
.ahm-board-result { display: none; margin-top: 12px; padding: 10px 14px; border-radius: 4px; font-size: 13px; }
.ahm-board-result.success { display: block; background: #ecfdf5; color: #16a34a; }
.ahm-board-result.error { display: block; background: #fef2f2; color: #dc2626; }
.ahm-board-error { text-align: center; padding: 40px; color: var(--text); }
.ahm-board-error a { color: var(--brand); font-weight: 600; }

/* Responsive */
@media (max-width: 768px) {
    .ahm-board-title { font-size: 20px; }
    .ahm-board-table th, .ahm-board-table td { padding: 9px 4px; font-size: 12px; }
    .col-like, .col-views { display: none; }
    .col-author { width: 55px; }
    .col-date { width: 75px; }
    .ahm-board-view-meta { flex-wrap: wrap; gap: 8px; }
    .ahm-board-search { flex-wrap: wrap; }
    .ahm-board-search input { width: 130px; }
    .ahm-board-toolbar { flex-direction: column; gap: 8px; align-items: flex-start; }
}
