:root {
  --bg: #fff8ef;
  --bg-2: #fff1df;
  --card: rgba(255, 255, 255, 0.82);
  --card-strong: #ffffff;
  --text: #362f2a;
  --muted: #75685e;
  --primary: #f59e0b;
  --primary-dark: #c77405;
  --accent: #7fb069;
  --rose: #f8c8c8;
  --brown: #b7794b;
  --line: rgba(86, 62, 43, 0.13);
  --shadow: 0 24px 70px rgba(120, 73, 27, 0.14);
  --shadow-soft: 0 12px 28px rgba(88, 57, 27, 0.10);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background:
    url("bg-cats.jpg") center top / cover no-repeat fixed,
    var(--bg);
}
body {
  margin: 0;
  font-family: "LINE Seed Sans TH", "Noto Sans Thai", "Prompt", "Segoe UI", sans-serif;
  color: var(--text);
  /* Translucent veil over the cat backdrop so content stays readable */
  background:
    radial-gradient(circle at 12% 8%, rgba(248, 200, 200, 0.28), transparent 24rem),
    radial-gradient(circle at 86% 18%, rgba(127, 176, 105, 0.14), transparent 24rem),
    linear-gradient(180deg, rgba(255, 248, 239, 0.45), rgba(255, 253, 249, 0.30) 56%, rgba(255, 248, 239, 0.55));
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(183, 121, 75, 0.09) 1px, transparent 1px),
    radial-gradient(rgba(245, 158, 11, 0.08) 1px, transparent 1px);
  background-size: 44px 44px, 24px 24px;
  mask-image: linear-gradient(180deg, black, transparent 76%);
}
button, a, select, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.page-shell { width: min(100%, 1500px); margin: 0 auto; overflow: hidden; }
.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  width: min(calc(100% - 32px), var(--max));
  margin: 16px auto 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}
.site-header.has-shadow { box-shadow: 0 18px 44px rgba(87, 55, 25, 0.16); }
.brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.brand strong { display: block; line-height: 1.1; font-size: 1.05rem; }
.brand small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 2px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 16px; position: relative; display: grid; place-items: center;
  background: linear-gradient(145deg, #ffcc8a, #fff2d8 52%, #ffffff);
  box-shadow: inset 0 -6px 16px rgba(245, 158, 11, 0.18);
}
.brand-mark .ear { width: 14px; height: 14px; background: #ffc36c; position: absolute; top: -3px; transform: rotate(45deg); border-radius: 4px; }
.brand-mark .ear.left { left: 8px; }
.brand-mark .ear.right { right: 8px; }
.brand-mark .face { position: relative; z-index: 1; font-size: 1.15rem; }
.nav { display: flex; align-items: center; justify-content: center; gap: 18px; flex: 1; color: #5d5149; font-size: 0.94rem; }
.nav a { padding: 9px 4px; border-radius: 999px; transition: color 0.2s ease; }
.nav a:hover { color: var(--primary-dark); }
.header-cta, .btn {
  display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; border-radius: 999px;
  font-weight: 800; white-space: nowrap; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.header-cta, .btn.primary { color: #fff; background: linear-gradient(135deg, var(--primary), #e27d10); box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28); }
.header-cta { padding: 12px 18px; }
.btn { padding: 14px 22px; }
.btn:hover, .header-cta:hover { transform: translateY(-2px); }
.btn.ghost { background: rgba(255, 255, 255, 0.72); color: var(--text); border: 1px solid var(--line); }
.btn.full { width: 100%; }
.btn.small { padding: 11px 16px; font-size: 0.9rem; }
.menu-toggle { display: none; width: 42px; height: 42px; border: 0; border-radius: 14px; background: #fff2de; color: var(--text); }

.section-pad { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; padding: 88px 0; }
.hero { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 48px; align-items: center; min-height: 720px; padding-top: 72px; }
.eyebrow, .section-kicker {
  display: inline-flex; align-items: center; gap: 8px; color: var(--primary-dark); font-weight: 900;
  background: rgba(255, 236, 200, 0.84); border: 1px solid rgba(245, 158, 11, 0.22); padding: 8px 13px; border-radius: 999px; margin: 0 0 16px;
}
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: clamp(3rem, 7vw, 6.4rem); line-height: 0.94; letter-spacing: -0.065em; margin-bottom: 22px; }
h2 { font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: -0.045em; margin-bottom: 16px; }
h3 { font-size: 1.25rem; line-height: 1.25; margin-bottom: 10px; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.24rem); line-height: 1.8; max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 24px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; color: #5f5146; }
.trust-row span { background: rgba(255,255,255,.7); border: 1px solid var(--line); padding: 9px 12px; border-radius: 999px; }
.hero-visual { min-height: 570px; position: relative; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 999px; filter: blur(1px); opacity: 0.8; }
.orb-1 { width: 330px; height: 330px; background: rgba(245, 158, 11, 0.18); top: 36px; right: 20px; }
.orb-2 { width: 240px; height: 240px; background: rgba(127, 176, 105, 0.18); bottom: 38px; left: 12px; }
.cat-card, .floating-card, .matcher-card, .recommendation-panel, .category-card, .product-card, .article-card, .kit-panel, .cost-card, .cost-result, .solver-result, .value-card, .disclosure-card {
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.big-card { width: min(100%, 450px); border-radius: var(--radius-xl); padding: 22px; position: relative; z-index: 1; }
.cat-portrait { height: 270px; border-radius: 26px; background: linear-gradient(160deg, #ffe0a5, #fff7eb 55%, #dfeecd); display: grid; place-items: center; overflow: hidden; }
.cat-head { width: 162px; height: 132px; border-radius: 54% 54% 45% 45%; background: #fff7f0; position: relative; box-shadow: inset -16px -18px 0 rgba(234, 194, 141, 0.36); }
.cat-ear-left, .cat-ear-right { position: absolute; top: -38px; width: 66px; height: 66px; background: #fff7f0; transform: rotate(45deg); border-radius: 16px 10px 8px 10px; }
.cat-ear-left { left: 13px; } .cat-ear-right { right: 13px; }
.cat-eye { position: absolute; width: 18px; height: 18px; background: #3b332d; border-radius: 999px; top: 58px; }
.cat-eye.left { left: 48px; } .cat-eye.right { right: 48px; }
.cat-nose { position: absolute; width: 18px; height: 13px; background: #e59aa2; border-radius: 50% 50% 60% 60%; top: 78px; left: 50%; transform: translateX(-50%); }
.cat-mouth { position: absolute; width: 44px; height: 24px; border-bottom: 3px solid #5d5149; border-radius: 0 0 999px 999px; top: 85px; left: 50%; transform: translateX(-50%); }
.profile-content { padding: 22px 4px 2px; }
.profile-content p { color: var(--muted); line-height: 1.6; }
.tag, .score-pill, .mini-label { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 10px; font-size: 0.82rem; font-weight: 900; }
.tag { background: #fff1d7; color: var(--primary-dark); }
.tag.soft { background: #f5f7de; color: #62712e; }
.score-pill { background: #eaf4e1; color: #4f7a35; }
.mini-bars { display: grid; gap: 10px; margin-top: 18px; }
.mini-bars span, .cost-bars span { position: relative; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.8); padding: 8px 12px; font-size: .9rem; }
.mini-bars span::before, .cost-bars span::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, rgba(245,158,11,.24), rgba(127,176,105,.2)); z-index: -1; border-radius: inherit; }
.floating-card { position: absolute; z-index: 2; border-radius: 20px; padding: 16px; width: 230px; display: grid; gap: 6px; }
.floating-card span { color: var(--muted); line-height: 1.45; }
.food-card { left: 4px; top: 112px; } .score-card { right: 0; bottom: 76px; }

.quick-filter-panel { display: grid; grid-template-columns: minmax(220px, 0.34fr) 1fr; gap: 18px; align-items: center; margin: -12px 0 28px; padding: 20px; background: rgba(255,255,255,.68); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.quick-filter-copy h3 { margin: 6px 0 8px; font-size: 1.28rem; }
.quick-filter-copy p { margin: 0; color: var(--muted); line-height: 1.6; }
.quick-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; }
.chip, .kit-tab, .problem-card { border: 1px solid var(--line); background: rgba(255,255,255,.76); color: var(--text); border-radius: 999px; padding: 11px 16px; white-space: nowrap; font-weight: 800; transition: .18s ease; }
.chip.is-active, .kit-tab.is-active, .problem-card.is-active { background: #2f2924; color: #fff; border-color: #2f2924; box-shadow: 0 12px 26px rgba(47,41,36,.18); }
.section-heading { text-align: center; max-width: 760px; margin: 0 auto 36px; }
.section-heading p { color: var(--muted); line-height: 1.75; font-size: 1.06rem; }
.section-heading.split { display: flex; align-items: end; justify-content: space-between; gap: 20px; text-align: left; max-width: none; }
.text-link { font-weight: 900; color: var(--primary-dark); }
.soft-bg { width: min(calc(100% - 32px), 1260px); border-radius: 42px; background: linear-gradient(180deg, rgba(255,255,255,.64), rgba(255,241,223,.62)); border: 1px solid var(--line); margin-top: 40px; padding-left: 40px; padding-right: 40px; }

.value-grid, .category-grid, .product-grid, .article-grid { display: grid; gap: 18px; }
.value-grid { grid-template-columns: repeat(3, 1fr); }
.value-card { border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-soft); }
.value-card span { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #2f2924; color: #fff; font-weight: 900; margin-bottom: 16px; }
.value-card p, .category-card p, .product-card p, .article-card p { color: var(--muted); line-height: 1.65; }
.matcher-grid, .cost-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 22px; align-items: stretch; }
.matcher-card, .recommendation-panel, .cost-card, .cost-result { border-radius: var(--radius-xl); padding: 24px; }
.matcher-card, .cost-card { display: grid; gap: 14px; box-shadow: var(--shadow-soft); }
label { display: grid; gap: 8px; color: #574c43; font-weight: 900; }
select, input[type="number"] { width: 100%; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.9); padding: 14px 14px; color: var(--text); outline: none; }
select:focus, input[type="number"]:focus { border-color: rgba(245, 158, 11, .55); box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.panel-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.recommendation-panel h3 { font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -0.04em; }
.recommendation-panel p, .solver-result p, .kit-panel p, .cost-result p { color: var(--muted); line-height: 1.7; }
.recommend-list, .kit-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.recommend-list span, .kit-list span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; color: #5e5148; font-weight: 800; }

/* ช่องโฆษณา */
.ad-slot { width: 100%; max-width: 970px; margin: 0 auto; }
.ad-wrap { padding: 24px 20px; }
.ad-placeholder {
  min-height: 110px;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #fff6e9, #fff6e9 12px, #fdf0dd 12px, #fdf0dd 24px);
  border: 1px dashed rgba(197, 116, 5, 0.35);
  border-radius: var(--radius-md);
}
.ad-placeholder span { color: #b98a4a; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em; }
.ad-label { display: block; text-align: center; font-size: 0.65rem; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }

/* ปุ่มไปที่ร้านค้า พร้อมโลโก้ร้าน */
.shop-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.shop-logo { flex-shrink: 0; vertical-align: middle; border-radius: 5px; }
.related-cta .shop-logo { width: 15px; height: 15px; }

/* สินค้าจริงที่แทรกในแผงผลลัพธ์ Matcher / ชุดแนะนำ / Problem Solver */
.related-products { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.related-heading { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.related-product { display: flex; align-items: center; gap: 12px; background: var(--card-strong); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 14px; text-decoration: none; color: var(--text); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.related-product:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.related-thumb { flex: 0 0 48px; width: 48px; height: 48px; border-radius: var(--radius-sm); background-color: var(--bg-2); background-size: cover; background-position: center; }
.related-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.related-info strong { font-size: 0.9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-info small { color: var(--muted); font-weight: 700; }
.related-cta { flex-shrink: 0; color: var(--primary-dark); font-weight: 800; font-size: 0.85rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.note { background: rgba(127,176,105,.12); border: 1px solid rgba(127,176,105,.22); padding: 14px; border-radius: 18px; }
.budget-box { background: #2f2924; color: #fff; border-radius: 20px; padding: 16px; margin: 18px 0; }
.budget-box p { color: rgba(255,255,255,.78); margin: 6px 0 0; }
.category-grid { grid-template-columns: repeat(3, 1fr); }
.category-card { border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-soft); }
.category-icon { width: 54px; height: 54px; display: grid; place-items: center; background: #fff2de; border-radius: 18px; font-size: 1.5rem; margin-bottom: 18px; }

.kit-tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.kit-panel { border-radius: var(--radius-xl); padding: 28px; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 24px; align-items: center; box-shadow: var(--shadow-soft); }
.kit-panel h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.035em; }
.kit-list { margin: 0; }
.cost-result strong { display: block; font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: 1; letter-spacing: -0.06em; margin: 18px 0 14px; color: var(--primary-dark); }
.toggle-line { display: flex; grid-template-columns: 18px 1fr; align-items: center; gap: 10px; font-weight: 800; line-height: 1.5; }
.cost-bars { display: grid; gap: 10px; margin-top: 22px; }
.solver-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.problem-card { width: 100%; border-radius: 22px; text-align: left; padding: 18px; }
.solver-result { border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-soft); }
.solver-result h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.product-grid { grid-template-columns: repeat(4, 1fr); align-items: stretch; }
.product-card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.product-art { aspect-ratio: 1 / 1; position: relative; overflow: hidden; background: linear-gradient(135deg, #ffe3ae, #fff7ee); }
/* สินค้าที่มีรูปจริง: แสดงรูปเต็มใบไม่ครอป พื้นหลังขาว และซ่อนลายวงกลมตกแต่ง */
.product-art.has-image { background-color: #fff; background-size: contain; background-repeat: no-repeat; background-position: center; background-origin: content-box; padding: 12px; box-sizing: border-box; cursor: zoom-in; transition: transform 0.35s ease; }
.product-art.has-image::before, .product-art.has-image::after { display: none; }
/* ซูมรูปเมื่อชี้เมาส์เพื่อดูรายละเอียดชัดขึ้น */
.product-card:hover .product-art.has-image { transform: scale(1.35); }
.product-art::before, .product-art::after { content: ""; position: absolute; border-radius: 50%; }
.product-art::before { width: 130px; height: 130px; background: rgba(255,255,255,.58); right: 24px; top: 26px; }
.product-art::after { width: 80px; height: 80px; background: rgba(245,158,11,.32); left: 28px; bottom: 18px; }
.product-art.litter { background: linear-gradient(135deg, #e8f0dc, #fffdf5); }
.product-art.fountain { background: linear-gradient(135deg, #d9f1f6, #fff7ee); }
.product-art.toy { background: linear-gradient(135deg, #ffe6ef, #fff8dd); }
.product-art.brush { background: linear-gradient(135deg, #eee5ff, #fff8ef); }
.product-art.starter { background: linear-gradient(135deg, #ffe1bd, #e8f0dc); }
.product-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.product-body ul { padding-left: 18px; color: #5d5149; line-height: 1.65; margin: 8px 0 18px; }
.product-body .btn { margin-top: auto; width: fit-content; }
.tag-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.compare-section .table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-soft); }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { text-align: left; padding: 18px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
th { background: #2f2924; color: #fff; }
tr:last-child td { border-bottom: 0; }
.article-grid { grid-template-columns: repeat(3, 1fr); }
.article-card { border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-soft); display: block; text-decoration: none; color: var(--text); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.article-card span { color: var(--primary-dark); font-weight: 900; }
.disclosure-card { border-radius: 42px; padding: 34px; display: flex; align-items: center; justify-content: space-between; gap: 22px; background: linear-gradient(135deg, rgba(47,41,36,.96), rgba(92,69,45,.92)); color: #fff; }
.disclosure-card p { color: rgba(255,255,255,.78); line-height: 1.8; }
.disclosure-card .section-kicker { background: rgba(255,255,255,.14); color: #ffe2b1; border-color: rgba(255,255,255,.18); }
.site-footer { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; padding: 36px 0 54px; display: flex; justify-content: space-between; gap: 18px; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer strong { color: var(--text); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { font-weight: 800; color: #5d5149; }
.reveal { animation: fadeUp .7s both; }
.delay-1 { animation-delay: .12s; } .delay-2 { animation-delay: .22s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1200px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .site-header { border-radius: 24px; align-items: flex-start; flex-wrap: wrap; }
  .menu-toggle { display: grid; place-items: center; margin-left: auto; }
  .header-cta { display: none; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: flex-start; padding: 8px 4px 4px; }
  .site-header.is-open .nav { display: flex; }
  .hero, .matcher-grid, .cost-grid, .kit-panel { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 52px; }
  .hero-visual { min-height: 520px; }
  .value-grid, .category-grid, .product-grid, .article-grid, .solver-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading.split { display: block; text-align: center; }
  .quick-filter-panel { grid-template-columns: 1fr; }
  .soft-bg { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 640px) {
  .section-pad { padding: 64px 0; }
  .soft-bg { width: calc(100% - 16px); border-radius: 28px; }
  h1 { font-size: clamp(2.7rem, 14vw, 4.2rem); }
  .hero-actions, .trust-row { flex-direction: column; align-items: stretch; }
  .btn, .header-cta { width: 100%; }
  .floating-card { position: relative; width: 100%; left: auto; right: auto; top: auto; bottom: auto; margin-top: 10px; }
  .hero-visual { display: block; min-height: 0; }
  .big-card { width: 100%; }
  .value-grid, .category-grid, .product-grid, .article-grid, .solver-grid { grid-template-columns: 1fr; }
  .panel-top, .site-footer, .disclosure-card { flex-direction: column; align-items: flex-start; }
  .quick-filter-panel { padding: 16px; margin-top: -18px; border-radius: 22px; }
}
