/* 제품 데이터베이스 목록 · 상세 (js/catalog.js) */
.cg-img { display: block; position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; background: #f6f6f7; overflow: hidden; }
.cg-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cg-img.sm { width: 60px; height: 60px; flex: none; border-radius: 10px; }
.cg-img.hero { border-radius: 0; aspect-ratio: 1 / .86; }
.cg-img.hero img { padding: 4%; }

.cg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; padding: 4px var(--gut) 18px; }
@media (min-width: 520px) { .cg-grid { grid-template-columns: repeat(3, 1fr); } }
.cg-card { display: grid; gap: 2px; align-content: start; min-width: 0; }
.cg-card .cg-img { margin-bottom: 8px; }
.cg-brand { font-size: 12px; color: var(--sub); font-weight: 700; }
.cg-brand small { font-weight: 500; color: var(--mute); margin-left: 4px; }
.cg-card b { font-size: 13.5px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; word-break: keep-all; }
.cg-meta { display: flex; gap: 4px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.cg-meta em { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: var(--gray); color: var(--sub); }
.cg-meta i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }

.cg-sub { padding-top: 0; }
.cg-sub button { font-size: 12.5px; }
.cg-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px var(--gut) 0; }
.cg-sel { display: grid; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--sub); }
.cg-sel select { height: 40px; border-radius: 10px; border: 1px solid var(--gray-2); background: #fff; padding: 0 10px; font-size: 13.5px; color: var(--ink); min-width: 0; }
.cg-colors { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 12px var(--gut) 0; }
.cg-colors::-webkit-scrollbar { display: none; }
.cg-colors button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 8px; border-radius: 16px; border: 1px solid var(--gray-2); font-size: 12.5px; background: #fff; white-space: nowrap; }
.cg-colors button.on { border-color: var(--ink); font-weight: 700; }
.cg-colors i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cg-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gut) 12px; font-size: 13px; color: var(--sub); }
.cg-bar b { color: var(--ink); }
.cg-bar button { font-size: 12.5px; color: var(--accent); font-weight: 700; }
.cg-clear { font-size: 13px; font-weight: 700; color: var(--accent); }

.cg-row { display: flex; align-items: center; gap: 12px; padding: 10px var(--gut); }
.cg-rb { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cg-rb b { font-size: 14px; font-weight: 600; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cg-rb .brand { font-size: 12px; color: var(--sub); }
.cg-rb .cx { font-size: 11.5px; color: var(--mute); }

.cg-head { padding: 18px var(--gut) 6px; }
.cg-head h1 { font-size: 20px; line-height: 1.35; letter-spacing: -.04em; margin: 3px 0 2px; font-weight: 800; word-break: keep-all; }
.cg-orig { font-size: 12px; color: var(--mute); }
.cg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.cg-tags span { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 10px; background: var(--gray); color: var(--sub); }
.cg-tags .rv { background: #fff4e5; color: #a35a00; }
.cg-actions { display: grid; padding: 4px 0; }
.cg-sec { padding: 22px var(--gut) 4px; border-top: 8px solid var(--gray); margin-top: 18px; }
.cg-sec h3 { font-size: 16px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 10px; }
.cg-sec h3 small { font-size: 12px; font-weight: 700; color: var(--accent); margin-left: 4px; }
.cg-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.cg-facts div { background: var(--gray); border-radius: 12px; padding: 10px 12px; }
.cg-facts dt { font-size: 11px; color: var(--mute); font-weight: 700; }
.cg-facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; line-height: 1.4; }
.cg-use { font-size: 13.5px; line-height: 1.65; color: #333; }
.cg-note { font-size: 12px; color: var(--mute); line-height: 1.55; margin: 8px 0 6px; }
.cg-note a { text-decoration: underline; }
.cg-shades { display: flex; flex-wrap: wrap; gap: 6px; }
.cg-shades span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 12px; background: var(--gray); }
.cg-shades i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cg-steps { display: grid; gap: 6px; }
.cg-steps a { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.cg-steps b { font-size: 13.5px; }
.cg-steps span { font-size: 12px; color: var(--sub); }
.cg-all summary { font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 0; }
.cg-ings { font-size: 12.5px; line-height: 1.7; color: #444; }
.cg-hs { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut) 4px; }
.cg-hs::-webkit-scrollbar { display: none; }
.kit .cg-link { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--accent); }

/* 화장품 홈 */
.cg-img.none { display: grid; place-items: center; background: #f3f2f0; }
.cg-img.none .prod { position: absolute; inset: 18%; width: 64%; height: 64%; opacity: .55; }
.cg-img.none em { position: absolute; left: 8px; bottom: 8px; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--mute); background: #fff; padding: 2px 7px; border-radius: 8px; }
.cg-img.sm.none em { display: none; }
.cg-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 var(--gut); }
.cg-cats button { display: grid; justify-items: center; gap: 2px; padding: 12px 4px 10px; border-radius: 14px; background: #f7f6f4; }
.cg-cic { width: 44px; height: 44px; display: block; }
.cg-cic .prod { width: 100%; height: 100%; }
.cg-cats b { font-size: 13px; }
.cg-cats small { font-size: 11px; color: var(--mute); }
.cg-chiprow { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--gut); }
.cg-ichip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--gray-2); background: #fff; font-size: 13px; }
.cg-ichip small { font-size: 11.5px; color: var(--accent); font-weight: 700; }
.cg-hs.pad0 { margin: 0; padding: 0 var(--gut) 4px; }
.cg-revs { display: grid; gap: 8px; padding: 0 var(--gut); }
.cg-revs a { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: #f7f6f4; }
.cg-revs a > span:last-child { display: grid; gap: 1px; font-size: 13px; min-width: 0; }
.cg-revs b { color: #e0a32b; font-size: 12px; letter-spacing: 1px; }
.cg-barr { display: flex; gap: 12px; }
.cg-bar button.on { color: var(--ink); text-decoration: underline; }

/* 상세: 전성분 분석 · 적합성 · 리뷰 · 비교 */
.cg-keys { display: grid; gap: 8px; margin-bottom: 12px; }
.cg-key { display: block; border-left: 4px solid var(--accent); background: #faf7f5; border-radius: 0 12px 12px 0; padding: 9px 12px; }
.cg-key b { font-size: 13.5px; }
.cg-key p { font-size: 12.5px; color: #555; line-height: 1.55; margin-top: 2px; }
.cg-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cg-flags span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 10px; background: #eef6f0; color: #1f7a46; }
.cg-flags span.on { background: #fff1e2; color: #b45b00; }
.cg-suit { display: grid; gap: 6px; }
.cg-suit li { display: grid; grid-template-columns: 64px 108px 1fr; gap: 8px; align-items: center; font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: #f7f6f4; }
.cg-suit em { font-style: normal; font-weight: 700; }
.cg-suit li.good em { color: #1f7a46; } .cg-suit li.warn em { color: #b45b00; } .cg-suit li.none em { color: var(--mute); }
.cg-suit span { color: #555; }
.cg-rlist { display: grid; gap: 8px; margin-bottom: 12px; }
.cg-rlist li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #f7f6f4; font-size: 13px; }
.cg-rlist b { color: #e0a32b; letter-spacing: 1px; font-size: 12px; }
.cg-rlist small { font-size: 11px; color: var(--mute); }
.cg-rlist small button { font-size: 11px; color: var(--accent); margin-left: 6px; }
.cg-rform { display: grid; gap: 8px; }
.cg-stars { display: flex; gap: 2px; }
.cg-stars button { font-size: 24px; color: #ddd; line-height: 1; }
.cg-stars button.on { color: #e0a32b; }
.cg-rform .field.ta { height: auto; padding: 10px 14px; font-size: 14px; resize: vertical; }
.cg-cmpw { overflow-x: auto; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut); }
.cg-cmp { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.cg-cmp th { text-align: left; color: var(--mute); font-weight: 700; padding: 8px 8px 8px 0; white-space: nowrap; vertical-align: top; }
.cg-cmp td { padding: 8px; border-left: 1px solid var(--line); vertical-align: top; width: 33%; min-width: 96px; }
.cg-cmp td a { display: grid; gap: 4px; }
.cg-cmp td b { font-size: 12px; font-weight: 600; line-height: 1.35; }

/* 화장대 제품 추가 시트 */
.sh-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; padding: 4px; border-radius: 12px; background: var(--gray); }
.sh-modes button { height: 34px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--sub); }
.sh-modes button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.srl button[disabled] { opacity: .55; }
.srl .cx { font-size: 11.5px; color: var(--mute); }
.srl .tile .cg-img.sm { width: 48px; height: 48px; }
.sh-bcbtns { display: flex; gap: 8px; margin-top: 12px; }
.sh-video { width: 100%; margin-top: 10px; border-radius: 12px; background: #111; aspect-ratio: 4 / 3; object-fit: cover; }
.sh-bcin { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.cpt a { float: right; font-weight: 700; color: var(--accent); }
.cp .tile .cg-img.sm { width: 100%; height: 100%; }

/* 메이크업 시뮬레이션: 내 화장대 색 */
.mf-mine { font-size: 11px; font-weight: 700; color: var(--accent); margin-right: 2px; align-self: center; }
