* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; color: #222; background: #fafafa; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.site-header { background: #1a1025; color: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { color: #ffd166; font-weight: 700; font-size: 1.4rem; text-decoration: none; }
.brand img { max-height: 44px; }
.main-nav { display: flex; gap: 18px; }
.main-nav a { color: #fff; text-decoration: none; font-size: 0.95rem; }
.nav-toggle { display: none; background: none; border: 1px solid #fff; color: #fff; font-size: 1.2rem; padding: 4px 10px; }

.hero-slider { width: 100%; background: #2d1b46; color: #fff; text-align: center; padding: 90px 16px; }
.home-section { margin: 28px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 10px; }
.card-thumb { aspect-ratio: 16/9; background: #eee; display: flex; align-items: center; justify-content: center; border-radius: 6px; margin-bottom: 8px; }

/* แบนเนอร์โฆษณาคั่นกลาง */
.ad-banner-slot { margin: 24px 0; text-align: center; }
.ad-desktop { max-width: 960px; height: 150px; margin: 0 auto; background: #eaeaea; display: flex; align-items: center; justify-content: center; }
.ad-mobile-grid { display: none; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ad-mobile-col { aspect-ratio: 1/1; background: #eaeaea; display: flex; align-items: center; justify-content: center; }

/* Chaty ลอยมุมจอ */
.chaty-widget { position: fixed; right: 16px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.chaty-btn { width: 48px; height: 48px; border-radius: 50%; background: #ff9f1c; color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 3px 10px rgba(0,0,0,.2); }

.site-footer { background: #1a1025; color: #ccc; padding: 24px 0; margin-top: 40px; text-align: center; }

@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; }
  .main-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #1a1025; padding: 16px; }
  .main-nav.open { display: flex; }
}

@media (max-width: 640px) {
  .ad-desktop { display: none; }
  .ad-mobile-grid { display: grid; }
}
