*{box-sizing:border-box}
:root{--gold:#8a6d14;--gold2:#e8c766;--ink:#111;--muted:#595959;--line:#00833c}
body{margin:0;font-family:"Prompt","Noto Sans Thai","Sukhumvit Set","Leelawadee UI",Tahoma,system-ui,sans-serif;color:var(--ink);background:#fff;line-height:1.5}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.wrap{max-width:1100px;margin:0 auto;padding:0 16px}
header.top{position:sticky;top:0;z-index:10;background:#fff;border-bottom:1px solid #eee}
header.top .wrap{display:flex;align-items:center;justify-content:space-between;height:64px;gap:12px}
.logo{display:flex;flex-direction:column;justify-content:center;min-height:44px;line-height:1.1}
.logo b{font-size:20px;color:var(--gold)}
.logo small{font-size:11px;color:var(--muted)}
.btn-line{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--line);color:#fff;font-weight:600;border-radius:26px;padding:0 20px;min-height:44px}
.btn-line.big{width:100%;min-height:52px;font-size:17px}
.search{margin:12px 0}
.search input{width:100%;height:46px;border:1px solid #ccc;border-radius:23px;padding:0 18px;font:inherit;font-size:15px}
.hero{background:#111;color:#fff;border-radius:16px;padding:28px 22px;margin:4px 0 8px}
.hero span{color:var(--gold2);font-size:13px;letter-spacing:1px}
.hero h1{margin:6px 0;font-size:28px;line-height:1.25}
.hero p{margin:0;color:#ddd;font-size:14px}
.sr{position:absolute;left:-9999px}
.layout{display:grid;grid-template-columns:104px minmax(0,1fr);gap:12px;align-items:start;padding-top:12px}
@media(min-width:800px){.layout{grid-template-columns:200px minmax(0,1fr);gap:24px}}
.layout main{min-width:0}
.layout .search{margin-top:0}
.catbar{position:sticky;top:76px}
.side-h{font-size:15px;margin:4px 0 8px}
.chips{display:flex;flex-direction:column;gap:6px}
.chips button{width:100%;text-align:left;min-height:44px;padding:8px 12px;border-radius:10px;border:0;background:#f1f1f1;font:inherit;font-size:14px;line-height:1.3;cursor:pointer}
.chips button[aria-pressed="true"]{background:#111;color:#fff}
h2.sec{font-size:19px;margin:14px 0 10px}
.grid:empty{min-height:560px}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-bottom:28px}
@media(min-width:800px){.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}}
@media(min-width:1100px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.card{display:flex;flex-direction:column;gap:6px}
.card .ph{aspect-ratio:3/4;border-radius:12px;overflow:hidden;background:#f4e9d8;position:relative}
.card .ph img{width:100%;height:100%;object-fit:cover}
.tag{position:absolute;top:8px;left:8px;background:#b03a2e;color:#fff;font-size:12px;padding:2px 8px;border-radius:10px}
.card .nm{font-size:14px;line-height:1.35}
.price{font-weight:700;font-size:17px}
.old{color:#6b6b6b;text-decoration:line-through;font-size:13px;margin-left:6px;font-weight:400}
footer{background:#111;color:#ccc;padding:28px 0;font-size:14px}
footer b{color:var(--gold2);font-size:17px}
.crumb{font-size:13px;color:var(--muted);padding:12px 0}
.pd{display:grid;gap:20px}
@media(min-width:800px){.pd{grid-template-columns:1fr 1fr;align-items:start}}
.pd .ph{aspect-ratio:1/1;border-radius:16px;overflow:hidden;background:#f4e9d8}
.pd .ph img{width:100%;height:100%;object-fit:cover}
.pd h1{font-size:22px;margin:0 0 6px;line-height:1.35}
.pd .price{font-size:28px;color:#b03a2e}
.opt{margin:14px 0}
.opt b{display:block;font-size:14px;margin-bottom:6px}
.opt span{display:inline-block;border:1px solid #111;border-radius:10px;padding:8px 14px;margin:0 6px 6px 0;font-size:14px}
.desc{white-space:pre-line;color:#333}
.stock{color:#2e7d32;font-size:13px}
.sticky-buy{position:sticky;bottom:0;background:#fff;border-top:1px solid #eee;padding:12px 0;margin-top:20px}
.empty{padding:40px 0;color:var(--muted);text-align:center}
#product{min-height:100vh}
.topnav{display:flex;gap:4px;margin-left:auto}
.topnav a{display:flex;align-items:center;min-height:44px;padding:0 10px;font-size:15px;border-radius:10px}
.topnav a:hover{background:#f3f3f3}
@media(max-width:420px){header.top .btn-line{padding:0 12px;font-size:14px}.topnav a{padding:0 6px;font-size:14px}}
.reviews{padding-bottom:20px}
.rv-track{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;padding-bottom:8px;scrollbar-width:thin}
.rv{flex:0 0 72%;max-width:320px;scroll-snap-align:start;margin:0;border:3px solid #1a9e85;border-radius:12px;overflow:hidden;background:#fff}
@media(min-width:800px){.rv{flex-basis:30%}}
.rv img{width:100%;aspect-ratio:3/4;object-fit:cover;object-position:top}
.rv figcaption{font-size:13px;padding:6px 10px;color:#333}
.alist{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));padding-bottom:12px}
.acard{display:flex;flex-direction:column;gap:6px;border:1px solid #eee;border-radius:12px;overflow:hidden;background:#fff}
.acard .ph{aspect-ratio:16/9;background:#f4e9d8}
.acard .ph img{width:100%;height:100%;object-fit:cover}
.acard b{font-size:16px;padding:0 12px;line-height:1.4}
.acard p{margin:0;padding:0 12px 12px;font-size:14px;color:#4a4a4a}
.acard time{font-size:12px;color:#595959;padding:8px 12px 0}
.more{text-decoration:underline;color:#6b5212}
.article{max-width:760px;margin:0 auto;padding-bottom:40px}
.article h1{font-size:26px;line-height:1.3;margin:6px 0}
.article .cover{border-radius:14px;overflow:hidden;aspect-ratio:16/9;background:#f4e9d8;margin:14px 0}
.article .cover img{width:100%;height:100%;object-fit:cover}
.article .body{font-size:17px;line-height:1.8;color:#222}
.article .body h2{font-size:21px;margin:26px 0 8px}
.article .body a{color:#6b5212;text-decoration:underline}
#statsBox iframe{width:100%;height:480px;border:0;border-radius:12px}
.logo-img{height:44px;width:auto;max-width:180px;object-fit:contain}
.banner{margin:4px 0 8px}
.banner img{width:100%;height:auto;border-radius:16px;display:block}
.btn-line{white-space:nowrap}
@media(max-width:480px){.logo-img{height:36px;max-width:110px}}
/* หน้าแรก: รีวิว/บทความ 2 แถว สลับอัตโนมัติ */
.fade{transition:opacity .25s ease}
.rv-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media(min-width:800px){.rv-grid{gap:16px;max-width:560px}}
.rv-grid .rv{max-width:none;flex:none}
.alist.home{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media(min-width:800px){.alist.home{gap:16px}}
.dots{display:flex;justify-content:center;gap:4px;padding:10px 0 4px}
.dots button{width:44px;height:28px;border:0;background:none;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.dots button::after{content:"";width:10px;height:10px;border-radius:5px;background:#ccc;transition:all .2s}
.dots button[aria-current="true"]::after{width:24px;background:#111}
/* มือถือ: จัดหน้าแรกให้ดูง่าย */
@media(max-width:699px){
  .layout{grid-template-columns:minmax(0,1fr);gap:0;padding-top:8px}
  .catbar{position:static;margin-bottom:6px}
  .catbar .side-h{display:none}
  .chips{flex-direction:row;overflow-x:auto;gap:8px;padding:2px 0 6px;scrollbar-width:none}
  .chips::-webkit-scrollbar{display:none}
  .chips button{width:auto;flex:none;white-space:nowrap;border-radius:22px;padding:8px 16px}
  .search{margin:6px 0 10px}
  .hero{padding:20px 18px;border-radius:14px}
  .hero h1{font-size:22px}
  .banner img{border-radius:12px}
  h2.sec{font-size:17px;margin:16px 0 8px}
  .card .nm{font-size:13px}
  .price{font-size:16px}
  .alist.home .acard p{display:none}
  .alist.home .acard b{font-size:14px;padding:0 10px 10px}
  .alist.home .acard time{padding:6px 10px 0;font-size:11px}
  header.top .wrap{height:58px}
  footer{padding:22px 0}
}
.rv img{height:auto}
@media(max-width:699px){
  .logo b{font-size:17px;white-space:nowrap}
  .logo small{display:none}
  .topnav a{padding:0 6px;font-size:14px}
  header.top .btn-line{padding:0 12px;font-size:14px;min-height:40px}
}
@media(max-width:360px){.topnav a:first-child{display:none}}
.more-sentinel{height:1px}
/* แกลเลอรีรูปสินค้า */
.gal{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;border-radius:16px;background:#f4e9d8;scrollbar-width:none;aspect-ratio:1/1}
.gal::-webkit-scrollbar{display:none}
.gal img{flex:0 0 100%;width:100%;height:100%;object-fit:cover;scroll-snap-align:start}
.gal-main{aspect-ratio:1/1;border-radius:16px;overflow:hidden;background:#f4e9d8}
.gal-main img{width:100%;height:100%;object-fit:cover}
.thumbs{display:flex;gap:8px;padding-top:8px;overflow-x:auto}
.thumbs button{flex:none;width:64px;height:64px;padding:0;border:2px solid transparent;border-radius:10px;overflow:hidden;cursor:pointer;background:#f4e9d8}
.thumbs button[aria-current="true"]{border-color:#111}
.thumbs img{width:100%;height:100%;object-fit:cover}
/* แชร์ */
.share{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px;font-size:14px}
.share a,.share button{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:22px;border:1px solid #ddd;background:#fff;font:inherit;font-size:14px;cursor:pointer}
/* สินค้าที่คล้ายกัน */
.related{padding:10px 0 30px}
.grid.rel{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:800px){.grid.rel{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* footer links */
.flinks{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:10px}
.flinks a{display:inline-flex;align-items:center;min-height:44px;color:#ddd;text-decoration:underline}
/* หน้าข้อมูล */
.page{max-width:760px;margin:0 auto;padding-bottom:40px;min-height:60vh}
.page h1{font-size:26px;margin:6px 0 12px}
.page .body{font-size:16px;line-height:1.8}
.page .body h2{font-size:19px;margin:22px 0 6px}
/* คุกกี้ */
.cookie{position:fixed;left:12px;right:12px;bottom:12px;z-index:60;background:#111;color:#eee;border-radius:14px;padding:14px 16px;display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;box-shadow:0 8px 30px #0004;max-width:760px;margin:0 auto}
.cookie p{margin:0;font-size:14px;flex:1 1 260px}
.cookie a{color:#e8c766;text-decoration:underline}
.cookie div{display:flex;gap:8px}
.cookie button{min-height:44px;padding:0 18px;border-radius:22px;border:0;font:inherit;font-size:14px;cursor:pointer}
.ck-yes{background:#e8c766;color:#111;font-weight:700}.ck-no{background:#333;color:#eee}
.callout{margin:0 0 14px;padding:10px 14px;background:#fff4d6;border-radius:10px;font-size:14px}

.promo{position:relative;width:100%;margin:4px 0 14px;border-radius:16px;overflow:hidden;background:#f3f3f3;aspect-ratio:var(--ar,4);max-height:min(60vh,460px)}
.promo .pslide{display:none;height:100%}.promo .pslide.on{display:block}
.promo a,.promo picture{display:block;height:100%}
.promo img{width:100%;height:100%;object-fit:contain;display:block}
.pdots{position:absolute;left:0;right:0;bottom:8px;display:flex;gap:2px;justify-content:center}
.pdots button{width:24px;height:24px;border:0;padding:0;background:none;cursor:pointer;display:grid;place-items:center}
.pdots button::before{content:"";width:9px;height:9px;border-radius:50%;background:#fffa;box-shadow:0 0 0 1px #0006}
.pdots button.on::before{background:#fff}
@media(max-width:699px){.promo{border-radius:12px;margin:2px 0 12px;aspect-ratio:var(--arm,var(--ar,2));max-height:75vh}}
@media(max-width:480px){.logo b{font-size:15px;white-space:normal;line-height:1.15}.topnav a:first-child{display:none}header.top .wrap{gap:8px}}
@media(max-width:380px){.logo b{font-size:14px;white-space:nowrap}header.top .btn-line{padding:0 10px;font-size:13px}.topnav a{padding:0 4px;font-size:13px}}
@media(max-width:340px){.topnav{display:none}}
