/*
Theme Name: UBONIFEC
Theme URI: https://ubonifec.com/
Author: UBONIFEC
Author URI: https://ubonifec.com/
Description: ธีมบล็อกสำหรับเว็บไซต์ ห้างหุ้นส่วนจำกัด อุบลไอเฟค — ข้อมูลบริษัท บริการ สินค้า ผลงาน และช่องทางติดต่อตามสาขา เพิ่มสินค้า ผลงาน และสาขาได้จากหลังบ้านโดยไม่ต้องแก้โค้ด
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 2.13.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ubonifec
Tags: business, full-site-editing, block-patterns, custom-colors, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ---------- พื้นฐาน ---------- */
:root {
	--ubf-blue: #2F57A0;
	--ubf-navy: #1F1D5A;
	--ubf-ink: #16182B;
	--ubf-muted: #4A5068;
	--ubf-tint: #EEF3FB;
	--ubf-soft: #F5F8FD;
	--ubf-line: #E3E8F2;
	--ubf-border: #C9D4E8;
	--ubf-dash: #A9BBDD;
	--ubf-pale: #E1E9F7;
	--ubf-pale2: #C9D7EF;
	--ubf-ondark1: #B9C8E8;
	--ubf-ondark2: #DCE4F4;
	--ubf-light: #3463B3;
	--ubf-deep: #24467F;
}
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
img { max-width: 100%; height: auto; }

.ubf-wrap { max-width: 1200px; margin-left: auto !important; margin-right: auto !important; padding-left: 32px; padding-right: 32px; box-sizing: border-box; width: 100%; }
.ubf-sec { padding-top: 96px; padding-bottom: 96px; }
.ubf-bg-soft { background: var(--ubf-soft); }
.ubf-stack { display: flex; flex-direction: column; gap: 16px; }
.ubf-stack-lg { display: flex; flex-direction: column; gap: 40px; }
.ubf-stack > *, .ubf-stack-lg > *, .ubf-grid > *, .ubf-row > * { margin-block: 0 !important; }
.ubf-eyebrow { margin: 0; color: var(--ubf-blue); font-weight: 600; font-size: 15px; }
.ubf-lead { color: var(--ubf-muted); font-size: 18px; margin: 0; }
.ubf-muted { color: var(--ubf-muted); }
.ubf-sec-head { max-width: 680px; }
.ubf-sec-head h2 { font-size: 38px; margin: 0; }

/* ปุ่ม */
.ubf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 10px; font-weight: 600; font-size: 16px; text-decoration: none; box-sizing: border-box; line-height: 1.2; border: 1.5px solid transparent; cursor: pointer; font-family: inherit; }
.ubf-btn svg { flex: none; }
.ubf-btn-primary { background: var(--ubf-blue); color: #fff !important; }
.ubf-btn-primary:hover, .ubf-btn-primary:focus-visible { background: var(--ubf-navy); color: #fff !important; }
.ubf-btn-ghost { background: #fff; color: var(--ubf-navy) !important; border-color: var(--ubf-border); }
.ubf-btn-ghost:hover, .ubf-btn-ghost:focus-visible { border-color: var(--ubf-blue); color: var(--ubf-blue) !important; }
.ubf-btn-light { background: #fff; color: var(--ubf-navy) !important; }
.ubf-btn-light:hover { background: var(--ubf-tint); }
.ubf-btn-line { background: #05873F; color: #fff !important; }
.ubf-btn-line:hover, .ubf-btn-line:focus-visible { background: #046E33; color: #fff !important; }
.ubf-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-buttons.ubf-btn-row { gap: 12px; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: #fff; color: var(--ubf-navy); border: 1.5px solid var(--ubf-border); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--ubf-blue); color: var(--ubf-blue); }
.wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; box-sizing: border-box; }
:focus-visible { outline: 3px solid #F2A541; outline-offset: 2px; }

/* ---------- ส่วนหัว ---------- */
.ubf-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 6px solid var(--ubf-blue); }
.admin-bar .ubf-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ubf-header { top: 46px; } }
.ubf-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; flex-wrap: nowrap; }
.ubf-header-inner > * { margin: 0 !important; }
.ubf-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.ubf-brand img { display: block; width: auto; }
.ubf-brand .ubf-logo-main { height: 56px; }
.ubf-brand .ubf-logo-partner { height: 46px; }
.ubf-brand .ubf-x { font-size: 22px; font-weight: 600; color: var(--ubf-muted); }
.ubf-header-actions { display: flex; align-items: center; gap: 8px; }
.ubf-header-actions .ubf-fuji { height: 48px; width: auto; display: block; border-radius: 4px; }
.ubf-header-actions .ubf-btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
.ubf-nav .wp-block-navigation__container { gap: clamp(12px, 1.3vw, 20px); flex-wrap: nowrap; }
.ubf-nav .wp-block-navigation-item__content, .ubf-header-actions .ubf-btn { white-space: nowrap; }
.ubf-nav .wp-block-navigation-item__content { color: var(--ubf-ink); font-weight: 500; font-size: 16px; text-decoration: none; padding: 10px 0 7px !important; border-bottom: 3px solid transparent; }
.ubf-nav .wp-block-navigation-item__content:hover { color: var(--ubf-blue); }
.ubf-nav .is-active > .wp-block-navigation-item__content, .ubf-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--ubf-blue); font-weight: 700; border-bottom-color: var(--ubf-blue); }
.ubf-nav .wp-block-navigation__responsive-container-open { width: 44px; height: 44px; border: 1.5px solid var(--ubf-border); border-radius: 10px; justify-content: center; align-items: center; color: var(--ubf-navy); background: #fff; }
.ubf-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.ubf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 20px; }

/* ---------- ฮีโร่ ---------- */
.ubf-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.ubf-hero h1 { font-size: 52px; line-height: 1.25; margin: 0; }
.ubf-badge { display: inline-flex; align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--ubf-pale); color: var(--ubf-navy); font-size: 14px; font-weight: 600; margin: 0; }

/* ---------- ตัวเลข ---------- */
.ubf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.ubf-stats-wrap { border-bottom: 1px solid var(--ubf-line); }
.ubf-stat-num { margin: 0; font-size: 36px; font-weight: 700; color: var(--ubf-blue); line-height: 1.3; }
.ubf-stat-label { margin: 0; font-size: 15px; color: var(--ubf-muted); }

/* ---------- บริการ ---------- */
.ubf-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ubf-service { border: 1px solid var(--ubf-line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; background: #fff; }
.ubf-service > * { margin: 0 !important; }
.ubf-service h3 { font-size: 20px; }
.ubf-service p { color: var(--ubf-muted); font-size: 16px; }
.ubf-illus { border-radius: 12px; background: var(--ubf-tint); aspect-ratio: 16 / 10; overflow: hidden; }
.ubf-illus svg { width: 100%; height: 100%; display: block; }

/* ---------- เกี่ยวกับเรา ---------- */
.ubf-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.ubf-about p { color: var(--ubf-muted); font-size: 17px; margin: 0; }
.ubf-about h2 { font-size: 38px; margin: 0; }

/* ---------- แถบ FUJIFILM ---------- */
.ubf-fujiband { background: var(--ubf-navy); color: #fff; }
.ubf-fujiband-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding-top: 64px; padding-bottom: 64px; }
.ubf-fujiband-inner > * { margin: 0 !important; }
.ubf-fujiband-main { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; flex: 1 1 560px; min-width: 0; }
.ubf-fujiband-main > * { margin: 0 !important; }
.ubf-fujiband .wp-block-image img, .ubf-fujiband-badge img { width: 220px; max-width: 100%; border-radius: 8px; background: #fff; display: block; }
.ubf-fujiband-text { display: flex; flex-direction: column; gap: 10px; flex: 1 1 300px; min-width: 0; max-width: 620px; }
.ubf-fujiband-text > * { margin: 0 !important; }
.ubf-fujiband h2 { color: #fff; font-size: 32px; }
.ubf-fujiband .ubf-kicker { color: var(--ubf-ondark1); font-weight: 600; font-size: 15px; }
.ubf-fujiband p { color: var(--ubf-ondark2); font-size: 17px; }
.ubf-fujiband .wp-block-button__link { background: #fff; color: var(--ubf-navy); }
.ubf-fujiband .wp-block-button__link:hover { background: var(--ubf-tint); color: var(--ubf-navy); }

/* ---------- สไลด์ ---------- */
.ubf-slider { position: relative; width: 100%; overflow: hidden; border-radius: 16px; aspect-ratio: 4 / 3; background: var(--ubf-pale); }
.ubf-slider.ubf-r20 { border-radius: 20px; }
.ubf-slider-track { display: flex; height: 100%; transition: transform .6s ease; margin: 0; padding: 0; list-style: none; }
.ubf-slide { flex: 0 0 100%; height: 100%; margin: 0 !important; }
.ubf-slide img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
.ubf-slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; border: none; background: rgba(255,255,255,.94); color: var(--ubf-navy); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(22,24,43,.18); padding: 0; z-index: 2; }
.ubf-slider-btn.prev { left: 10px; }
.ubf-slider-btn.next { right: 10px; }
.ubf-slider-dots { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: 2px; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.9); z-index: 2; }
.ubf-slider-dots button { width: 28px; height: 28px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ubf-slider-dots span { display: block; width: 8px; height: 8px; border-radius: 999px; background: #9AA6BF; transition: width .2s; }
.ubf-slider-dots button[aria-current="true"] span { width: 18px; background: var(--ubf-blue); }
@media (prefers-reduced-motion: reduce) { .ubf-slider-track { transition: none; } }
/* แกลเลอรีที่ตั้งสไตล์ "สไลด์อัตโนมัติ" ก่อน JS ทำงาน */
.wp-block-gallery.is-style-ubf-slider:not(.ubf-slider) { display: block !important; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 20px; }
.wp-block-gallery.is-style-ubf-slider:not(.ubf-slider) > figure:not(:first-child) { display: none !important; }
.wp-block-gallery.is-style-ubf-slider:not(.ubf-slider) > figure { width: 100% !important; height: 100%; margin: 0 !important; }
.wp-block-gallery.is-style-ubf-slider:not(.ubf-slider) > figure img { width: 100%; height: 100%; object-fit: cover; }
.wp-block-gallery.ubf-slider { display: block !important; margin: 0 !important; }
.wp-block-gallery.ubf-slider .ubf-slider-track > figure { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; height: 100% !important; margin: 0 !important; }
.wp-block-gallery.ubf-slider figcaption { display: none; }

/* ---------- แท็บ + การ์ด ---------- */
.ubf-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.ubf-tab { min-height: 44px; padding: 0 18px; border-radius: 999px; font-family: inherit; font-size: 15px; cursor: pointer; white-space: nowrap; background: #fff; color: var(--ubf-navy); border: 1.5px solid var(--ubf-border); font-weight: 500; }
.ubf-tab[aria-selected="true"] { background: var(--ubf-blue); color: #fff; border-color: var(--ubf-blue); font-weight: 600; }
.ubf-tab:hover { border-color: var(--ubf-blue); }
.ubf-panel[hidden] { display: none; }
.ubf-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ubf-card { background: #fff; border: 1px solid var(--ubf-line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ubf-card > * { margin: 0; }
.ubf-card .ubf-slider { border-radius: 12px; }
.ubf-card-tag { font-size: 14px; font-weight: 600; color: var(--ubf-blue); }
.ubf-card h3 { font-size: 19px; line-height: 1.4; }
.ubf-card h3 a { color: var(--ubf-navy); text-decoration: none; }
.ubf-card h3 a:hover { color: var(--ubf-blue); text-decoration: underline; }
.ubf-card-desc { color: var(--ubf-muted); font-size: 15px; }
.ubf-card-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.ubf-card-btns .ubf-btn { min-height: 44px; padding: 0 16px; font-size: 15px; flex: 1 1 auto; }
.ubf-empty { border: 2px dashed var(--ubf-dash); border-radius: 16px; padding: 32px; background: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.ubf-empty p { margin: 0; font-size: 17px; color: var(--ubf-navy); font-weight: 600; }
.ubf-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.ubf-pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border: 1.5px solid var(--ubf-border); border-radius: 10px; text-decoration: none; padding: 0 12px; }
.ubf-pagination .current { background: var(--ubf-blue); color: #fff; border-color: var(--ubf-blue); }

/* ---------- สาขา ---------- */
.ubf-branch-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ubf-branch-pick label { font-weight: 600; font-size: 16px; color: var(--ubf-navy); }
.ubf-select { min-height: 48px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--ubf-border); background: #fff; font-family: inherit; font-size: 16px; color: var(--ubf-ink); min-width: 260px; max-width: 100%; }
.ubf-branches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.ubf-branch { background: #fff; border: 1px solid var(--ubf-line); border-top: 6px solid var(--ubf-blue); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.ubf-branch[hidden] { display: none; }
.ubf-branch-body { padding: 28px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.ubf-branch-body > * { margin: 0; }
.ubf-branch h3 { font-size: 22px; margin: 0; }
.ubf-branch dl { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.ubf-branch dt { font-size: 14px; color: var(--ubf-muted); }
.ubf-branch dd { margin: 2px 0 0; font-size: 17px; font-weight: 500; }
.ubf-branch dd a { font-weight: 600; text-decoration: none; }
.ubf-branch-map { position: relative; height: 240px; background: var(--ubf-pale); border-top: 1px solid var(--ubf-line); }
.ubf-branch-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ubf-branch-map .ubf-btn { position: absolute; right: 12px; bottom: 12px; min-height: 40px; padding: 0 14px; font-size: 14px; box-shadow: 0 2px 8px rgba(22,24,43,.2); }

/* ---------- ส่วนท้าย ---------- */
.ubf-footer { background: var(--ubf-ink); color: #C9CEDD; }
.ubf-footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; padding-top: 40px; padding-bottom: 40px; }
.ubf-footer-inner > * { margin: 0 !important; }
.ubf-footer p { margin: 0; font-size: 14px; }
.ubf-footer .ubf-footer-name { color: #fff; font-weight: 600; font-size: 16px; }
.ubf-footer a { color: #fff; }
.ubf-footer-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 15px; }
.ubf-footer-copy { width: 100%; }

/* ปุ่มลอย */
.ubf-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.ubf-fab a { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; color: #fff !important; box-shadow: 0 6px 18px rgba(22,24,43,.25); }
.ubf-fab .ubf-fab-line { background: #06C755; }
.ubf-fab .ubf-fab-phone { background: var(--ubf-blue); }

/* ---------- หน้าบทความ / รายการ ---------- */
.ubf-main { padding-top: 56px; padding-bottom: 80px; }
.ubf-entry > * + * { margin-top: 1.1em !important; }
.ubf-entry h1 { font-size: 40px; }
.ubf-single-media { margin-bottom: 32px !important; }
.ubf-single-actions { margin-top: 32px !important; }

/* ---------- มือถือ / แท็บเล็ต ---------- */
@media (max-width: 1100px) {
	.ubf-nav .wp-block-navigation__container { gap: 18px; }
	.ubf-header-actions .ubf-btn .ubf-phone-label { display: none; }
	.ubf-header-actions .ubf-btn { width: 44px; padding: 0; }
}
@media (max-width: 900px) {
	.ubf-wrap { padding-left: 16px; padding-right: 16px; }
	.ubf-sec { padding-top: 64px; padding-bottom: 64px; }
	.ubf-hero, .ubf-about { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.ubf-hero h1 { font-size: 36px; }
	.ubf-sec-head h2, .ubf-about h2 { font-size: 28px; }
	.ubf-fujiband h2 { font-size: 26px; }
	.ubf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.ubf-services { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.ubf-illus { aspect-ratio: 2 / 1; }
	.ubf-cards, .ubf-branches { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding-bottom: 8px; }
	.ubf-cards > *, .ubf-branches > * { scroll-snap-align: start; }
	.ubf-cards.ubf-cards-list { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); overflow: visible; }
	.ubf-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.ubf-select { min-width: 0; width: 100%; }
	.ubf-header-inner { gap: 8px; min-height: 72px; }
	.ubf-brand { gap: 6px; }
	.ubf-brand .ubf-logo-main { height: 30px; }
	.ubf-brand .ubf-logo-partner { height: 26px; }
	.ubf-brand .ubf-x { font-size: 16px; }
	.ubf-header-actions .ubf-fuji { height: 34px; }
	.ubf-header-actions { order: 2; gap: 6px; }
	.ubf-nav { order: 3; }
	.ubf-fab { right: 12px; bottom: 12px; }
	.ubf-fab a { width: 52px; padding: 0; justify-content: center; }
	.ubf-fab .ubf-fab-text { display: none; }
}
@media (max-width: 420px) {
	.ubf-brand .ubf-logo-main { height: 26px; }
	.ubf-brand .ubf-logo-partner { height: 22px; }
	.ubf-header-actions .ubf-fuji { height: 28px; }
}
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.ubf-hero .ubf-stack { gap: 24px; }
.ubf-footer .ubf-stack { gap: 4px; }
.ubf-main-wide { max-width: none; padding-left: 0; padding-right: 0; }

/* แถบเลือกจังหวัด ใต้เมนู */
.ubf-header { border-bottom: 0; }
.ubf-topbar { background: var(--ubf-tint); border-top: 6px solid var(--ubf-blue); border-bottom: 1px solid var(--ubf-line); }
.ubf-topbar-inner { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 36px; font-size: 13px; color: var(--ubf-navy); }
.ubf-topbar-inner > * { margin: 0 !important; }
.ubf-topbar label { font-weight: 600; white-space: nowrap; }
.ubf-select.ubf-select-sm { min-height: 28px; min-width: 0; width: auto; padding: 0 6px; font-size: 13px; border-radius: 6px; border-width: 1px; }
.ubf-topbar-branch { color: var(--ubf-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
html { scroll-padding-top: 130px; }
@media (max-width: 900px) {
	.ubf-topbar-inner { justify-content: flex-start; min-height: 36px; }
	.ubf-topbar-branch { display: none; }
	html { scroll-padding-top: 120px; }
}

/* ปุ่มกรองประเภทลูกค้า */
.ubf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -16px 0 20px; }
.ubf-chip { min-height: 38px; padding: 0 14px; border-radius: 8px; font-family: inherit; font-size: 14px; cursor: pointer; background: var(--ubf-tint); color: var(--ubf-navy); border: 1px solid var(--ubf-line); }
.ubf-chip[aria-pressed="true"] { background: var(--ubf-navy); color: #fff; border-color: var(--ubf-navy); }
.ubf-card[hidden] { display: none !important; }
.ubf-slider[data-mode="hover"] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
@media (max-width: 900px) { .ubf-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .ubf-chip { white-space: nowrap; } }

/* ผลงาน: หัวข้อตามประเภทลูกค้า, 4 ต่อแถว (คอม) / 2x2 (มือถือ) */
.ubf-group + .ubf-group { margin-top: 40px; }
.ubf-group-title { font-size: 22px; margin: 0 0 16px; color: var(--ubf-navy); }
.ubf-group-title span { font-size: 15px; font-weight: 500; color: var(--ubf-muted); }
.ubf-cards.ubf-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.ubf-grid4 .ubf-card { padding: 12px; gap: 10px; }
.ubf-grid4 .ubf-card h3 { font-size: 16px; }
.ubf-grid4 .ubf-card-btns { flex-direction: column; }
.ubf-grid4 .ubf-card-btns .ubf-btn { width: 100%; min-height: 40px; font-size: 14px; padding: 0 10px; }
.ubf-more-row { display: flex; justify-content: center; margin-top: 20px; }
@media (max-width: 1100px) { .ubf-cards.ubf-grid4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
	.ubf-cards.ubf-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; gap: 10px; padding-bottom: 0; }
	.ubf-grid4 .ubf-card { padding: 8px; gap: 6px; border-radius: 12px; }
	.ubf-grid4 .ubf-card h3 { font-size: 13.5px; line-height: 1.4; }
	.ubf-grid4 .ubf-card-tag { font-size: 12px; }
	.ubf-grid4 .ubf-card-btns { gap: 6px; padding-top: 2px; }
	.ubf-grid4 .ubf-card-btns .ubf-btn { min-height: 40px; font-size: 13px; padding: 0 6px; gap: 6px; }
	.ubf-grid4 .ubf-card-btns .ubf-btn svg { width: 15px; height: 15px; }
	.ubf-grid4 .ubf-slider-btn { width: 32px; height: 32px; }
	.ubf-grid4 .ubf-slider-btn.prev { left: 4px; } .ubf-grid4 .ubf-slider-btn.next { right: 4px; }
	.ubf-grid4 .ubf-slider-dots { bottom: 4px; padding: 0 3px; }
	.ubf-grid4 .ubf-slider-dots button { width: 18px; height: 22px; }
	.ubf-group-title { font-size: 18px; }
}

.ubf-services { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.ubf-services .ubf-service { padding: 18px; }
.ubf-services .ubf-service h3 { font-size: 18px; }
.ubf-services .ubf-service p { font-size: 15px; }
@media (max-width: 1100px) { .ubf-services { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .ubf-services { grid-template-columns: minmax(0, 1fr); } }
.ubf-branch-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.ubf-illus-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Keep menu bar + province bar visible while scrolling (template-part wrapper is the sticky box). */
.wp-block-template-part:has(> .ubf-header) { position: sticky; top: 0; z-index: 50; }
.wp-block-template-part > .ubf-header { position: relative; }

/* Mascot: rises from behind the floating contact buttons, greets, then hides. */
.ubf-fab { position: fixed; }
.ubf-mascot { position: absolute; right: 0; bottom: 100%; width: 128px; pointer-events: none; }
.ubf-mascot-clip { position: relative; height: 160px; overflow: hidden; margin-bottom: -2px; }
.ubf-mascot-fig { position: absolute; left: 0; right: 0; bottom: 0; transform: translateY(105%); transition: transform .6s cubic-bezier(.34,1.35,.64,1); }
.ubf-mascot-svg { display: block; width: 100%; height: auto; }
.ubf-mascot.is-in .ubf-mascot-fig { transform: none; }
.ubf-mascot-bubble { position: absolute; right: 112px; bottom: 96px; margin: 0; width: max-content; max-width: 210px; padding: 10px 14px; border-radius: 14px; background: #fff; color: var(--ubf-navy); font-size: 15px; font-weight: 600; line-height: 1.45; white-space: pre-line; box-shadow: 0 8px 24px rgba(22,24,43,.18); border: 1px solid var(--ubf-line, #dfe5f1); opacity: 0; transform: translateY(8px) scale(.96); transform-origin: right bottom; transition: opacity .25s, transform .25s; }
.ubf-mascot-bubble::after { content: ""; position: absolute; right: -7px; bottom: 16px; width: 14px; height: 14px; background: #fff; border-right: 1px solid var(--ubf-line, #dfe5f1); border-top: 1px solid var(--ubf-line, #dfe5f1); transform: rotate(45deg); }
.ubf-mascot.has-bubble .ubf-mascot-bubble { opacity: 1; transform: none; }
.ubf-mascot-close { position: absolute; right: 0; top: 0; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: rgba(31,29,90,.75); color: #fff; font-size: 18px; line-height: 26px; cursor: pointer; pointer-events: auto; opacity: 0; visibility: hidden; transition: opacity .2s; }
.ubf-mascot.is-in .ubf-mascot-close { opacity: 1; visibility: visible; }
.ubf-mascot-close:focus-visible { outline: 3px solid var(--ubf-blue); outline-offset: 2px; }
.ubf-m-wave { display: none; }
.ubf-mascot.pose-wave .ubf-m-wai { display: none; }
.ubf-mascot.pose-wave .ubf-m-wave { display: inline; }
.ubf-m-eyes { transform-origin: 80px 73.5px; animation: ubfBlink 4s infinite; }
.ubf-mascot.pose-wai .ubf-m-head, .ubf-mascot.pose-wai .ubf-m-wai { animation: ubfBow 1.3s ease-in-out .35s 1; }
.ubf-mascot.pose-wave .ubf-m-hand { transform-origin: 147px 116px; animation: ubfWave .45s ease-in-out infinite alternate; }
@keyframes ubfBlink { 0%, 93%, 100% { transform: none; } 95% { transform: scaleY(.1); } }
@keyframes ubfBow { 0%, 100% { transform: none; } 40%, 65% { transform: translateY(7px); } }
@keyframes ubfWave { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@media (max-width: 900px) {
	.ubf-mascot { width: 100px; }
	.ubf-mascot-clip { height: 125px; }
	.ubf-mascot-bubble { right: 88px; bottom: 70px; max-width: 180px; font-size: 14px; padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.ubf-mascot-fig { transition: none; }
	.ubf-m-eyes, .ubf-mascot.pose-wai .ubf-m-head, .ubf-mascot.pose-wai .ubf-m-wai, .ubf-mascot.pose-wave .ubf-m-hand { animation: none; }
}
@media print { .ubf-mascot { display: none; } }
.ubf-illus-cutout { display: flex; align-items: center; justify-content: center; padding: 10px 12px 6px; }
.ubf-illus-cutout img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }

/* Copier cut-out next to the first headline line */
.ubf-hero h1 .ubf-h1-first { display: flex; align-items: center; gap: 0.2em; white-space: nowrap; }
.ubf-hero h1 .ubf-hero-copier { flex: 0 1 auto; min-width: 0; max-height: 1.3em; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(22,24,43,.15)); }
/* Service card picture area: logo blue */
.ubf-illus { background: linear-gradient(135deg, var(--ubf-light) 0%, var(--ubf-blue) 55%, var(--ubf-deep) 100%); }

/* Keep footer text clear of the floating contact buttons */
.ubf-footer-inner { padding-bottom: 150px; }
@media (min-width: 901px) { .ubf-footer-inner { padding-right: 260px; padding-bottom: 40px; } }

/* Home: hero sits closer to the menu bar */
#top.ubf-sec { padding-top: 32px; padding-bottom: 72px; }
@media (max-width: 900px) { #top.ubf-sec { padding-top: 20px; padding-bottom: 48px; } }

/* Home hero v2.1.2: one-line headline, lead, full-width 16:7 banner, buttons below */
.ubf-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.ubf-hero .ubf-stack { gap: 16px; }
.ubf-hero h1.ubf-h1-row { font-size: min(46px, 3.75vw); line-height: 1.3; white-space: nowrap; }
.ubf-h1-row .ubf-h1-mid { font-size: .64em; font-weight: 600; color: var(--ubf-blue); margin: 0 .15em; }
.ubf-hero .ubf-lead { max-width: none; }
.ubf-hero .is-style-ubf-slider, .ubf-hero .ubf-slider { aspect-ratio: 16 / 7 !important; }
.ubf-hero-actions { margin: 0 !important; }
@media (max-width: 900px) {
	.ubf-hero h1.ubf-h1-row { font-size: 34px; white-space: normal; }
	.ubf-h1-row .ubf-h1-big, .ubf-h1-row .ubf-h1-mid { display: block; margin: 0; }
	.ubf-h1-row .ubf-h1-mid { font-size: 22px; line-height: 1.5; }
	.ubf-hero .is-style-ubf-slider, .ubf-hero .ubf-slider { aspect-ratio: 4 / 3 !important; }
	.ubf-hero .ubf-badge { white-space: nowrap; font-size: clamp(10px, 3.05vw, 14px); padding: 5px 10px; max-width: 100%; box-sizing: border-box; }
}

/* 2.3.0 แบนเนอร์จากหลังบ้าน: สไลด์ที่มีลิงก์ */
.ubf-slide > a.ubf-slide-link, .wp-block-gallery.is-style-ubf-slider > figure > a.ubf-slide-link { display: block; width: 100%; height: 100%; }

/* 2.4.0 โทนสีจากหลังบ้าน: ภาพประกอบการ์ดบริการใช้สีตามโทน */
.ubf-illus svg [stroke="#1F1D5A"] { stroke: var(--ubf-navy); }
.ubf-illus svg [fill="#1F1D5A"] { fill: var(--ubf-navy); }
.ubf-illus svg [stroke="#2F57A0"] { stroke: var(--ubf-blue); }
.ubf-illus svg [fill="#2F57A0"] { fill: var(--ubf-blue); }
.ubf-illus svg [fill="#C9D7EF"] { fill: var(--ubf-pale2); }
.ubf-illus svg [fill="#EEF3FB"] { fill: var(--ubf-tint); }
/* การ์ดสาขาสีของแต่ละบริษัท: ลิงก์ในการ์ดใช้สีเดียวกับปุ่ม */
.ubf-branch dd a { color: var(--ubf-blue); }
/* 2.4.0 เมนูย่อย (dropdown) */
.ubf-nav .wp-block-navigation__submenu-container { background: #fff !important; border: 1px solid var(--ubf-line) !important; border-radius: 12px; box-shadow: 0 10px 28px rgba(22,24,43,.12); padding: 8px !important; min-width: 270px !important; }
.ubf-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 8px 12px !important; border-bottom: 0 !important; border-radius: 8px; font-size: 15px; }
.ubf-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--ubf-soft); }
.ubf-nav .wp-block-navigation-submenu__toggle { color: inherit; }
@media (max-width: 1280px) { .ubf-nav .wp-block-navigation-item__content { font-size: 15px; } }

/* ---------- หน้าสินค้า/บริการ (แม่แบบ "หน้าสินค้าและบริการ") ---------- */
.ubf-main-sol { padding: 0; }
.ubf-main-sol > .wp-block-post-content > * { margin-block: 0; }
.ubf-sol-sec { padding-top: 72px; padding-bottom: 72px; }
.ubf-sol-sec.is-alt { background: var(--ubf-soft); }
.ubf-sol-sec .ubf-wrap > * + * { margin-top: 0; }
.ubf-sol-head { max-width: 760px; margin-bottom: 32px !important; }
.ubf-sol-head > * { margin: 0; }
.ubf-sol-head h2 { font-size: 36px; line-height: 1.25; color: var(--ubf-navy); }
.ubf-sol-head p { color: var(--ubf-muted); font-size: 17px; margin-top: 8px; }
.ubf-sol-hero { background: linear-gradient(180deg, var(--ubf-soft), #fff); padding-top: 48px; padding-bottom: 64px; }
.ubf-sol-hero .ubf-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.ubf-sol-hero .ubf-wrap > * { margin: 0; }
.ubf-sol-hero-text > * { margin: 0 0 16px; }
.ubf-sol-hero-text > *:last-child { margin-bottom: 0; }
.ubf-sol-hero h1 { font-size: 46px; line-height: 1.2; color: var(--ubf-navy); }
.ubf-sol-hero .ubf-sub { font-size: 21px; font-weight: 600; color: var(--ubf-blue); line-height: 1.45; }
.ubf-sol-hero .ubf-lead { font-size: 17.5px; }
.ubf-sol-img { margin: 0 !important; }
.ubf-sol-img img { width: 100%; border-radius: 20px; box-shadow: 0 18px 40px rgba(31, 29, 90, .16); display: block; }
.ubf-sol-hero .is-style-ubf-slider, .ubf-sol-hero .ubf-slider { aspect-ratio: 1 / 1 !important; box-shadow: 0 18px 40px rgba(31, 29, 90, .16); }
.ubf-crumb { font-size: 14px; color: var(--ubf-muted); }
.ubf-crumb a { color: var(--ubf-blue); text-decoration: none; }
.ubf-crumb a:hover { text-decoration: underline; }

/* รายการเครื่องหมายถูก */
ul.ubf-keys { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.ubf-keys li { display: flex; gap: 10px; align-items: flex-start; font-size: 18px; font-weight: 500; line-height: 1.5; }
ul.ubf-keys li::before { content: ""; flex: none; width: 28px; height: 28px; margin-top: -1px; border-radius: 50%; background: var(--ubf-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat; }
ul.ubf-xlist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; margin: 0; }
ul.ubf-xlist li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.6; }
ul.ubf-xlist li::before { content: ""; flex: none; width: 28px; height: 28px; margin-top: 1px; border-radius: 50%; background: #FCE8E6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C5221F' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 14px no-repeat; }
ul.ubf-dots { padding-left: 1.2em; margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--ubf-muted); }

/* ไอคอน (ใส่ class ubf-ic-… ให้กล่อง) */
[class*="ubf-ic-"] { position: relative; }
[class*="ubf-ic-"]::before { content: ""; display: block; width: 58px; height: 58px; flex: none; border-radius: 14px; background: var(--ubf-blue); position: relative; z-index: 1; margin-bottom: 16px; }
[class*="ubf-ic-"]::after { content: ""; position: absolute; z-index: 2; width: 30px; height: 30px; background: #fff; -webkit-mask: var(--ubf-ic) center / contain no-repeat; mask: var(--ubf-ic) center / contain no-repeat; }
.ubf-ic-shield { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8.3-8 9-4.6-.7-8-4.5-8-9V6z'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5'/%3E%3C/svg%3E"); }
.ubf-ic-card { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='13' rx='2'/%3E%3Cpath d='M3 10h18M7 15h4'/%3E%3C/svg%3E"); }
.ubf-ic-drop { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3s6 6.5 6 11a6 6 0 01-12 0c0-4.5 6-11 6-11z'/%3E%3Cpath d='M9.5 15h5'/%3E%3C/svg%3E"); }
.ubf-ic-wrench { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 00-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 005.4-5.4l-2.6 2.6-2.4-.6-.6-2.4z'/%3E%3C/svg%3E"); }
.ubf-ic-award { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M8.5 14L7 22l5-3 5 3-1.5-8'/%3E%3C/svg%3E"); }
.ubf-ic-clock { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.ubf-ic-chat { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3Cpath d='M8 10h8M8 13h5'/%3E%3C/svg%3E"); }
.ubf-ic-calendar { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4M8 15h3'/%3E%3C/svg%3E"); }
.ubf-ic-free { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 8h4a2 2 0 010 4H9zM9 12h4.5a2 2 0 010 4H9zM9 8v8M11 6v2M11 16v2'/%3E%3C/svg%3E"); }
.ubf-ic-phonecheck { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 005 5L15 13l5 2v4a1 1 0 01-1 1A16 16 0 014 5a1 1 0 011-1z'/%3E%3Cpath d='M15 5l2 2 4-4'/%3E%3C/svg%3E"); }
.ubf-ic-ocr { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7V5a1 1 0 011-1h2M17 4h2a1 1 0 011 1v2M20 17v2a1 1 0 01-1 1h-2M7 20H5a1 1 0 01-1-1v-2'/%3E%3Cpath d='M8 9h8M8 12h8M8 15h5'/%3E%3C/svg%3E"); }
.ubf-ic-search { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5'/%3E%3C/svg%3E"); }
.ubf-ic-rename { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a1 1 0 00-1 1v16a1 1 0 001 1h12a1 1 0 001-1V8z'/%3E%3Cpath d='M14 3v5h5M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.ubf-ic-send { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3L10 14M21 3l-7 18-4-7-7-4z'/%3E%3C/svg%3E"); }
.ubf-ic-flow { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3Cpath d='M6.5 10v4a3 3 0 003 3H14M17.5 14v-4a3 3 0 00-3-3H10'/%3E%3C/svg%3E"); }
.ubf-ic-x { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.ubf-ic-check { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.ubf-ic-download { --ubf-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }

/* การ์ดจุดเด่น (แสดงครบทุกข้อ มีเลขกำกับ) */
.ubf-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: ubf-feat; }
.ubf-feats > * { margin: 0 !important; }
.ubf-feat { position: relative; background: #fff; border: 1px solid var(--ubf-line); border-radius: 18px; padding: 26px 24px 24px; overflow: hidden; counter-increment: ubf-feat; }
.ubf-feat > * { margin: 0; position: relative; z-index: 1; }
.ubf-feat > * + * { margin-top: 8px; }
.ubf-feat[class*="ubf-ic-"]::after { left: 38px; top: 40px; }
.ubf-feat h3 { font-size: 20px; line-height: 1.45; color: var(--ubf-navy); }
.ubf-feat p { color: var(--ubf-muted); font-size: 15.5px; }
.ubf-feat .ubf-num { position: absolute; right: 14px; top: 2px; margin: 0; font-size: 72px; font-weight: 700; color: var(--ubf-tint); line-height: 1; z-index: 0; }
.ubf-feat.is-hl { background: var(--ubf-navy); border-color: var(--ubf-navy); }
.ubf-feat.is-hl h3 { color: #fff; }
.ubf-feat.is-hl p { color: var(--ubf-ondark2); }
.ubf-feat.is-hl .ubf-num { color: rgba(255, 255, 255, .08); }
.ubf-feat.is-hl::before { background: #fff; }
.ubf-feat.is-hl::after { background: var(--ubf-blue); }

/* ขั้นตอน */
.ubf-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: ubf-step; }
.ubf-steps > * { margin: 0 !important; }
.ubf-step { position: relative; padding: 0 12px; counter-increment: ubf-step; text-align: center; }
.ubf-step > * { margin: 0; }
.ubf-step > * + * { margin-top: 8px; }
.ubf-step::before { content: counter(ubf-step); position: relative; z-index: 1; display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%; background: #fff; border: 3px solid var(--ubf-blue); color: var(--ubf-blue); font-size: 24px; font-weight: 700; box-sizing: border-box; }
.ubf-step::after { content: ""; position: absolute; top: 30px; left: 50%; right: -50%; height: 3px; background: var(--ubf-border); }
.ubf-step:last-child::after { display: none; }
.ubf-step h3 { font-size: 18px; line-height: 1.45; color: var(--ubf-navy); }
.ubf-step p { font-size: 15px; color: var(--ubf-muted); }
.ubf-step.is-hl::before { background: var(--ubf-blue); color: #fff; }
.ubf-step .ubf-btn-row { justify-content: center; gap: 6px; }
.ubf-step .ubf-btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
.ubf-pill { display: inline-block; background: #E7F6EE; color: #12784A !important; font-weight: 700; border-radius: 99px; padding: 2px 12px; font-size: 14px; }

/* แถบปิดท้าย */
.ubf-cta-band { background: var(--ubf-navy); color: #fff; border-radius: 22px; padding: 40px 44px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ubf-cta-band > * { margin: 0; }
.ubf-cta-band h2 { font-size: 30px; line-height: 1.3; color: #fff; margin: 0 0 6px; }
.ubf-cta-band p { color: var(--ubf-ondark2); margin: 0; font-size: 17px; }
.ubf-cta-band .ubf-btn-ghost { border-color: #fff; }
.ubf-sol-sec .ubf-wrap > .ubf-summary, .ubf-sol-sec .ubf-wrap > .ubf-center { margin-top: 28px !important; }
.ubf-sol-sec.is-cta { padding-top: 8px; }
.ubf-summary { background: var(--ubf-tint); border-left: 6px solid var(--ubf-blue); border-radius: 16px; padding: 28px 32px; font-size: 19px; line-height: 1.7; color: var(--ubf-ink); }
.ubf-summary > * { margin: 0; }
.ubf-summary > * + * { margin-top: 10px; }
.ubf-summary strong { color: var(--ubf-navy); }

/* สไลด์ประโยชน์ (เลื่อนได้ + ปุ่มหัวข้อครบทุกข้อ) */
.ubf-carousel { position: relative; }
.ubf-carousel-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.ubf-carousel-track::-webkit-scrollbar { display: none; }
.ubf-carousel:not(.is-ready) { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; }
.ubf-cslide { flex: 0 0 100%; scroll-snap-align: start; display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; background: #fff; border: 1px solid var(--ubf-line); border-radius: 22px; padding: 32px; box-sizing: border-box; margin: 0 !important; }
.ubf-cslide > * { margin: 0 !important; }
.ubf-cslide figure { margin: 0; }
.ubf-cslide img { width: 100%; border-radius: 16px; display: block; background: var(--ubf-tint); }
.ubf-cslide-text > * { margin: 0; }
.ubf-cslide-text > * + * { margin-top: 12px; }
.ubf-cslide-text h3 { font-size: 28px; line-height: 1.35; color: var(--ubf-navy); }
.ubf-cslide-text ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; color: var(--ubf-ink); font-size: 17px; line-height: 1.65; }
.ubf-cslide-no { font-weight: 700; color: var(--ubf-blue); font-size: 15px; letter-spacing: .02em; }
.ubf-stat { font-size: 54px; font-weight: 700; line-height: 1.05; color: var(--ubf-blue); }
.ubf-stat small { display: block; font-size: 16px; font-weight: 600; color: var(--ubf-muted); margin-top: 4px; }
.ubf-carousel-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ubf-carousel-nav button { font: inherit; font-size: 15px; font-weight: 600; border: 1.5px solid var(--ubf-border); background: #fff; color: var(--ubf-navy); border-radius: 99px; padding: 8px 16px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; text-align: left; }
.ubf-carousel-nav button b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ubf-tint); color: var(--ubf-blue); font-size: 13px; flex: none; }
.ubf-carousel-nav button[aria-current="true"] { background: var(--ubf-navy); border-color: var(--ubf-navy); color: #fff; }
.ubf-carousel-nav button[aria-current="true"] b { background: #fff; color: var(--ubf-navy); }
.ubf-carousel-arrows { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; align-items: center; }
.ubf-carousel-arrows span { margin-right: auto; color: var(--ubf-muted); font-size: 14px; }
.ubf-carousel-arrows button { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ubf-border); background: #fff; color: var(--ubf-navy); font-size: 20px; cursor: pointer; }
.ubf-carousel-arrows button:disabled { opacity: .35; cursor: default; }

/* วิธีเลือกซื้อ / การ์ดรูป */
.ubf-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.ubf-guide > * { margin: 0 !important; }
.ubf-guide-card { background: #fff; border: 1px solid var(--ubf-line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ubf-guide-card > * { margin: 0 !important; }
.ubf-guide-card img { width: 100%; border-radius: 14px; display: block; background: var(--ubf-tint); }
.ubf-guide-card h3 { font-size: 20px; line-height: 1.4; color: var(--ubf-navy); }
.ubf-guide-card p { color: var(--ubf-muted); font-size: 16px; }

/* ข้อจำกัด → ทางแก้ */
.ubf-problem { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); gap: 0; align-items: stretch; }
.ubf-problem > * { margin: 0 !important; }
.ubf-problem-card { border-radius: 20px; padding: 28px; }
.ubf-problem-card > * { margin: 0; }
.ubf-problem-card > * + * { margin-top: 14px; }
.ubf-problem-card h3 { font-size: 22px; line-height: 1.4; }
.ubf-problem-card.is-old { background: #fff; border: 1px solid #F3D3CF; }
.ubf-problem-card.is-old h3 { color: #A1281F; }
.ubf-problem-card.is-new { background: var(--ubf-navy); color: #fff; }
.ubf-problem-card.is-new h3 { color: #fff; }
.ubf-problem-card.is-new ul.ubf-keys li { font-size: 17px; font-weight: 500; }
.ubf-problem-card.is-new ul.ubf-keys li::before { background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F1D5A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-9'/%3E%3C/svg%3E"); }
.ubf-problem-arrow { display: grid; place-items: center; font-size: 34px; color: var(--ubf-blue); font-weight: 700; }

/* เอกสาร/วิดีโอ */
.ubf-leaflet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ubf-leaflet > * { margin: 0 !important; }
.ubf-leaflet img { width: 100%; border-radius: 12px; border: 1px solid var(--ubf-line); box-shadow: 0 8px 22px rgba(31, 29, 90, .08); display: block; }
.ubf-center { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px !important; }
.ubf-video { max-width: 960px; margin-left: auto !important; margin-right: auto !important; }
.ubf-video .wp-block-embed__wrapper, .ubf-video iframe { border-radius: 18px; overflow: hidden; }
.ubf-video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; }

@media (max-width: 900px) {
	.ubf-sol-sec { padding-top: 48px; padding-bottom: 48px; }
	.ubf-sol-head h2 { font-size: 27px; }
	.ubf-sol-hero { padding-top: 24px; padding-bottom: 40px; }
	.ubf-sol-hero .ubf-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.ubf-sol-hero .ubf-wrap > :last-child { order: -1; }
	.ubf-sol-hero h1 { font-size: 32px; }
	.ubf-sol-hero .ubf-sub { font-size: 18px; }
	ul.ubf-keys li { font-size: 16.5px; }
	.ubf-sol-hero .ubf-btn-row .ubf-btn, .ubf-cta-band .ubf-btn { flex: 1 1 100%; }
	.ubf-feats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.ubf-feat { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 18px; }
	.ubf-feat::before { width: 50px; height: 50px; margin: 0; grid-row: span 2; }
	.ubf-feat[class*="ubf-ic-"]::after { left: 30px; top: auto; width: 26px; height: 26px; }
	.ubf-feat > * + * { margin-top: 0; }
	.ubf-feat h3 { font-size: 18px; }
	.ubf-feat p { grid-column: 2; }
	.ubf-feat .ubf-num { font-size: 54px; }
	.ubf-steps { grid-template-columns: minmax(0, 1fr); }
	.ubf-step { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 4px 14px; padding: 0 0 22px; text-align: left; }
	.ubf-step::before { grid-row: span 4; margin: 0; }
	.ubf-step::after { top: 62px; bottom: 0; left: 30px; right: auto; width: 3px; height: auto; }
	.ubf-step > * { grid-column: 2; }
	.ubf-step > * + * { margin-top: 0; }
	.ubf-step .ubf-btn-row { justify-content: flex-start; margin-top: 6px; }
	.ubf-cta-band { padding: 28px 22px; }
	.ubf-cta-band h2 { font-size: 24px; }
	.ubf-summary { padding: 22px; font-size: 17px; }
	.ubf-cslide { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px; }
	.ubf-cslide-text h3 { font-size: 22px; }
	.ubf-stat { font-size: 42px; }
	.ubf-carousel-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
	.ubf-carousel-nav button { white-space: nowrap; }
	.ubf-problem { grid-template-columns: minmax(0, 1fr); }
	.ubf-problem-arrow { transform: rotate(90deg); padding: 6px 0; }
	.ubf-leaflet { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- เนื้อหาสินค้าและบริการในหน้าแรก (แถบแท็บติดตามการเลื่อน) ---------- */
.ubf-home-sol { position: relative; }
.ubf-hs-bar { position: sticky; top: var(--ubf-hs-top, 86px); z-index: 40; background: #fff; border-bottom: 1px solid var(--ubf-line); box-shadow: 0 6px 18px rgba(22, 24, 43, .06); }
.ubf-hs-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 0; }
.ubf-hs-tabs::-webkit-scrollbar { display: none; }
.ubf-hs-tab { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 99px; border: 1.5px solid var(--ubf-border); background: #fff; color: var(--ubf-navy); font-weight: 600; font-size: 15.5px; text-decoration: none; white-space: nowrap; }
.ubf-hs-tab:hover { border-color: var(--ubf-blue); color: var(--ubf-blue); }
.ubf-hs-tab.is-on { background: var(--ubf-navy); border-color: var(--ubf-navy); color: #fff; }
.ubf-hs-item { scroll-margin-top: 64px; }
.ubf-hs-item + .ubf-hs-item { border-top: 1px solid var(--ubf-line); }
.ubf-hs-item .ubf-sol-sec.is-cta { display: none; }
.ubf-hs-item .ubf-sol-hero { padding-top: 40px; }
.ubf-hs-item .ubf-sol-hero h2 { font-size: 46px; line-height: 1.2; color: var(--ubf-navy); margin: 0 0 16px; }
.ubf-hs-more { text-align: center; margin: 0 0 56px !important; }
@media (max-width: 900px) {
	.ubf-hs-item .ubf-sol-hero h2 { font-size: 32px; }
	.ubf-hs-tab { min-height: 36px; padding: 0 14px; font-size: 14.5px; }
	.ubf-hs-tabs { padding: 8px 0; }
}

/* ---------- 2.5.2 ---------- */
/* หัวส่วน "สินค้าทั้งหมด" (ขนาดเท่าหัวเล็ก) */
.ubf-sec-head h2.ubf-eyebrow-h { font-size: 15px; font-weight: 600; color: var(--ubf-blue); line-height: 1.5; }
/* การ์ดบริการในหน้าแรกเล็กลง (เน้นเนื้อหาสินค้าและบริการ) */
.ubf-services { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .ubf-services { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ubf-services .ubf-service { padding: 12px; gap: 8px; border-radius: 14px; }
.ubf-services .ubf-service .ubf-illus { aspect-ratio: 2 / 1; border-radius: 10px; }
.ubf-services .ubf-service h3 { font-size: 16px; line-height: 1.4; }
.ubf-services .ubf-service p { font-size: 14px; line-height: 1.55; }
#services.ubf-sec { padding-bottom: 56px; }
@media (max-width: 900px) {
	.ubf-services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ubf-services .ubf-service { padding: 10px; }
	.ubf-services .ubf-service h3 { font-size: 15px; }
	.ubf-services .ubf-service p { font-size: 13px; }
}
/* จุดเด่นแบบหัวข้ออย่างเดียว (เช่น ทำไมต้องเช่ากับอุบลไอเฟค): กระชับ ไอคอนอยู่ข้างข้อความ */
.ubf-feat:not(:has(> p:not(.ubf-num))) { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; }
.ubf-feat:not(:has(> p:not(.ubf-num)))::before { width: 44px; height: 44px; margin: 0; border-radius: 12px; }
.ubf-feat[class*="ubf-ic-"]:not(:has(> p:not(.ubf-num)))::after { left: 28px; top: 50%; width: 24px; height: 24px; margin-top: -12px; }
.ubf-feat:not(:has(> p:not(.ubf-num))) h3 { font-size: 17px; line-height: 1.4; margin: 0; padding-right: 34px; }
.ubf-feat:not(:has(> p:not(.ubf-num))) .ubf-num { font-size: 40px; top: 50%; transform: translateY(-50%); right: 12px; }
.ubf-feats:has(> .ubf-feat:not(:has(> p:not(.ubf-num)))) { gap: 12px; }
/* แถวเส้นทาง + ปุ่มแชร์ */
.ubf-crumb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ubf-share { position: relative; }
.ubf-share-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--ubf-border); background: #fff; color: var(--ubf-navy); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.ubf-share-btn:hover { border-color: var(--ubf-blue); color: var(--ubf-blue); }
.ubf-share-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--ubf-line); border-radius: 12px; box-shadow: 0 10px 28px rgba(22, 24, 43, .14); padding: 6px; min-width: 170px; display: flex; flex-direction: column; }
.ubf-share-menu[hidden] { display: none; }
.ubf-share-menu a, .ubf-share-menu button { display: block; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--ubf-ink); text-decoration: none; font: inherit; font-size: 15px; background: none; border: 0; cursor: pointer; }
.ubf-share-menu a:hover, .ubf-share-menu button:hover { background: var(--ubf-soft); }
/* ดูรูปขยาย */
.ubf-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(10, 12, 30, .88); display: flex; align-items: center; justify-content: center; padding: 56px 16px 16px; }
.ubf-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.ubf-lightbox-close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--ubf-navy); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.ubf-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--ubf-navy); font-size: 24px; cursor: pointer; }
.ubf-lightbox-nav.prev { left: 12px; } .ubf-lightbox-nav.next { right: 12px; }
.ubf-leaflet a { cursor: zoom-in; display: block; }
.ubf-home-sol > #products { scroll-margin-top: 64px; }
.ubf-home-sol > * { margin-block: 0 !important; }
/* แท็บเล็ต (601–980 px): ใช้ปุ่มเมนู ☰ แทนเมนูเต็ม ไม่ให้ทับปุ่มโทร */
@media (min-width: 600px) and (max-width: 980px) {
	.ubf-header-actions { margin-left: auto !important; }
	.ubf-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.ubf-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
	.ubf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: flex !important; }
	.ubf-nav .wp-block-navigation__responsive-container.is-menu-open { position: fixed; inset: 0; z-index: 100000; display: flex; padding: 24px; background: #fff; overflow: auto; }
	.ubf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { flex-direction: column; align-items: flex-start; gap: 6px; }
	.ubf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { position: static !important; opacity: 1 !important; visibility: visible !important; width: auto !important; height: auto !important; box-shadow: none !important; border: 0 !important; padding: 0 0 0 16px !important; }
}
/* เมนูแบบเต็มจอ (☰): ชิดซ้ายทั้งเมนูหลักและเมนูย่อย */
.ubf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.ubf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.ubf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.ubf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { align-items: flex-start !important; text-align: left; }
