/* ส่วนเสริมสำหรับ โฮมเพจ / นโยบาย / แอดมิน (ใช้ร่วมกับ style.css) */
.topbar .topnav a.on { color: var(--text); background: var(--fill); }

/* hero โฮมเพจ */
.home-hero { position: relative; isolation: isolate; min-height: 92svh; display: flex; align-items: center; padding: 120px 0 70px; overflow: hidden; }
.home-hero .hero-bg { position: absolute; inset: 0; z-index: -1; }
.home-hero .hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; animation: heroZoom 26s ease-in-out infinite alternate; }
@keyframes heroZoom { from { transform: scale(1.02); } to { transform: scale(1.1) translateX(-1.5%); } }
.home-hero .hero-bg::after { content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,13,20,.82) 0%, rgba(11,13,20,.55) 34%, rgba(11,13,20,.08) 62%, transparent 75%),
    linear-gradient(180deg, rgba(11,13,20,.45) 0%, transparent 22%, transparent 70%, var(--bg) 100%); }
.home-hero .lead { text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.home-hero h1 { text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.home-hero .trust span { color: rgba(245,245,247,.86); text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.home-hero h1 { font-size: clamp(44px, 8vw, 96px); line-height: 1.02; letter-spacing: -.035em; font-weight: 900; margin: 18px 0 16px; }
.home-hero h1 .grad { background: linear-gradient(120deg, #a8f0a0, #30d158 45%, #2dd4bf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero .lead { font-size: clamp(17px, 2.1vw, 21px); color: rgba(245,245,247,.82); max-width: 36ch; margin: 0 0 30px; }
.brandline { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.brandline img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 8px 24px rgba(48,209,88,.35); }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; color: var(--text-2); font-size: 15px; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--leaf); }

/* ประกาศ */
.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lcard { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--r-xl); overflow: hidden; transition: transform .45s var(--ease), box-shadow .3s; }
.lcard:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.lcard .ph { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-2); }
.lcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.lcard:hover .ph img { transform: scale(1.06); }
.lcard .badge { position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--red); color: #fff; }
.lcard .badge.g { background: rgba(17,19,28,.75); border: 1px solid var(--hair-2); left: auto; right: 12px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lcard .bd { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lcard h3 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; }
.lcard .loc { color: var(--text-2); font-size: 14px; display: flex; gap: 6px; align-items: center; }
.lcard .loc svg { width: 15px; height: 15px; flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--fill); color: var(--text-2); }
.lcard .ft { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hair); }
.lcard .price { font-size: 20px; font-weight: 900; }
.lcard .go { font-size: 14px; font-weight: 700; color: var(--green); }
.lcard.empty { border: 1.5px dashed var(--hair-2); background: transparent; box-shadow: none; align-items: center; justify-content: center; text-align: center; padding: 32px; min-height: 320px; gap: 12px; }
.lcard.empty .plus { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: rgba(48,209,88,.14); color: var(--green); }
.lcard.empty .plus svg { width: 30px; height: 30px; }
.lcard.empty p { margin: 0; color: var(--text-2); }

/* ขั้นตอน */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.step { padding: 26px; border-radius: var(--r-lg); position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 18px; right: 22px; font-size: 64px; font-weight: 900; line-height: 1; color: rgba(255,255,255,.06); }
.step h3 { margin: 14px 0 6px; font-size: 19px; font-weight: 800; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }

/* ฟอร์ม */
.sell-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 14px; align-items: start; }
.sell-aside { padding: 30px; border-radius: var(--r-xl); position: sticky; top: 90px; }
.sell-aside h3 { font-size: 24px; margin: 0 0 10px; font-weight: 800; }
.sell-aside p { color: var(--text-2); margin: 0 0 18px; }
.form { padding: 28px; border-radius: var(--r-xl); display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; color: var(--text-2); }
.field label .req { color: #ff7a70; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--text); background: rgba(10, 12, 18, .55);
  border: 1px solid var(--hair-2); border-radius: 14px; padding: 12px 14px; outline: none; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(48,209,88,.7); box-shadow: 0 0 0 4px rgba(48,209,88,.15); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { cursor: pointer; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--hair-2); background: rgba(10,12,18,.4); font-size: 15px; font-weight: 700; color: var(--text-2); transition: all .2s; }
.chips input:checked + label { background: rgba(48,209,88,.18); border-color: rgba(48,209,88,.6); color: #b8f5c4; }
.chips input:focus-visible + label { box-shadow: 0 0 0 4px rgba(48,209,88,.2); }
.consent { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(10,12,18,.4); border: 1px solid var(--hair); font-size: 14.5px; color: var(--text-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #30d158; flex: none; }
.consent a { color: var(--text); }
.form .actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form .btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.6); }
.form .lockmsg { font-size: 13.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.form .lockmsg svg { width: 15px; height: 15px; }
.form .err { grid-column: 1 / -1; color: #ff8a80; font-size: 14.5px; min-height: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { grid-column: 1 / -1; text-align: center; padding: 30px 10px; }
.done .ok { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: rgba(48,209,88,.18); color: var(--green); }
.done .ok svg { width: 36px; height: 36px; }
.done h3 { font-size: 24px; margin: 0 0 6px; }
.done p { color: var(--text-2); margin: 0 0 20px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r-lg); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--text-2); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--text-2); }

/* ส่วนท้ายเว็บ (ใช้ทุกหน้า) */
.site-foot { border-top: 1px solid var(--hair); margin-top: 40px; padding: 48px 0 120px; color: var(--text-2); font-size: 14.5px; text-align: left; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-foot h4 { margin: 0 0 12px; color: var(--text); font-size: 15px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { color: var(--text-2); text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.site-foot .brandline { margin-bottom: 12px; color: var(--text); }
.site-foot .brandline img { width: 36px; height: 36px; border-radius: 10px; }
.site-foot .bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-3); }
.site-foot .bottom a { color: var(--text-2); }

/* หน้านโยบาย */
.doc { max-width: 820px; margin: 0 auto; padding: 120px 16px 40px; }
.doc h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -.02em; margin: 8px 0 6px; font-weight: 900; line-height: 1.15; }
.doc .upd { color: var(--text-3); font-size: 14px; margin-bottom: 28px; }
.doc .card { padding: 8px 28px 20px; border-radius: var(--r-xl); }
.doc h2 { font-size: 21px; margin: 26px 0 8px; font-weight: 800; }
.doc p, .doc li { color: var(--text-2); }
.doc ul { padding-left: 22px; }
.doc a { color: var(--text); }
.doc .toc { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.doc .toc a { text-decoration: none; padding: 7px 14px; border-radius: 999px; background: var(--fill); font-size: 14px; font-weight: 700; color: var(--text-2); }
.doc .toc a.on { background: rgba(255,255,255,.92); color: #0b0d14; }

@media (max-width: 960px) {
  .listings { grid-template-columns: repeat(2, 1fr); }
  .sell-grid { grid-template-columns: 1fr; }
  .sell-aside { position: static; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .site-foot .cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .home-hero { min-height: 100svh; align-items: flex-end; padding: 110px 0 40px; }
  .home-hero .hero-bg img { object-position: 74% 50%; }
  .home-hero .hero-bg::after { background: linear-gradient(180deg, rgba(11,13,20,.55) 0%, rgba(11,13,20,.05) 26%, rgba(11,13,20,.35) 50%, rgba(11,13,20,.9) 78%, var(--bg) 100%); }
}
@media (max-width: 640px) {
  .listings, .steps { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; padding: 20px; }
  .doc .card { padding: 4px 18px 16px; }
}

[hidden] { display: none !important; }
.logo span:last-child { white-space: nowrap; }
.btn { white-space: nowrap; }
.ts-box { grid-column: 1 / -1; min-height: 65px; }
