:root {
    --brand: #c6001f;
    --brand-dark: #82181a;
    --brand-tint: #fdf2f4;
    --navy: #011b35;
    --navy-soft: #1b3c5d;
    --bg: #fafaf8;
    --surface: #ffffff;
    --text: #191917;
    --muted: #8a8985;
    --line: #e9e9e5;
    --accent: #9bb0c7;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
    --shadow-md: 0 8px 24px rgba(1, 27, 53, 0.08);
}

* { box-sizing: border-box; }

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Noto Sans KR", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.page-main {
    flex: 1;
}

.topbar {
    background: var(--navy);
    border-bottom: 3px solid var(--brand);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-badge {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.logo:hover .logo-badge {
    transform: scale(1.07) rotate(-1.5deg);
}

.logo-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1;
}

.logo-mark {
    font-family: "Bebas Neue", sans-serif;
    font-size: 25px;
    letter-spacing: 2px;
    color: var(--brand);
    line-height: 1;
}

.logo-text {
    font-size: 13px;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1;
    font-weight: 400;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.menu a {
    padding: 8px 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

.menu a.active,
.menu a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.auth {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.section .btn-outline,
.card .btn-outline {
    color: var(--brand);
    border-color: var(--brand);
    background: #fff;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 13px;
}

.hero {
    background: linear-gradient(135deg, var(--navy), var(--navy-soft));
    color: #fff;
    padding: 72px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: center;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.15;
}

.hero .lead {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px;
}

.hero-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.hero-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.section {
    padding: 56px 0;
}

.section-title {
    margin: 0 0 20px;
    font-size: 28px;
}

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--surface);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(1, 27, 53, 0.06);
}

.card h3 {
    margin: 0 0 8px;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

.notice {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.notice.error {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.notice.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

input, textarea, select {
    width: 100%;
    border: 1px solid #d4dbe5;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    font: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(198, 0, 31, 0.12);
}

textarea {
    min-height: 140px;
}

.table-wrap {
    overflow: auto;
    background: var(--surface);
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 14px;
}

th {
    background: #f3f7fc;
}

.footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.86);
    padding: 34px 0 20px;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.footer-brand strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* 관리자 */
.admin-wrap {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--navy);
    color: #fff;
    padding: 20px 16px;
}

.admin-brand {
    display: block;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.88);
}

.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.admin-side-actions {
    margin-top: 24px;
    display: grid;
    gap: 8px;
}

.admin-main {
    background: var(--bg);
    padding: 24px;
}

.admin-main-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-main-top h1 {
    margin: 0;
    font-size: 24px;
}

.admin-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.admin-main .btn-outline {
    color: var(--brand);
    border-color: var(--brand);
    background: #fff;
}

.admin-form-card {
    max-width: 960px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 8px;
}

.admin-form-section-title {
    margin: 0 0 14px;
    font-size: 18px;
}

.admin-check-group {
    display: grid;
    gap: 10px;
}

.admin-check-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.admin-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-page-desc {
    margin: 4px 0 0;
}

.admin-page-head-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.admin-empty-card h3 {
    margin: 0 0 8px;
}

.admin-empty-card .btn {
    margin-top: 12px;
}

.admin-product-form {
    display: grid;
    gap: 16px;
}

.admin-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.admin-product-main,
.admin-product-side {
    display: grid;
    gap: 16px;
}

.admin-form-section-head {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.admin-form-section-head h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.admin-form-section-head .muted {
    margin: 0;
}

.admin-form-row {
    display: grid;
    gap: 14px;
}

.admin-form-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-form-hint {
    margin: 10px 0 0;
}

.admin-form-group-last {
    margin-bottom: 0;
}

.admin-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-form-footer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-form-footer-meta {
    margin: 0;
    font-size: 13px;
}

.required {
    color: var(--brand);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-image-preview {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.admin-image-preview img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg);
}

.admin-image-remove {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
}

.admin-upload-placeholder {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    margin-bottom: 14px;
    border: 1px dashed #cfd8e3;
    border-radius: 12px;
    background: #fbfcfd;
    color: var(--muted);
    font-size: 14px;
}

.admin-upload-label {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px dashed #cfd8e3;
    border-radius: 12px;
    background: #fbfcfd;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-upload-label:hover {
    border-color: var(--brand);
    background: #fff7f8;
}

.admin-upload-title {
    font-weight: 600;
    color: var(--text);
}

.admin-upload-input {
    margin-top: 10px;
    padding: 8px;
    font-size: 13px;
}

.admin-toggle-list {
    display: grid;
    gap: 10px;
}

.admin-toggle-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfd;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-toggle-item:hover {
    border-color: #cfd8e3;
}

.admin-toggle-item input {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

.admin-toggle-copy {
    display: grid;
    gap: 2px;
}

.admin-toggle-copy strong {
    font-size: 14px;
}

.admin-toggle-copy .muted {
    font-size: 13px;
    line-height: 1.45;
}

.admin-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-actions-cell {
    white-space: nowrap;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.board-grid {
    margin-top: 20px;
}

.board-card {
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.board-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(1, 27, 53, 0.1);
}

.board-type {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff1f2;
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
}

.community-section {
    padding-top: 28px;
}

.community-section-home {
    padding-top: 20px;
}

.community-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.community-section-home .community-layout {
    align-items: stretch;
}

.community-content .home-hero-wrap {
    width: 100%;
    margin: 0 0 28px;
    border-radius: 14px;
    overflow: hidden;
}

.community-content .home-hero-wrap .hero {
    padding: 48px 24px 40px;
}

/* ── 사이드바 전체 컨테이너 ─────────────────────────── */
.community-sidebar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    position: sticky;
    top: 92px;
    box-shadow: 0 2px 8px rgba(1,27,53,0.06);
}

/* ── 섹션 헤더 (커뮤니티 / 쇼핑몰) ─────────────────── */
.community-sidebar-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    background: var(--navy);
    border-bottom: none;
    margin-bottom: 0;
}

.community-sidebar-head strong {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.community-sidebar-head span.muted {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

/* ── 두 번째 섹션 구분선 ────────────────────────────── */
.community-sidebar-head + .community-sidebar-head,
.community-board-nav + .community-sidebar-head {
    border-top: 1px solid var(--line);
    background: var(--navy-soft);
}

/* ── 네비 전체 ──────────────────────────────────────── */
.community-board-nav {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
}

/* ── 최상위 링크 (홈, 전체보기, 카테고리 직접 링크) ── */
.community-board-nav > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    border-left: 3px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
    line-height: 1.4;
}

.community-board-nav > a:hover {
    background: #f4f6f9;
    color: var(--navy);
    border-left-color: var(--accent);
}

.community-board-nav > a.active {
    background: #fff0f1;
    color: var(--brand-dark);
    border-left-color: var(--brand);
    font-weight: 700;
}

/* ── 그룹(카테고리) 묶음 ────────────────────────────── */
.community-nav-group {
    margin-top: 0;
}

.community-nav-group:first-of-type {
    margin-top: 0;
}

/* ── 그룹 제목 (상위 카테고리) ─────────────────────── */
.community-nav-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 16px 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-top: 1px solid var(--line);
}

.community-nav-group:first-of-type .community-nav-group-title {
    border-top: none;
}

/* ── 하위 게시판 링크 ───────────────────────────────── */
.community-board-nav a.community-nav-board {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px 8px 24px;
    font-size: 13px;
    font-weight: 400;
    color: #444;
    border-left: 3px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
    line-height: 1.4;
}

.community-board-nav a.community-nav-board:hover {
    background: #f4f6f9;
    color: var(--navy);
    border-left-color: var(--accent);
}

.community-board-nav a.community-nav-board.active {
    background: #fff0f1;
    color: var(--brand-dark);
    border-left-color: var(--brand);
    font-weight: 600;
}

.community-board-nav a small {
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 6px;
}

/* ── 빈 상태 안내 ───────────────────────────────────── */
.community-sidebar-empty {
    padding: 12px 16px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.community-content {
    min-width: 0;
}

.board-menu-cards {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.hero-compact {
    background: linear-gradient(135deg, var(--navy), var(--navy-soft));
    color: #fff;
    border-radius: 14px;
    padding: 32px 28px;
    margin-bottom: 28px;
}

.hero-compact h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 40px);
}

.hero-compact .lead {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-compact .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
    background: transparent;
}

.page-head-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.inline-form {
    display: inline;
}

.auth-section {
    padding-top: 40px;
    padding-bottom: 64px;
}

.auth-card {
    max-width: 480px;
    margin: 0 auto;
}

.auth-card-wide {
    max-width: 640px;
}

.auth-links {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.auth-links span {
    margin: 0 6px;
}

.inline-field {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-field input {
    flex: 1;
}

.field-msg.success {
    color: #065f46;
}

.field-msg.error {
    color: #9f1239;
}

.found-id-list {
    margin: 10px 0 0;
    padding-left: 18px;
}

.found-id-list li {
    margin-bottom: 6px;
}

.board-table .col-id,
.board-table .col-hit {
    width: 72px;
}

.board-table .col-writer {
    width: 120px;
}

.board-table .col-date {
    width: 110px;
}

.board-title-cell a {
    color: var(--navy);
    font-weight: 600;
}

.badge-notice {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.comment-count {
    margin-left: 4px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    display: block;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.gallery-thumb-empty {
    display: grid;
    place-items: center;
    background: var(--line);
    color: var(--muted);
    font-size: 13px;
}

.board-view h1 {
    margin: 8px 0;
    font-size: 28px;
}

.board-view-meta {
    margin: 0;
}

.board-view-images {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.board-view-images img {
    width: 100%;
    border-radius: 12px;
}

.board-view-content {
    white-space: pre-wrap;
    line-height: 1.8;
}

.board-comments {
    margin-top: 20px;
}

.board-comments h2 {
    margin-top: 0;
    font-size: 20px;
}

.comment-list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

.comment-item {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.existing-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.existing-image-item {
    display: grid;
    gap: 6px;
    font-size: 13px;
}

.existing-image-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.file-input {
    display: block;
    margin-bottom: 8px;
}

.recommended-section {
    margin-bottom: 32px;
}

.recommended-section.compact .section-title {
    font-size: 22px;
}

.recommended-empty .card {
    margin-top: 0;
}

.admin-recommended-preview {
    margin-bottom: 0;
}

.admin-recommended-grid {
    margin-top: 16px;
}

.admin-recommended-grid .product-card {
    pointer-events: none;
}

.admin-check-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    white-space: nowrap;
}

.admin-check-inline input {
    width: auto;
}

tr.row-muted td {
    opacity: 0.65;
}

.recommended-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.shop-list-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.product-card {
    display: block;
    position: relative;
    overflow: hidden;
}

.product-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--line);   /* 로딩 전 회색 배경 */
    display: block;
}

.product-thumb-empty {
    display: grid;
    place-items: center;
    background: var(--line);
    color: var(--muted);
    font-size: 13px;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    margin-bottom: 10px;
}

.badge-recommend {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.product-category-label {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.product-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.product-price {
    margin: 8px 0 0;
    font-weight: 700;
    color: var(--brand-dark);
}

.product-price-lg {
    font-size: 24px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.product-detail-image {
    width: 100%;
    max-height: 520px;
    object-fit: contain;   /* 상세는 잘리지 않게 contain */
    object-position: center;
    border-radius: 12px;
    background: #f5f5f5;
    display: block;
}

.product-detail-desc {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

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

    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-product-layout {
        grid-template-columns: 1fr;
    }

    .admin-form-row-3 {
        grid-template-columns: 1fr;
    }

    .admin-page-head {
        flex-direction: column;
    }

    .admin-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-form-footer-meta {
        order: -1;
    }

    .community-layout {
        grid-template-columns: 1fr;
    }

    .community-section-home .community-layout {
        display: flex;
        flex-direction: column;
    }

    .community-section-home .community-content {
        order: 1;
    }

    .community-section-home .community-sidebar {
        order: 2;
    }

    .community-sidebar {
        position: static;
    }

    .gallery-grid,
    .existing-images {
        grid-template-columns: 1fr 1fr;
    }

    .topbar-inner {
        flex-wrap: wrap;
    }

    .menu {
        order: 3;
        width: 100%;
    }

    .hero-grid,
    .grid {
        grid-template-columns: 1fr;
    }

    .admin-wrap {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }
}

.mypage-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.order-detail-dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px 16px;
    max-width: 560px;
}

.order-detail-dl dt {
    margin: 0;
    font-weight: 600;
    color: var(--muted);
}

.order-detail-dl dd {
    margin: 0;
}

.order-bank-box {
    margin-top: 16px;
}

.order-status-form select {
    min-width: 110px;
    padding: 4px 8px;
    font-size: 0.9rem;
}

/* ?솃 硫붿씤 (Manus ?젅?씠?븘?썐 李멸퀬) */
.home-hero-wrap {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 55%, #2a4f6e 100%);
    color: #fff;
    padding: 0;
    margin-bottom: 0;
}

.home-hero-wrap .hero {
    background: transparent;
    padding: 56px 0 48px;
}

.home-hero-manus .hero-manus {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.home-hero-kicker {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(36px, 8vw, 56px);
    letter-spacing: 4px;
    color: var(--brand);
    line-height: 1;
}

.home-hero-subkicker {
    margin: 4px 0 16px;
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.home-hero-title {
    margin: 0 0 8px;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    line-height: 1.2;
}

.home-hero-title span {
    font-weight: 500;
    opacity: 0.92;
}

.home-hero-subtitle {
    margin: 0 0 6px;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.home-hero-tagline {
    margin: 0 0 16px;
    font-size: 15px;
    color: var(--brand);
    font-weight: 600;
}

.home-hero-lead {
    margin: 0 auto 24px;
    max-width: 560px;
    font-size: 15px;
    line-height: 1.7;
}

.home-hero-manus .hero-actions {
    justify-content: center;
}

.home-block {
    margin-bottom: 36px;
}

.home-block-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.home-block-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.home-block-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.home-section-heading {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    font-size: 28px;
    letter-spacing: 1px;
    color: var(--navy);
}

.home-notice-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
}

.home-notice-list li {
    border-bottom: 1px solid var(--line);
}

.home-notice-list li:last-child {
    border-bottom: none;
}

.home-notice-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
}

.home-notice-list a:hover {
    background: #fff8f8;
}

.home-notice-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-notice-date {
    font-size: 12px;
    white-space: nowrap;
}

.home-posts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.home-post-tabs {
    display: flex;
    gap: 4px;
    background: #eef2f7;
    padding: 4px;
    border-radius: 10px;
}

.home-post-tab {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    color: var(--muted);
}

.home-post-tab.active {
    background: #fff;
    color: var(--brand-dark);
    box-shadow: 0 2px 8px rgba(1, 27, 53, 0.08);
}

.home-post-panel {
    display: none;
}

.home-post-panel.active {
    display: block;
}

.home-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
}

.home-post-list li {
    border-bottom: 1px solid var(--line);
}

.home-post-list li:last-child {
    border-bottom: none;
}

.home-post-row {
    display: grid;
    grid-template-columns: 88px 1fr auto auto auto;
    gap: 8px 12px;
    align-items: center;
    padding: 11px 16px;
    font-size: 14px;
}

.home-post-row:hover {
    background: #f8fafc;
}

.home-post-board {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-post-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-post-comments {
    color: var(--brand);
    font-size: 12px;
}

.home-post-views,
.home-post-date {
    font-size: 12px;
    white-space: nowrap;
    text-align: right;
}

.home-shop-section {
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.home-shop-section .recommended-head {
    margin-bottom: 16px;
}

.home-empty-card {
    padding: 16px 20px;
}

.home-empty-card p {
    margin: 0;
}

@media (max-width: 768px) {
    .home-post-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .home-post-views,
    .home-post-date {
        text-align: left;
    }
}

.about-card .about-list {
    margin: 20px 0;
    padding-left: 20px;
    line-height: 1.8;
}

.admin-settings-form {
    max-width: 720px;
    display: grid;
    gap: 20px;
}

.admin-settings-block h3 {
    margin: 0 0 8px;
}

.admin-settings-block .muted {
    margin: 0 0 16px;
}

/* ── 장바구니 아이콘 ─────────────────────────────────────── */
.cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 1.25rem;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 6px;
    transition: background .15s;
    color: inherit;
}
.cart-icon:hover {
    background: rgba(0,0,0,.06);
}
.cart-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--brand, #c6001f);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    text-align: center;
    border-radius: 999px;
    padding: 0 4px;
    pointer-events: none;
}

/* ── 결제 폼 공통 ────────────────────────────────────────── */
.notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: .95em;
}
.notice.success { background: #eafaf1; color: #217a50; border: 1px solid #a9dfbf; }
.notice.error   { background: #fdedec; color: #c0392b; border: 1px solid #f5b7b1; }

@media (max-width: 768px) {
    .home-feature-grid {
        grid-template-columns: 1fr;
    }

    .home-recent-list a {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .home-recent-meta {
        justify-self: start;
    }
}

/* ── 헤더 검색바 ────────────────────────────────────── */
.header-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: background .15s, border-color .15s;
}

.header-search:focus-within {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.4);
}

.header-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    padding: 6px 10px 6px 14px;
    width: 160px;
    transition: width .2s;
}

.header-search-input::placeholder { color: rgba(255,255,255,0.5); }

.header-search-input:focus { width: 220px; }

.header-search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    padding: 6px 12px 6px 4px;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.header-search-btn:hover { color: #fff; }

/* ── 검색 결과 페이지 ───────────────────────────────── */
.search-section { padding: 32px 0 60px; }

.search-bar-wrap { margin-bottom: 28px; }

.search-bar-form {
    display: flex;
    max-width: 640px;
    margin: 0 auto;
    border: 2px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 2px 12px rgba(1,27,53,0.07);
    transition: border-color .15s;
}

.search-bar-form:focus-within { border-color: var(--navy); }

.search-bar-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 18px;
    font-size: 15px;
    background: transparent;
    color: var(--text);
}

.search-bar-btn {
    background: var(--navy);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s;
}

.search-bar-btn:hover { background: var(--navy-soft); }

/* 탭 */
.search-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--line);
    margin-bottom: 24px;
}

.search-tab {
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}

.search-tab:hover { color: var(--text); }

.search-tab.active {
    color: var(--navy);
    border-bottom-color: var(--navy);
    font-weight: 700;
}

.search-tab-count {
    display: inline-block;
    background: #eef2f7;
    color: var(--muted);
    border-radius: 10px;
    font-size: 11px;
    padding: 1px 7px;
    margin-left: 4px;
    font-weight: 600;
}

.search-tab.active .search-tab-count {
    background: var(--navy);
    color: #fff;
}

/* 결과 섹션 */
.search-result-section { margin-bottom: 36px; }

.search-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.search-result-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

/* 게시글 결과 목록 */
.search-post-list {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.search-post-item {
    display: block;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    transition: background .1s;
    color: var(--text);
}

.search-post-item:last-child { border-bottom: none; }

.search-post-item:hover { background: #f8f9fb; }

.search-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}

.search-post-board {
    background: #eef2f7;
    color: var(--navy-soft);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
}

.search-post-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: var(--text);
    line-height: 1.5;
}

.search-post-title mark {
    background: #fff3cd;
    color: #7a4a00;
    border-radius: 2px;
    padding: 0 1px;
}

.search-post-comments { color: var(--brand); }

/* 빈 상태 */
.search-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted);
}

/* 페이지네이션 */
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

/* 반응형 */
@media (max-width: 640px) {
    .header-search-input { width: 110px; }
    .header-search-input:focus { width: 150px; }
    .search-bar-btn { padding: 14px 14px; font-size: 13px; }
}

/* ── 글쓰기 폼 개선 ─────────────────────────────────── */
.write-admin-bar {
    display: flex;
    align-items: center;
    background: #f0f4f8;
    border: 1px solid #d4dbe5;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.write-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--navy);
    cursor: pointer;
    margin: 0;
}

.write-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--brand);
    flex-shrink: 0;
}

/* ── QNA 연락처 박스 (작성 폼) ──────────────────────── */
.write-contact-box {
    background: #f8fafc;
    border: 1px solid #d4dbe5;
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.write-contact-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--navy-soft);
    margin: 0 0 12px;
}

.write-contact-note {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}

.write-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 540px) {
    .write-contact-grid { grid-template-columns: 1fr; }
}

/* ── 게시글 상세 — 관리자 연락처 박스 ──────────────── */
.post-contact-admin-box {
    margin-top: 20px;
    padding: 14px 18px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
}

.post-contact-admin-title {
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 10px;
}

.post-contact-admin-title span {
    font-weight: 400;
    color: #a16207;
    font-size: 12px;
}

.post-contact-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    margin: 0;
    font-size: 13.5px;
}

.post-contact-dl dt {
    font-weight: 600;
    color: #78350f;
    white-space: nowrap;
}

.post-contact-dl dd {
    margin: 0;
    color: var(--text);
}

/* ── 주문 상세 DL ───────────────────────────────────── */
.order-detail-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    margin: 0;
}

.order-detail-dl dt {
    font-weight: 600;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    padding-top: 1px;
}

.order-detail-dl dd {
    margin: 0;
    font-size: 14px;
    color: var(--text);
}

/* ── 관리자 주문 상세 그리드 ────────────────────────── */
@media (max-width: 860px) {
    .admin-main > div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ════════════════════════════════════════════════════════════
   한국어 타이포그래피 & 반응형 개선
   ════════════════════════════════════════════════════════════ */

/* ── 한국어 기본 타이포그래피 ────────────────────────── */
body {
    word-break: keep-all;
    overflow-wrap: break-word;
    line-height: 1.75;
}

p, li, td, th, dd, label {
    line-height: 1.8;
}

.board-view-content {
    font-size: 15px;
    line-height: 1.95;
    word-break: keep-all;
}

.section-title {
    letter-spacing: -0.025em;
}

.home-hero-lead {
    line-height: 1.85;
    word-break: keep-all;
}

.home-post-tab {
    letter-spacing: -0.01em;
}

.card {
    word-break: keep-all;
}

/* 게시판 제목 말줄임 유지하면서 한국어 단어 보호 */
.post-title,
.home-post-title,
.home-notice-title {
    word-break: keep-all;
}

/* ── 햄버거 버튼 ──────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.hamburger:hover,
.hamburger:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── 모바일 내비게이션 패널 ──────────────────────────── */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.mobile-nav-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 290px;
    max-width: 86vw;
    height: 100%;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: mobileNavSlideIn 0.26s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes mobileNavSlideIn {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-nav-panel { animation: none; }
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.mobile-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    transition: background 0.15s;
    padding: 0;
    flex-shrink: 0;
}

.mobile-nav-close:hover { background: rgba(255, 255, 255, 0.2); }

/* 패널 내 검색창 */
.mobile-nav-search {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.mobile-nav-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    transition: background 0.15s, border-color 0.15s;
}

.mobile-nav-search-form:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
}

.mobile-nav-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    padding: 10px 12px;
    min-width: 0;
}

.mobile-nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.mobile-nav-search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    padding: 8px 14px 8px 6px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.mobile-nav-search-btn:hover { color: #fff; }

/* 패널 내 메뉴 링크 */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    flex: 1;
}

.mobile-nav-links a {
    padding: 15px 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15.5px;
    font-weight: 500;
    border-left: 3px solid transparent;
    letter-spacing: -0.01em;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.mobile-nav-links a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.mobile-nav-links a.active {
    background: rgba(198, 0, 31, 0.18);
    color: #fff;
    border-left-color: var(--brand);
    font-weight: 700;
}

/* 패널 내 인증 버튼 */
.mobile-nav-auth {
    padding: 20px 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-nav-greeting {
    margin: 0 0 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.mobile-nav-auth .btn-outline {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}

.mobile-nav-auth .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* body 스크롤 잠금 */
.mobile-nav-open {
    overflow: hidden;
}

/* ── 태블릿 이하 (≤920px) — 햄버거 모드 ─────────────── */
@media (max-width: 920px) {
    /* 기존 flex-wrap: wrap 덮어쓰기 */
    .topbar-inner {
        flex-wrap: nowrap;
        gap: 10px;
        padding: 11px 0;
    }

    /* 햄버거 버튼 표시 */
    .hamburger {
        display: flex;
    }

    /* 데스크톱 가로 내비게이션 숨김 */
    .menu {
        display: none;
    }

    /* 인증 영역: auth-name 숨기고 버튼만 표시 */
    .auth-name {
        display: none;
    }

    .auth {
        flex-wrap: nowrap;
        gap: 6px;
    }

    /* 검색창 약간 좁혀서 공간 확보 */
    .header-search-input {
        width: 120px;
    }

    .header-search-input:focus {
        width: 170px;
    }
}

/* ── 모바일 (≤640px) — 인증 버튼 숨기고 패널로 통합 ─── */
@media (max-width: 640px) {
    .topbar-inner {
        padding: 10px 0;
        gap: 8px;
    }

    /* 인증 버튼(.btn)은 모바일 패널로 이동 — 장바구니만 헤더에 유지 */
    .auth .btn {
        display: none;
    }

    /* 검색창 더 좁게 */
    .header-search-input {
        width: 100px;
    }

    .header-search-input:focus {
        width: 140px;
    }

    /* 상품 그리드 2열 유지 (OK) */
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .product-card-img {
        aspect-ratio: 1 / 1;
    }

    /* 섹션 패딩 줄임 */
    .section {
        padding: 28px 0;
    }

    /* 히어로 패딩 줄임 */
    .hero {
        padding: 44px 0;
    }

    .home-hero-wrap .hero {
        padding: 40px 0 36px;
    }

    /* 홈 게시글 행 간결하게 */
    .home-post-row {
        padding: 10px 14px;
        font-size: 13.5px;
    }

    /* 탭 버튼 약간 작게 */
    .home-post-tab {
        padding: 7px 13px;
        font-size: 13px;
    }

    /* 카드 패딩 줄임 */
    .card {
        padding: 20px 16px;
        border-radius: 12px;
    }
}

/* ── 소형 모바일 (≤480px) ────────────────────────────── */
@media (max-width: 480px) {
    /* 검색창 헤더에서 숨김 (패널 내 검색 사용) */
    .header-search {
        display: none;
    }

    /* 상품 그리드: 1열 */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-grid,
    .existing-images {
        grid-template-columns: 1fr 1fr;
    }

    /* 히어로 타이틀 조정 */
    .home-hero-title {
        font-size: clamp(22px, 7vw, 32px);
    }

    .home-hero-subtitle {
        font-size: clamp(16px, 5vw, 22px);
    }

    .home-hero-kicker {
        font-size: clamp(30px, 9vw, 48px);
    }

    /* 주문 dl 좁게 */
    .order-detail-dl {
        grid-template-columns: 80px 1fr;
        gap: 8px 12px;
    }
}

/* ── 푸터 반응형 ─────────────────────────────────────── */
@media (max-width: 640px) {
    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-copy {
        text-align: center;
    }
}

/* ── 마이페이지 반응형 ───────────────────────────────── */
@media (max-width: 640px) {
    .mypage-nav {
        flex-direction: column;
    }

    .mypage-nav .btn {
        text-align: center;
    }
}

/* ── 게시판 반응형 추가 개선 ─────────────────────────── */
@media (max-width: 640px) {
    .board-view-head h1 {
        font-size: 1.2rem;
    }

    .board-view-meta {
        font-size: 12.5px;
    }

    .comment-list {
        font-size: 14px;
    }

    /* 글쓰기 폼 패딩 줄임 */
    .write-contact-box {
        padding: 14px 14px;
    }
}

/* ── 검색 페이지 반응형 ──────────────────────────────── */
@media (max-width: 640px) {
    .search-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .search-tab {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* ── 커뮤니티 레이아웃 개선 ─────────────────────────── */
@media (max-width: 920px) {
    /* 커뮤니티 사이드바가 접혀있을 때 깔끔하게 */
    .community-sidebar {
        border-top: 1px solid var(--line);
        padding-top: 24px;
        margin-top: 8px;
    }
}

/* ════════════════════════════════════════════════════════════
   디자인 리파인 v2 — 한국형 프리미엄 · 미니멀
   레이아웃/기능 변경 없음. 토큰·디테일만 정제하는 오버라이드.
   ════════════════════════════════════════════════════════════ */

/* ── 1. 타이포그래피 ─────────────────────────────────── */
body {
    font-family: "Pretendard Variable", Pretendard, "Noto Sans KR",
        -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.011em;
}

h1, h2, h3, h4 {
    letter-spacing: -0.028em;
    font-weight: 700;
}

::selection {
    background: rgba(198, 0, 31, 0.13);
}

/* ── 2. 헤더 ─────────────────────────────────────────── */
.topbar {
    background: linear-gradient(180deg, #02203d, var(--navy));
    border-bottom: 2px solid var(--brand);
    box-shadow: 0 2px 14px rgba(1, 27, 53, 0.16);
}

.menu a {
    font-size: 14.5px;
    letter-spacing: -0.01em;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s;
}

.menu a.active {
    background: rgba(255, 255, 255, 0.14);
    font-weight: 600;
}

.logo-mark {
    letter-spacing: 2.5px;
}

.logo-text {
    font-size: 12px;
    letter-spacing: 2.5px;
}

/* ── 3. 버튼 ─────────────────────────────────────────── */
.btn {
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 14px;
    letter-spacing: -0.01em;
    transition: background 0.18s, color 0.18s, border-color 0.18s,
        box-shadow 0.18s, transform 0.1s;
}

.btn:not(.btn-outline):hover {
    background: #a50019;
    box-shadow: 0 4px 14px rgba(198, 0, 31, 0.28);
}

.btn:active {
    transform: translateY(1px);
}

.btn-sm {
    padding: 7px 13px;
    font-size: 13px;
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
}

.section .btn-outline,
.card .btn-outline {
    border-color: #dcdcd8;
    color: var(--text);
    font-weight: 500;
}

.section .btn-outline:hover,
.card .btn-outline:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-tint);
}

/* ── 4. 카드 ─────────────────────────────────────────── */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.board-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.board-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #d8d8d4;
}

.board-type {
    background: var(--brand-tint);
    letter-spacing: 0.01em;
}

/* ── 5. 홈 히어로 ────────────────────────────────────── */
.home-hero-wrap {
    position: relative;
    background:
        radial-gradient(720px 340px at 50% -12%, rgba(198, 0, 31, 0.3), transparent 68%),
        radial-gradient(480px 280px at 88% 110%, rgba(155, 176, 199, 0.14), transparent 70%),
        linear-gradient(160deg, #021a32 0%, #0a2c4d 58%, #16395c 100%);
    overflow: hidden;
}

.home-hero-wrap::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.home-hero-kicker {
    letter-spacing: 7px;
    text-shadow: 0 2px 18px rgba(198, 0, 31, 0.35);
}

.home-hero-subkicker {
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.48);
}

.home-hero-title {
    letter-spacing: -0.02em;
}

.home-hero-lead {
    color: rgba(255, 255, 255, 0.74);
    font-size: 14.5px;
}

.hero-compact {
    background:
        radial-gradient(520px 240px at 50% -16%, rgba(198, 0, 31, 0.26), transparent 70%),
        linear-gradient(160deg, #021a32, #14395f);
    border-radius: var(--radius);
}

/* ── 6. 홈 섹션 헤드 ─────────────────────────────────── */
.home-block-head {
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}

.home-block-label {
    border-radius: 4px;
    padding: 3px 8px;
    letter-spacing: 0.04em;
}

.home-block-title {
    font-size: 19px;
}

.home-section-heading {
    letter-spacing: 1.5px;
}

/* ── 7. 홈 리스트 / 탭 ───────────────────────────────── */
.home-notice-list,
.home-post-list {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.home-notice-list a:hover,
.home-post-row:hover {
    background: #fafaf8;
}

.home-post-tabs {
    background: #f1f1ee;
    border-radius: 10px;
}

.home-post-tab {
    border-radius: 7px;
    transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.home-post-tab.active {
    color: var(--navy);
    box-shadow: 0 1px 5px rgba(17, 24, 39, 0.1);
}

/* ── 8. 테이블 ───────────────────────────────────────── */
.table-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

th {
    background: #fafaf9;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.01em;
}

td {
    font-size: 14px;
}

.board-title-cell a {
    color: var(--text);
    transition: color 0.12s;
}

.board-title-cell a:hover {
    color: var(--brand-dark);
}

/* ── 9. 폼 ───────────────────────────────────────────── */
input, textarea, select {
    border-color: #dcdcd8;
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--navy-soft);
    box-shadow: 0 0 0 3px rgba(27, 60, 93, 0.12);
}

label {
    color: #454542;
}

/* ── 10. 상품 카드 ───────────────────────────────────── */
.product-thumb,
.product-thumb-empty {
    border-radius: 10px;
    border: 1px solid var(--line);
    transition: transform 0.25s ease;
}

.product-card:hover .product-thumb {
    transform: scale(1.02);
}

.product-card h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.015em;
    transition: color 0.12s;
}

.product-card:hover h3 {
    color: var(--brand-dark);
}

.product-category-label {
    font-size: 11.5px;
    letter-spacing: 0.01em;
}

.product-price {
    color: var(--text);
    font-size: 16px;
    letter-spacing: -0.01em;
}

.product-price-lg {
    font-size: 26px;
}

.badge-recommend {
    letter-spacing: 0.03em;
}

/* ── 11. 커뮤니티 사이드바 ───────────────────────────── */
.community-sidebar {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.community-board-nav > a:hover,
.community-board-nav a.community-nav-board:hover {
    background: #f6f6f4;
}

/* 선택된 메뉴: 파란색(네이비 계열)으로 명확한 선택감 */
.community-board-nav > a.active,
.community-board-nav a.community-nav-board.active {
    background: #e9f1fa;
    color: #14406b;
    border-left-color: #2e6da4;
    font-weight: 700;
}

.community-board-nav > a.active small,
.community-board-nav a.community-nav-board.active small {
    color: #5a86ad;
}

/* 모바일 패널 활성 메뉴도 파란색 계열로 통일 */
.mobile-nav-links a.active {
    background: rgba(78, 130, 180, 0.28);
    border-left-color: #7fb1e0;
}

/* ── 12. 검색 ────────────────────────────────────────── */
.search-bar-form {
    border-radius: var(--radius);
    border-color: var(--line);
}

.search-post-board {
    background: #f1f1ee;
}

.search-post-item:hover {
    background: #fafaf8;
}

.search-tab.active .search-tab-count {
    background: var(--navy);
}

.search-tab-count {
    background: #f1f1ee;
}

/* ── 13. 푸터 ────────────────────────────────────────── */
.footer {
    background: #021528;
    padding: 44px 0 24px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-brand .muted {
    color: rgba(255, 255, 255, 0.5);
}

.footer-copy {
    color: rgba(255, 255, 255, 0.42);
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* ── 14. 기타 디테일 ─────────────────────────────────── */
.badge-notice {
    letter-spacing: 0.03em;
}

.notice {
    border-radius: var(--radius-sm);
}

.pagination .btn-outline,
.search-pagination .btn-outline {
    border-color: #dcdcd8;
    color: var(--text);
}

.board-view h1 {
    letter-spacing: -0.03em;
}

.board-view-content {
    font-size: 15.5px;
}

.gallery-thumb {
    border-radius: 10px;
    border: 1px solid var(--line);
    transition: transform 0.25s ease;
}

.gallery-item:hover .gallery-thumb {
    transform: scale(1.02);
}

/* ── 홈 신상품 무한 슬라이더 ─────────────────────────── */
.home-slider {
    margin-bottom: 36px;
}

.home-slider-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}

.home-slider-kicker {
    font-family: "Bebas Neue", sans-serif;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--brand);
    line-height: 1;
}

.home-slider-title {
    margin: 0;
    font-size: 19px;
    letter-spacing: -0.02em;
    flex: 1;
}

.home-slider-viewport {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.home-slider-track {
    display: flex;
    width: max-content;
    animation: homeSliderFlow linear infinite;
    will-change: transform;
}

.home-slider-viewport:hover .home-slider-track,
.home-slider-track:focus-within {
    animation-play-state: paused;
}

@keyframes homeSliderFlow {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.home-slider-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 172px;
    flex-shrink: 0;
    margin-right: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-slider-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.home-slider-card img,
.home-slider-noimg {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: var(--line);
    display: block;
}

.home-slider-noimg {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
}

.home-slider-name {
    margin-top: 4px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.home-slider-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

/* 모션 최소화 설정: 흐름 대신 가로 스크롤 */
@media (prefers-reduced-motion: reduce) {
    .home-slider-track {
        animation: none;
        width: auto;
    }
    .home-slider-viewport {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

@media (max-width: 640px) {
    .home-slider-card {
        width: 138px;
        margin-right: 10px;
    }
    .home-slider-title {
        font-size: 16px;
    }
}

/* ── 간판형 대문: 컴팩트 브랜드 바 + 상품 슬라이더 ───── */
.home-hero-banner {
    padding: 24px 0 0;
}

.home-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0 24px;
    margin-bottom: 18px;
}

.home-banner-kicker {
    margin: 0 0 4px;
    font-family: "Bebas Neue", sans-serif;
    font-size: 26px;
    letter-spacing: 3px;
    color: var(--brand);
    line-height: 1;
}

.home-banner-kicker span {
    font-size: 10px;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 8px;
    vertical-align: 3px;
}

.home-banner-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.home-banner-title span {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: -0.01em;
}

.home-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.section .home-banner-actions .btn-outline {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.35);
    background: transparent;
}

.section .home-banner-actions .btn-outline:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 640px) {
    .home-hero-banner {
        padding-top: 18px;
    }
    .home-banner-top {
        padding: 0 16px;
        margin-bottom: 14px;
    }
    .home-banner-kicker {
        font-size: 22px;
    }
    .home-banner-title {
        font-size: 17px;
    }
}

/* ── 대문 간판 모드: 히어로 안에 내장된 슬라이더 ─────── */
.home-slider-hero {
    margin: 0;
    padding: 4px 0 30px;
}

/* 간판 모드 카드: 조금 더 크게 (간판의 주인공) */
.home-slider-hero .home-slider-card {
    width: 196px;
}

.community-content .home-hero-wrap .hero {
    padding-bottom: 26px;
}

.home-slider-hero .home-slider-head {
    padding: 0 24px;
    margin-bottom: 12px;
}

.home-slider-hero .home-slider-title {
    color: #fff;
}

.section .home-slider-hero .home-slider-head .btn-outline {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.35);
    background: transparent;
}

.section .home-slider-hero .home-slider-head .btn-outline:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
}

.home-slider-hero .home-slider-card {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.home-slider-hero .home-slider-card:hover {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
}

@media (max-width: 640px) {
    .home-slider-hero {
        padding-bottom: 24px;
    }
    .home-slider-hero .home-slider-head {
        padding: 0 16px;
    }
    .home-slider-hero .home-slider-card {
        width: 150px;
    }
}
