/* ============================================================
   스킨 레이어 — body 클래스로 사이트마다 다른 화면을 만든다
   (style.css 다음에 로드)
   ============================================================ */

/* ---------- 모서리 ---------- */
body.r0{--rr:0px}
body.r2{--rr:2px}
body.r4{--rr:4px}
body.r8{--rr:8px}
.pcard .imgwrap,.gal .main,.gal .thumbs button,.rankrow .th,.citem .th,.slides,.sidebnr a,.ordercard .oi .th{border-radius:var(--rr,0)}
.badge{border-radius:calc(var(--rr,0) / 2)}

/* ---------- 밀도 ---------- */
body.d-tight{--gy:22px;--gx:10px;--sec:32px}
body.d-normal{--gy:34px;--gx:16px;--sec:46px}
body.d-airy{--gy:48px;--gx:24px;--sec:56px}
.pgrid:not(.list){gap:var(--gy) var(--gx)}
.section{margin:var(--sec) 0}
body.d-tight .pcard .info{padding-top:8px}
body.d-airy .pcard .info{padding-top:14px}
body.d-tight .pcard .pname{font-size:12px;margin-bottom:5px}
body.d-airy .pcard .pname{font-size:13px;line-height:1.5}

/* ---------- 열 수 ---------- */
body.col4 .pgrid:not(.list){grid-template-columns:repeat(4,minmax(0,1fr))}
body.col5 .pgrid:not(.list){grid-template-columns:repeat(5,minmax(0,1fr))}
body.col6 .pgrid:not(.list){grid-template-columns:repeat(6,minmax(0,1fr))}
body.col6 .pcard .pbrand{font-size:11.5px}
body.col6 .pcard .pname{font-size:12px}
body.col6 .pcard .now,body.col6 .pcard .off{font-size:13px}

/* ---------- 이미지 비율 ---------- */
body.rt-tall .pcard .imgwrap{aspect-ratio:3/4}
body.rt-tall .gal .main{aspect-ratio:3/4}
body.rt-tall .pgrid.list .imgwrap{width:130px}

/* ---------- 판매가 강조색 ---------- */
/* 흰 배경 위 판매가는 AA(4.5:1) 를 넘는 톤으로 — 12px '원' 단위까지 통과시킨다 */
body.pc-sale .pcard .now,body.pc-sale .rankrow .pr,body.pc-sale .priceblock .now{color:var(--sale-deep)}
body.pc-point .pcard .now,body.pc-point .rankrow .pr,body.pc-point .priceblock .now{color:var(--point)}

/* ---------- 카드 형태 ---------- */
/* boxed — 테두리 카드 */
body.card-boxed .pcard{border:1px solid var(--line);padding:10px;background:#fff}
body.card-boxed .pcard .info{padding:10px 2px 2px}
body.card-boxed .pcard:hover{border-color:var(--ink)}
body.card-boxed .quick-add{left:10px;right:10px;bottom:10px}
/* lined — 정보 위 구분선 + 브랜드 강조 */
body.card-lined .pcard .info{border-top:1px solid var(--line);margin-top:10px;padding-top:10px}
body.card-lined .pcard .pbrand{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--sub)}
body.card-lined .badge{background:none;color:var(--ink);border:1px solid var(--ink);padding:3px 6px}
body.card-lined .badge.hot{color:#c23600;border-color:#c23600}   /* 회색 배경 위에서도 AA */
body.card-lined .badges{left:8px;top:8px;gap:4px}
/* overlay — 정보 중앙 정렬, 배지는 이미지 하단 */
body.card-overlay .pcard .info{text-align:center}
body.card-overlay .pcard .price{justify-content:center}
body.card-overlay .pcard .meta{justify-content:center}
body.card-overlay .badges{left:0;right:0;top:auto;bottom:0;justify-content:center}
body.card-overlay .badge{background:rgba(0,0,0,.62);color:#fff}
body.card-overlay .badge.hot{background:var(--sale)}
body.card-overlay .badge.moq{display:none}
/* wide — 이름 왼쪽 / 가격 오른쪽 2단 */
body.card-wide .pcard .info{display:grid;grid-template-columns:1fr auto;gap:2px 10px;align-items:end}
body.card-wide .pcard .pbrand{grid-column:1/-1}
body.card-wide .pcard .pname{margin-bottom:0}
body.card-wide .pcard .price{flex-direction:column;align-items:flex-end;gap:1px}
body.card-wide .pcard .meta{grid-column:1/-1}
body.card-wide .pcard .unit{grid-column:1/-1}

/* ---------- 섹션 제목 ---------- */
body.sh-under .sec-head{border-bottom:1px solid var(--line);padding-bottom:10px}
body.sh-under .sec-head h2{position:relative;padding-bottom:10px;margin-bottom:-11px}
body.sh-under .sec-head h2::after{content:'';position:absolute;left:0;bottom:0;width:100%;height:3px;background:var(--point)}
body.sh-plain .sec-head{border-bottom:0;padding-bottom:4px}
body.sh-plain .sec-head h2{font-size:22px}
body.sh-left .sec-head{border-bottom:1px solid var(--line2);padding-bottom:10px}
body.sh-left .sec-head h2{padding-left:11px;border-left:4px solid var(--point);line-height:1.1}

/* ---------- 사이드바 레이아웃 ---------- */
.withside{display:grid;grid-template-columns:190px minmax(0,1fr);gap:0 26px;align-items:start;margin-top:14px}
.sidecat{border:1px solid var(--line)}
.sidecat h4{font-size:13px;font-weight:800;padding:11px 13px;background:var(--ink);color:#fff}
.sidecat a{display:block;padding:9px 13px;font-size:12.5px;color:#444;border-top:1px solid var(--line2)}
.sidecat a:hover{background:var(--gray);color:var(--point);font-weight:700}
.sidecat .sc-foot{padding:11px 13px;border-top:1px solid var(--line2);background:var(--gray)}
.sidecat .sc-foot b{display:block;font-size:12px;margin-bottom:5px}
.sidecat .sc-foot p{font-size:11.5px;color:var(--faint);line-height:1.6}
.sidebanner{margin-top:10px;border:1px solid var(--line);padding:14px 13px;background:var(--gray)}
.sidebanner b{display:block;font-size:13px;font-weight:800;margin-bottom:4px}
.sidebanner p{font-size:11.5px;color:var(--sub);line-height:1.6}
.sidebanner a{display:inline-block;margin-top:8px;font-size:11.5px;font-weight:700;color:var(--point)}
@media (max-width:960px){.withside{grid-template-columns:minmax(0,1fr)}.sidecat,.sidebanner{display:none}}

/* 배너 스트립(사이드바형 홈 상단) */
.bannerstrip{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:10px;height:230px}
.bannerstrip .slides{height:230px}
.bannerstrip .sub{display:grid;grid-template-rows:1fr 1fr;gap:10px}
.bannerstrip .sub a{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;padding:0 18px;color:#fff;background:#1d2024}
.bannerstrip .sub b{position:relative;z-index:2;font-size:14px;font-weight:800;line-height:1.35}
.bannerstrip .sub span{position:relative;z-index:2;font-size:11.5px;opacity:.9;margin-top:3px}
@media (max-width:760px){.bannerstrip{grid-template-columns:minmax(0,1fr);height:auto}.bannerstrip .slides{height:180px}.bannerstrip .sub{grid-template-rows:none;grid-template-columns:1fr 1fr;height:70px}}

/* ---------- 원형별 특성 ---------- */
/* 셀렉트샵형 — 넓은 여백, 중앙 헤더, 배지 최소 */
body.lay-select .container{width:min(1100px,100% - 32px)}
body.lay-select .badge.free,body.lay-select .badge.moq,body.lay-select .badge.ad{display:none}
body.lay-select .sec-head h2{font-size:17px;letter-spacing:.02em;font-weight:700}
body.lay-select .pcard .pname{color:#333}
body.lay-select .slides{height:400px}
body.lay-select .quickcats{border-bottom:0}

/* 스트리트형 — 검정 헤더, 랭킹 숫자 강조 */
body.lay-street .header{background:#111;color:#fff}
body.lay-street .header .icon-btn,body.lay-street .brand-text b{color:#fff}
body.lay-street .brand-text span,body.lay-street .icon-btn span.lb{color:#999}
body.lay-street .search .box{border-color:#fff;background:#111}
body.lay-street .search input{color:#fff}
body.lay-street .search input::placeholder{color:#777}
body.lay-street .search button{color:#fff}
body.lay-street .search .hot{color:#777}
body.lay-street .search .hot b{color:#fff}
body.lay-street .catnav{border-top:0;background:#111;border-bottom:1px solid #222}
body.lay-street .catnav .links a,body.lay-street .allcat{color:#ddd;font-weight:700;letter-spacing:.02em}
body.lay-street .catnav .links a:hover,body.lay-street .allcat:hover{color:#fff}
body.lay-street .catnav .right{color:#888}
body.lay-street .rankrow .no{font-size:20px;color:var(--ink)}
body.lay-street .rankrow:nth-child(-n+3) .no{color:var(--sale)}
body.lay-street .sec-head h2{letter-spacing:-.05em;font-size:21px}

/* 마켓형 — 원형 카테고리 크게, 배너 부드럽게 */
body.lay-fresh .qc .thumb{width:72px;height:72px}
body.lay-fresh .quickcats{padding:30px 0 6px;border-bottom:0}
body.lay-fresh .search .box{height:48px;border-width:2px}
body.lay-fresh .benefits{border-color:var(--point)}
body.lay-fresh .benefit .ico{color:var(--point)}

/* 디스카운트형 — 조밀, 배지 강조 */
body.lay-discount .pcard .pname{font-size:12px;line-height:1.4}
body.lay-discount .badge{font-size:10.5px;padding:3px 5px}
body.lay-discount .pcard .unit{color:var(--sale)}
body.lay-discount .sec-head{padding-bottom:8px}

/* 브랜드몰형 — 풀블리드 히어로, 큰 타이포 */
body.lay-brand .fullhero{margin:0 calc(50% - 50vw);width:100vw;height:420px;position:relative;overflow:hidden}
body.lay-brand .fullhero .slides{height:420px}
body.lay-brand .slide h2{font-size:40px}
body.lay-brand .slide .copy{max-width:640px}
body.lay-brand .sec-head h2{font-size:24px;letter-spacing:-.05em}
body.lay-brand .quickcats{grid-template-columns:repeat(auto-fit,minmax(90px,1fr))}
@media (max-width:760px){body.lay-brand .fullhero,body.lay-brand .fullhero .slides{height:250px}body.lay-brand .slide h2{font-size:22px}}

/* B2B 도매형 — 표 헤더 + 리스트 기본 */
body.lay-b2b .pgrid.list .pcard{border-bottom:1px solid var(--line2);padding:14px 0}
body.lay-b2b .listhead{display:grid;grid-template-columns:1fr 110px 90px 90px;gap:10px;padding:9px 0;border-top:2px solid var(--ink);border-bottom:1px solid var(--line);font-size:12px;font-weight:800;color:var(--sub)}
body.lay-b2b .listhead span:not(:first-child){text-align:right}
body.lay-b2b .sec-head{border-bottom-width:1px}
body.lay-b2b .benefits{margin-top:0}
@media (max-width:760px){body.lay-b2b .listhead{display:none}}

/* 오픈마켓형 — 조밀 + 랭킹 리스트 강조 */
body.lay-market .sec-head h2{font-size:17px}
body.lay-market .pcard .pname{font-size:12px}
body.lay-market .rankrow{padding:8px 4px}
body.lay-market .rankrow .th{width:48px;height:48px}

.hero.solo{grid-template-columns:minmax(0,1fr)}

/* ---------- 헤더 변형 ---------- */
/* center — 로고 중앙, 그 아래 GNB 중앙 */
.header.hd-center .header-inner{flex-direction:column;height:auto;padding:22px 0 16px;gap:14px}
.header.hd-center .brand{order:1}
.header.hd-center .brand-text{align-items:center}
.header.hd-center .brand-text b{font-size:26px;letter-spacing:-.06em}
.header.hd-center .search{order:3;max-width:420px;width:100%}
.header.hd-center .search .box{height:38px;border-width:1px;border-color:var(--line)}
.header.hd-center .header-right{order:2;position:absolute;right:0;top:22px;margin:0}
.header.hd-center .header-inner{position:relative}
.header.hd-center .nav-toggle{position:absolute;left:0;top:22px}
body.hd-center-nav .catnav-inner{justify-content:center}
body.hd-center-nav .catnav .links{flex:0 1 auto;max-width:100%}
body.hd-center-nav .catnav .right{display:none}
body.hd-center-nav .allcat{display:none}
/* compact — 한 줄 슬림 */
.header.hd-compact .header-inner{height:64px;gap:16px}
.header.hd-compact .brand-text b{font-size:18px}
.header.hd-compact .search{max-width:420px}
.header.hd-compact .search .box{height:38px}
.header.hd-compact .search .hot{display:none}
.header.hd-compact .icon-btn{width:40px;height:40px;font-size:0;gap:0}
.header.hd-compact .icon-btn .lb{display:none}
/* dark 는 lay-street 에서 처리 */

@media (max-width:760px){
  .header.hd-center .header-inner{padding:12px 0 8px;gap:8px}
  .header.hd-center .header-right{top:8px}
  .header.hd-center .nav-toggle{top:8px}
  .header.hd-center .brand-text b{font-size:19px}
  body.col4 .pgrid:not(.list),body.col5 .pgrid:not(.list),body.col6 .pgrid:not(.list){grid-template-columns:repeat(2,minmax(0,1fr))}
  body.d-airy{--gy:26px;--gx:12px;--sec:36px}
  body.lay-select .slides{height:230px}
}
