:root {
    /* 한국노인복지중앙회 CI 컬러 — 로고의 네이비(문자) + 골드(하단 아치) 기반 */
    --brand: #efa53c;
    --brand-dark: #d38b26;
    --brand-light: #fbe6c2;
    --trust: #1c3f72;
    --trust-dark: #142c50;
    --bg: #f7f8fa;
    --card-bg: #ffffff;
    --text: #2b2f36;
    --text-muted: #767f8c;
    --border: #e4e7ec;
    --danger: #c0503d;
    --success: #3f8f5f;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

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

.container { max-width: 1360px; margin: 0 auto; padding: 0 20px; }

/* ── 상단 헤더 ────────────────────────────── */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-top-inner { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 20px; height: 45px; position: relative; }
.header-top-inner .nav-toggle { grid-column: 1; }
.header-top-inner .brand { grid-column: 2; }
.header-top-inner .search-wrap { grid-column: 3; }
.header-top-inner .header-icons { grid-column: 4; }
.site-header .brand { display: flex; align-items: center; flex-shrink: 0; }
.site-header .brand img { display: block; }

.search-form {
    flex: 1 1 auto; max-width: 360px; display: flex; align-items: center;
    border: 2px solid var(--trust); border-radius: 999px; overflow: hidden; height: 32px;
}
.search-form input {
    flex: 1; border: none; outline: none; padding: 0 16px; font-size: 0.88rem; background: transparent; color: var(--text); min-width: 0;
}
.search-form button {
    border: none; background: var(--trust); color: #fff; width: 40px; height: 100%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.search-form button:hover { background: var(--trust-dark); }

.search-wrap { position: relative; width: 100%; max-width: 360px; justify-self: center; }
.search-wrap .search-form { max-width: none; }
.search-suggest {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 20px rgba(0,0,0,0.1); overflow: hidden; z-index: 20;
}
.search-suggest.open { display: block; }
.search-suggest-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--text); text-decoration: none; }
.search-suggest-item:hover { background: var(--bg); }
.search-suggest-item img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.search-suggest-item .ss-name { flex: 1; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.search-suggest-item .ss-price { font-size: 0.82rem; color: var(--text-muted); flex-shrink: 0; }
.search-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text); align-items: center; justify-content: center; padding: 4px; }

.header-icons { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.icon-link { position: relative; display: flex; align-items: center; color: var(--text); }
.icon-link .icon-label { display: none; }
.icon-link:hover { color: var(--trust); }
.icon-link .badge-count {
    position: absolute; top: -4px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--brand); color: #fff; font-size: 0.65rem; font-weight: 700; text-align: center; line-height: 16px;
}
.icon-link-text { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.icon-link-text:hover { color: var(--trust); }
.nav-toggle { display: none; border: none; background: none; cursor: pointer; padding: 4px; color: var(--text); }

.main-nav { background: var(--trust); }
.main-nav-inner { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.main-nav a {
    display: block; padding: 11px 16px; color: #e7edf5; font-size: 0.86rem; font-weight: 500; white-space: nowrap;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-dropdown { position: relative; }
.nav-caret { font-size: 0.62rem; margin-left: 3px; opacity: 0.75; }
.nav-dropdown-panel {
    display: none; position: absolute; top: 100%; left: 0; min-width: 160px; background: #fff; border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 10px 20px rgba(0,0,0,0.12); z-index: 50; padding: 6px 0;
}
.nav-dropdown-panel a { color: var(--text); padding: 9px 16px; font-weight: 400; }
.nav-dropdown-panel a:hover { color: var(--trust); background: var(--bg); }
.nav-dropdown:hover .nav-dropdown-panel { display: block; }

/* ── 공통 카드/버튼/폼 ────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.btn {
    display: inline-block; padding: 10px 20px; border-radius: var(--radius);
    border: 1px solid var(--brand); background: var(--brand); color: #fff;
    font-size: 0.92rem; cursor: pointer;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 5px 12px; font-size: 0.82rem; }

/* ── 배송지 카드 ──────────────────────────── */
.addr-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 24px; }
.addr-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.addr-card.is-default { border-color: var(--brand); }
.addr-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.addr-card-label { font-weight: 700; font-size: 0.95rem; }
.addr-card-receiver { font-size: 0.88rem; margin-bottom: 4px; }
.addr-card-address { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 12px; }
.addr-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.addr-form-toggle summary { list-style: none; margin-bottom: 4px; }
.addr-form-toggle summary::-webkit-details-marker { display: none; }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }
details[open] > summary.btn.btn-outline { background: var(--brand); color: #fff; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.88rem; font-weight: 600; }
.form-control {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.94rem; background: #fff; color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--brand); }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem; }
.alert-success { background: #e7f4ec; color: var(--success); border: 1px solid #bfe3cc; }
.alert-error { background: #fbeae6; color: var(--danger); border: 1px solid #f0c6bb; }
.alert-info { background: #eef3f1; color: var(--trust); border: 1px solid #cddcd7; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-pending { background: #faf0dd; color: #9a6a1f; }
.badge-active { background: #e7f4ec; color: var(--success); }
.badge-suspended { background: #fbeae6; color: var(--danger); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table th, table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
table th { background: #f7f2ec; font-weight: 600; color: var(--text-muted); }

.pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin-top: 20px; }
.pagination a, .pagination span { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; }
.pagination .active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── 대시보드(관리자/입점사) 레이아웃 ─────── */
.dash-wrap { display: flex; min-height: calc(100vh - 64px); }
.dash-sidebar { width: 220px; background: var(--trust-dark); color: #fff; flex-shrink: 0; }
.dash-sidebar a { display: block; padding: 7px 20px; font-size: 0.86rem; color: #cfe0da; line-height: 1.3; }
.dash-sidebar a:hover, .dash-sidebar a.active { background: var(--trust); color: #fff; }
.dash-sidebar .group-title { padding: 10px 20px 3px; font-size: 0.72rem; color: var(--brand-light); text-transform: uppercase; }
.dash-main { flex: 1; padding: 28px; }
.dash-main h1 { font-size: 1.4rem; margin: 0 0 20px; }
.page-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }

/* ── 상품 카드 그리드 ─────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.product-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    display: block; position: relative; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(28,63,114,0.12); border-color: transparent; }
.product-card .thumb-wrap { position: relative; overflow: hidden; }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f0ebe3; display: block; transition: transform 0.25s ease; }
.product-card:hover img { transform: scale(1.05); }
.product-card .info { padding: 14px 16px 16px; }
.product-card .seller { font-size: 0.74rem; color: var(--text-muted); margin-bottom: 4px; }
.product-card .name { font-size: 0.92rem; margin-bottom: 6px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.5em; }
.product-card .price-list { font-size: 0.76rem; color: var(--text-muted); text-decoration: line-through; margin-bottom: 2px; }
.product-card .price-now { font-weight: 700; color: var(--text); font-size: 1.02rem; display: flex; align-items: baseline; gap: 5px; }
.product-card .price-now .won { font-size: 0.82em; font-weight: 500; color: var(--text-muted); }
.product-card .discount-pct { color: #e0433c; font-weight: 800; font-size: 1rem; }
.product-card .ship-fee-line { font-size: 0.74rem; color: var(--text-muted); margin-top: 4px; }
.free-ship-tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; color: var(--success); background: #e7f4ec; vertical-align: middle; }
.card-badge {
    position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 9px; border-radius: 6px;
    font-size: 0.7rem; font-weight: 700; color: #fff; background: var(--trust); letter-spacing: 0.02em;
}
.card-badge.badge-cart { background: var(--success); }
.card-badge.badge-popular { background: var(--trust); }

/* ── 카테고리 퀵 아이콘 내비 ──────────────── */
.cat-quicknav { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; margin-bottom: 32px; }
.cat-quicknav a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); color: var(--text); font-size: 0.8rem; text-align: center; transition: border-color 0.15s ease, transform 0.15s ease; }
.cat-quicknav a:hover { border-color: var(--brand); transform: translateY(-2px); }
.cat-quicknav .cat-icon { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand-light); color: var(--brand-dark); font-size: 1.15rem; font-weight: 700; }

/* ── 홈 공지사항 스트립 ───────────────────── */
.notice-strip { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 18px; margin-bottom: 28px; }
.notice-strip-head { display: contents; }
.notice-strip .notice-tag { order: 1; flex-shrink: 0; font-size: 0.78rem; font-weight: 700; color: var(--trust); background: var(--bg); padding: 5px 10px; border-radius: 6px; }
.notice-strip ul { order: 2; list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.notice-strip li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; font-size: 0.87rem; min-width: 0; }
.notice-strip li:last-child { border-bottom: none; }
.notice-strip li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.notice-strip li .date { color: var(--text-muted); font-size: 0.78rem; flex-shrink: 0; }
.notice-strip .more-link { order: 3; flex-shrink: 0; font-size: 0.8rem; color: var(--text-muted); }

/* ── 판매자 정보 / 배송 안내 박스 ─────────── */
.seller-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-top: 20px; background: #fff; }
.seller-box h3 { margin: 0 0 12px; font-size: 0.95rem; }
.seller-box dl { display: grid; grid-template-columns: 84px 1fr; row-gap: 8px; margin: 0; font-size: 0.86rem; }
.seller-box dt { color: var(--text-muted); }
.seller-box dd { margin: 0; }
.seller-box .seller-link { color: var(--trust); text-decoration: underline; }

/* ── 상품 상세설명 (리치에디터 렌더링) ────── */
.product-description-content { line-height: 1.8; padding: 20px 0; }
.product-description-content p { margin: 0 0 1em; }
.product-description-content img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.product-description-content iframe { max-width: 100%; }
.product-description-content iframe.ql-video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: none; display: block; margin: 1em 0; }
.product-description-content blockquote { border-left: 3px solid var(--border); margin: 1em 0; padding-left: 16px; color: var(--text-muted); }
.product-description-content ul, .product-description-content ol { padding-left: 1.4em; }

footer.site-foot { text-align: center; padding: 30px 0; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 20px; }
footer.site-foot .site-foot-biz { font-size: 0.78rem; line-height: 1.7; margin-bottom: 10px; }
footer.site-foot .site-foot-links { margin-bottom: 8px; font-size: 0.82rem; }
footer.site-foot .site-foot-links a:hover { color: var(--trust); text-decoration: underline; }
footer.site-foot .site-foot-copy { font-size: 0.78rem; }

/* ── 게스트 랜딩 페이지 ───────────────────── */
.hero {
    background: linear-gradient(160deg, #ffffff 0%, var(--brand-light) 120%);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 64px 20px;
    text-align: center;
}
.hero h1 { font-size: 1.9rem; margin: 0 0 14px; color: var(--trust); }
.hero p { font-size: 1.02rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 28px; line-height: 1.7; }
.hero .btn { padding: 12px 28px; font-size: 1rem; }
.hero .btn-outline { border-color: var(--trust); color: var(--trust); }
.hero .btn-outline:hover { background: var(--trust); color: #fff; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 56px 0; }
.steps .step { text-align: center; }
.steps .step .num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; background: var(--brand-light);
    color: var(--brand-dark); font-weight: 700; margin-bottom: 12px;
}
.steps .step h3 { margin: 0 0 8px; font-size: 1.02rem; }
.steps .step p { color: var(--text-muted); font-size: 0.88rem; margin: 0; line-height: 1.6; }

/* ── 메인 슬라이드 배너 (뷰포트 전체폭으로 확장) ───────────────────── */
.banner-slider {
    position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; width: 100vw;
    margin-top: -28px; overflow: hidden; margin-bottom: 28px; background: var(--border);
}
.banner-track { display: flex; transition: transform 0.5s ease; }
.banner-slide { flex: 0 0 100%; display: block; }
.banner-slide img { width: 100%; aspect-ratio: 4.3 / 1; object-fit: cover; display: block; }
.banner-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.banner-dots button {
    width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,0.6); cursor: pointer; padding: 0;
}
.banner-dots button.active { background: #fff; width: 20px; border-radius: 4px; }

/* ── 홈 이벤트 카드 셸프(가로 스와이프, 배너와는 다른 느낌의 스냅 스크롤) ───────────────────────── */
.event-slider { position: relative; }
.event-track {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px;
}
.event-track::-webkit-scrollbar { display: none; }
.event-slide {
    flex: 0 0 calc(46% - 8px); scroll-snap-align: start; display: block; position: relative;
    border-radius: var(--radius); overflow: hidden; background: var(--border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.event-slide:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(28,63,114,0.16); }
.event-slide img { width: 100%; aspect-ratio: 8 / 3; object-fit: cover; display: block; }
.event-slide-title {
    position: absolute; left: 20px; bottom: 16px; color: #fff; font-size: 1.05rem; font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.55);
}
.event-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.18); cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--trust); z-index: 5;
}
.event-nav.prev { left: -14px; }
.event-nav.next { right: -14px; }
.event-nav:hover { background: #fff; }

@media (max-width: 1200px) and (min-width: 861px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
    .dash-wrap { flex-direction: column; }
    .dash-sidebar { width: 100%; }
    .steps { grid-template-columns: 1fr; }
    .banner-slide img { aspect-ratio: 2.6 / 1; }
    .event-slide { flex: 0 0 88%; }
    .event-slide img { aspect-ratio: 8 / 3; }
    .event-slide-title { font-size: 0.95rem; left: 14px; bottom: 12px; }
    .event-nav { display: none; }

    .header-top-inner { display: flex; align-items: center; justify-content: space-between; position: relative; height: 56px; gap: 6px; }
    .site-header .brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
    .site-header .brand img { height: 18px; max-width: 100%; }
    .search-wrap { display: none; position: fixed; left: 0; right: 0; top: 56px; max-width: none; margin: 0; padding: 8px 12px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.08); z-index: 50; }
    .search-wrap.open { display: block; }
    .search-wrap .search-form { height: 40px; }
    .search-toggle { display: flex; flex-shrink: 0; }
    .search-toggle svg { width: 19px; height: 19px; }
    .icon-link .icon-label, .icon-link-text { display: none; }
    .icon-link svg { width: 19px; height: 19px; }
    .header-icons { gap: 8px; flex-shrink: 0; }
    .nav-toggle { display: block; flex-shrink: 0; }
    .nav-toggle svg { width: 21px; height: 21px; display: block; }
    .container { padding: 0 12px; }

    .main-nav { display: none; }
    .main-nav.open { display: block; }
    .main-nav-inner { flex-direction: column; align-items: stretch; justify-content: flex-start; overflow-x: visible; }
    .main-nav a { border-bottom: 1px solid rgba(255,255,255,0.1); }
    .nav-dropdown-panel {
        display: block; position: static; border: none; border-radius: 0; box-shadow: none; background: rgba(0,0,0,0.12); padding: 0;
    }
    .nav-dropdown-panel a { color: #dbe4f0; padding-left: 28px; font-size: 0.82rem; }
    .nav-dropdown-panel a:hover { color: #fff; background: rgba(255,255,255,0.08); }

    .notice-strip { flex-direction: column; align-items: stretch; padding: 12px 16px; }
    .notice-strip-head { display: flex; justify-content: space-between; align-items: center; width: 100%; }
    .notice-strip ul { width: 100%; }
    .seller-box dl { grid-template-columns: 74px 1fr; }

    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card .info { padding: 10px 10px 12px; }
    .product-card .name { font-size: 0.84rem; min-height: 2.3em; }
    .product-card .price-now { font-size: 0.92rem; }
    .product-detail-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
}

@media (min-width: 861px) {
    .nav-toggle { display: none; }
    .main-nav { display: block !important; }
    .search-toggle { display: none; }
}

/* ── 최근 본 상품 플로팅 사이드바(쿠팡 스타일) ───────────────────── */
.floating-recent { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 200; }
.floating-recent-tab {
    position: absolute; right: 100%; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl;
    background: var(--trust); color: #fff; border: none; padding: 16px 9px; border-radius: 8px 0 0 8px;
    cursor: pointer; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em; white-space: nowrap;
}
.floating-recent-tab:hover { background: var(--trust-dark); }
.floating-recent-panel {
    width: 220px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: -4px 0 16px rgba(0,0,0,0.14); overflow: hidden;
}
.floating-recent:not(.open) .floating-recent-tab { display: block; }
.floating-recent:not(.open) .floating-recent-panel { display: none; }
.floating-recent.open .floating-recent-tab { display: none; }
.floating-recent-header {
    display: flex; justify-content: space-between; align-items: center; padding: 12px 14px;
    background: var(--bg); border-bottom: 1px solid var(--border); font-weight: 700; font-size: 0.9rem;
}
.floating-recent-header button { border: none; background: none; cursor: pointer; color: var(--text-muted); font-size: 1.1rem; line-height: 1; }
.floating-recent-header button:hover { color: var(--text); }
.floating-recent-list { max-height: 360px; overflow-y: auto; }
.floating-recent-item { display: flex; gap: 10px; padding: 10px 14px; align-items: center; color: var(--text); border-bottom: 1px solid var(--border); }
.floating-recent-item:last-child { border-bottom: none; }
.floating-recent-item:hover { background: var(--bg); }
.floating-recent-item img { width: 46px; height: 46px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: #f0ebe3; }
.fr-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fr-name { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-price { font-size: 0.82rem; font-weight: 700; }

@media (max-width: 860px) {
    .floating-recent { display: none; }
}

/* ── 도움말 챗봇(규칙 기반 FAQ) ───────────────────── */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 210; }
.chat-fab {
    width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--trust); color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.chat-fab:hover { background: var(--trust-dark); }
.chat-widget.open .chat-fab { display: none; }
.chat-panel { display: none; }
.chat-widget.open .chat-panel {
    display: flex; flex-direction: column; position: absolute; right: 0; bottom: 0;
    width: 320px; max-width: calc(100vw - 24px); height: 440px; max-height: calc(100vh - 100px);
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); overflow: hidden;
}
.chat-header {
    display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
    background: var(--trust); color: #fff; font-weight: 700; font-size: 0.95rem; flex-shrink: 0;
}
.chat-header button { border: none; background: none; cursor: pointer; color: #fff; font-size: 1.2rem; line-height: 1; opacity: 0.9; }
.chat-header button:hover { opacity: 1; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.chat-msg {
    background: var(--bg); border-radius: var(--radius); padding: 12px 14px; font-size: 0.86rem;
    line-height: 1.55; margin-bottom: 12px; white-space: pre-line;
}
.chat-options { display: flex; flex-direction: column; gap: 8px; }
.chat-opt-btn {
    text-align: left; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    background: #fff; color: var(--text); font-size: 0.85rem; cursor: pointer;
}
.chat-opt-btn:hover { border-color: var(--trust); color: var(--trust); }
.chat-back-btn { color: var(--text-muted); border-style: dashed; }
.chat-link-btn { text-align: center; margin-top: 2px; }

@media (max-width: 480px) {
    .chat-widget { right: 12px; bottom: 12px; }
    .chat-widget.open .chat-panel { width: calc(100vw - 24px); height: calc(100vh - 140px); }
}

/* ── 리뷰/별점 ───────────────────────────── */
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { display: none; }
.star-input label { font-size: 2rem; color: #ddd; cursor: pointer; line-height: 1; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: var(--brand); }
.star-display { color: var(--brand); letter-spacing: 1px; }
.star-display .empty { color: #ddd; }
.review-summary { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.review-summary .avg { font-size: 1.3rem; font-weight: 700; }
.review-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: none; }
.review-item .review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 0.85rem; }
.review-item .reviewer { font-weight: 600; }
.review-item .review-date { color: var(--text-muted); font-size: 0.78rem; }
.review-item .review-content { font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; }

/* ── 메인페이지 섹션 헤더(제목 + 더보기) ─────── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.section-head .more-link { flex-shrink: 0; font-size: 0.85rem; color: var(--text-muted); }
.section-head .more-link:hover { color: var(--brand); }

/* ── 관리자/입점사 대시보드 상단바(.gnb) ─────── */
.gnb { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.gnb .container { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.gnb .brand { display: flex; align-items: center; gap: 10px; }
.gnb .brand img { display: block; }
.gnb .brand .gnb-role-tag { color: var(--text-muted); font-size: 0.9rem; padding-left: 10px; border-left: 1px solid var(--border); }
.gnb nav { display: flex; align-items: center; gap: 16px; font-size: 0.86rem; }
.gnb nav .gnb-user { color: var(--text); font-weight: 600; }
.gnb nav a:not(.btn) { color: var(--text-muted); }
.gnb nav a:not(.btn):hover { color: var(--brand); }

/* ── 메인페이지 카테고리 진열대(테무 스타일 탭+상품셸프) ─────── */
.cat-shelf { margin-top: 32px; margin-bottom: 36px; }
.cat-shelf-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding-bottom: 6px; margin-bottom: 16px; }
.cat-shelf-tabs::-webkit-scrollbar { height: 4px; }
.cat-shelf-tab {
    flex-shrink: 0; display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px;
    background: #fff; color: var(--text-muted); font-size: 0.86rem; cursor: pointer; white-space: nowrap;
}
.cat-shelf-tab .cat-icon { display: flex; line-height: 1; }
.cat-shelf-tab.active { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-light); font-weight: 600; }

/* ── 모바일: 카테고리 진열대 탭은 줄바꿈 대신 가로 한 줄 스와이프 스크롤 ─── */
@media (max-width: 860px) {
    .cat-shelf-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .cat-shelf-tabs::-webkit-scrollbar { display: none; }
}

/* ── 상품 목록 페이지: 소분류 탭(대분류보다 작게) + 정렬 드롭다운 ─── */
.cat-shelf-tabs-sub { padding-left: 4px; }
.cat-shelf-tabs-sub .cat-shelf-tab { padding: 5px 12px; font-size: 0.78rem; }

.sort-dropdown { position: relative; }
.sort-dropdown summary { list-style: none; }
.sort-dropdown summary::-webkit-details-marker { display: none; }
.sort-dropdown summary .sort-caret { font-size: 0.7rem; margin-left: 1px; }
.sort-dropdown[open] summary { border-color: var(--trust); color: var(--trust); }
.sort-menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 140px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); overflow: hidden; padding: 4px 0;
}
.sort-menu-item { display: block; padding: 9px 14px; font-size: 0.86rem; color: var(--text); white-space: nowrap; }
.sort-menu-item:hover { background: var(--bg); }
.sort-menu-item.active { color: var(--brand-dark); font-weight: 600; background: var(--brand-light); }
