/* ============================================================
   Angel Shop — Modern Minimal Fashion Theme
   ============================================================ */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css');

:root {
  --fg:        #111;
  --fg-soft:   #555;
  --fg-muted:  #999;
  --bg:        #fff;
  --bg-soft:   #fafafa;
  --bg-mute:   #f4f4f4;
  --border:    #ececec;
  --border-soft: #f4f4f4;
  --accent:    #111;
  --accent-fg: #fff;
  --danger:    #e11d48;
  --success:   #16a34a;
  --warn:      #d97706;
  --radius:    2px;
  --radius-lg: 8px;
  --maxw:      1280px;
  --header-h:  72px;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
  font-size: 14px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; transition: opacity .2s var(--ease); }
a:hover { opacity: .65; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
.muted { color: var(--fg-muted); font-size: 12px; }
.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; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
@media (max-width: 768px) { .container { padding: 0 16px; } }

/* ============================================================
   NOTICE BAR
   ============================================================ */
.notice-bar {
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 16px;
  letter-spacing: -.01em;
}
.notice-bar a { color: #fff; text-decoration: underline; }

/* ============================================================
   BRAND INTRO (logo + name + description)
   ============================================================ */
.brand-intro {
  text-align: center;
  padding: 48px 16px 32px;
  background: #fff;
}
.brand-intro-logo {
  display: inline-block; margin-bottom: 4px;
}
.brand-intro-logo img {
  max-height: 90px; width: auto; margin: 0 auto; display: block;
}
.brand-intro-name {
  font-size: 28px; font-weight: 700; letter-spacing: -.03em;
  margin: 8px 0 18px; line-height: 1;
}
.brand-intro-desc {
  color: var(--fg-soft);
  font-size: var(--desc-size, 24px); line-height: 1.5;
  max-width: 900px; margin: 0 auto;
  white-space: pre-line;
}
@media (max-width: 640px) {
  .brand-intro { padding: 32px 16px 24px; }
  .brand-intro-logo img { max-height: 70px; }
  .brand-intro-name { font-size: 22px; }
  .brand-intro-desc { font-size: calc(var(--desc-size, 24px) * 0.7); }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--menu-bg, rgba(255,255,255,.94));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; min-height: var(--header-h); gap: 24px;
}
.header-inner .brand {
  grid-column: 2;
  font-weight: 700; font-size: 20px; letter-spacing: -.02em;
  display: inline-flex; align-items: center;
}
.header-inner .brand img { max-height: 32px; width: auto; }
.main-nav { grid-column: 3; justify-self: end; }
.main-nav ul {
  display: flex; gap: 28px; list-style: none; margin: 0; padding: 0;
}
.main-nav a {
  font-size: 13px; font-weight: 500; color: var(--fg);
  position: relative; padding: 8px 0;
}
.main-nav a:hover { opacity: 1; color: var(--fg-soft); }

/* 브랜드 인트로가 있으면 sticky 헤더에서 브랜드 숨기고 메뉴를 가운데 정렬 */
.site-header.no-brand .header-inner {
  grid-template-columns: 1fr;
  max-width: none;        /* 메뉴 많을 때 한 줄에 들어가도록 컨테이너 폭 해제 */
}
.site-header.no-brand .main-nav {
  grid-column: 1; justify-self: stretch;
}
.site-header.no-brand .main-nav ul {
  justify-content: center; gap: 22px; flex-wrap: nowrap;
  overflow-x: auto;        /* 화면 좁아져서 안 들어가면 가로 스크롤 */
  scrollbar-width: none;
  padding: 0 16px;
}
.site-header.no-brand .main-nav ul::-webkit-scrollbar { display: none; }
.site-header.no-brand .main-nav a {
  font-size: 13px; padding: 12px 0; white-space: nowrap;
}
@media (max-width: 768px) {
  /* 모바일에선 transform 트릭 대신 display 토글로 단순화 */
  .main-nav {
    display: none !important;
    transform: none !important;
    transition: none !important;
  }
  .main-nav.open {
    display: block !important;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    height: calc(100vh - var(--header-h));
    background: #fff; z-index: 99;
    overflow-y: auto; padding: 16px 24px;
  }
  .main-nav.open ul {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    overflow-x: visible !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: 0 !important;
  }
  .main-nav.open a {
    font-size: 16px;
    padding: 14px 0;
    white-space: normal;
    display: block;
    border-bottom: 1px solid var(--border-soft);
  }
  /* no-brand에서도 sticky 헤더에 햄버거가 보여야 함 */
  .site-header.no-brand .header-inner {
    grid-template-columns: auto 1fr;
    min-height: var(--header-h);
  }
  .site-header.no-brand .nav-toggle {
    grid-column: 1; justify-self: start;
  }
}

/* 메뉴바 배경 색상이 설정되면 흰 글씨로 자동 전환 */
.site-header[style*="--menu-bg"] {
  border-bottom: 0;
}
.site-header[style*="--menu-bg"] .main-nav a,
.site-header[style*="--menu-bg"] .brand,
.site-header[style*="--menu-bg"] .brand-text,
.site-header[style*="--menu-bg"] .nav-toggle {
  color: #fff;
}
.site-header[style*="--menu-bg"] .main-nav a:hover {
  color: rgba(255,255,255,.7);
}

/* Mobile nav */
.nav-toggle {
  display: none; background: none; border: 0; padding: 8px;
  color: var(--fg);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 768px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .header-inner .brand { grid-column: 2; justify-self: center; font-size: 17px; }
  .nav-toggle { display: inline-flex; grid-column: 1; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: #fff;
    transform: translateY(-100%); transition: transform .3s var(--ease);
    z-index: 90; padding: 16px 24px; border-top: 1px solid var(--border-soft);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { font-size: 18px; padding: 14px 0; display: block;
                border-bottom: 1px solid var(--border-soft); }
}

/* ============================================================
   MAIN / SECTIONS
   ============================================================ */
main.container { padding-top: 0; padding-bottom: 48px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }

.section { padding: 64px 0 0; }
.section:first-of-type { padding-top: 40px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 24px;
}
.section-head h2 { font-size: 18px; letter-spacing: 0; }
.section-head a:not(.btn) { font-size: 12px; color: var(--fg-muted); font-weight: 500; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  margin: 0 -32px 0; padding: 96px 32px 96px;
  background: var(--bg-mute);
  text-align: center;
}
@media (max-width: 768px) {
  .hero { margin: 0 -16px; padding: 64px 16px; }
}
.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800; letter-spacing: -.03em;
  margin-bottom: 14px; line-height: 1.1;
}
.hero-sub {
  font-size: 15px; color: var(--fg-soft);
  max-width: 480px; margin: 0 auto 32px;
}
.hero .btn { padding: 14px 36px; font-size: 14px; }

/* ============================================================
   HOME ONE-PAGE SECTIONS
   ============================================================ */
.home-section {
  padding: 64px 0;
}
.home-section:first-of-type { padding-top: 32px; }
.home-section-alt {
  background: #fff7f9;  /* 연한 분홍 */
}
.home-section-soft {
  background: var(--bg-soft);
}
.home-section .container > .section-head {
  border: 0; padding: 0; margin-bottom: 32px;
}

/* 메인 배너 그리드 */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
}
/* 명시적 N열 설정 시 */
.banner-grid.cols-fixed {
  grid-template-columns: repeat(var(--banner-cols, 3), 1fr);
}
@media (max-width: 768px) {
  .banner-grid,
  .banner-grid.cols-fixed { padding: 0 16px; gap: 12px; grid-template-columns: 1fr; }
}
.banner-card {
  display: block; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--bg-mute); line-height: 0;
}
.banner-card img {
  width: 100%; height: auto; display: block;
  transition: transform .5s var(--ease);
}
.banner-card:hover img { transform: scale(1.03); }
.banner-card:hover { opacity: 1; }

/* 후기 카드 */
.review-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 960px) { .review-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .review-cards { grid-template-columns: 1fr; } }
.review-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px; background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  min-height: 200px; transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.review-card:hover {
  opacity: 1; transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.review-card-title {
  font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -.02em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.review-card-snippet {
  flex: 1; font-size: 13px; color: var(--fg-soft); line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.review-card-meta {
  display: flex; justify-content: space-between; font-size: 11px; color: var(--fg-muted);
  border-top: 1px solid var(--border-soft); padding-top: 12px;
}

/* 상담 CTA 섹션 */
.contact-cta {
  background: #111; color: #fff; padding: 80px 0;
}
.contact-cta .btn { transition: all .2s var(--ease); }
.contact-cta .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }

/* ============================================================
   HOME CATEGORY SECTIONS
   ============================================================ */
.home-cat-section { margin-bottom: 40px; }
.home-cat-section:last-child { margin-bottom: 0; }
.home-cat-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.home-cat-title {
  margin: 0; font-size: 16px; font-weight: 600; color: var(--fg);
}
.home-cat-more {
  font-size: 12px; color: var(--fg-muted); text-decoration: none;
}
.home-cat-more:hover { color: var(--fg); }

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
  gap: 24px 16px;
}
@media (max-width: 960px) {
  .product-grid { gap: 20px 12px; }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(var(--grid-cols-mobile, 2), 1fr); gap: 16px 10px; }
}

.product-card { display: flex; flex-direction: column; gap: 6px; height: 100%; }
/* 스페이서: PC 그리드에서 자리만 차지, 모바일에선 숨김 */
.product-card.spacer { background: transparent; pointer-events: none; }
@media (max-width: 640px) {
  .product-card.spacer { display: none; }
}
.product-card-info { display: flex; flex-direction: column; flex: 1 1 auto; text-decoration: none; color: inherit; }
.product-card-info:hover { opacity: 1; }
.product-card .thumb {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted); font-size: 12px;
  position: relative;
}
.product-card .thumb img {
  width: 100%; height: auto; display: block;
  transition: transform .6s var(--ease);
}
.product-card-info:hover .thumb img { transform: scale(1.04); }
.product-card .name {
  margin-top: 8px; font-size: 13px; color: var(--fg-soft);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .price {
  margin-top: 2px; font-weight: 700; font-size: 14px; color: var(--fg);
}
.product-card .desc {
  margin-top: 4px; font-size: 12px; color: var(--fg-soft);
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-actions {
  display: flex; flex-direction: row; gap: 6px; margin-top: 10px;
}
.product-card-actions .btn { padding: 10px; font-size: 12px; flex: 1; }
@media (max-width: 640px) {
  .product-card-actions { flex-direction: column; }
}

/* ===== 주문 모달 ===== */
/* ===== 팝업 배너 ===== */
.popup-banner { position: fixed; z-index: 999; }
.popup-banner[hidden] { display: none; }
.popup-banner.pos-center {
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5);
}
.popup-banner.pos-bottom-right { bottom: 16px; right: 16px; }
.popup-banner.pos-bottom-left  { bottom: 16px; left: 16px; }
.popup-banner-box {
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
  max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column;
}
.popup-banner.pos-bottom-right .popup-banner-box,
.popup-banner.pos-bottom-left  .popup-banner-box { max-width: 360px; }
.popup-banner-img { display: block; }
.popup-banner-img img {
  display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain;
}
.popup-banner-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #f5f5f5; font-size: 13px;
  border-top: 1px solid #e5e5e5;
}
.popup-banner-today { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: #555; }
.popup-banner-close {
  background: none; border: 0; cursor: pointer;
  font-size: 13px; font-weight: 600; padding: 4px 10px;
  color: #111;
}
.popup-banner-close:hover { color: #dc2626; }
@media (max-width: 640px) {
  .popup-banner.pos-bottom-right,
  .popup-banner.pos-bottom-left { bottom: 8px; left: 8px; right: 8px; }
  .popup-banner.pos-bottom-right .popup-banner-box,
  .popup-banner.pos-bottom-left  .popup-banner-box { max-width: 100%; }
}

.order-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  animation: orderModalFadeIn .15s var(--ease);
}
.order-modal[hidden] { display: none; }
@keyframes orderModalFadeIn { from { opacity: 0 } to { opacity: 1 } }
.order-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
}
.order-modal-box {
  position: relative; background: #fff;
  width: 90%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.order-modal-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: 0; font-size: 28px;
  line-height: 1; cursor: pointer; color: var(--fg-muted);
  padding: 8px 12px;
}
.order-modal-close:hover { color: var(--fg); }
.order-modal-loading {
  text-align: center; padding: 60px 20px;
  color: var(--fg-muted); font-size: 14px;
}
@media (max-width: 640px) {
  .order-modal-box { width: 96%; padding: 24px 16px; max-height: 95vh; }
}

/* ===== 상품 상세 페이지 - 상세 이미지 스택 ===== */
.product-detail-images {
  margin: 64px auto 0;
  max-width: 860px;
  display: flex; flex-direction: column; gap: 0;
}
.product-detail-images img {
  width: 100%; height: auto; display: block;
}

/* ============================================================
   SHOP PAGE HEADER
   ============================================================ */
.shop-header {
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 32px;
}
.shop-breadcrumb {
  font-size: 12px; color: var(--fg-muted);
  margin-bottom: 8px; letter-spacing: -.01em;
}
.shop-breadcrumb a { color: var(--fg-muted); }
.shop-breadcrumb a:hover { color: var(--fg); opacity: 1; }
.shop-breadcrumb span { margin: 0 6px; }
.shop-title {
  font-size: 28px; font-weight: 800; letter-spacing: -.03em;
  margin: 0;
}
.shop-count {
  margin-top: 6px; font-size: 13px; color: var(--fg-muted);
}

/* ============================================================
   CATEGORY TABS
   ============================================================ */
.cat-tabs {
  display: flex; gap: 24px; border-bottom: 1px solid var(--border);
  margin-bottom: 40px; overflow-x: auto;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a {
  padding: 16px 0; font-size: 14px; color: var(--fg-muted);
  border-bottom: 1px solid transparent; white-space: nowrap;
  font-weight: 500; transition: all .2s var(--ease);
}
.cat-tabs a.active { color: var(--fg); border-bottom-color: var(--fg); font-weight: 600; }
.cat-tabs a:hover { color: var(--fg); opacity: 1; }

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.product-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
  padding: 16px 0 0;
}
@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
}
.product-detail .thumb {
  aspect-ratio: 1 / 1; background: var(--bg-mute);
  border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted);
}
.product-detail .thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.product-detail .cat-label {
  font-size: 12px; color: var(--fg-muted); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .05em;
}
.product-detail .name {
  font-size: 24px; font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 16px;
}
.product-detail .price {
  font-size: 22px; font-weight: 700; margin-bottom: 32px;
}
.product-detail .desc {
  color: var(--fg-soft); font-size: 14px; line-height: 1.7;
  margin-bottom: 32px;
  padding: 24px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
}

/* ============================================================
   FORMS
   ============================================================ */
form .field { margin-bottom: 20px; }
form label {
  display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px;
  color: var(--fg);
}
form label .req { color: var(--danger); margin-left: 2px; }
form input[type=text], form input[type=password], form input[type=number],
form input[type=email], form input[type=tel], form input[type=file],
form select, form textarea {
  width: 100%; padding: 14px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; font-family: inherit;
  background: #fff; color: var(--fg); transition: border-color .15s var(--ease);
}
form textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
form input:focus, form select:focus, form textarea:focus {
  outline: none; border-color: var(--fg);
}
form .help { font-size: 12px; color: var(--fg-muted); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px;
  background: var(--accent); color: var(--accent-fg);
  border: 1px solid var(--accent); border-radius: var(--radius);
  font-size: 13px; font-weight: 600; font-family: inherit;
  line-height: 1; white-space: nowrap; flex-shrink: 0;
  text-decoration: none; cursor: pointer; vertical-align: middle;
  transition: all .15s var(--ease); letter-spacing: -.01em;
  box-sizing: border-box;
}
form.inline-btn,
.post-actions form,
.actions form,
.sortable-list li form,
.table form,
.menu-row form {
  display: inline-flex; align-items: stretch;
  margin: 0; padding: 0;
}
.btn:hover { background: #000; opacity: 1; }
.btn.secondary { background: #fff; color: var(--fg); border-color: var(--border); }
.btn.secondary:hover { background: var(--bg-soft); border-color: var(--fg); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #be123c; }
.btn.sm { padding: 8px 14px; font-size: 12px; }
.btn.block { display: flex; width: 100%; padding: 16px; font-size: 14px; }

.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* TD에 .actions 적용 시 테이블 레이아웃 깨지지 않게 */
.table td.actions {
  display: table-cell;
  white-space: nowrap;
}
.table td.actions > * {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 4px;
}
.table td.actions > *:last-child { margin-right: 0; }

/* ============================================================
   TABLES
   ============================================================ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
  text-align: left; padding: 14px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.table th {
  font-weight: 600; font-size: 11px;
  color: var(--fg-muted); text-transform: uppercase; letter-spacing: .04em;
}
.table tr:hover td { background: var(--bg-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================
   POST LIST (reviews, etc.)
   ============================================================ */
.post-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.post-list li {
  border-bottom: 1px solid var(--border-soft); padding: 18px 4px;
  transition: background .15s var(--ease);
}
.post-list li:hover { background: var(--bg-soft); }
.post-list .title { font-size: 14px; font-weight: 500; }
.post-list .meta {
  display: flex; gap: 14px; font-size: 11px; color: var(--fg-muted);
  margin-top: 6px;
}
.post-list .badge {
  display: inline-block; padding: 2px 7px; border-radius: 10px;
  background: var(--bg-mute); font-size: 10px; margin-right: 6px;
  color: var(--fg-soft); font-weight: 500;
  vertical-align: middle;
}
.post-list .badge.admin { background: var(--fg); color: #fff; }
.post-list .badge.secret { background: #fef3c7; color: #92400e; }

.post-view { padding: 32px 0 0; max-width: 800px; margin: 0 auto; }
.post-view .post-title { font-size: 24px; margin-bottom: 12px; font-weight: 700; }
.post-view .post-meta {
  font-size: 12px; color: var(--fg-muted);
  padding-bottom: 24px; border-bottom: 1px solid var(--border);
  display: flex; gap: 16px; flex-wrap: wrap;
}
.post-view .post-body {
  padding: 40px 0; border-bottom: 1px solid var(--border);
  min-height: 200px; font-size: 15px; line-height: 1.7; color: var(--fg-soft);
}
.post-view .post-body p { margin-bottom: 16px; }
.post-view .post-actions { padding: 20px 0; display: flex; gap: 8px; }

/* ============================================================
   FAQ
   ============================================================ */
.faq details {
  border-bottom: 1px solid var(--border-soft); padding: 20px 4px;
}
.faq summary {
  cursor: pointer; font-weight: 600; list-style: none; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--fg-muted); font-size: 20px; font-weight: 300; }
.faq details[open] summary::after { content: '−'; }
.faq .answer {
  padding: 16px 0 4px; color: var(--fg-soft); font-size: 14px;
  line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 0; padding: 32px 0;
  background: var(--bg-soft);
}
.site-footer p { margin: 4px 0; font-size: 12px; color: var(--fg-muted); }

/* ============================================================
   ADMIN SHORTCUT (floating button on public pages when logged in)
   ============================================================ */
.admin-shortcut {
  position: fixed; right: 20px; bottom: 20px;
  background: #111; color: #fff !important;
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  z-index: 1000; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.admin-shortcut:hover {
  opacity: 1; transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.32);
  text-decoration: none;
}
.admin-shortcut svg { display: block; }

/* ============================================================
   FLASH
   ============================================================ */
.flash {
  padding: 14px 18px; background: #f0fdf4; color: #166534;
  border: 1px solid #bbf7d0; border-radius: var(--radius);
  margin-bottom: 20px; font-size: 13px;
}
.flash.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* ============================================================
   ORDER FORM
   ============================================================ */
.order-summary {
  background: var(--bg-soft); padding: 20px;
  border-radius: var(--radius); margin-bottom: 32px;
  display: flex; align-items: center; gap: 16px;
}
.order-summary .thumb {
  width: 80px; height: 80px; flex-shrink: 0;
  background: #fff; border-radius: var(--radius); overflow: hidden;
}
.order-summary .thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.order-summary .name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.order-summary .price { font-size: 16px; font-weight: 700; }
.order-summary .desc {
  margin-top: 6px; font-size: 12px; color: var(--fg-soft); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   EMPTY STATE & PAGER
   ============================================================ */
.empty {
  text-align: center; padding: 80px 16px;
  color: var(--fg-muted); font-size: 14px;
}

.pager {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 40px; font-size: 13px;
}
.pager a, .pager span {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--fg-muted); min-width: 36px; text-align: center;
}
.pager a:hover { color: var(--fg); border-color: var(--fg); opacity: 1; }
.pager .current { background: var(--fg); color: #fff; border-color: var(--fg); }

/* ============================================================
   ADMIN
   ============================================================ */
body.admin { background: var(--bg-soft); font-size: 13px; }
.admin-header {
  background: #fff; color: var(--fg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.admin-header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; gap: 24px;
}
.admin-header .brand {
  font-size: 16px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}
.admin-header .brand-text { color: var(--fg); }
.admin-header a { color: var(--fg-soft); }
.admin-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.admin-nav a { font-size: 13px; font-weight: 500; padding: 4px 0; white-space: nowrap; }
.admin-nav a:hover { color: var(--fg); opacity: 1; }
.nav-badge {
  display: inline-block; background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 10px; margin-left: 2px;
  vertical-align: 1px;
}
.admin-nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 8px; font-size: 20px; color: var(--fg); align-self: flex-end;
}

/* 관리자 검색 폼 */
.admin-search {
  display: flex; gap: 6px; margin-bottom: 12px; max-width: 480px; align-items: stretch;
}
.admin-search input[type="search"] {
  flex: 1; padding: 6px 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 4px;
  background: #fff;
}

/* 벌크 액션 바 */
.admin-bulk-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: -1px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 6px 6px 0 0; font-size: 13px;
}
.admin-bulk-bar select {
  padding: 5px 8px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 4px; background: #fff;
}
.admin-bulk-bar label {
  display: inline-flex; gap: 6px; align-items: center;
  font-weight: 500; cursor: pointer;
}

/* 토스트 (flash 메시지 자동 페이드) */
.flash.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #111; color: #fff;
  padding: 14px 20px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 9999; max-width: 360px;
  font-size: 13px; line-height: 1.5;
  animation: toastIn .25s ease-out, toastOut .3s ease-in 3.7s forwards;
}
.flash.toast.error { background: #991b1b; }
@keyframes toastIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(20px); opacity: 0; visibility: hidden; }
}

.admin-main { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }

/* 모바일: 관리자 햄버거 메뉴 */
@media (max-width: 768px) {
  .admin-header { padding: 0 12px; }
  .admin-header-inner {
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 0; min-height: 0; padding: 8px 0;
  }
  .admin-header .brand {
    padding: 4px 0; font-size: 15px;
  }
  .admin-nav-toggle { display: block; }
  .admin-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-top: 1px solid var(--border);
    padding: 8px 16px 16px;
    box-shadow: 0 8px 16px rgba(0,0,0,.06);
    z-index: 100;
  }
  .admin-nav.open { display: flex; }
  .admin-nav a {
    padding: 12px 0; font-size: 14px;
    border-bottom: 1px solid var(--border);
  }
  .admin-nav a:last-child { border-bottom: 0; }
  .admin-header { position: relative; }
  .admin-main { padding: 16px 12px; }
  .admin-card { padding: 16px; }
  .admin-main h1 { font-size: 19px; margin-bottom: 16px; }
  .admin-card h2 { font-size: 14px; }

  /* 테이블 기본: 모바일에서 가로 스크롤 (fallback) */
  .admin-card > .table:not(.cards-mobile),
  .admin-card .table-wrap {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px; padding: 0 16px;
    width: calc(100% + 32px);
  }
  .table:not(.cards-mobile) { white-space: nowrap; min-width: 100%; }
  .table:not(.cards-mobile) th,
  .table:not(.cards-mobile) td {
    white-space: nowrap; padding: 10px 8px; font-size: 12px;
  }

  /* 테이블 카드형: <table class="table cards-mobile"> 적용 시 모바일에서 행 = 카드 */
  .table.cards-mobile thead { display: none; }
  .table.cards-mobile,
  .table.cards-mobile tbody,
  .table.cards-mobile tr {
    display: block; width: 100%;
  }
  .table.cards-mobile tr {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
  }
  .table.cards-mobile tr:hover td { background: transparent; }
  .table.cards-mobile td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border: none;
    border-bottom: 1px dashed var(--border-soft);
    font-size: 13px;
    white-space: normal;
    text-align: right;
  }
  .table.cards-mobile td:last-child { border-bottom: 0; padding-bottom: 0; }
  .table.cards-mobile td:first-child { padding-top: 0; }
  .table.cards-mobile td::before {
    content: attr(data-label);
    font-weight: 600; color: var(--fg-muted);
    font-size: 11px; flex-shrink: 0;
    text-transform: uppercase; letter-spacing: .02em;
  }
  .table.cards-mobile td[data-label=""]::before,
  .table.cards-mobile td:not([data-label])::before { content: ""; }
  /* 라벨 없는 셀(주로 액션 버튼)은 풀 폭으로 */
  .table.cards-mobile td[data-label=""],
  .table.cards-mobile td:not([data-label]) {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  /* 카드 안에서 .num 정렬 무력화 */
  .table.cards-mobile td.num { text-align: right; }
  /* 폼 그리드 (상품 수정의 입금/조회/좋아요/IP 같은) — 1열로 */
  .admin-card form > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}
.admin-main h1 { font-size: 22px; margin-bottom: 24px; }
.admin-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px;
}
.admin-card h2 { font-size: 15px; margin-bottom: 16px; }

/* 설정 페이지 탭 */
.settings-tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.settings-tabs a {
  padding: 12px 20px;
  font-size: 14px; font-weight: 500;
  color: var(--fg-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s var(--ease);
}
.settings-tabs a:hover { color: var(--fg); opacity: 1; text-decoration: none; }
.settings-tabs a.active {
  color: var(--fg); border-bottom-color: var(--fg); font-weight: 600;
}

/* Sortable lists */
.sortable-list { list-style: none; padding: 0; margin: 0; }
.sortable-list li {
  background: #fff; border: 1px solid var(--border);
  padding: 12px 14px; margin-bottom: 6px; border-radius: var(--radius);
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
}
.sortable-list .handle { color: var(--fg-muted); cursor: grab; user-select: none; font-size: 16px; }
.sortable-list .sortable-ghost { opacity: .35; }

.menu-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border);
  padding: 10px 12px; margin-bottom: 6px; border-radius: var(--radius);
}
.menu-row .handle { color: var(--fg-muted); cursor: grab; user-select: none; font-size: 18px; padding: 0 4px; }
.menu-row .menu-label { flex: 0 0 200px; }
.menu-row .menu-url   { flex: 1; font-family: ui-monospace, "SF Mono", monospace; font-size: 12px; }
@media (max-width: 640px) {
  .menu-row { flex-wrap: wrap; }
  .menu-row .menu-label, .menu-row .menu-url { flex: 1 1 100%; }
}

/* Status badges */
.status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.status-pending  { background: #fef3c7; color: #92400e; }
.status-paid     { background: #dbeafe; color: #1e40af; }
.status-shipped  { background: #ede9fe; color: #5b21b6; }
.status-done     { background: #dcfce7; color: #166534; }
.status-canceled { background: #f3f4f6; color: #4b5563; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-box {
  max-width: 380px; margin: 100px auto;
  padding: 40px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.login-box h1 { text-align: center; margin-bottom: 28px; font-size: 22px; }
