/* หัวเว็บ (แถบบน) + โลโก้เมนูข้าง แบบใหม่ · 22 ก.ย. 2569 */
/* ── โลโก้เมนูข้าง ── */
html body .sidebar .kb-brand{display:flex!important;align-items:center;gap:10px;text-align:left;margin:4px 0 10px!important;text-decoration:none}
.kb-mark{position:relative;width:48px;height:48px;border-radius:15px;display:grid;place-items:center;flex:none;background:linear-gradient(150deg,#E4466B,#C32148 55%,#9F1937);color:#fff;font:900 28px/1 inherit;box-shadow:0 6px 14px #C3214840}
.kb-mark i{position:absolute;top:5px;right:6px;font-style:normal;font-size:11px;color:#F7E7CE}
.kb-text{display:flex;flex-direction:column;line-height:1}
.kb-text strong{font-size:22px;font-weight:900;color:#172A46;letter-spacing:-.02em}
.kb-text small{font-size:13px;font-weight:800;color:#C32148;margin-top:4px}
.kb-live{white-space:nowrap;display:inline-flex;align-items:center;gap:7px;margin:0 0 22px;padding:5px 11px;border-radius:99px;background:#FFF3DC;color:#9a6512;font-size:10.5px;font-weight:800;letter-spacing:.04em}
.kb-live i{width:7px;height:7px;border-radius:50%;background:#e02d4f;box-shadow:0 0 0 3px #e02d4f33}
html body .sidebar .nav-caption{font-size:11px;font-weight:800;letter-spacing:.08em;color:#8A94A6;text-transform:uppercase;margin:0 0 8px 4px}
@media(max-width:900px){html body .sidebar .kb-brand{margin-top:0!important}.kb-live{margin-bottom:16px}}

/* ── แถบบน (คอมพิวเตอร์) ── */
@media(min-width:901px){
 html body .topbar{height:72px!important;padding:0 28px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px}
 html body .topbar .breadcrumb{display:flex!important;align-items:center;gap:10px;font-size:13px;color:#8A94A6}
 html body .topbar .breadcrumb span{color:#D5CBBE}
 html body .topbar .breadcrumb b{font-size:18px;font-weight:900;color:#172A46;padding:6px 14px;border-radius:12px;background:#FFF8EF;box-shadow:inset 0 0 0 1px #EFE2D0}
 /* จอกลาง (≤1100px) มีโลโก้อยู่ข้างซ้ายแล้ว ซ่อนคำ "KruJoy Lango /" ที่ซ้ำ กันแถบบนดันปุ่มบัญชีจนล้นจอ (14 ต.ค. 2569) */
 @media (max-width:1100px){html body .topbar .breadcrumb{font-size:0;gap:0}html body .topbar .breadcrumb span{display:none}}
 html body .top-actions{display:flex!important;align-items:center!important;gap:12px!important}
}
/* ปุ่มตะกร้า: เม็ดยา + ตัวเลขเป็นวงกลมมุมขวาบน จัดกึ่งกลางพอดี */
html body .topbar .cart-trigger{position:relative;display:inline-flex!important;align-items:center;gap:8px;height:44px;padding:0 16px 0 12px!important;border-radius:99px;background:#fff!important;color:#172A46!important;border:1.5px solid #EFE2D0;text-decoration:none;font-weight:800;font-size:14px;transition:border-color .15s,box-shadow .15s}
html body .topbar .cart-trigger:hover{border-color:#C32148;box-shadow:0 4px 12px #C321481f}
html body .topbar .cart-trigger [data-icon] svg,html body .topbar .cart-trigger svg{width:22px!important;height:22px!important;color:#C32148;display:block}
html body .topbar .cart-trigger [data-icon]{display:grid;place-items:center;width:22px;height:22px}
html body .topbar #cart-count{position:absolute;top:-6px;right:-6px;min-width:22px;height:22px;padding:0 6px;box-sizing:border-box;border-radius:99px;display:grid!important;place-items:center;background:#C32148!important;color:#fff!important;font-size:12px;font-weight:900;line-height:1;border:2px solid #fff;box-shadow:0 2px 6px #C3214855;font-style:normal}
/* ปุ่มบัญชี */
html body .topbar .account-trigger{display:inline-flex!important;align-items:center;gap:9px;height:44px;padding:0 12px 0 5px!important;border:1.5px solid #EFE2D0!important;border-left:1.5px solid #EFE2D0!important;border-radius:99px;background:#fff!important;color:#172A46!important;font-weight:800;font-size:14px;cursor:pointer;transition:border-color .15s,box-shadow .15s}
html body .topbar .account-trigger:hover{border-color:#172A46;box-shadow:0 4px 12px #172A461a}
.account-copy{display:flex;flex-direction:column;align-items:flex-start;min-width:0;line-height:1.12}.account-copy strong{font:inherit;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-copy small{margin-top:3px;color:#1E8C85;font-size:10.5px;font-weight:800;white-space:nowrap}
html body .topbar .avatar{width:34px!important;height:34px!important;border-radius:50%;display:grid!important;place-items:center;background:linear-gradient(150deg,#D9982B,#C32148)!important;color:#fff!important;font-weight:900;font-size:14px}
.kb-chev{width:16px;height:16px;color:#8A94A6}
/* มือถือ: ตะกร้าเป็นไอคอน + วงกลมตัวเลข */
@media(max-width:900px){
 html body .topbar .cart-trigger{width:44px;padding:0!important;justify-content:center;border-radius:14px}
 html body .topbar .cart-trigger .desktop-label{display:none!important}
 html body .topbar #cart-count{top:-5px;right:-5px;min-width:20px;height:20px;font-size:11px}
}
html body .sidebar .kb-text{display:flex!important;flex-direction:column!important;align-items:flex-start;line-height:1}
html body .sidebar .kb-text strong{display:block!important;font-size:22px!important;letter-spacing:-.02em!important;color:#172A46!important;font-style:normal}
html body .sidebar .kb-text small{display:block!important;font-size:13px!important;letter-spacing:0!important;color:#C32148!important;margin-top:4px;font-weight:800;font-style:normal}
@media(max-width:900px){
 body.kj-signed-in .app-logo{display:none!important}
 body.kj-signed-in .topbar .cart-trigger{display:none!important}
 html body.kj-signed-in .topbar .account-trigger{display:grid!important;grid-template-columns:minmax(0,1fr) 42px;gap:9px;height:54px;padding:5px 5px 5px 10px!important;border-radius:16px;margin-left:auto;max-width:174px;box-shadow:0 5px 16px #172A4614}
 body.kj-signed-in .account-trigger .account-copy{grid-column:1;grid-row:1;text-align:right;align-items:flex-end}
 body.kj-signed-in .account-trigger .avatar{grid-column:2;grid-row:1;width:42px!important;height:42px!important;border-radius:13px!important}
 body.kj-signed-in .account-trigger .kb-chev{display:none}
 body.kj-signed-in .account-copy strong{max-width:105px;font-size:13px}
 body.kj-signed-in .account-copy small{font-size:10px}
}
html body .sidebar .kb-mark{display:grid!important;font-size:28px!important;font-weight:900!important;line-height:1!important;color:#fff!important;font-family:inherit}
html body .sidebar .kb-mark i{display:block!important}

/* ── เมนูล่างมือถือ: ปุ่มที่เลือกขึ้นสี (แบบแอป) ── */
html body .kj-tabbar a,html body .kj-tabbar button{color:#8A94A6!important;background:none!important;transition:color .2s}
html body .kj-tabbar a svg,html body .kj-tabbar button svg{transition:transform .2s,fill .2s}
html body .kj-tabbar .active:not(.kj-tab-center){color:#C32148!important;font-weight:800}
html body .kj-tabbar .active:not(.kj-tab-center) svg{fill:#C3214826;stroke:#C32148;transform:translateY(-1px) scale(1.08)}
html body .kj-tabbar .active:not(.kj-tab-center):after{content:"";position:absolute;top:0;left:32%;right:32%;height:3px;border-radius:0 0 4px 4px;background:#C32148}
html body .kj-tabbar .kj-tab-center{color:#8A94A6!important}
html body .kj-tabbar .kj-tab-center .kj-tab-fab{background:linear-gradient(145deg,#9AA5B6,#7B879A)!important;box-shadow:0 6px 14px #172A4633!important;transition:background .2s,transform .2s}
html body .kj-tabbar .kj-tab-center.active{color:#C32148!important;font-weight:800}
html body .kj-tabbar .kj-tab-center.active .kj-tab-fab{background:linear-gradient(145deg,#E4466B,#C32148 55%,#9F1937)!important;box-shadow:0 6px 16px #C3214866!important;transform:translateY(-2px)}
html body .kj-tabbar .kj-pop svg{animation:kjpop .35s ease}
@keyframes kjpop{40%{transform:scale(1.25)}100%{transform:scale(1.08)}}
/* 22 ก.ย. 2569: แก้เมนูข้างบนมือถือ — แสดงชื่อเมนูครบทุกข้อ เลื่อนดูได้ ไม่ถูกตัด */
@media(max-width:900px){
 body.app-drawer-open .sidebar{overflow-y:auto!important;-webkit-overflow-scrolling:touch;padding-bottom:28px!important}
 body.app-drawer-open .sidebar nav{flex:0 0 auto!important;overflow:visible!important;max-height:none!important;height:auto!important;display:flex!important;flex-direction:column!important;gap:4px!important}
 body.app-drawer-open .sidebar nav a{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;width:100%!important;height:auto!important;min-height:46px;padding:10px 14px!important;border-radius:12px!important;box-sizing:border-box}
 body.app-drawer-open .sidebar nav a span{display:inline!important;font-size:15px!important;font-weight:700;color:#172A46;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.app-drawer-open .sidebar nav a.active span{color:#C32148}
 body.app-drawer-open .sidebar nav a svg{flex:0 0 22px;width:22px;height:22px}
 body.app-drawer-open .sidebar .sidebar-note{display:none!important}
}

/* โลโก้ KruJoy Lango (ภาพพื้นโปร่งใส) */
html body .sidebar .kb-brand{justify-content:center}
.kb-logo-img{display:block;width:100%;max-width:210px;height:auto}
.app-logo{display:flex!important;align-items:center}
.app-logo-img{display:block;height:40px;width:auto;max-width:52vw}
.kf-logo{padding:10px 16px!important}
.kf-logo-img{display:block;height:58px;width:auto;max-width:100%}
@media(max-width:380px){.app-logo-img{height:34px}}

/* เมนูข้าง: หัวหมวด */
.sidebar .nav-group-cap{font-size:11.5px;font-weight:800;letter-spacing:.06em;color:#9aa1ae;padding:14px 16px 4px}
.sidebar #navigation .nav-group-cap:first-child{padding-top:2px}
.nav-caption{display:none!important}
#navigation a span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:850px){.sidebar .nav-group-cap{display:none}body.app-drawer-open .sidebar .nav-group-cap{display:block}}
/* เมนูมือถือ (ลิ้นชัก): โลโก้ใหญ่ขึ้น */
@media(max-width:900px){body.app-drawer-open .sidebar .brand img{width:220px!important;height:auto!important;max-width:100%}body.app-drawer-open .sidebar .brand{margin-bottom:18px!important}}

body.app-drawer-open .sidebar .nav-caption,.sidebar .nav-caption{display:none!important}

/* โลโก้ท้ายเว็บ: คงสัดส่วนเดิม ไม่ถูกบีบ */
.kf .kf-logo{display:inline-block;max-width:100%;padding:12px 18px}
.kf .kf-logo-img{width:240px!important;max-width:100%!important;height:auto!important;aspect-ratio:900/231;object-fit:contain}

/* ── มือถือ ยังไม่เข้าสู่ระบบ / ระหว่างโหลดบัญชี: โลโก้ไม่ชนปุ่ม (27 ก.ย. 2569) ──
   โลโก้ย้ายมาชิดปุ่มเมนู (ไม่ลอยกลางจอ) · ซ่อนตะกร้า (สั่งซื้อต้องเข้าสู่ระบบอยู่แล้ว) · ปุ่มบัญชีเหลือคำว่า "เข้าสู่ระบบ" */
@media(max-width:900px){
 html body:not(.kj-signed-in) .topbar .app-logo{position:static!important;transform:none!important;left:auto!important;right:auto!important;margin:0 auto 0 6px!important;flex:0 1 auto;min-width:0}
 html body:not(.kj-signed-in) .topbar .app-logo img{width:clamp(96px,30vw,132px)!important;height:auto!important}
 html body:not(.kj-signed-in) .topbar .cart-trigger{display:none!important}
 html body:not(.kj-signed-in) .topbar .top-actions{gap:6px;flex:none}
 html body:not(.kj-signed-in) .topbar .account-trigger{padding:0 14px!important;height:42px;gap:0}
 html body:not(.kj-signed-in) .topbar .account-trigger .avatar,
 html body:not(.kj-signed-in) .topbar .account-trigger #account-subtitle,
 html body:not(.kj-signed-in) .topbar .account-trigger .kb-chev{display:none!important}
 html body:not(.kj-signed-in) .topbar #account-label{font-size:14px;white-space:nowrap}
}
