/* Soundspace — header 3 ชั้น (util / contact / navbar) · scoped #ss-header
   CSS var จาก config: --ss-brand --ss-accent --ss-line --ss-ink */

.ss-site { font-family: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ss-ink, #222); }
.ss-skip { position: absolute; left: -9999px; }
.ss-skip:focus { left: 12px; top: 12px; z-index: 100000; background: #fff; padding: 8px 14px; border-radius: 6px; }

/* ============ ชั้น 1: utility ============ */
.ss-util { background: #2a2a2a; color: #cfcfcf; font-size: 13px; }
.ss-util__inner { max-width: 1200px; margin: 0 auto; padding: 6px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ss-util__tag { opacity: .85; }
.ss-util__login { color: #e6e6e6; text-decoration: none; }
.ss-util__login:hover { color: #fff; text-decoration: underline; }

/* ============ ชั้น 2: contact (โลโก้ + เบอร์ + LINE) ============ */
.ss-contact { background: #fff; }
.ss-contact__inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ss-logo { flex: 0 0 auto; }
.ss-logo img { max-height: 88px; width: auto; display: block; }
.ss-logo__text { font-size: 38px; font-weight: 800; color: var(--ss-brand, #8a7f3d); text-decoration: none; }

.ss-contact__blocks { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: flex-end; }

.ss-cblock { display: flex; align-items: center; gap: 9px; }
.ss-cblock__ico { flex: 0 0 auto; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid #e6e6e6; color: var(--ss-brand, #8a7f3d); }
.ss-cblock__ico--hot { color: #1a73e8; }
.ss-cblock__ico svg { width: 17px; height: 17px; }
.ss-cblock__body { display: flex; flex-direction: column; line-height: 1.3; }
.ss-cblock__label { font-size: 11px; color: #888; }
.ss-cblock__nums { display: flex; flex-direction: column; }
.ss-cblock__nums a { color: var(--ss-accent, #e23b2e); font-weight: 700; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.ss-cblock__ico--hot ~ .ss-cblock__body .ss-cblock__nums a { color: #1a73e8; }
.ss-cblock__nums a:hover { text-decoration: underline; }

.ss-line-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ss-line, #06c755); color: #fff !important; padding: 9px 18px; border-radius: 26px; text-decoration: none; transition: filter .15s; }
.ss-line-btn:hover { filter: brightness(.94); }
.ss-line-btn__ico { display: flex; }
.ss-line-btn__txt { display: flex; flex-direction: column; line-height: 1.15; }
.ss-line-btn__txt b { font-size: 15px; }
.ss-line-btn__txt small { font-size: 11px; opacity: .9; }

/* ============ ชั้น 3: navbar (sticky) ============ */
.ss-navbar { background: #897C4F; border-bottom: 1px solid rgba(0,0,0,.12); position: sticky; top: 0; z-index: 999; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.ss-navbar__inner { max-width: 1200px; margin: 0 auto; padding: 6px 20px; display: flex; align-items: center; gap: 20px; }
.ss-navbar__logo { display: none; }              /* โชว์เฉพาะมือถือ */
.ss-navbar__logo img { max-height: 40px; width: auto; display: block; }
.ss-navbar__logo .ss-logo__text { font-size: 20px; }

/* เมนูหลัก (desktop) */
.ss-nav { flex: 1 1 auto; }
.ss-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.ss-menu li { position: relative; }
.ss-menu a { display: block; padding: 12px 14px; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; border-radius: 6px; transition: color .15s, background .15s; }
.ss-menu a:hover, .ss-menu .current-menu-item > a, .ss-menu .current-menu-parent > a { color: #fff; background: rgba(0,0,0,.18); }
.ss-menu .sub-menu { position: absolute; left: 0; top: 100%; min-width: 210px; background: #fff; border: 1px solid #eee; border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 6px; margin: 0; list-style: none; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; z-index: 1000; }
.ss-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
/* submenu = พื้นขาว → ตัวหนังสือเข้ม (ไม่ inherit สีขาวจาก nav ทอง) */
.ss-menu .sub-menu a { font-size: 14px; padding: 8px 12px; font-weight: 500; color: var(--ss-ink, #222); }
.ss-menu .sub-menu a:hover { color: var(--ss-brand, #8a7f3d); background: #faf8f0; }

/* ค้นหา + burger */
.ss-navbar__right { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.ss-search { display: flex; align-items: center; background: #f4f4f4; border: 1px solid #e6e6e6; border-radius: 24px; overflow: hidden; }
.ss-search__input { border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; -webkit-appearance: none; appearance: none; margin: 0; padding: 9px 14px; font: inherit; font-size: 14px; width: 190px; }
.ss-search__input:focus { border: 0 !important; box-shadow: none !important; outline: none; }
.ss-search__input::-webkit-search-decoration, .ss-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ss-search__btn { border: 0; background: transparent; padding: 0 12px; color: #888; cursor: pointer; display: flex; align-items: center; }
.ss-search__btn:hover { color: var(--ss-brand, #8a7f3d); }

.ss-burger { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; cursor: pointer; padding: 0; color: var(--ss-ink, #222); -webkit-tap-highlight-color: transparent; }
.ss-burger:hover, .ss-burger:focus, .ss-burger:active { background: #897E3C !important; border-color: #897E3C !important; outline: none; box-shadow: none; }
.ss-burger span { width: 22px; height: 2px; background: var(--ss-ink, #222) !important; border-radius: 2px; transition: .2s; }
.ss-burger:hover span, .ss-burger:focus span, .ss-burger:active span { background: #fff !important; }
.ss-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ss-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ss-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* LINE icon ขวาสุด navbar (มือถือ) + แถบค้นหาเต็มกว้าง (มือถือ) — base ซ่อนบน desktop */
.ss-navbar__line { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; background: var(--ss-line, #06c755); color: #fff; flex: 0 0 auto; }
.ss-navbar__line svg { width: 22px; height: 22px; }
.ss-msearch { display: none; }

/* ============ เมนูมือถือ ============ */
.ss-mobile { background: #fff; border-bottom: 1px solid #ececec; padding: 14px 20px; }
.ss-mobile[hidden] { display: none; }
.ss-mmenu { list-style: none; margin: 0; padding: 0; }
.ss-mmenu li { border-bottom: 1px solid #f2f2f2; }
.ss-mmenu a { display: block; padding: 13px 4px; color: var(--ss-ink, #222); text-decoration: none; font-weight: 600; }
.ss-mmenu .sub-menu { list-style: none; margin: 0; padding: 0 0 6px 16px; }
.ss-mmenu .sub-menu a { padding: 9px 4px; font-size: 14px; color: #555; font-weight: 500; }

/* เบอร์โทรในเมนูมือถือ (จัดกลุ่ม Call Center / Hotline) */
.ss-mobile__contact { margin-top: 16px; padding-top: 16px; border-top: 1px solid #eee; }
.ss-mcontact-group { margin-bottom: 14px; }
.ss-mcontact-label { display: block; font-size: 11px; color: #999; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px; }
.ss-mobile__contact a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ss-accent, #e23b2e); font-weight: 700; font-size: 16px; padding: 7px 0; }
.ss-mobile__contact a svg { width: 18px; height: 18px; flex: 0 0 auto; }
.ss-mcontact-group:nth-of-type(2) a, .ss-mcontact-group:nth-of-type(2) a svg { color: #1a73e8; }
.ss-mobile__line { justify-content: center; color: #fff !important; background: var(--ss-line, #06c755); border-radius: 10px; padding: 13px !important; margin-top: 8px; }
.ss-mobile__line svg { color: #fff; }

/* ============ vertical categories (flyout ออกขวา) ============ */
.ss-vmenu { position: relative; border: 1px solid #e6e6e6; border-radius: 10px; background: #fff; }
.ss-vmenu__head { background: #2a2a2a; color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .4px; text-transform: uppercase; padding: 14px 18px; border-radius: 10px 10px 0 0; }
.ss-vmenu__list { list-style: none; margin: 0; padding: 0; }
.ss-vmenu__list > li { position: relative; border-bottom: 1px solid #f0f0f0; }
.ss-vmenu__list > li:last-child { border-bottom: 0; }
.ss-vmenu__list > li > a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 18px; color: var(--ss-ink, #222); text-decoration: none; font-size: 15px; transition: background .12s, color .12s; }
.ss-vmenu__list > li.menu-item-has-children > a::after { content: "›"; color: #bbb; font-size: 18px; line-height: 1; }
.ss-vmenu__list > li:hover > a { background: #2a2a2a; color: #fff; }
.ss-vmenu__list > li:hover > a::after { color: #fff; }
.ss-vmenu__list .sub-menu { list-style: none; margin: 0; padding: 10px 0; position: absolute; left: 100%; top: -1px; min-width: 260px; min-height: calc(100% + 2px); background: #fff; border: 1px solid #e6e6e6; border-left: 3px solid var(--ss-brand, #8a7f3d); border-radius: 0 8px 8px 0; box-shadow: 0 14px 34px rgba(0,0,0,.14); opacity: 0; visibility: hidden; transform: translateX(6px); transition: opacity .15s, transform .15s; z-index: 100; }
.ss-vmenu__list > li:hover > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.ss-vmenu__list .sub-menu a { display: block; padding: 9px 20px; color: #444; text-decoration: none; font-size: 14px; position: relative; }
.ss-vmenu__list .sub-menu a:hover { color: var(--ss-brand, #8a7f3d); background: #faf8f0; }

/* ============ responsive ============ */
@media (max-width: 980px) {
	.ss-contact { display: none; }              /* เบอร์ครบย้ายไปเมนูมือถือ */
	/* util: โชว์ tagline กลาง ๆ (แก้ topbar ว่าง) */
	.ss-util__inner { justify-content: center; }
	.ss-util__tag { display: block; font-size: 12px; text-align: center; }
	/* navbar: mobile = พื้นขาวแบบเดิม (ทองไว้เฉพาะ desktop/tablet) */
	.ss-navbar { background: #fff; }
	/* navbar: ☰ ซ้าย · โลโก้ กลาง · LINE ขวา */
	.ss-navbar__inner { padding: 8px 14px; gap: 10px; }
	.ss-burger { display: flex; order: 1; }
	.ss-navbar__logo { display: block; order: 2; margin: 0 auto; }
	.ss-navbar__logo img { max-height: 48px; }
	.ss-nav, .ss-navbar__right { display: none; }
	.ss-navbar__line { display: flex; order: 3; }
	/* แถบค้นหาเต็มกว้าง (พื้นสีแบรนด์ แบบเดิม) */
	.ss-msearch { display: block; background: var(--ss-brand, #8a7f3d); padding: 10px 14px; }
	.ss-msearch form { display: flex; align-items: stretch; background: #fff; border-radius: 8px; overflow: hidden; }
	.ss-msearch input[type="search"] { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; padding: 12px 14px; font: inherit; font-size: 15px; outline: none; -webkit-appearance: none; }
	.ss-msearch button { flex: 0 0 auto; border: 0; background: #fff; padding: 0 15px; color: #777; display: flex; align-items: center; cursor: pointer; }
	/* มือถือ: ยุบ submenu (เหลือ 8 หมวดหลัก แตะไปหน้าหมวด) */
	.ss-vmenu__list .sub-menu { display: none; }
	.ss-vmenu__list > li:hover > a { background: #fff; color: var(--ss-ink, #222); }
	.ss-vmenu__list > li.menu-item-has-children > a::after { content: "›"; color: #bbb; }
}
@media (min-width: 981px) {
	.ss-mobile { display: none !important; }
	.ss-msearch, .ss-navbar__line { display: none !important; }
}
