/* 펫픽 공개 화면. 다나와 류 비교 사이트 톤: 연회색 바탕, 흰 카드, 초록 포인트 */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --fg: #222222;
  --fg-2: #444444;
  --muted: #8a8f98;
  --line: #e3e5e8;
  --line-2: #d6d9de;
  --green: #19b46a;
  --green-dark: #129a59;
  --green-bg: #e9f8f0;
  --blue: #1c5fd6;
  --blue-bg: #eef3fd;
  --red: #e5484d;
  --warn: #b45309;
  --warn-bg: #fff7e6;
  --unknown: #a3a8b1;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; color: var(--fg); background: var(--bg); line-height: 1.5; font-size: 14px; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button.link { background: none; border: 0; color: var(--blue); padding: 0; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.unknown { color: var(--unknown); }
.hp { position: absolute; left: -9999px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.notice { background: var(--warn-bg); color: var(--warn); padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.status { padding: 8px 12px; border-radius: 6px; background: var(--blue-bg); color: var(--blue); font-size: 13px; }
.status.error { background: #fdecec; color: #b42318; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-2); background: #fff; border-radius: 6px; color: var(--fg); font-weight: 500; }
.btn:hover { text-decoration: none; border-color: #bfc4cc; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); }
.btn.outline { color: var(--green-dark); border-color: var(--green); }
.badge-new { display: inline-block; background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; vertical-align: middle; margin-right: 4px; }
.badge-soon { display: inline-block; background: rgba(255,255,255,.22); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 8px; margin-left: 6px; }
.chip { display: inline-block; background: var(--green-bg); color: var(--green-dark); border-radius: 12px; padding: 2px 9px; font-size: 12px; }
.tag { color: var(--muted); font-size: 12px; margin-right: 6px; }

/* ---------- 헤더 ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header .top { display: grid; grid-template-columns: 220px 1fr 220px; align-items: center; height: 96px; gap: 20px; }
.logo { display: flex; flex-direction: column; line-height: 1.1; }
.logo .word { display: flex; align-items: center; gap: 6px; font-size: 30px; font-weight: 800; color: var(--green); letter-spacing: -0.04em; }
.logo .word svg { width: 30px; height: 30px; }
.logo .slogan { font-size: 12px; color: var(--muted); margin-top: 4px; margin-left: 2px; }
.search-pill { position: relative; max-width: 520px; margin: 0 auto; width: 100%; }
.search-pill input { width: 100%; height: 48px; padding: 0 52px 0 22px; border: 2px solid var(--green); border-radius: 26px; font-size: 15px; outline: none; background: #fff; }
.search-pill input:focus { box-shadow: 0 0 0 3px rgba(25,180,106,.15); }
.search-pill button { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--fg-2); display: grid; place-items: center; }
.search-pill button svg { width: 22px; height: 22px; }
.quick { display: flex; justify-content: flex-end; gap: 22px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--fg-2); position: relative; }
.quick a:hover { text-decoration: none; color: var(--green-dark); }
.quick svg { width: 26px; height: 26px; }
.quick .badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--green); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.gnb { display: flex; align-items: center; gap: 28px; height: 46px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.gnb .all-cat { display: flex; align-items: center; gap: 8px; width: 200px; color: var(--fg); }
.gnb .all-cat svg { width: 18px; height: 18px; }
.gnb a { color: var(--fg-2); }
.gnb a.active { color: var(--green-dark); }
.gnb a.soon { color: var(--muted); font-weight: 500; }
.gnb a:hover { text-decoration: none; color: var(--green-dark); }

/* ---------- 레이아웃 ---------- */
.page { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.page.three { grid-template-columns: 200px minmax(0, 1fr) 230px; }
.side { position: sticky; top: 12px; }

/* 초록 카테고리 사이드바 */
.cat-box { background: var(--green); border-radius: 10px; color: #fff; overflow: hidden; }
.cat-box .head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 700; font-size: 15px; background: rgba(0,0,0,.08); }
.cat-box .head svg { width: 18px; height: 18px; }
.cat-box ul { list-style: none; margin: 0; padding: 6px 0 8px; }
.cat-box li a { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; font-weight: 600; color: #fff; }
.cat-box li a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.cat-box li a.active { background: #fff; color: var(--green-dark); margin: 0 8px; border-radius: 6px; padding-left: 8px; padding-right: 8px; }
.cat-box li a.soon { opacity: .7; font-weight: 500; }
.cat-box svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* 필터 카드 */
.filters { margin-top: 12px; padding: 4px 0; }
.filters details { border-bottom: 1px solid var(--line); padding: 10px 14px; }
.filters details:last-of-type { border-bottom: 0; }
.filters summary { cursor: pointer; font-weight: 700; font-size: 13px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.filters summary::after { content: "⌃"; color: var(--muted); font-size: 12px; transform: rotate(180deg); }
.filters details[open] summary::after { transform: none; }
.filters summary::-webkit-details-marker { display: none; }
.chips label { display: block; padding: 4px 0; font-size: 13px; color: var(--fg-2); }
.chips input { accent-color: var(--green); margin-right: 4px; }
.ingredient-filter label { display: block; margin: 6px 0; font-size: 13px; }
.ingredient-filter select { width: 100%; border: 1px solid var(--line-2); border-radius: 4px; font-size: 12px; }
.ranges label { display: block; margin: 8px 0; font-size: 13px; }
.ranges input { width: 64px; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 4px; }
.filters .reset { display: block; width: 100%; padding: 10px; border: 0; background: #f7f8fa; color: var(--fg-2); font-size: 13px; border-top: 1px solid var(--line); }

/* 히어로 배너 */
.hero { position: relative; overflow: hidden; border-radius: 10px; background: linear-gradient(100deg, #0f2a3a 0%, #163f4e 55%, #1b5d55 100%); color: #fff; padding: 30px 34px; min-height: 140px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: #5fe3a1; }
.hero p { margin: 0; font-size: 14px; opacity: .85; }
.hero .paw { width: 110px; height: 110px; opacity: .25; flex: 0 0 auto; }

/* 결과 영역 */
.results { margin-top: 14px; padding: 14px 16px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 14px; font-size: 13px; }
.results-bar strong { color: var(--green-dark); }
.results-bar select { padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; font-size: 13px; }
.product-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.product-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s, border-color .15s; }
.product-card:hover { border-color: #c9cdd4; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.thumb { aspect-ratio: 4 / 3; border-radius: 6px; background: #f3f4f6; display: grid; place-items: center; color: #c4c8cf; overflow: hidden; }
.thumb svg { width: 48px; height: 48px; }
.thumb span { font-size: 11px; color: #a8adb5; margin-top: 4px; }
.card-head .brand-name { display: block; font-size: 12px; color: var(--muted); }
.card-head h2 { font-size: 15px; margin: 2px 0 0; font-weight: 700; color: var(--blue); line-height: 1.35; }
.card-head h2 a:hover { text-decoration: underline; }
.hashtags { font-size: 12px; color: var(--muted); margin: 0; }
.hashtags span { margin-right: 6px; }
.nutrients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 2px 0 0; }
.nutrients div { background: #f7f8fa; border-radius: 4px; padding: 5px 6px; text-align: center; }
.nutrients dt { font-size: 10px; color: var(--muted); }
.nutrients dd { margin: 0; font-weight: 700; font-size: 13px; }
.nutrients small { display: block; font-weight: 400; color: var(--muted); font-size: 10px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; margin: 0; color: var(--fg-2); }
.price-line { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
.price-line .price { font-size: 16px; font-weight: 800; color: var(--fg); }
.price-line .price small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.compare-toggle { border: 1px solid var(--green); background: #fff; color: var(--green-dark); border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; }
.compare-toggle.active { background: var(--green); color: #fff; }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 16px 0 4px; }
.pagination button { border: 1px solid var(--line-2); background: #fff; padding: 6px 11px; border-radius: 4px; font-size: 13px; }
.pagination button[aria-current=page] { background: var(--green); color: #fff; border-color: var(--green); }

.request-box { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 16px; margin-top: 16px; background: #fafbfc; }
.request-box h3 { margin: 0 0 8px; font-size: 15px; }
.request-box label { display: block; margin: 8px 0; font-size: 13px; }
.request-box input { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px; }

/* 오른쪽 안내 칼럼 */
.aside-card { padding: 14px 16px; margin-bottom: 12px; }
.aside-card h3 { margin: 0 0 8px; font-size: 14px; }
.aside-card ul { margin: 0; padding-left: 16px; font-size: 12px; color: var(--fg-2); }
.aside-card li { margin: 4px 0; }
.aside-card.green { background: var(--green-bg); border-color: #cdeedc; }
.aside-card.green h3 { color: var(--green-dark); }

/* ---------- 제품 상세 ---------- */
.product-detail { display: flex; flex-direction: column; gap: 14px; }
.breadcrumb { font-size: 12px; color: var(--muted); margin-top: 14px; }
.breadcrumb a:hover { color: var(--green-dark); }
.detail-head { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 22px; }
.detail-head .thumb { aspect-ratio: 1 / 1; }
.detail-head .brand-name { color: var(--muted); font-size: 13px; }
.detail-head h1 { margin: 2px 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.spec-table th { text-align: left; width: 110px; color: var(--muted); font-weight: 500; padding: 7px 8px; background: #f7f8fa; border-bottom: 1px solid #fff; }
.spec-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.spec-table .big { font-size: 18px; font-weight: 800; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.section { padding: 18px 22px; }
.section h2 { font-size: 16px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--fg); display: inline-block; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: 8px 8px; text-align: left; vertical-align: top; }
.data-table thead th { background: #f7f8fa; color: var(--fg-2); font-weight: 600; font-size: 12px; }
.data-table tr.stale td { color: var(--unknown); }
.inline-list { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.inline-list li { border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 10px; font-size: 13px; }
.ingredient-list { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; font-size: 13px; }
.ingredient-list li { margin: 3px 0; break-inside: avoid; }
.source-list { margin: 0; padding-left: 18px; font-size: 13px; }
.source-list li { margin: 5px 0; word-break: break-all; }
.source-list a { color: var(--blue); }
.verify-pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #f0f1f3; color: var(--fg-2); }
.verify-pill.verified { background: var(--green-bg); color: var(--green-dark); }

/* 제휴 링크 */
.affiliate-box { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfc; }
.affiliate-box h3 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.affiliate-embed { margin: 10px 0 0; }
.affiliate-embed iframe, .affiliate-embed img { max-width: 100%; display: block; }
.site-footer .disclosure { color: var(--fg-2); }

/* ---------- 비교 ---------- */
.compare-page { padding: 22px; }
.compare-page h1 { margin: 0 0 6px; font-size: 22px; }
.lead { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.compare-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare-table th, .compare-table td { border: 1px solid var(--line); padding: 9px 10px; vertical-align: top; }
.compare-table thead th { background: #f7f8fa; text-align: center; }
.compare-table thead a { color: var(--blue); font-weight: 700; }
.compare-table .row-label { background: #f7f8fa; font-weight: 600; white-space: nowrap; color: var(--fg-2); }
.compare-table ol { margin: 0; padding-left: 18px; }

/* ---------- 정적 페이지 ---------- */
.static-page { padding: 24px 28px; margin-top: 18px; }
.static-page h1 { margin-top: 0; font-size: 22px; }
.static-page h2 { font-size: 16px; margin-top: 22px; }

/* ---------- 푸터 ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0; color: var(--muted); font-size: 12px; }
.site-footer .links { margin-bottom: 8px; }
.site-footer .links a { margin-right: 14px; color: var(--fg-2); }

/* ---------- 반응형 ---------- */
@media (max-width: 1100px) {
  .page.three { grid-template-columns: 200px minmax(0, 1fr); }
  .right-col { display: none; }
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 14px; }
  .site-header .top { grid-template-columns: 1fr auto; height: auto; padding: 12px 0; gap: 10px; }
  .search-pill { grid-column: 1 / -1; }
  .quick { gap: 14px; }
  .gnb { gap: 16px; overflow-x: auto; font-size: 14px; white-space: nowrap; }
  .gnb .all-cat { display: none; }
  .page, .page.three { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* 가로 스크롤 메뉴(.cat-box ul)가 그리드 칸의 최소 너비를 넓히지 않도록 */
  .side, .main-col, .product-detail, .compare-page, .static-page { min-width: 0; }
  .side { position: static; }
  .cat-box ul { display: flex; overflow-x: auto; padding: 6px 8px; gap: 2px; }
  .cat-box li a { white-space: nowrap; padding: 8px 12px; }
  .cat-box li a.active { margin: 0; }
  .cat-box .head { display: none; }
  .product-list { grid-template-columns: 1fr; }
  .hero { padding: 20px; min-height: 0; }
  .hero h1 { font-size: 19px; }
  .hero .paw { display: none; }
  .detail-head { grid-template-columns: 1fr; padding: 16px; }
  .ingredient-list { columns: 1; }
  .section { padding: 14px 16px; }
}

/* 모바일 필터 접기: 760px 이하에서만 토글 버튼이 보이고 패널은 기본 접힘 */
.filter-toggle { display: none; }
@media (max-width: 760px) {
  .filter-toggle { display: block; width: 100%; padding: 10px 12px; font: inherit; font-weight: 600; color: inherit; background: #fff; border: 1px solid var(--line, #e3e6ea); border-radius: 8px; cursor: pointer; text-align: left; }
  .filter-toggle::after { content: ' ▾'; float: right; }
  .filters.open .filter-toggle::after { content: ' ▴'; }
  .filters.open .filter-toggle { margin-bottom: 10px; }
  .filters:not(.open) > :not(.filter-toggle) { display: none; }
}
