/* Shared shell for public pages - KASA PROPERTY Luxury Navy & Champagne Gold */
:root {
  --shell-red: #C5A059;
  --shell-red-dark: #A8843F;
  --shell-navy: #0B1C33;
  --shell-navy-dark: #060F1C;
  --shell-text: #1E293B;
  --shell-muted: #64748B;
  --shell-line: #E2E8F0;
  --shell-bg: #F9F9FB;
  --shell-ease: cubic-bezier(.22, 1, .36, 1);
}
body { margin:0; background:var(--shell-bg); color:var(--shell-navy); font-family:"Fenice Std","Noto Serif Thai","Prompt","Inter",system-ui,serif; }
.site-shell-nav {
  height: 74px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  background: rgba(11, 28, 51, 0.96);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  border-bottom: 1px solid rgba(197, 160, 89, 0.22);
  transition: box-shadow .3s var(--shell-ease), background .3s ease;
}
.site-shell-nav.scrolled {
  background: #0B1C33;
  box-shadow: 0 8px 26px rgba(6, 15, 28, 0.35);
}
.site-shell-left,.site-shell-actions,.site-shell-brand { display:flex; align-items:center; }
.site-shell-left { min-width:0; gap:8px; }
.site-shell-brand { gap:8px; color:#C5A059; font-size:18px; font-weight:800; text-decoration:none; white-space:nowrap; transition:opacity .2s ease; }
.site-shell-brand:hover { opacity:.85; }
.site-shell-brand span { padding:4px 8px; border-radius:6px; background:linear-gradient(135deg,#C5A059,#A8843F); color:#0B1C33; box-shadow:0 2px 6px rgba(197,160,89,.3); transition:transform .3s var(--shell-ease), box-shadow .3s; }
.site-shell-brand:hover span { transform:translateY(-1px); box-shadow:0 4px 12px rgba(197,160,89,.4); }
.site-shell-menu { display:flex; gap:20px; margin-left:20px; }
.site-shell-menu a { position:relative; color:#CBD5E1; font-size:14px; font-weight:600; text-decoration:none; white-space:nowrap; transition:color .2s ease; }
.site-shell-menu a::after { content:""; position:absolute; left:0; right:100%; bottom:-4px; height:2px; border-radius:2px; background:#C5A059; transition:right .28s var(--shell-ease); }
.site-shell-menu a:hover { color:#C5A059; }
.site-shell-menu a:hover::after { right:0; }
.site-shell-actions { gap:12px; }
.site-shell-actions a { text-decoration:none; white-space:nowrap; font-size:14px; font-weight:700; transition:transform .25s var(--shell-ease), box-shadow .25s, background .2s, border-color .2s, color .2s; }
.site-shell-actions a:hover { transform:translateY(-1px); }
.site-shell-actions a:active { transform:translateY(0) scale(.97); }
.site-shell-outline { padding:8px 16px; border:1px solid rgba(255,255,255,0.22); border-radius:999px; color:#E2E8F0; background:rgba(255,255,255,0.06); }
.site-shell-outline:hover { border-color:#C5A059; color:#C5A059; background:rgba(197,160,89,0.12); }
.site-shell-primary { padding:9px 20px; border-radius:999px; background:linear-gradient(135deg,#C5A059,#A8843F); color:#0B1C33 !important; font-weight:800; box-shadow:0 4px 14px rgba(197,160,89,.35); }
.site-shell-primary:hover { background:linear-gradient(135deg,#D4AF67,#B58F48); box-shadow:0 6px 18px rgba(197,160,89,.45); }
.site-shell-menu-button { display:none; border:0; background:none; color:#C5A059; font-size:24px; cursor:pointer; border-radius:10px; padding:4px 8px; transition:background .2s ease; }
.site-shell-menu-button:hover { background:rgba(255,255,255,0.08); }
.site-shell-menu-button:active { transform:scale(.92); }
.site-shell-drawer { position:fixed; top:0; right:0; bottom:0; z-index:2001; width:min(310px,85vw); box-sizing:border-box; display:flex; flex-direction:column; justify-content:space-between; background:#fff; box-shadow:-4px 0 20px rgba(15,23,42,.16); transform:translateX(105%); transition:transform .38s var(--shell-ease); will-change:transform; visibility:hidden; }
.site-shell-drawer.open { transform:translateX(0); visibility:visible; }
.site-shell-drawer-head { height:72px; box-sizing:border-box; display:flex; align-items:center; justify-content:space-between; padding:12px 20px; border-bottom:1px solid var(--shell-line); }
.site-shell-close { border:0; background:none; color:var(--shell-muted); font-size:22px; cursor:pointer; border-radius:8px; width:38px; height:38px; transition:background .2s, color .2s, transform .25s var(--shell-ease); }
.site-shell-close:hover { background:#f1f5f9; color:var(--shell-navy); }
.site-shell-close:active { transform:rotate(90deg) scale(.9); }
.site-shell-drawer nav { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; }
/* มือถือ: เมนูยาวเกินจอให้เลื่อนขึ้นลงได้ทั้ง drawer */
@media (max-width: 640px) {
  .site-shell-drawer { justify-content:flex-start; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; }
  .site-shell-drawer nav { flex:0 0 auto; overflow:visible; }
  .site-shell-drawer-footer { position:static; }
  body.site-shell-drawer-open { overflow:hidden; }
}
.site-shell-drawer nav a { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #f1f5f9; color:var(--shell-navy); font-size:16px; font-weight:700; text-decoration:none; transition:background .2s ease, color .2s ease, padding-left .28s var(--shell-ease); }
.site-shell-drawer nav a:hover { background:#F9F5EC; color:#C5A059; padding-left:26px; }
.site-shell-drawer nav b { color:#94a3b8; transition:transform .28s var(--shell-ease), color .2s; }
.site-shell-drawer nav a:hover b { transform:translateX(3px); color:#C5A059; }
.site-shell-drawer-footer { display:grid; gap:12px; padding:20px; border-top:1px solid var(--shell-line); text-align:center; background:#0B1C33; }
.site-shell-drawer-footer>a:last-child { color:#CBD5E1; font-size:13px; font-weight:700; }
.site-shell-overlay { position:fixed; inset:0; z-index:2000; visibility:hidden; opacity:0; background:rgba(6,15,28,.65); backdrop-filter:blur(3px); transition:opacity .32s ease, visibility .32s; }
.site-shell-overlay.open { visibility:visible; opacity:1; }
.site-shell-page { min-height:calc(100vh - 74px); background:var(--shell-bg); }
.site-shell-content { width:min(1240px,calc(100% - 32px)); margin:0 auto; }
.site-shell-narrow { width:min(760px,calc(100% - 32px)); margin:0 auto; }
.site-shell-card { border:1px solid var(--shell-line); border-radius:14px; background:#fff; box-shadow:0 4px 18px rgba(11,28,51,.05); }
.site-shell-title { margin:0; color:var(--shell-navy); font-size:28px; font-family:"Prompt","Inter",system-ui,sans-serif; }
.site-shell-muted { color:var(--shell-muted); }
.site-shell-form-box { padding:32px; border-radius:16px; border:1px solid var(--shell-line); background:#fff; box-shadow:0 4px 20px rgba(11,28,51,.05); }
.site-shell-form-box label { color:var(--shell-text); font-weight:700; }
.site-shell-form-box input,.site-shell-form-box select,.site-shell-form-box textarea { box-sizing:border-box; width:100%; min-height:46px; margin-top:8px; border:1px solid #cbd5e1; border-radius:10px; background:#fff; color:var(--shell-navy); font:inherit; transition:border-color .2s, box-shadow .2s; }
.site-shell-form-box input,.site-shell-form-box select { padding:0 14px; }
.site-shell-form-box textarea { padding:14px; resize:vertical; }
.site-shell-form-box input:focus,.site-shell-form-box select:focus,.site-shell-form-box textarea:focus { outline:none; border-color:#C5A059; box-shadow:0 0 0 3px rgba(197,160,89,.22); }
.site-shell-primary-button { border:0; border-radius:10px; background:linear-gradient(135deg,#C5A059,#A8843F); color:#0B1C33; font-weight:800; cursor:pointer; padding:12px 24px; box-shadow:0 4px 14px rgba(197,160,89,.35); transition:transform .2s, box-shadow .2s; }
.site-shell-primary-button:hover { transform:translateY(-1px); box-shadow:0 6px 18px rgba(197,160,89,.45); }
.site-shell-footer { background:#071220; color:#cbd5e1; border-top:1px solid rgba(197,160,89,.25); }
.site-shell-footer-inner { width:min(1120px,calc(100% - 32px)); margin:0 auto; display:grid; grid-template-columns:2fr 1fr 1fr; gap:36px; padding:38px 0 28px; }
.site-shell-footer strong { display:block; margin-bottom:10px; color:#fff; }
.site-shell-footer p { max-width:520px; margin:0; font-size:14px; line-height:1.7; }
.site-shell-footer nav { display:grid; align-content:start; gap:8px; }
.site-shell-footer nav a { color:#cbd5e1; font-size:14px; text-decoration:none; }
.site-shell-footer nav a:hover { color:#fff; }
.site-shell-copy { width:min(1120px,calc(100% - 32px)); margin:0 auto; padding:18px 0; border-top:1px solid rgba(255,255,255,.08); color:#94a3b8; font-size:13px; }
/* ที่จอ 1366px เมนู 9 รายการ + 3 ปุ่ม (≈1200px) บวกโลโก้ (≈240px) เกินความกว้าง
   ทำให้ปุ่มท้ายแถบทับกันและหลุดขอบขวา → ยุบเป็น hamburger ตั้งแต่ 1200px */
@media (max-width:1200px) {
  .site-shell-nav { gap:12px; padding:12px 18px; }
  .site-shell-menu { gap:16px; margin-left:14px; }
  .site-shell-actions { gap:10px; }
  .site-shell-actions .site-shell-outline { padding:8px 13px; font-size:13px; }
  .site-shell-primary { padding:8px 16px; font-size:13px; }
}
@media (max-width:1100px) { .site-shell-menu,.site-shell-actions { display:none; } .site-shell-menu-button { display:block; } }
@media (max-width:992px) { .site-shell-menu,.site-shell-actions { display:none; } .site-shell-menu-button { display:block; } }
@media (max-width:768px) { .site-shell-nav { height:64px; padding:10px 16px; } .site-shell-footer-inner { grid-template-columns:1fr; gap:24px; } .site-shell-title { font-size:22px; } .site-shell-form-box { padding:20px; } }

/* ลื่นไหล: รายการเมนู drawer + การ์ดทั่วไป */
.site-shell-drawer nav a { animation:shell-drawer-item .4s var(--shell-ease) backwards; }
.site-shell-drawer.open nav a:nth-child(1){animation-delay:.04s}.site-shell-drawer.open nav a:nth-child(2){animation-delay:.08s}.site-shell-drawer.open nav a:nth-child(3){animation-delay:.12s}.site-shell-drawer.open nav a:nth-child(4){animation-delay:.16s}.site-shell-drawer.open nav a:nth-child(5){animation-delay:.2s}.site-shell-drawer.open nav a:nth-child(6){animation-delay:.24s}.site-shell-drawer.open nav a:nth-child(7){animation-delay:.28s}.site-shell-drawer.open nav a:nth-child(8){animation-delay:.32s}.site-shell-drawer.open nav a:nth-child(n+9){animation-delay:.36s}
@keyframes shell-drawer-item { from { opacity:0; transform:translateX(16px); } to { opacity:1; transform:translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .site-shell-nav, .site-shell-brand, .site-shell-brand span, .site-shell-menu a::after, .site-shell-actions a, .site-shell-menu-button, .site-shell-drawer, .site-shell-close, .site-shell-drawer nav a, .site-shell-drawer nav b, .site-shell-overlay { transition:none !important; animation:none !important; }
}


/* Responsive boundary protection for shared public-page shell. */
html { width:100%; max-width:100%; overflow-x:clip; }
body { width:100%; min-width:320px; max-width:100%; overflow-wrap:anywhere; }
.site-shell-nav, .site-shell-left, .site-shell-actions, .site-shell-content, .site-shell-narrow,
.site-shell-footer-inner, .site-shell-copy, .site-shell-form-box, .site-shell-card { min-width:0; }
.site-shell-content, .site-shell-narrow { width:min(100% - 32px, 1240px); }
.site-shell-menu, .site-shell-actions { min-width:0; }
.site-shell-footer-inner, .site-shell-copy { width:min(100% - 32px,1120px); }
.site-shell-form-box input, .site-shell-form-box select, .site-shell-form-box textarea,
.site-shell-form-box button { max-width:100%; }
@media (max-width:768px) {
  .site-shell-nav { padding-right:12px; padding-left:12px; }
  .site-shell-left { flex:1 1 auto; }
  .site-shell-brand { min-width:0; }
  .site-shell-brand img { max-width:min(46vw,170px); height:auto; }
  .site-shell-footer-inner { padding-top:28px; }
  .site-shell-form-box { padding:clamp(16px,5vw,22px); }
}
@media (max-width:360px) {
  .site-shell-content, .site-shell-narrow, .site-shell-footer-inner, .site-shell-copy { width:calc(100% - 24px); }
  .site-shell-title { font-size:20px; }
}
