/* ส่วนเสริมของเว็บใหม่: โหลดต่อจากธีมเดิม (theme.css) เพื่อคงหน้าตาเดิมและแก้จุดที่ใช้งานยาก */
@font-face{font-family:'supermarket';src:url('../fonts/supermarket.woff') format('woff');font-weight:normal;font-style:normal;font-display:swap}
:focus-visible{outline:3px solid #2f5d12!important;outline-offset:2px}
.sb-skip{position:absolute;left:-9999px;top:0;z-index:10000;background:#fff;padding:10px 16px}
.sb-skip:focus{left:8px;top:8px}
.sb-icon{width:1.1em;height:1.1em;vertical-align:-.15em;fill:currentColor}

/* h1 ใช้หน้าตาเดียวกับหัวข้อ h3 เดิม */
h1.sec-title{position:relative;display:inline-block;color:#050505;line-height:20px;font-size:25px;padding:10px 10px 10px 15px;margin:10px 0 15px;background:#8DC73F;text-transform:uppercase;font-weight:normal}
h1.sec-title::after{content:'';position:absolute;right:-10px;top:0;width:20px;height:100%;background:#8DC73F;transform:skewX(-15deg)}
h1.sec-title b{position:relative;z-index:1}
.page-side h1.sec-title{line-height:1.25}

/* เมนู: สีเข้มขึ้นเพื่อให้อ่านง่าย */
.navbar-default .navbar-nav>li>a{color:#6b6b6b}
.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#4b7f12}
.navbar-brand{position:relative}

/* สไลด์หน้าแรก (สัดส่วนเดิม 1600 x 553) */
.sb-hero{position:relative;width:100%;aspect-ratio:1600/553;overflow:hidden;background:#dfeaf5}
.sb-slide{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .8s,visibility 0s .8s}
.sb-slide.is-on{opacity:1;visibility:visible;transition:opacity .8s}
.sb-slide>img{width:100%;height:100%;object-fit:cover;display:block}
.sb-layer{position:absolute;display:block}
.sb-layer img,.sb-layer>img{width:100%;height:auto;display:block}
img.sb-layer{height:auto}

/* แถบเลื่อนรูป */
.sb-car{position:relative}
.sb-track{display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}
.sb-track::-webkit-scrollbar{display:none}
.sb-track>.item{flex:0 0 calc((100% - (var(--n) - 1)*20px)/var(--n));min-width:0;scroll-snap-align:start}
.sb-car{--n:3}
.sb-car[data-kind=reference]{--n:5}
.sb-car[data-kind=gallery]{--n:1;max-width:800px}
.sb-nav{position:absolute;right:0;top:-46px;z-index:5;display:flex;gap:4px}
.sb-nav button{width:32px;height:32px;border:1px solid #bbb;background:#767676;color:#fff;font-size:22px;line-height:1;padding:0}
.sb-nav button:hover{background:#4b7f12}
.sb-car[data-kind=reference] .sb-nav{right:15px}
.sb-car[data-kind=gallery] .sb-nav{top:auto;bottom:10px;right:10px}
.sb-car[data-kind=products] .sb-track{padding-bottom:60px}
.our-projects .project-box{display:block!important;opacity:1!important;width:100%}
.our-projects .project-box .image img{width:100%;height:auto}

/* ปุ่มโทรและ LINE ในหน้าสินค้า: ใช้ไอคอนในเว็บเอง */
.btn-widget .btn-widget-menu-click-to-call,.btn-widget .btn-widget-menu-line{background-image:none!important}
.btn-widget .btn-widget-menu-click-to-call{background-color:#b85f00!important}
.btn-widget .btn-widget-menu-line{background-color:#04702f!important}
.btn-widget .btn-widget-btn-float .sb-icon{width:26px;height:26px;vertical-align:middle}

/* ฟอร์ม */
/* ฟอนต์ supermarket ถูกตัดสระและวรรณยุกต์ในช่องกรอก จึงใช้ฟอนต์ไทยมาตรฐานเฉพาะในช่อง */
.form-control{color:#333;height:46px;font-family:"Sukhumvit Set",Thonburi,"Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif;font-size:16px;line-height:1.6}
textarea.form-control{height:auto;padding-top:8px}
input[type=file].form-control{padding:8px 12px}
.form-control::placeholder{color:#666;opacity:1}
.sb-label{display:block;font-weight:normal;margin:0 0 3px}
.sb-hp{position:absolute!important;left:-9999px!important;height:1px;width:1px;overflow:hidden}
.btn-contact,.btn-contact:hover,.btn-contact:focus{background:#3f6b1f;border-color:#3f6b1f;color:#fff}
.sb-form-note{display:none;margin:14px 5px;padding:12px 15px;border-left:4px solid #3f6b1f;background:#eef6e4;color:#26331b}
.sb-form-note.is-on{display:block}
.sb-form-note.is-error{border-color:#b3261e;background:#fdecea;color:#5f1410}
.sb-map{width:100%;height:380px;border:0;margin-top:20px;display:block}
.table-product td:first-child{width:30%}

.sb-pdpa{margin:12px 0;font-size:16px}
.sb-pdpa a{text-decoration:underline!important}
.btn-contact[disabled]{opacity:.65}
a.sb-privacy{color:#4a5152;text-decoration:underline!important;display:inline-block;padding:8px 0}
.sb-policy h2{font-size:22px;margin-top:24px}
.sb-policy li{margin-bottom:5px}
footer{padding-top:25px}
/* ตัวหนังสือส่วนท้ายสีเข้ม ให้อ่านง่ายบนพื้นสีเทา */
footer,footer p,footer a,footer h3,footer h4,footer .h-title,footer li{color:#0d120f}
footer a:hover,footer a:focus,ul.footer-menu li a:hover{color:#000;text-decoration:underline}
.copy-right.sb-copy,.copy-right.sb-copy a{color:#2f3637!important}
button.sb-consent-open{margin:0 0 0 16px;padding:8px 0;min-height:40px;border:0;background:none;color:#2f3637;font:inherit;text-decoration:underline}
button.sb-consent-open[hidden]{display:none}

/* แถบขอความยินยอม: ปุ่มทั้งสองเด่นเท่ากัน และไม่บังเนื้อหาท้ายหน้า */
.sb-consent{position:fixed;left:0;right:0;bottom:0;z-index:9995;padding:12px 16px;border-top:3px solid #8dc63f;background:#fff;color:#26331b;box-shadow:0 -2px 8px rgba(0,0,0,.18)}
.sb-consent[hidden]{display:none}
.sb-consent-in{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;max-width:1140px;margin:0 auto}
.sb-consent p{flex:1 1 300px;margin:0;color:#26331b;font-size:17px;line-height:1.45}
.sb-consent a{color:#26331b;text-decoration:underline!important}
.sb-consent-btns{display:flex;flex:0 1 auto;gap:10px}
.sb-consent button{min-width:130px;min-height:44px;padding:8px 16px;border:0;border-radius:3px;background:#2f5d12;color:#fff;font:inherit;font-weight:bold}
.sb-consent button:hover{background:#234a0b}
.sb-consent button:focus-visible,.sb-consent a:focus-visible,button.sb-consent-open:focus-visible{outline:3px solid #111;outline-offset:2px}
body{padding-bottom:var(--sb-consent-h,0px)}

/* แถบติดต่อบนมือถือ */
.sb-bar{display:none}
@media (max-width:992px){
  .sb-bar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:9990;background:#fff;box-shadow:0 -2px 8px rgba(0,0,0,.18);padding-bottom:env(safe-area-inset-bottom)}
  .sb-bar a{flex:1;padding:16px 4px;text-align:center;font-size:18px;line-height:24px;font-weight:bold;color:#fff!important}
  .sb-bar .c1{background:#2f5d12}.sb-bar .c2{background:#04702f}.sb-bar .c3{background:#333}
  body{padding-bottom:calc(56px + env(safe-area-inset-bottom) + var(--sb-consent-h,0px))}
  .sb-consent{bottom:calc(56px + env(safe-area-inset-bottom));padding:10px 14px}
  .sb-consent p{font-size:16px}
  .sb-consent-btns{flex:1 1 100%}
  .sb-consent button{flex:1}
  .navbar-toggle{float:right;min-width:48px;min-height:44px}
  .navbar-collapse{clear:both}
  .navbar-nav .dropdown-menu{position:static;float:none;width:auto;box-shadow:none;border:0;margin:0}
  .navbar-nav .dropdown-menu>li>a{white-space:normal;padding:9px 15px 9px 25px}
  /* หน้าสินค้าและผลงาน: เนื้อหาขึ้นก่อน เมนูสินค้าอยู่ด้านล่าง */
  .page-side .sb-row{display:flex;flex-direction:column}
  .page-side .sb-row:before,.page-side .sb-row:after{display:none}
  .page-side .sb-row>.col-md-3{order:2;margin-top:20px}
}
@media (min-width:993px){.navbar-nav .dropdown:hover>.dropdown-menu{display:block}}
@media (max-width:1199px){.sb-car[data-kind=reference]{--n:4}}
@media (max-width:999px){.sb-car[data-kind=products]{--n:2}.sb-car[data-kind=reference]{--n:3}}
@media (max-width:599px){.sb-car[data-kind=products]{--n:1}.sb-car[data-kind=portfolio],.sb-car[data-kind=reference]{--n:2}}
@media (max-width:480px){h1.sec-title::after{display:none}}
@media (max-width:449px){.sb-car[data-kind=portfolio],.sb-car[data-kind=reference]{--n:1}}
@media (prefers-reduced-motion:reduce){.sb-slide,.products .post *{transition:none!important}}
