/* ============================================================
   BEAUTY STORY 디자인 시스템 — K-뷰티 에디토리얼
   - 디스플레이(제목·로고): Noto Serif KR / 본문·UI: Pretendard Variable
   - 서피스는 웜 포슬린 뉴트럴, 로즈·베리는 '액센트'로만.
   - 시그니처: 최상단 그라데이션 리본 + 세리프 헤드라인 + 블러시 워시 히어로.
   - 모바일(≤860): 헤더=로고+햄버거, 메뉴는 애니메이션 드로어 + 하단 탭바.
   - 관리자(data-site=admin): 세리프 배제(도구 성격), 청록 액센트, 와이드 컨테이너.
   ============================================================ */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@500;600;700;900&display=swap");

:root {
  --accent-community: #c2255c;   /* 딥 로즈 — 커뮤니티/기본 */
  --accent-shop:      #a61e4d;   /* 베리 — 샵 */
  --accent-admin:     #0f766e;   /* 청록 — 관리자 */
  --accent: var(--accent-community);

  --c-text: #241b21; --c-sub: #6d5f69; --c-muted: #a2939c;
  --c-line: #ebe2e7; --c-line-2: #f4eef2;
  --c-bg: #faf7f8; --c-card: #ffffff;
  --c-danger: #e11d48; --c-ok: #15803d; --c-warn: #b45309;

  --font-body: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-display: "Noto Serif KR", "Pretendard Variable", Pretendard, serif;

  --radius: 16px; --radius-sm: 11px;
  --accent-soft: color-mix(in srgb, var(--accent) 7%, #fff);
  --accent-line: color-mix(in srgb, var(--accent) 22%, #fff);
  --shadow-sm: 0 1px 2px rgb(48 22 38 / .04);
  --shadow-md: 0 2px 4px rgb(48 22 38 / .04), 0 14px 32px -18px rgb(48 22 38 / .18);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
body[data-site="shop"]  { --accent: var(--accent-shop); }
body[data-site="admin"] {
  --accent: var(--accent-admin);
  --font-display: var(--font-body); /* 백오피스는 세리프 배제 */
  --c-bg: #f5f7f7; --c-line: #e4e9e8; --c-line-2: #eef2f1;
  --c-text: #1b2422; --c-sub: #5d6b68; --c-muted: #93a19e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--c-text); background: var(--c-bg); font-size: 15px; line-height: 1.6;
  letter-spacing: -.01em; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---------- 헤더/GNB ---------- */
.site-header { background: rgba(255,253,254,.86); backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--c-line); position: sticky; top: 0; z-index: 50; }
/* 시그니처 — 브랜드 리본(베리→로즈→라벤더) */
.site-header::before { content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--accent-shop), var(--accent-community) 46%, #8b5cf6); }
body[data-site="admin"] .site-header::before { background: linear-gradient(90deg, #0f766e, #2dd4bf); }
.site-header .inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.header-top { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 18px; }
.logo { font-family: var(--font-display); font-size: 20px; font-weight: 900; letter-spacing: -.01em; color: var(--c-text); white-space: nowrap; line-height: 1.05; }
.logo:hover { color: var(--c-text); }
.logo small { display: block; font-size: 8.5px; font-weight: 700; font-family: var(--font-body); color: var(--accent); letter-spacing: .34em; margin-top: 2px; }
.gnb { display: flex; gap: 2px; flex: 1; }
.gnb a { padding: 8px 12px; font-weight: 600; font-size: 14px; color: var(--c-sub); border-radius: 999px; white-space: nowrap; transition: color .15s var(--ease), background .15s var(--ease); }
.gnb a:hover, .gnb a.active { color: var(--accent); background: var(--accent-soft); }
.gnb a.to-shop { color: var(--accent-shop); font-weight: 700; }
.gnb a.to-community { color: var(--accent-community); font-weight: 700; }
.util { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--c-sub); white-space: nowrap; }
.util a:hover { color: var(--accent); }
.util .divider { color: var(--c-line); }
.nav-toggle-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--c-line);
  background: #fff; align-items: center; justify-content: center; cursor: pointer; color: var(--c-text); flex: none; transition: background .15s var(--ease); }
.nav-burger:hover { background: var(--c-line-2); }
.nav-burger svg { width: 22px; height: 22px; }
.nav-burger svg line { transition: transform .3s var(--ease), opacity .2s var(--ease); transform-box: fill-box; transform-origin: center; }

/* ---------- 레이아웃 ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 26px 20px 76px; }
.container.narrow { max-width: 720px; }
.page-title { font-family: var(--font-display); font-size: 25px; font-weight: 700; margin: 8px 0 22px; letter-spacing: -.02em; line-height: 1.35; }
.page-title small { font-size: 13px; font-weight: 500; font-family: var(--font-body); color: var(--c-muted); margin-left: 8px; letter-spacing: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.with-side { display: grid; grid-template-columns: 216px 1fr; gap: 28px; align-items: start; }

/* ---------- 카드/패널 ---------- */
.card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.card h3 { font-size: 15px; margin-bottom: 12px; letter-spacing: -.02em; }
.card + .card { margin-top: 14px; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; margin: 34px 0 14px; }
.panel-title h2 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
/* 꽃잎 마커 — 포인트는 작게, 조용하게 */
.panel-title h2::before { content: ""; width: 9px; height: 9px; flex: none;
  border-radius: 50% 50% 50% 2px; background: var(--accent); transform: rotate(45deg); }
body[data-site="admin"] .panel-title h2::before { border-radius: 3px; transform: none; width: 4px; height: 16px; }
.panel-title a { font-size: 12.5px; color: var(--c-muted); font-weight: 600; }
.panel-title a:hover { color: var(--accent); }

/* ---------- 버튼 (탭 타깃 ≥42px, 필 셰이프) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--c-line); background: #fff; color: var(--c-text); font-size: 14px; font-weight: 700; cursor: pointer; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .12s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease); }
/* 버튼 그룹 — 좁아지면 줄바꿈(레이아웃 붕괴 방지). 탭형 행은 가로 스크롤(.tab-row). */
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tab-row { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.tab-row::-webkit-scrollbar { display: none; }
.tab-row > * { flex: none; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 42%, #fff); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px var(--accent); }
.btn.primary:hover { color: #fff; box-shadow: 0 10px 24px -8px var(--accent); }
.btn.danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn.danger:hover { color: #fff; }
.btn.sm { min-height: 34px; padding: 6px 14px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- 폼 ---------- */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; letter-spacing: -.01em; }
.form-row .hint { font-size: 12px; color: var(--c-muted); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); font-size: 16px; font-family: inherit; background: #fff; color: var(--c-text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checks label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 14px; margin-bottom: 8px; }
.field-error { color: var(--c-danger); font-size: 12px; margin-top: 5px; }

/* ---------- 테이블 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
table.list th, table.list td { padding: 12px 14px; border-bottom: 1px solid var(--c-line-2); text-align: left; vertical-align: middle; }
table.list th { background: color-mix(in srgb, var(--c-bg) 55%, #fff); color: var(--c-sub); font-weight: 700; white-space: nowrap; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: color-mix(in srgb, var(--c-bg) 40%, #fff); }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 뱃지/알림 ---------- */
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; letter-spacing: 0;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); white-space: nowrap; }
.badge.gray { background: var(--c-line-2); color: var(--c-sub); border-color: var(--c-line); }
.badge.ok { background: #f0fdf4; color: var(--c-ok); border-color: #bbf7d0; }
.badge.warn { background: #fffbeb; color: var(--c-warn); border-color: #fde68a; }
.badge.danger { background: #fff1f3; color: var(--c-danger); border-color: #fecdd6; }
.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.alert.info { background: #fff; border-color: var(--c-line); color: var(--c-sub); }
.alert.success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert.error { background: #fff1f3; border-color: #fecdd6; color: #be123c; }

/* ---------- 칩 탭 / 필터 바 (카테고리·상태 필터 공통) ---------- */
.chip-bar { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.chip-bar.scroll { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.chip-bar.scroll::-webkit-scrollbar { display: none; }
.chip-bar.scroll > * { flex: none; }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--c-line);
  background: #fff; color: var(--c-sub); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease); }
.chip:hover { border-color: var(--accent-line); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.filter-bar input[type=text], .filter-bar input[type=search] { flex: 1; min-width: 160px; }
.filter-bar select { width: auto; min-width: 128px; flex: none; }
.filter-bar .btn { flex: none; }

/* ---------- 신고 드롭다운 패널 ---------- */
.report-box { position: relative; }
.report-box > summary { list-style: none; cursor: pointer; }
.report-box > summary::-webkit-details-marker { display: none; }
.report-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; width: 268px; text-align: left; box-shadow: var(--shadow-md); }
@media (max-width: 480px) { .report-panel { right: auto; left: 50%; transform: translateX(-50%); width: 250px; } }

/* ---------- 아바타 / 메타 (사용자 표시 공통) ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #ffe4ee, #f2ecfd);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--accent); flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.meta { font-size: 12px; color: var(--c-muted); }

/* ---------- 상품 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card { background: #fff; border: 1px solid var(--c-line); border-radius: 18px; overflow: hidden; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease); }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--accent-line); }
.product-card .thumb { aspect-ratio: 1; background: #f6f1f4; display: grid; place-items: center; color: var(--c-muted); font-size: 12px; position: relative; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.product-card:hover .thumb img { transform: scale(1.045); }
.product-card .thumb .thumb-label { position: absolute; top: 9px; left: 9px; }
.product-card .info { padding: 13px 15px 16px; }
.product-card .brand { font-size: 11px; font-weight: 700; color: var(--c-muted); letter-spacing: .04em; }
.product-card .name { font-size: 13.5px; font-weight: 600; margin: 3px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; line-height: 1.45; }
.product-card .price { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.product-card .price .rate { color: var(--accent); margin-right: 6px; }
.product-card .price .original { font-size: 12px; color: var(--c-muted); text-decoration: line-through; font-weight: 400; margin-left: 6px; }
.price-locked { font-size: 12px; color: var(--c-muted); }

/* ---------- 메인 배너 (에디토리얼 히어로) ---------- */
.hero-banner { border-radius: 24px; overflow: hidden; position: relative;
  background:
    radial-gradient(560px 320px at 88% -30%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 62%),
    radial-gradient(440px 280px at 6% 118%, rgb(139 92 246 / .09), transparent 62%),
    linear-gradient(115deg, #fdf2f5 0%, #fcf0f2 46%, #f7f1fa 100%);
  min-height: 236px; display: flex; flex-direction: column; justify-content: center; padding: 42px 46px; margin-bottom: 6px; }
/* 장식 링 — 오프캔버스로 반쯤 걸치는 가는 원 */
.hero-banner::after { content: ""; position: absolute; right: -70px; top: -96px; width: 270px; height: 270px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 24%, transparent); pointer-events: none; }
.hero-banner h2 { font-family: var(--font-display); font-size: 33px; font-weight: 700; margin-bottom: 10px; letter-spacing: -.02em; line-height: 1.32; position: relative; max-width: 30ch; }
.hero-banner p { color: var(--c-sub); position: relative; max-width: 52ch; }
/* 이미지 배너 모드(#hero-roll) — 텍스트 가독용 스크림, 장식 링 제거 */
#hero-roll .hero-banner::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(255 253 254 / .82), rgb(255 253 254 / .3) 55%, transparent); }
#hero-roll .hero-banner::after { display: none; }
.strip-banner { border-radius: var(--radius); background: #fff; border: 1px solid var(--c-line); text-align: center;
  padding: 18px; font-size: 13px; color: var(--c-muted); margin: 22px 0; transition: border-color .15s var(--ease), color .15s var(--ease); }
a.strip-banner:hover { border-color: var(--accent-line); color: var(--accent); }

/* ---------- 게시판 ---------- */
.board-list .post-row { display: flex; gap: 12px; padding: 15px 6px; border-bottom: 1px solid var(--c-line-2); align-items: baseline; }
.board-list .post-row:hover { background: color-mix(in srgb, var(--c-bg) 40%, #fff); }
.board-list .post-row .title { font-weight: 600; flex: 1; }
.board-list .post-row .meta { font-size: 12px; color: var(--c-muted); white-space: nowrap; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--c-line-2); }
.comment .who { font-size: 12.5px; font-weight: 800; }
.comment .when { font-size: 11px; color: var(--c-muted); margin-left: 6px; }

/* ---------- 사이드 내비 ---------- */
.side-nav { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.side-nav .group-label { padding: 13px 16px 5px; font-size: 11px; font-weight: 800; color: var(--c-muted); letter-spacing: .06em; }
.side-nav a { display: block; padding: 11px 16px; font-size: 14px; font-weight: 500; color: var(--c-sub); transition: background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease); }
.side-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- 통계 타일 ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-tile { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 17px 19px; box-shadow: var(--shadow-sm); }
.stat-tile .label { font-size: 12px; color: var(--c-muted); }
.stat-tile .value { font-size: 23px; font-weight: 800; margin-top: 5px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-tile .value small { font-size: 12px; font-weight: 500; color: var(--c-muted); }

/* ---------- 페이지네이션/푸터 ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 11px; border: 1px solid var(--c-line); border-radius: 999px; font-size: 13px; background: #fff; transition: border-color .15s var(--ease); }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.site-footer { border-top: 1px solid var(--c-line); background: #fff; margin-top: 52px; }
.site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 30px 20px 34px; font-size: 12px; color: var(--c-muted); line-height: 1.9; }
.site-footer strong { color: var(--c-sub); }
.site-footer a:hover { color: var(--accent); }
.empty { text-align: center; color: var(--c-muted); padding: 52px 0; font-size: 14px; }

/* ---------- 하단 탭바 (모바일 전용, 기본 숨김) ---------- */
.tabbar, .tabbar-spacer, .buybar { display: none; }

/* ---------- 관리자 전용 — 와이드 컨테이너 ---------- */
body[data-site="admin"] .container { max-width: 1340px; }
body[data-site="admin"] .site-header .inner { max-width: 1340px; }

/* ---------- GNB 그룹 드롭다운 (관리자 상단 메뉴) ---------- */
.gnb-group { position: relative; }
.gnb-group-btn { display: inline-flex; align-items: center; gap: 3px; }
.gnb-group-btn .caret { width: 12px; height: 12px; opacity: .5; transition: transform .18s var(--ease); }
.gnb-group:hover .gnb-group-btn .caret, .gnb-group:focus-within .gnb-group-btn .caret { transform: rotate(180deg); }
/* 버튼과 패널 사이 hover 브리지(마우스 이동 중 닫힘 방지) */
.gnb-group::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.gnb-drop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; min-width: 172px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 14px; box-shadow: var(--shadow-md); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s; }
.gnb-group:hover .gnb-drop, .gnb-group:focus-within .gnb-drop { opacity: 1; visibility: visible; transform: none; }
.gnb-drop a { display: block; padding: 9px 13px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--c-sub); white-space: nowrap; }
.gnb-drop a:hover { background: var(--accent-soft); color: var(--accent); }
.gnb-drop a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* ---------- 상품 상세 (105 스킨 레이아웃 이식) ---------- */
.pd-wrap { display: grid; grid-template-columns: 3fr 2fr; gap: 28px; align-items: start; }
.pd-main { border-radius: 20px; overflow: hidden; border: 1px solid var(--c-line); background: #f6f1f4; aspect-ratio: 1; display: grid; place-items: center; color: var(--c-muted); }
.pd-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pd-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--c-line); cursor: pointer;
  opacity: .5; filter: grayscale(70%); transition: opacity .15s var(--ease), filter .15s var(--ease), border-color .15s var(--ease); }
.pd-thumbs img.active, .pd-thumbs img:hover { opacity: 1; filter: none; border-color: var(--accent); }
.pd-panel { position: sticky; top: 84px; }
.price-rows { border-top: 1px solid var(--c-line); padding-top: 14px; margin: 14px 0; }
.price-rows .row { display: flex; align-items: baseline; gap: 12px; font-size: 13px; padding: 3px 0; }
.price-rows .row .lbl { flex: none; width: 84px; color: var(--c-muted); }
.price-rows .row.main { font-size: 15px; padding-top: 8px; }
.price-rows .row.main .val { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.price-rows .row.main .rate { color: var(--accent); font-weight: 800; font-size: 20px; margin-right: 2px; }
.spec-rows { border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); margin: 14px 0; padding: 8px 0; font-size: 12.5px; }
.spec-rows .row { display: flex; gap: 12px; padding: 4px 0; color: var(--c-sub); }
.spec-rows .row .lbl { flex: none; width: 84px; color: var(--c-muted); }

/* 수량 스테퍼 — [−][수량][+] 캡슐 */
.qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--c-line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty-stepper button { width: 38px; min-height: 38px; border: 0; background: #fff; color: var(--accent); font-size: 17px; font-weight: 700; cursor: pointer; line-height: 1; transition: background .15s var(--ease); }
.qty-stepper button:hover { background: var(--accent-soft); }
.qty-stepper input { width: 48px; border: 0; text-align: center; font-size: 14px; font-weight: 700; padding: 0; -moz-appearance: textfield; appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; background: var(--accent-soft); }

/* 총 구매금액 — 좌 라벨 / 우 금액 */
.tot-price { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 2px 2px; border-top: 1px solid var(--c-line); margin-top: 16px; }
.tot-price .lbl { font-size: 13px; color: var(--c-sub); }
.tot-price strong { font-size: 23px; letter-spacing: -.02em; }
.soldout-box { background: #fff1f3; border: 1px solid #fecdd6; color: var(--c-danger); text-align: center; padding: 12px; border-radius: var(--radius-sm); font-weight: 700; margin: 12px 0; }

/* 상세 하단 탭 — 언더라인 인디케이터 */
.detail-tabs { position: sticky; top: 64px; z-index: 30; display: flex; gap: 2px; border-bottom: 1px solid var(--c-line); margin: 34px 0 18px;
  background: color-mix(in srgb, var(--c-bg) 20%, #fff); backdrop-filter: blur(10px); border-radius: 12px 12px 0 0;
  overflow-x: auto; scrollbar-width: none; }
.detail-tabs::-webkit-scrollbar { display: none; }
.detail-tabs a { flex: none; padding: 14px 18px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-size: 14.5px; font-weight: 600; color: var(--c-muted); white-space: nowrap; }
.detail-tabs a small { font-weight: 700; color: var(--accent); margin-left: 3px; }
.detail-tabs a:hover { color: var(--c-text); }
.detail-tabs a.selected { color: var(--accent); border-bottom-color: var(--accent); font-weight: 800; }

/* ---------- 장바구니 (105: 카드 리스트 + 고정 결제요약) ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.cart-items { display: grid; gap: 14px; }
.cart-item { position: relative; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px 18px 18px 126px; min-height: 124px;
  box-shadow: var(--shadow-sm); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.cart-item:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.cart-item.invalid { opacity: .6; }
.cart-item .ci-thumb { position: absolute; left: 18px; top: 18px; width: 88px; height: 88px; border-radius: 12px; object-fit: cover; border: 1px solid var(--c-line-2); background: #f6f1f4; }
.cart-item .ci-brand { font-size: 11px; font-weight: 700; color: var(--c-muted); letter-spacing: .04em; }
.cart-item .ci-name { font-weight: 700; line-height: 1.45; padding-right: 34px; }
.cart-item .ci-option { font-size: 12.5px; color: var(--c-sub); margin-top: 3px; }
.cart-item .ci-controls { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.cart-item .ci-unit { font-size: 12px; color: var(--c-muted); }
.cart-item .ci-line-total { margin-left: auto; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.cart-item .ci-remove { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; background: none; color: var(--c-muted);
  font-size: 17px; line-height: 1; cursor: pointer; border-radius: 999px; transition: background .15s var(--ease), color .15s var(--ease); }
.cart-item .ci-remove:hover { background: #fff1f3; color: var(--c-danger); }
.order-summary { position: sticky; top: 84px; }
.order-summary .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--c-sub); padding: 5px 0; }
.order-summary .row .val { font-variant-numeric: tabular-nums; color: var(--c-text); }
.order-summary .row.total { border-top: 1px solid var(--c-line); padding-top: 14px; margin-top: 8px; color: var(--c-text); font-weight: 700; }
.order-summary .row.total strong { font-size: 22px; letter-spacing: -.02em; }

@media (max-width: 980px) {
  .pd-wrap { grid-template-columns: 1fr; gap: 18px; }
  .pd-panel { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .detail-tabs { top: 0; }
}
@media (max-width: 480px) {
  .cart-item { padding-left: 104px; }
  .cart-item .ci-thumb { width: 72px; height: 72px; }
}

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 980px) {
  .grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .site-header .inner { padding: 0 16px; }
  .container { padding: 20px 16px 76px; }
  /* 모바일: 본문 먼저, 사이드 내비는 아래로(콘텐츠 우선) */
  .with-side { grid-template-columns: 1fr; gap: 18px; }
  .with-side > :first-child { order: 2; }
  .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }

  /* 헤더: 첫 줄=로고+햄버거, 메뉴는 아래로 부드럽게 펼쳐짐 */
  .nav-burger { display: inline-flex; }
  .header-top { gap: 8px; flex-wrap: wrap; height: auto; min-height: 62px; }
  .gnb, .util { flex-basis: 100%; order: 3; flex-direction: column; align-items: stretch;
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .34s var(--ease), opacity .26s var(--ease), padding .34s var(--ease), margin .34s var(--ease); }
  .gnb { gap: 1px; }
  .gnb a { padding: 13px 12px; font-size: 15px; border-radius: 10px; }
  .util { order: 4; font-size: 15px; gap: 4px; }
  .util a, .util form { padding: 7px 2px; }
  .util .divider { display: none; }
  .util .btn { width: 100%; margin-top: 4px; }
  #nav-toggle:checked ~ .inner .gnb { max-height: 62vh; opacity: 1; overflow-y: auto; padding: 6px 0 8px; margin-top: 6px; border-top: 1px solid var(--c-line); }

  /* 모바일 드로어: 그룹 = 섹션 라벨 + 항상 펼침 목록 */
  .gnb-group { position: static; }
  .gnb-group::after { display: none; }
  .gnb-group-btn { width: 100%; }
  .gnb-group-btn .caret { display: none; }
  .gnb-drop { position: static; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; border-radius: 0; padding: 0 0 6px 14px; min-width: 0; }
  .gnb-drop a { padding: 11px 12px; font-size: 14.5px; border-radius: 10px; }
  #nav-toggle:checked ~ .inner .util { max-height: 40vh; opacity: 1; padding: 10px 0 14px; border-top: 1px solid var(--c-line); }
  /* 햄버거 → X 모션 */
  #nav-toggle:checked ~ .inner .nav-burger svg line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  #nav-toggle:checked ~ .inner .nav-burger svg line:nth-child(2) { opacity: 0; }
  #nav-toggle:checked ~ .inner .nav-burger svg line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* 하단 탭바 + 스페이서 */
  .tabbar-spacer { display: block; height: calc(var(--tabbar-h) + var(--safe-b)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex;
    background: rgba(255,253,254,.92); backdrop-filter: saturate(1.5) blur(14px);
    border-top: 1px solid var(--c-line); padding-bottom: var(--safe-b); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: var(--tabbar-h); font-size: 11px; font-weight: 600; color: var(--c-muted); transition: color .15s var(--ease); }
  .tabbar a .ic { width: 23px; height: 23px; display: block; transition: transform .15s var(--ease); }
  .tabbar a:active .ic { transform: scale(.86); }
  .tabbar a.active { color: var(--accent); }
  .tabbar a.center { color: var(--c-sub); }
  .tabbar a.center .ic-wrap { width: 46px; height: 46px; margin-top: -20px; margin-bottom: 2px; border-radius: 999px;
    background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px -6px var(--accent); transition: transform .15s var(--ease); }
  .tabbar a.center:active .ic-wrap { transform: scale(.92); }
  .tabbar a.center .ic-wrap .ic { width: 24px; height: 24px; }

  /* 상품상세 하단 고정 구매바(테마 참고) — 항상 접근 가능한 장바구니 CTA */
  .buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; align-items: center; gap: 12px;
    background: rgba(255,253,254,.96); backdrop-filter: saturate(1.5) blur(14px);
    border-top: 1px solid var(--c-line); padding: 9px 16px calc(9px + var(--safe-b));
    box-shadow: 0 -6px 20px -12px rgb(48 22 38 / .2); }
  .buybar .bb-price { flex: 1; min-width: 0; line-height: 1.25; }
  .buybar .bb-price .amt { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
  .buybar .bb-price .lbl { font-size: 11px; color: var(--c-muted); }
  .buybar .btn { flex: none; min-width: 148px; min-height: 46px; }
  body:has(.buybar) .tabbar { display: none; }
}
@media (max-width: 640px) {
  .filter-bar .btn { flex: 1; }
  /* 커머스 테이블(장바구니·주문 등): 모바일에서 행을 카드로 스택 — 가로 스크롤 제거 */
  table.list.stack thead { display: none; }
  table.list.stack, table.list.stack tbody, table.list.stack tr, table.list.stack td { display: block; width: 100%; }
  table.list.stack tr { border: 1px solid var(--c-line); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 4px 2px; background: #fff; }
  table.list.stack tr:last-child { margin-bottom: 0; }
  table.list.stack tr:hover td { background: transparent; }
  table.list.stack td { border: 0; border-bottom: 1px solid var(--c-line-2); padding: 9px 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  table.list.stack td:last-child { border-bottom: 0; }
  table.list.stack td::before { content: attr(data-label); font-weight: 700; color: var(--c-sub); font-size: 12px; text-align: left; flex: none; }
  table.list.stack td[data-label=""]::before, table.list.stack td:not([data-label])::before { content: none; }
}
@media (max-width: 480px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-banner { min-height: 176px; padding: 28px 26px; border-radius: 20px; }
  .hero-banner h2 { font-size: 23px; }
  .page-title { font-size: 22px; }
}
