/* ============================================================
   배때지 V2 · 브랜드 탐색 (brand.php)  — 2026-07-26 전면 개편
   V2 메인(home-v2.css)의 디자인 시스템을 그대로 따른다:
     배경 #f6f6f4 · 잉크 #16161a · 서브 #6b6b74 · 라인 #e8e8ea
     카드 #fff + 1px 라인 + radius 16 · hover translateY(-3px)+연한 그림자
     콘텐츠 폭 1280 · 좌우 패딩 16/28 · 섹션 제목 18px/800
   별도 색상 테마·다크 배너 없음. 상품 카드는 SHOP 공통(.v2live-card) 재사용.
   ============================================================ */
.v2b {
    --hm-ink: #16161a;
    --hm-sub: #6b6b74;
    --hm-line: #e8e8ea;
    --hm-bg: #f6f6f4;
    --hm-card: #ffffff;
    --hm-ac: #4b48d6;
    --hm-radius: 16px;
    --hm-pad: 16px;
    --hm-max: 1280px;
    background: var(--hm-bg);
    color: var(--hm-ink);
    -webkit-text-size-adjust: 100%;
    word-break: keep-all;
    padding: 4px var(--hm-pad) calc(var(--v2-nav-height, 68px) + env(safe-area-inset-bottom, 0px) + 40px);
}
.v2b > * { max-width: var(--hm-max); margin-left: auto; margin-right: auto; }
.v2b * { box-sizing: border-box; }
.v2b a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
@media (min-width: 1024px) { .v2b { --hm-pad: 28px; } }

/* ---------- A. 페이지 헤더 (메인 섹션 헤더 규칙) ---------- */
.v2b-head { padding: 14px 0 2px; }
.v2b-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.3; }
.v2b-head p { margin: 5px 0 0; font-size: 13px; color: var(--hm-sub); line-height: 1.5; }
.v2b-head p strong { color: var(--hm-ink); font-weight: 800; }

/* ---------- 공통 섹션 헤더 ---------- */
.v2b-section, .v2b-picked { margin-top: 28px; }
.v2b-guide + .v2b-popular { margin-top: 22px; }
.v2b-secttl {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    margin-bottom: 12px;
}
.v2b-secttl h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.3px; line-height: 1.3; }
.v2b-secttl small { font-size: 12.5px; color: var(--hm-sub); font-weight: 600; }

/* 허브 안내 디스클로저 (2026-08-27 리디자인)
   장문 2문단 → «브랜드 안내 보기» 버튼 + 접이식 정보 블록 3개(v2-disclosure.css 공용).
   여기서는 브랜드 페이지 고유의 여백/제목 크기만 정한다. */
.v2b-guide { margin: 14px 0 0; }
.v2b-guide-ttl { margin: 0 0 8px; font-size: 16px; font-weight: 800;
                 letter-spacing: -.3px; line-height: 1.35; color: var(--hm-ink); }
@media (min-width: 768px) { .v2b-guide-ttl { font-size: 18px; } }

.v2b-more {
    flex: none; display: inline-flex; align-items: center; gap: 2px;
    font-size: 13px; font-weight: 700; color: var(--hm-sub); min-height: 44px;
}
.v2b-more svg { width: 15px; height: 15px; }
.v2b-more:hover { color: var(--hm-ink); }

/* ---------- 선택 브랜드 상품 미리보기 (.v2live-card 는 SHOP CSS 그대로) ---------- */
.v2b-picked-en { font-weight: 600; letter-spacing: .02em; }
.v2b-picked .v2live-products { margin: 0; }

/* ---------- B. 브랜드 검색 (메인 검색창 규칙) ---------- */
.v2b-search {
    position: relative; display: flex; align-items: center; gap: 8px;
    margin-top: 16px; padding: 0 14px;
    background: var(--hm-card); border: 1px solid var(--hm-line); border-radius: 13px;
    min-height: 48px;
}
.v2b-search:focus-within { border-color: var(--hm-ink); }
.v2b-search-icon { width: 19px; height: 19px; color: var(--hm-sub); flex: none; }
.v2b-search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    font-size: 15px; color: var(--hm-ink); padding: 12px 0; font-family: inherit;
}
.v2b-search input::placeholder { color: #a4a4ac; }
.v2b-search-clear {
    flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: #f0f0f2; color: var(--hm-sub); font-size: 16px; cursor: pointer;
    display: grid; place-items: center;
}
.v2b-count { margin: 8px 2px 0; font-size: 12px; color: var(--hm-sub); min-height: 15px; }
.v2b-count b { color: var(--hm-ink); font-weight: 800; }

/* ---------- C. 카테고리 칩 (메인 pill 칩 규칙) ---------- */
.v2b-cats {
    display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
    margin-top: 12px; padding-bottom: 4px; -webkit-overflow-scrolling: touch;
}
.v2b-cats::-webkit-scrollbar { display: none; }
.v2b-cat {
    flex: none; display: inline-flex; align-items: center; gap: 5px;
    border: 1px solid var(--hm-line); background: var(--hm-card); color: var(--hm-sub);
    font-size: 13px; font-weight: 700; border-radius: 999px; padding: 0 15px;
    min-height: 44px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.v2b-cat small { font-size: 11px; font-weight: 700; color: var(--hm-sub); }   /* #a0a0a8(2.6:1) → 5.28:1 */
.v2b-cat.is-active { background: var(--hm-ink); border-color: var(--hm-ink); color: #fff; }
.v2b-cat.is-active small { color: rgba(255,255,255,.7); }

/* ---------- D. 인기 브랜드 카드 (메인 퀵메뉴/가이드 카드 규칙) ---------- */
.v2b-pop-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.v2b-pop-card {
    display: flex; flex-direction: column; gap: 3px;
    padding: 15px 16px; min-height: 44px;
    background: var(--hm-card); border: 1px solid var(--hm-line); border-radius: var(--hm-radius);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.v2b-pop-mono {
    width: 40px; height: 40px; display: grid; place-items: center;
    background: #f4f4f6; border-radius: 12px;
    font-size: 14px; font-weight: 800; letter-spacing: .02em; color: var(--hm-ink);
    margin-bottom: 7px;
}
.v2b-pop-ko { font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-pop-en { font-size: 11.5px; color: var(--hm-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-pop-cnt { margin-top: 5px; font-size: 12px; color: var(--hm-sub); }
.v2b-pop-card.is-selected { border-color: var(--hm-ink); box-shadow: 0 0 0 1px var(--hm-ink) inset; }

/* ---------- E. 초성 인덱스 ---------- */
.v2b-initials {
    position: sticky; top: 0; z-index: 5;
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
    margin-top: 26px; padding: 10px 0;
    background: var(--hm-bg); -webkit-overflow-scrolling: touch;
}
.v2b-initials::-webkit-scrollbar { display: none; }
.v2b-ini {
    flex: none; min-width: 40px; min-height: 38px; padding: 0 12px;
    border: 1px solid var(--hm-line); background: var(--hm-card); color: var(--hm-sub);
    border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.v2b-ini.is-active { background: var(--hm-ink); border-color: var(--hm-ink); color: #fff; }

/* ---------- F. 전체 브랜드 목록 ---------- */
.v2b-group { margin-top: 16px; }
.v2b-group-ttl { margin: 0 0 8px 2px; font-size: 13px; font-weight: 800; color: var(--hm-sub); }
.v2b-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.v2b-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; min-height: 56px;
    background: var(--hm-card); border: 1px solid var(--hm-line); border-radius: 13px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.v2b-item-mono {
    flex: none; width: 36px; height: 36px; display: grid; place-items: center;
    background: #f4f4f6; border-radius: 10px;
    font-size: 12.5px; font-weight: 800; color: var(--hm-ink);
}
.v2b-item-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.v2b-item-name strong { font-size: 13.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-item-name em { font-style: normal; font-size: 11px; color: var(--hm-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-item-cnt { flex: none; font-size: 12px; font-weight: 700; color: var(--hm-sub); font-variant-numeric: tabular-nums; }
.v2b-item-go { flex: none; color: #c2c2c8; font-size: 15px; }
.v2b-item.is-selected { border-color: var(--hm-ink); box-shadow: 0 0 0 1px var(--hm-ink) inset; }

/* ---------- 빈 결과 (V2 공통 안내 톤) ---------- */
.v2b-empty {
    margin-top: 14px; padding: 34px 16px; text-align: center;
    background: var(--hm-card); border: 1px solid var(--hm-line); border-radius: var(--hm-radius);
}
.v2b-empty strong { display: block; font-size: 14.5px; font-weight: 800; }
.v2b-empty span { display: block; margin-top: 5px; font-size: 12.5px; color: var(--hm-sub); }

/* ---------- hover (PC 포인터 전용 — 메인 gcard 규칙) ---------- */
@media (hover: hover) and (pointer: fine) {
    .v2b-pop-card:hover, .v2b-item:hover {
        transform: translateY(-3px);
        border-color: var(--hm-ink);
        box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    }
}
.v2b-pop-card:active, .v2b-item:active { transform: scale(.985); }
@media (prefers-reduced-motion: reduce) {
    .v2b-pop-card, .v2b-item { transition: none !important; }
    .v2b-pop-card:hover, .v2b-item:hover { transform: none; }
}

/* ---------- 포커스 ---------- */
.v2b a:focus-visible, .v2b button:focus-visible, .v2b input:focus-visible {
    outline: 2px solid var(--hm-ac); outline-offset: 2px;
}

/* ---------- 반응형: 태블릿(600+) · PC(1024+) ---------- */
@media (min-width: 600px) {
    .v2b-pop-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .v2b-list { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (min-width: 1024px) {
    .v2b-head { padding-top: 20px; }
    .v2b-head h1 { font-size: 26px; }
    .v2b-pop-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
    .v2b-list { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (min-width: 1280px) {
    .v2b-pop-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
}
