:root {
  /* Warm Boutique — 웜 베이지 + 골드 프리미엄 */
  --ink: #2a261f;          /* 주요 텍스트 / 기본 버튼 */
  --bg: #fbf7ef;           /* 카드/헤더 표면 */
  --bg-soft: #f3ece0;      /* 페이지 배경 */
  --muted: #8a877e;
  --hint: #b3aa98;
  --line: #ece1cd;
  --line-strong: #e3d6bf;
  /* 골드 (브랜드 전반) */
  --gold: #b0843f;
  --gold-soft: #f6ead0;
  --gold-ink: #5c4413;
  --danger: #c0392b;       /* 삭제/오류용 레드 */
  --ok: #1aa06a;
  --accent: #b0843f;       /* 포인트 = 골드 */
  /* 구 변수 호환 별칭 (기존 인라인 스타일 유지용) */
  --primary: var(--gold);
  --secondary: var(--gold-ink);
  --text: var(--ink);
  --shadow: 0 1px 2px rgba(90,68,19,.05), 0 4px 16px rgba(90,68,19,.06);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg-soft); color: var(--ink);
  font-family: "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -.01em;
}
a { color: inherit; text-decoration: none; }

button {
  font-family: inherit; cursor: pointer; border: none; border-radius: 10px;
  padding: 10px 16px; font-size: 14px; font-weight: 600; transition: opacity .15s, background .15s, transform .05s;
}
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover:not(:disabled) { opacity: .9; }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-soft); }
.btn-ghost { background: #efe6d6; color: var(--gold-ink); }
.btn-ghost:hover:not(:disabled) { background: #e8dcc6; }
.btn-lucky { background: var(--gold-ink); color: #fff; }
.btn-lucky:hover:not(:disabled) { opacity: .92; }
.btn-block { width: 100%; padding: 14px; font-size: 15px; }

/* 헤더 */
.header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px;
  padding: 13px 22px; background: rgba(255,255,255,.9); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; font-size: 19px; letter-spacing: -.03em; white-space: nowrap; }
.nav { display: flex; gap: 17px; margin-left: auto; align-items: center; font-size: 14px; }
.nav .link { cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; transition: color .12s; }
.nav .link:hover { color: var(--ink); }
.nav .pill { background: var(--ink); color: #fff; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; }

/* 빅딜형 2단 헤더 */
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 14px 18px; }
.brand { font-weight: 900; font-size: 22px; letter-spacing: -.03em; white-space: nowrap; cursor: pointer; }
.hsearch { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--gold); border-radius: 999px; padding: 6px 6px 6px 16px; background: #fff; }
.hsearch input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; padding: 6px 0; }
.hsearch .go { background: var(--gold); color: #fff; border-radius: 999px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; font-size: 16px; }
.hicons { display: flex; gap: 16px; margin-left: auto; }
.hicon { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; color: var(--muted); font-size: 11px; white-space: nowrap; }
.hicon .ic { font-size: 19px; line-height: 1; }
.hicon:hover { color: var(--ink); }

.catbar { position: sticky; top: 56px; z-index: 19; background: var(--bg); border-bottom: 2px solid var(--gold); }
.catbar-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: stretch; padding: 0 14px; }
.hamb { background: var(--gold); color: #fff; border-radius: 0; width: 50px; font-size: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; }
.catnav { flex: 1; min-width: 0; display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav .cn { padding: 14px 14px; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; flex-shrink: 0; }
.catnav .cn:hover { color: var(--gold); }
.catnav .cn.active { color: var(--gold); border-bottom-color: var(--gold); }
.cattag { flex-shrink: 0; align-self: center; color: var(--muted); font-size: 13px; white-space: nowrap; padding-left: 14px; }
.megamenu { position: sticky; top: 102px; z-index: 18; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.megamenu-inner { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; padding: 20px 22px; }
.mm-col { min-width: 120px; }
.mm-top { font-weight: 800; font-size: 15px; margin-bottom: 8px; cursor: pointer; }
.mm-top:hover { color: var(--danger); }
.mm-sub { font-size: 13px; color: var(--muted); padding: 4px 0; cursor: pointer; }
.mm-sub:hover { color: var(--ink); }

.container { max-width: 1080px; margin: 0 auto; padding: 22px 18px 90px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 18px; }

/* 카테고리별 상품찾기 (아이콘) */
.caticons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.caticon { display: flex; flex-direction: column; align-items: center; gap: 9px; cursor: pointer; width: 92px; padding: 6px 0; }
.caticon-ic { width: 66px; height: 66px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 31px; transition: transform .14s, box-shadow .14s, border-color .14s; }
.caticon:hover .caticon-ic { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(176,132,63,.18); border-color: var(--gold); }
.caticon-label { font-size: 13px; font-weight: 600; color: var(--ink); text-align: center; }
@media (max-width: 640px) {
  .caticon { width: 22%; gap: 6px; }
  .caticon-ic { width: 54px; height: 54px; font-size: 26px; }
  .caticon-label { font-size: 12px; }
}

/* 히어로 배너 캐러셀 */
.hero { position: relative; width: 100%; height: clamp(180px, 31vw, 330px); border-radius: 16px; overflow: hidden; margin-bottom: 22px; box-shadow: var(--shadow); background: var(--ink); }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; display: flex; align-items: center; padding: 0 9%; cursor: pointer; opacity: 0; transition: opacity .55s ease; pointer-events: none; }
.hero-slide.on { opacity: 1; pointer-events: auto; }
.hero-cap { color: #fff; }
.hero-cap .t { font-size: clamp(22px, 4.4vw, 46px); font-weight: 900; letter-spacing: -.035em; line-height: 1.12; text-shadow: 0 2px 10px rgba(0,0,0,.22); }
.hero-cap .s { font-size: clamp(13px, 1.9vw, 19px); margin-top: 12px; font-weight: 600; opacity: .96; text-shadow: 0 1px 6px rgba(0,0,0,.2); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 999px; background: rgba(255,255,255,.82); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 22px; z-index: 3; border: none; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.hero-arrow:hover { background: #fff; }
.hero-arrow.l { left: 12px; }
.hero-arrow.r { right: 12px; }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 3; }
.hero-dots span { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.55); cursor: pointer; transition: width .2s; }
.hero-dots span.on { background: #fff; width: 22px; }

/* 우측 퀵 사이드바 (빅딜형, 넓은 데스크톱만) */
.quickmenu { position: fixed; right: 16px; top: 132px; width: 134px; z-index: 15; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.qm-item { padding: 12px 8px; text-align: center; font-size: 13px; font-weight: 700; cursor: pointer; border-bottom: 1px solid var(--line); }
.qm-item:hover { background: var(--bg-soft); }
.qm-recent { padding: 8px; border-bottom: 1px solid var(--line); }
.qm-rec-img { aspect-ratio: 1/1; background: #f3f3f5 center/cover; border-radius: 8px; cursor: pointer; }
.qm-rec-name { font-size: 11px; margin-top: 6px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; color: var(--ink); }
.qm-rec-nav { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.qm-rec-nav button { padding: 2px 9px; background: var(--bg-soft); border-radius: 6px; font-size: 13px; font-weight: 700; }
.qm-empty { font-size: 11px; color: var(--hint); text-align: center; padding: 18px 4px; line-height: 1.5; }
.qm-top { padding: 10px; text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); cursor: pointer; }
.qm-top:hover { color: var(--ink); }
@media (max-width: 1380px) { .quickmenu { display: none; } }

/* 상품 카드 */
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; transition: transform .16s, box-shadow .16s;
  cursor: pointer; box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 26px rgba(0,0,0,.09); }
.card .thumb { aspect-ratio: 1/1; background: #ece1cd center/cover; }

/* 상품 상세 — 빅딜식 큰 메인 이미지 */
.detail-media { width: 500px; max-width: 100%; }
.detail-main { aspect-ratio: 1/1; border-radius: 16px; background: #f6f3ec center/contain no-repeat; border: 1px solid var(--line); box-shadow: 0 6px 22px rgba(0,0,0,.06); }
.detail-thumbs { display: flex; gap: 9px; margin-top: 12px; overflow-x: auto; padding-bottom: 2px; }
.detail-thumb { width: 76px; height: 76px; border-radius: 10px; flex-shrink: 0; cursor: pointer; background-position: center; background-size: cover; border: 1px solid var(--line); transition: border-color .15s; }
.detail-thumb:hover { border-color: var(--gold); }
.detail-thumb.on { border: 2px solid var(--gold); }
@media (max-width: 900px) { .detail-media { width: 100%; } .detail-info { min-width: 0 !important; } }

/* 홈 진입 팝업 */
.popup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.popup-box { background: #fff; border-radius: 14px; max-width: 92vw; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.3); animation: popIn .2s ease; }
@keyframes popIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.popup-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); }
.popup-foot span { flex: 1; text-align: center; padding: 11px; font-size: 13px; color: var(--muted, #8a8270); cursor: pointer; }
.popup-foot span:first-child { border-right: 1px solid var(--line); }
.popup-foot span:hover { background: var(--bg-soft); }

/* 재고/랭킹 뱃지 */
.stock-badge { position: absolute; top: 8px; left: 8px; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; color: #fff; }
.stock-badge.low { background: var(--danger); }
.stock-badge.soldout { background: #6b6b6b; }
.rank-badge { position: absolute; top: 8px; left: 8px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-ink, #5c4413); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.card .body { padding: 12px 13px 14px; }
.card .name {
  font-weight: 500; font-size: 13.5px; margin: 0 0 6px; color: var(--ink); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em;
}
.card .price { color: var(--ink); font-weight: 800; font-size: 15px; }
.card .stock { color: var(--hint); font-size: 12px; margin-top: 6px; }

.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.section-title { font-family: "Noto Serif KR", serif; font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 8px 0 16px; }
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,23,26,.06); }
label.field { display: block; margin-bottom: 13px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.field .input { margin-top: 6px; }
.err { color: var(--danger); font-size: 13px; margin: 6px 0; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.badge { display: inline-block; background: #f1f1f3; color: var(--ink); font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.center { text-align: center; }

/* 행운존 (골드 포인트 — 룰렛/도전권) */
.lucky-card {
  background: linear-gradient(135deg, #f6ead0, #efdcb6); border: 1px solid #e6d3a8; border-radius: 18px;
  padding: 26px 30px; margin-bottom: 24px; cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.lucky-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(176,132,63,.2); }
.lucky-card .lk-title { font-weight: 800; font-size: 21px; color: var(--gold-ink); letter-spacing: -.01em; }
.lucky-card .lk-sub { font-size: 14px; color: #8a6f3c; margin-top: 8px; }
.spin-ticket { font-size: 44px; font-weight: 800; color: var(--gold); letter-spacing: -.03em; }

/* 쿠폰 */
.coupon {
  border: 1.5px dashed var(--gold); border-radius: 14px; padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; background: var(--gold-soft);
}
.coupon .label { font-weight: 700; color: var(--gold-ink); }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 999px; font-weight: 600; z-index: 50;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.empty { text-align: center; color: var(--hint); padding: 64px 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { border-bottom: 1px solid var(--line); padding: 11px 8px; text-align: left; }
table.tbl th { color: var(--muted); font-weight: 600; }
.iframe-wrap { width: 100%; aspect-ratio: 9/16; max-width: 360px; margin: 0 auto; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.iframe-wrap iframe { width: 100%; height: 100%; border: 0; }

/* 검색바 (홈) */
.searchbar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px 4px 4px 14px; box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s; }
.searchbar:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,23,26,.06); }
.searchbar input { flex: 1; border: none; outline: none; font-size: 14px; padding: 10px 0; background: transparent; }

/* 회원 등급 배지 */
.tier-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--gold-soft); color: var(--gold-ink); }

/* 관리자 2단 그룹 네비게이션 */
.admin-header { position: sticky; top: 0; z-index: 10; }
.admin-top {
  display: flex; align-items: stretch; background: #17171f;
  padding: 0 22px; gap: 0; min-height: 48px;
}
.admin-logo {
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -.03em;
  padding: 0 20px 0 0; margin-right: 16px; white-space: nowrap;
  display: flex; align-items: center; border-right: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.admin-groups { display: flex; align-items: stretch; flex: 1; overflow-x: auto; scrollbar-width: none; }
.admin-groups::-webkit-scrollbar { display: none; }
.admin-group-btn {
  color: rgba(255,255,255,.5); font-size: 13px; font-weight: 500;
  padding: 0 15px; cursor: pointer; border-bottom: 2.5px solid transparent;
  display: flex; align-items: center; transition: color .12s, border-color .12s;
  white-space: nowrap; user-select: none; flex-shrink: 0;
}
.admin-group-btn:hover { color: rgba(255,255,255,.88); }
.admin-group-btn.active { color: #fff; border-bottom-color: #F5A623; font-weight: 700; }
.admin-store-link {
  color: rgba(255,255,255,.38); font-size: 12px; flex-shrink: 0;
  padding: 0 0 0 18px; display: flex; align-items: center;
  text-decoration: none; white-space: nowrap; transition: color .12s;
}
.admin-store-link:hover { color: rgba(255,255,255,.75); }
.admin-subnav {
  display: flex; align-items: center; gap: 2px;
  padding: 5px 18px; background: #f4f4f8; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; min-height: 42px;
}
.admin-subnav::-webkit-scrollbar { display: none; }
.admin-sub-link {
  color: var(--muted); font-size: 13px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
  transition: all .12s; white-space: nowrap; user-select: none; flex-shrink: 0;
}
.admin-sub-link:hover { color: var(--ink); background: rgba(0,0,0,.06); }
.admin-sub-active {
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 6px; white-space: nowrap; cursor: pointer; flex-shrink: 0;
}

/* 모바일 반응형 */
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: 12px; padding: 11px 14px; }
  .brand { font-size: 18px; }
  .hsearch { order: 3; flex-basis: 100%; max-width: none; }
  .hicons { gap: 13px; }
  .hicon small { display: none; }
  .hicon .ic { font-size: 22px; }
  .catbar { top: 0; }
  .catbar-inner { padding: 0; }
  .hamb { width: 46px; font-size: 18px; }
  .catnav .cn { padding: 12px 13px; font-size: 14px; }
  .cattag { display: none; }
  .megamenu { top: 49px; }
  .megamenu-inner { gap: 16px; padding: 16px; }
}
@media (max-width: 640px) {
  .header { gap: 10px; padding: 11px 14px; }
  .nav { gap: 14px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .logo { font-size: 16px; }
  .admin-top { padding: 0 12px; }
  .admin-logo { font-size: 13px; padding: 0 12px 0 0; margin-right: 10px; }
  .admin-group-btn { padding: 0 10px; font-size: 12px; }
  .admin-subnav { padding: 4px 10px; }
  .admin-sub-link, .admin-sub-active { font-size: 12px; padding: 5px 10px; }
  .container { padding: 16px 12px 70px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .section-title { font-size: 17px; }
  .lucky-card { padding: 16px; }
  .lucky-card .lk-title { font-size: 16px; }
  .card .body { padding: 10px 11px 12px; }
  .card .name { font-size: 13px; }
  .hero-arrow { width: 32px; height: 32px; font-size: 17px; }
  .hero-arrow.l { left: 8px; } .hero-arrow.r { right: 8px; }
}
@media (max-width: 380px) { .grid { gap: 9px; } }

/* 공급사 HTML 상세설명 */
.prod-desc-html{margin:8px 0;line-height:1.6;overflow-wrap:break-word;font-size:14px;color:var(--text)}
.prod-desc-html img{max-width:100%;height:auto;display:block;margin:6px auto}
.prod-desc-html table{max-width:100%}
