:root{--ink:#1c2430;--muted:#667085;--line:#e4e7ec;--bg:#f7f8fa;--brand:#0b5cad;--accent:#f26b1d}
*{box-sizing:border-box}
:root{--bs-body-font-family:"Anuphan","Sarabun","Segoe UI",Tahoma,system-ui,sans-serif}
body{font-family:var(--bs-body-font-family);color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
a{color:var(--brand);text-decoration:none}a:hover{text-decoration:underline}
.wrap{max-width:1180px;margin:0 auto;padding:0 16px}
h1{font-size:1.5rem;margin:.2em 0 .4em}h2{font-size:1.2rem;margin:1.6em 0 .6em}
.meta{color:var(--muted);margin:0 0 12px}
.crumbs{font-size:.9rem;color:var(--muted);margin-bottom:8px}
.chips{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px}
.chips a{display:inline-block;background:#fff;border:1px solid var(--line);border-radius:999px;padding:5px 14px;color:var(--ink)}
.chips small{color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.pager{display:flex;gap:16px;justify-content:center;align-items:center;margin:24px 0}
.btn-accent{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:700}
.btn-accent:hover{background:var(--accent);color:#fff;filter:brightness(.93)}
.notice{background:#fff7e6;border:1px solid #ffd591;border-radius:8px;padding:10px 14px}.notice.ok{background:#e8f7ee;border-color:#8fd5a8}
.form{display:grid;gap:12px;max-width:520px}.form label{display:grid;gap:4px;font-weight:600}
.form input,.form textarea{padding:9px 12px;border:1px solid var(--line);border-radius:8px;font:inherit}

main.container{padding-top:16px;padding-bottom:40px;min-height:60vh}
.topbar{background:#f1f3f5;border-bottom:1px solid var(--line);font-size:.85rem;padding:6px 0}
.topbar a{color:var(--ink);margin-right:16px}
.main-nav{padding:10px 0;position:sticky;top:0;z-index:20}
.navbar-brand img{max-width:180px;object-fit:contain}
.cart-link{position:relative;color:var(--ink);font-size:1.3rem;padding:0 8px}
.cart-link .badge{position:absolute;top:-8px;right:-4px;font-size:.65rem}
.sub-nav .nav-link{color:var(--ink);white-space:nowrap;padding:.6rem 1rem}
.sub-nav .nav-link:hover{color:var(--brand)}
.section-title{font-size:1.25rem;font-weight:700;margin:1.2em 0 .7em;border-left:4px solid var(--accent);padding-left:10px}
.category-card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px 8px;text-align:center;color:var(--ink);display:flex;flex-direction:column;align-items:center;gap:8px}
.category-card:hover{border-color:var(--brand);text-decoration:none;box-shadow:0 2px 10px rgba(11,92,173,.15)}
.category-card img{width:84px;height:84px;object-fit:contain}
.cat-ph{width:84px;height:84px;display:flex;align-items:center;justify-content:center;font-size:2rem;color:#9aa4b2}
.category-name{font-size:.88rem;line-height:1.3}
.shelf .swiper{padding:2px 2px 8px}
.qty{width:80px}
.cart-table th{white-space:nowrap}
.site-footer{background:#fff;border-top:1px solid var(--line);padding:24px 0;color:var(--ink)}
.site-footer a{color:var(--brand)}

/* ---- Mega menu (same behaviour as KUPLUS) ---- */
.mega-wrap{position:relative}
.mega-menu-panel{position:absolute;left:0;right:0;top:100%;z-index:1030}
.mega-menu-panel.show::before{content:"";position:fixed;inset:0;z-index:-1;background:rgba(15,23,42,.3)}
.mega-menu-body{max-height:70vh;background:#fff;border-radius:0 0 .75rem .75rem;overflow:hidden;box-shadow:0 1rem 2rem rgba(15,23,42,.25)}
.mega-menu-parents{background:#f8f9fc;border-right:1px solid #e5e9f2;max-height:70vh;overflow-y:auto;padding:.5rem 0}
.mega-menu-parent-link{display:flex;align-items:center;justify-content:space-between;padding:.65rem 1rem;color:#334155;font-weight:600;font-size:.9rem;text-decoration:none;border-left:3px solid transparent}
.mega-menu-parent-link:hover{background:#eef1f8;color:var(--brand);text-decoration:none}
.mega-menu-parent-link.active{background:#eaf1ff;color:var(--brand);border-left-color:var(--brand)}
.mega-menu-children{max-height:70vh;overflow-y:auto;padding:1.25rem}
.mega-menu-child-group{display:none}.mega-menu-child-group.active{display:block}
.mega-menu-child-grid{column-count:1;column-gap:1.5rem;max-width:720px}
.mega-menu-child-grid--two{column-count:2}
.mega-menu-child-grid a{display:block;break-inside:avoid;color:#1f2937;font-size:.95rem;text-decoration:none;padding:.6rem .9rem;border-radius:.4rem}
.mega-menu-child-grid a:hover{background:#f1f4f9;color:var(--brand)}
.mobile-category-toggle{border:0;background:none;color:var(--ink);font-size:1.4rem;line-height:1;padding:0 .5rem 0 0}
.mega-menu-panel.collapsing{transition:none}
@media (max-width:991.98px){.mega-menu-panel{position:fixed;inset:0;top:0;height:auto;background:#fff;z-index:1045}}
@media (min-width:576px) and (max-width:991.98px){.mega-menu-panel{right:auto;width:50%;max-width:420px;box-shadow:6px 0 24px rgba(0,0,0,.2)}}
.mega-menu-mobile{display:flex;flex-direction:column;height:100%;background:#fff}
.mega-menu-mobile-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem;border-bottom:1px solid #e5e9f2;flex-shrink:0}
.mega-menu-mobile-body{position:relative;flex:1;overflow:hidden}
.mega-menu-mobile-level{display:none;position:absolute;inset:0;overflow-y:auto;background:#fff}
.mega-menu-mobile-level.active{display:flex;flex-direction:column}
.mega-menu-mobile-item{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;background:none;text-align:left;padding:.9rem 1.25rem;border-bottom:1px solid #f0f2f6;color:#1f2937;font-size:.95rem;text-decoration:none}
.mega-menu-mobile-item i{color:var(--ink)!important;opacity:1!important}
.mega-menu-mobile-back{display:flex;align-items:center;gap:.4rem;width:100%;border:0;background:#f8f9fc;text-align:left;padding:.9rem 1.25rem;border-bottom:1px solid #e5e9f2;color:var(--brand);font-weight:600;font-size:.95rem}
.mega-menu-mobile-item--icon{gap:.75rem}
.mega-menu-mobile-icon{flex-shrink:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:.5rem;background:#f1f4f9;font-size:1.1rem;overflow:hidden}
.mega-menu-mobile-icon i{color:var(--brand)}
.mega-menu-mobile-icon img{width:100%;height:100%;object-fit:contain}
.mega-menu-mobile-text{flex:1;display:flex;flex-direction:column;min-width:0}
.mega-menu-mobile-primary{font-weight:600;color:#1f2937}
.mega-menu-mobile-secondary{font-size:.8rem;color:#6c757d}

.mega-menu-mobile-contact{margin-top:auto;padding:1rem 1.25rem;background:#f4f5f9;display:flex;flex-direction:column;gap:.35rem;font-size:.9rem}
.mega-menu-mobile-contact-title{font-weight:700;margin-bottom:.25rem}
.mega-menu-mobile-contact a{color:#1f2937;text-decoration:none}
.mega-menu-mobile-contact i{width:1.4rem;color:#64748b}

/* ---- Header search suggestions (same as KUPLUS) ---- */
.tfm-search-form{position:relative}
.tfm-search-results{display:none;position:absolute;top:100%;left:0;right:0;margin-top:.4rem;background:#fff;border:1px solid #e5e9f2;border-radius:.6rem;box-shadow:0 .75rem 1.5rem rgba(15,23,42,.15);max-height:420px;overflow-y:auto;z-index:1050}
.tfm-search-results.show{display:block}
.tfm-search-item{display:flex;align-items:center;gap:.75rem;padding:.55rem .9rem;text-decoration:none;color:#1f2937;border-bottom:1px solid #f0f2f6}
.tfm-search-item:last-child{border-bottom:0}
.tfm-search-item:hover{background:#f8f9fc;text-decoration:none}
.tfm-search-item img{width:40px;height:40px;object-fit:contain;background:#fff;border:1px solid #e5e9f2;border-radius:.35rem;flex-shrink:0}
.tfm-search-item-text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}
.tfm-search-item-name{font-size:.87rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tfm-search-item-code{font-size:.75rem;color:#94a3b8}
.tfm-search-item-price{font-size:.85rem;font-weight:700;color:var(--brand);white-space:nowrap;flex-shrink:0}
.tfm-search-empty{padding:.9rem;color:#94a3b8;font-size:.85rem;text-align:center}

/* ---- Product card: equal height, 2-line title, price pinned to the bottom ---- */
.pcard{height:100%;display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.pcard:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(16,24,40,.12);border-color:#cdd7e5}
.pcard .thumb{position:relative;display:block;aspect-ratio:1/1;overflow:hidden;background:#fff}
/* absolutely positioned: a tall/wide source image can never stretch the card */
.pcard .thumb img{position:absolute;inset:14px;width:calc(100% - 28px);height:calc(100% - 28px);object-fit:contain;transition:opacity .35s ease,transform .35s ease}
.pcard:hover .thumb img{transform:scale(1.04)}
.pcard .noimg{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#c3cad5;font-size:2.6rem}
.pbadge{position:absolute;top:10px;left:10px;background:var(--accent);color:#fff;font-size:.72rem;font-weight:700;padding:2px 9px;border-radius:999px}
.pcard .body{display:flex;flex-direction:column;flex:1;padding:4px 14px 14px}
.pcard .brand{margin-top:10px;font-size:.74rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--brand);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:1.2em}
.pcard h3{margin:4px 0 4px;font-size:.93rem;line-height:1.4;font-weight:600;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;min-height:2.8em;word-break:break-word}
.pcard h3 a{color:var(--ink)}
.pcard h3 a:hover{color:var(--brand);text-decoration:none}
.pcard .sku{font-size:.8rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcard .price{margin-top:auto;padding-top:10px;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.pcard .price b{color:var(--accent);font-size:1.08rem}
.pcard .price s{color:var(--muted);font-size:.82rem}
.pcard .ask{color:var(--muted);font-size:.9rem}
.swiper-wrapper{align-items:stretch}
.swiper-slide{height:auto}
.shelf .swiper{position:relative}
.shelf .swiper-button-prev,.shelf .swiper-button-next{width:38px;height:38px;margin-top:-30px;border-radius:50%;background:#fff;color:var(--brand);box-shadow:0 2px 10px rgba(16,24,40,.22)}
.shelf .swiper-button-prev::after,.shelf .swiper-button-next::after{font-size:14px;font-weight:700}
.shelf .swiper-button-prev{left:4px}.shelf .swiper-button-next{right:4px}
.shelf .swiper-button-disabled{opacity:0;pointer-events:none}

/* ---- Load effects ---- */
#pageBar{position:fixed;top:0;left:0;height:3px;width:0;z-index:2000;background:linear-gradient(90deg,var(--brand),var(--accent));box-shadow:0 0 8px rgba(242,107,29,.5);pointer-events:none}
/* no fill-mode: a lingering transform on <main> would turn it into the containing block of position:fixed children */
main.container{animation:pageIn .35s ease}
@keyframes pageIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.js .reveal{opacity:0;transform:translateY(16px);transition:opacity .5s ease var(--d,0ms),transform .5s ease var(--d,0ms)}
.js .reveal.in{opacity:1;transform:none}
.js .pcard.reveal.in{transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease,opacity .5s ease var(--d,0ms)}
.js .thumb img{opacity:0}
.js .thumb img.loaded{opacity:1}
.js .thumb:not(.ready){background:linear-gradient(100deg,#f3f4f6 30%,#e8ebf0 45%,#f3f4f6 60%);background-size:300% 100%;animation:shimmer 1.3s ease-in-out infinite}
@keyframes shimmer{from{background-position:100% 0}to{background-position:-100% 0}}
@media (prefers-reduced-motion:reduce){main.container{animation:none}.js .reveal{opacity:1;transform:none;transition:none}.js .thumb:not(.ready){animation:none}#pageBar{display:none}.pcard,.pcard .thumb img{transition:none}}

/* ---- Category tiles: desktop grid, mobile swipe strip (same idea as KUPLUS) ---- */
.cat-wrap{position:relative}
.cat-swiper .swiper-slide{height:auto}
.cat-swiper .category-card{height:100%}
@media (min-width:992px){
  .cat-swiper{overflow:visible}
  .cat-swiper .swiper-wrapper{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;transform:none!important}
  .cat-swiper .swiper-slide{width:auto!important}
}
@media (max-width:991.98px){
  .cat-swiper{background:#fff;border:1px solid #e5e9f2;border-radius:1rem;overflow:hidden}
  .cat-swiper .category-card{flex-direction:row;align-items:center;justify-content:flex-start;gap:.7rem;padding:1rem .8rem;text-align:left;border:0;border-radius:0;border-right:1px solid #e5e9f2;box-shadow:none}
  .cat-swiper .category-card:hover{box-shadow:none;background:#f7f9fc}
  .cat-swiper .swiper-slide:last-child .category-card{border-right:0}
  .cat-swiper .category-card img,.cat-swiper .cat-ph{flex-shrink:0;width:48px;height:48px;border-radius:.6rem;background:#f1f4f9;object-fit:contain}
  .cat-swiper .cat-ph{font-size:1.3rem}
  .cat-swiper .category-name{font-size:.9rem;font-weight:600;line-height:1.3;color:#1f2937;text-align:left;min-width:0}
  .cat-nav{position:absolute;top:50%;z-index:5;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;border:0;background:#fff;color:var(--brand);box-shadow:0 2px 10px rgba(16,24,40,.25);display:flex;align-items:center;justify-content:center;font-size:.8rem;padding:0}
  .cat-nav--prev{left:-6px}.cat-nav--next{right:-6px}
  .cat-nav.swiper-button-disabled{opacity:0;pointer-events:none}
}

/* home page hero carousel (banners from the admin) */
.hero-carousel{margin:0 0 1.25rem}
.hero-swiper{position:relative;border-radius:14px;overflow:hidden;background:#eef2f6}
.hero-swiper .swiper-slide img{display:block;width:100%;height:auto;aspect-ratio:16/6;object-fit:cover}
.hero-swiper .swiper-pagination-bullet-active{background:var(--brand)}
.hero-swiper .swiper-button-prev,.hero-swiper .swiper-button-next{width:38px;height:38px;border-radius:50%;background:#fff;color:var(--brand);box-shadow:0 2px 10px rgba(16,24,40,.22)}
.hero-swiper .swiper-button-prev::after,.hero-swiper .swiper-button-next::after{font-size:14px;font-weight:700}
@media (max-width:575.98px){.hero-swiper{border-radius:10px}.hero-swiper .swiper-button-prev,.hero-swiper .swiper-button-next{display:none}}

/* ================= Product detail page ================= */
.pd{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:32px;align-items:start;margin-top:8px}
@media(max-width:991.98px){.pd{grid-template-columns:minmax(0,1fr);gap:18px}}
.pd-gallery,.pd-info,.pd-main,.pd-swiper{min-width:0}
.pd-gallery{position:sticky;top:84px}
@media(max-width:991.98px){.pd-gallery{position:static}}
.pd-zoom-hint{position:absolute;right:12px;bottom:12px;font-size:.78rem;color:#64748b;background:rgba(255,255,255,.9);padding:3px 10px;border-radius:999px;border:1px solid var(--line);pointer-events:none}
.pd-noimg{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#b8c0cc;font-size:3rem}
.pd-noimg span{font-size:.9rem}
.pd-main .pbadge{top:14px;left:14px;font-size:.8rem;padding:3px 12px}
.pd-thumbs{display:flex;gap:10px;margin-top:12px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.pd-thumbs::-webkit-scrollbar,.pd-tabs::-webkit-scrollbar{display:none}
.pd-thumb{flex:0 0 auto;width:74px;height:74px;border:2px solid var(--line);border-radius:12px;background:#fff;overflow:hidden;transition:border-color .15s ease}
.pd-thumb img{width:100%;height:100%;object-fit:contain;padding:4px}
.pd-thumb:hover{border-color:#b9c7dc}
.pd-thumb.active{border-color:var(--brand)}

.pd-info{min-width:0}
.pd-brand{display:inline-block;font-size:.8rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--brand);background:#eaf2fb;padding:3px 12px;border-radius:999px}
.pd-brand:hover{text-decoration:none;background:#dcebfa}
.pd-info h1{font-size:1.45rem;line-height:1.4;font-weight:700;margin:10px 0 8px;word-break:break-word}
.pd-ids{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:.9rem;color:var(--muted);margin-bottom:14px}
.pd-ids b{color:var(--ink)}
.pd-copy{border:0;background:none;color:#94a3b8;padding:0 4px;cursor:pointer}
.pd-copy:hover,.pd-copy.done{color:var(--brand)}
.pd-pricebox{background:linear-gradient(180deg,#fffaf5,#fff);border:1px solid #f6dcc8;border-radius:16px;padding:16px 18px;margin-bottom:14px}
.pd-price-row{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.pd-price{font-size:2rem;font-weight:800;color:var(--accent);line-height:1.1}
.pd-was{color:var(--muted);font-size:1.05rem}
.pd-vat{font-size:.82rem;color:var(--muted);margin-top:2px}
.pd-ask{font-size:1.05rem;font-weight:700;color:#334155}
.pd-ask i{color:var(--accent);margin-right:6px}
.pd-stock{margin-top:10px}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:.84rem;font-weight:600;padding:4px 12px;border-radius:999px}
.chip-ok{background:#e6f6ec;color:#17803d}.chip-warn{background:#fff4e0;color:#b45f06}.chip-muted{background:#eef1f5;color:#566174}
.pd-buy{display:flex;gap:12px;align-items:stretch;margin-bottom:12px}
.pd-qty{display:inline-flex;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}
.pd-qty button{width:40px;border:0;background:#f4f6f9;font-size:1.2rem;color:#334155;cursor:pointer}
.pd-qty button:hover{background:#e9edf3}
.pd-qty input{width:64px;text-align:center;border:0;font-weight:700;font-size:1rem;-moz-appearance:textfield}
.pd-qty input::-webkit-outer-spin-button,.pd-qty input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.pd-cta{flex:1;border-radius:12px;font-size:1.02rem;padding:12px 18px}
.btn-accent{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:700}
.btn-accent:hover{background:var(--accent);color:#fff;filter:brightness(.93)}
.pd-contact{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.pd-contact a{flex:1 1 160px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;padding:10px 14px;font-weight:700;text-decoration:none}
.btn-line{background:#06c755;color:#fff}.btn-line:hover{background:#05b34c;color:#fff}
.btn-call{background:#fff;color:var(--ink);border:1px solid var(--line)}.btn-call:hover{background:#f4f6f9;color:var(--ink)}
.pd-trust{list-style:none;margin:0;padding:14px 4px 0;border-top:1px dashed var(--line);display:grid;gap:8px;font-size:.9rem;color:#475569}
.pd-trust i{width:1.4rem;color:var(--brand)}

.pd-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin-top:28px;border-bottom:1px solid var(--line);position:sticky;top:60px;background:var(--bg);z-index:15;padding-top:6px}
.pd-tabs a{white-space:nowrap;padding:10px 16px;color:#475569;font-weight:600;border-bottom:3px solid transparent;margin-bottom:-1px}
.pd-tabs a:hover{color:var(--brand);text-decoration:none;border-bottom-color:var(--brand)}
.pd-section{background:#fff;border:1px solid var(--line);border-radius:16px;padding:6px 22px 22px;margin-top:18px;scroll-margin-top:120px}
.pd-section h2{font-size:1.15rem;margin:16px 0 12px;font-weight:700;border-left:4px solid var(--accent);padding-left:10px}
.pd-intro{color:#334155;line-height:1.75;margin:0 0 14px}
.pd-info-table{display:grid;grid-template-columns:minmax(150px,220px) 1fr;margin:0;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.pd-info-table dt,.pd-info-table dd{padding:9px 14px;margin:0;border-top:1px solid var(--line)}
.pd-info-table dt:first-of-type,.pd-info-table dd:first-of-type{border-top:0}
.pd-info-table dt{background:#f6f8fb;color:#566174;font-weight:600}
.pd-specs{width:100%;border-collapse:collapse;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.pd-specs th,.pd-specs td{padding:9px 14px;text-align:left;vertical-align:top;border-top:1px solid var(--line)}
.pd-specs tr:first-child th,.pd-specs tr:first-child td{border-top:0}
.pd-specs th{width:38%;background:#f6f8fb;color:#566174;font-weight:600}
.pd-specs tr:nth-child(even) td{background:#fcfdfe}
.pd-docs{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.pd-docs a{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;color:var(--ink);word-break:break-word}
.pd-docs a:hover{border-color:var(--brand);text-decoration:none;color:var(--brand)}
.pd-docs i{color:#d9381e;font-size:1.2rem}
.pd-related{background:transparent;border:0;padding:0}
.pd-related h2{margin-top:26px}
@media(max-width:575.98px){.pd-info-table{grid-template-columns:1fr}.pd-info-table dt{border-bottom:0}.pd-section{padding:4px 14px 16px}.pd-price{font-size:1.7rem}}

.pd-bar{position:fixed;left:0;right:0;bottom:0;z-index:900;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);box-shadow:0 -6px 18px rgba(16,24,40,.08)}
.pd-bar-price{display:flex;flex-direction:column;line-height:1.15}
.pd-bar-price b{font-size:1.2rem;color:var(--accent)}.pd-bar-price b.ask{font-size:1rem;color:#334155}
.pd-bar-price small{color:var(--muted);font-size:.72rem}
.pd-bar .btn{border-radius:12px;padding:10px 18px;white-space:nowrap}
.pd-bar-spacer{height:74px}

.pd-lightbox{position:fixed;inset:0;z-index:3000;background:rgba(10,15,25,.92);display:flex;align-items:center;justify-content:center;padding:24px}
.pd-lightbox[hidden]{display:none}
.pd-lightbox img{max-width:min(94vw,1200px);max-height:90vh;background:#fff;border-radius:12px;object-fit:contain}
.pd-lb-close{position:absolute;top:14px;right:20px;border:0;background:none;color:#fff;font-size:2.4rem;line-height:1;cursor:pointer}
.pd-lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:46px;border-radius:50%;border:0;background:rgba(255,255,255,.9);color:#1f2937;cursor:pointer}
.pd-lb-prev{left:16px}.pd-lb-next{right:16px}
.pd-lightbox.single .pd-lb-nav{display:none}
@media(prefers-reduced-motion:reduce){.pd-main img,.pd-thumb{transition:none}}

/* ---- Product gallery carousel ---- */
.pd-main{position:relative;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;aspect-ratio:1/1}
.pd-swiper{width:100%;height:100%}
.pd-swiper .swiper-slide{height:100%}
.pd-zoom{display:block;width:100%;height:100%;cursor:zoom-in}
.pd-zoom img{width:100%;height:100%;object-fit:contain;padding:18px;transition:transform .35s ease;-webkit-user-drag:none;user-select:none}
.pd-zoom:hover img{transform:scale(1.03)}
.pd-arrow{position:absolute;top:50%;z-index:5;transform:translateY(-50%);width:42px;height:42px;border-radius:50%;border:0;background:rgba(255,255,255,.95);color:var(--brand);box-shadow:0 2px 10px rgba(16,24,40,.25);align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .2s ease}
.pd-main:hover .pd-arrow{opacity:1}
.pd-arrow--prev{left:12px}.pd-arrow--next{right:12px}
.pd-arrow.swiper-button-disabled{opacity:0!important;pointer-events:none}
.pd-counter{position:absolute;top:12px;right:12px;z-index:5;font-size:.78rem;font-weight:600;color:#475569;background:rgba(255,255,255,.92);border:1px solid var(--line);padding:2px 10px;border-radius:999px;pointer-events:none}
.pd-dots{position:absolute;left:0;right:0;bottom:10px;z-index:5;display:flex;justify-content:center;gap:6px;pointer-events:none}
.pd-dots .swiper-pagination-bullet{pointer-events:auto;width:8px;height:8px;border-radius:50%;background:#c5ccd8;opacity:1;margin:0!important}
.pd-dots .swiper-pagination-bullet-active{background:var(--brand);width:20px;border-radius:999px}
@media(max-width:991.98px){.pd-main{border-radius:14px}.pd-zoom img{padding:10px}.pd-thumb{width:62px;height:62px}}

/* ---- Cart / checkout (same look as the KUPLUS cart) ---- */
.cart-thumb{width:50px;height:50px;object-fit:contain;background:#fff;border:1px solid #e5e9f2;border-radius:.35rem;flex-shrink:0}
.cart-thumb--empty{display:inline-flex;align-items:center;justify-content:center;color:#c3cad5}
.cart-table th{white-space:nowrap}
.cart-qty{min-width:76px}
.checkout-summary{position:sticky;top:84px}
@media(max-width:991.98px){.checkout-summary{position:static}}
.cart-empty{border:1px solid var(--line)}

/* ---- Mini-cart drawer (opened from the header cart icon / after "add to quote") ---- */
.tfm-cart-drawer{width:min(420px,100vw)}
.tfm-cart-drawer .offcanvas-body{display:flex;flex-direction:column}
.mini-cart-lines{flex:1 1 auto;overflow-y:auto;padding:.25rem 1rem}
.mini-cart-line{display:flex;gap:.75rem;padding:.85rem 0;border-bottom:1px solid #eef1f6}
.mini-cart-line.is-off{opacity:.55}
.mini-cart-info{min-width:0;flex:1 1 auto}
.mini-cart-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.875rem;font-weight:600;color:var(--ink,#1f2937);text-decoration:none}
.mini-cart-title:hover{text-decoration:underline}
.mini-cart-row{display:flex;align-items:center;gap:.6rem;margin-top:.45rem}
.mini-cart-price{margin-left:auto;font-weight:600;font-size:.9rem}
.mini-qty{display:inline-flex;border:1px solid #c9d1dc;border-radius:.4rem;overflow:hidden}
.mini-qty button{border:0;background:#fff;width:28px;color:#334155;font-size:1rem;line-height:1}
.mini-qty button:hover{background:#f1f5f9}
.mini-qty-input{width:46px;border:0;border-left:1px solid #c9d1dc;border-right:1px solid #c9d1dc;text-align:center;font-size:.85rem;padding:.2rem 0;-moz-appearance:textfield}
.mini-qty-input::-webkit-outer-spin-button,.mini-qty-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.mini-remove{border:0;background:none;color:#dc3545;padding:.2rem .35rem;border-radius:.3rem}
.mini-remove:hover{background:#fdecee}
.mini-cart-footer{flex:0 0 auto;border-top:1px solid #e5e9f2;padding:1rem;background:#fff}
.mini-cart-empty{padding:3rem 1rem}
.mini-cart-empty .fa-shopping-cart{font-size:2.5rem;color:#cbd5e1}

/* ---- Language switch (TH | EN) ---- */
.lang-switch{display:inline-flex;align-items:center;gap:6px;font-weight:700}
.lang-switch a{color:#64748b}
.lang-switch a.active{color:var(--brand);text-decoration:underline;text-underline-offset:3px}
.lang-switch>span{color:#cbd5e1}
.mega-menu-mobile-lang{justify-content:space-between;cursor:default}

/* ================= Product page: smaller gallery, minimal purchase block (one accent colour) ================= */
.pd{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:36px}
@media(max-width:991.98px){.pd{grid-template-columns:minmax(0,1fr);gap:16px}}
.pd-gallery{max-width:460px;width:100%}
@media(max-width:991.98px){.pd-gallery{max-width:none}}
.pd-main{aspect-ratio:1/1;border-radius:14px}
@media(max-width:991.98px){.pd-main{aspect-ratio:4/3;max-height:300px}.pd-zoom img{padding:8px}}
.pd-thumb{width:58px;height:58px;border-radius:10px;border-width:1.5px}
.pd-thumbs{gap:8px;margin-top:10px}

.pd-sku{display:inline-flex;align-items:center;gap:6px;font-size:.85rem;font-weight:700;letter-spacing:.06em;color:#475569;background:#f1f4f8;padding:4px 6px 4px 12px;border-radius:999px}
.pd-sku .pd-copy{padding:2px 6px}
.pd-info h1{font-size:1.4rem;line-height:1.4;margin:12px 0 8px}
.pd-links{list-style:none;margin:0 0 18px;padding:0;display:flex;flex-wrap:wrap;gap:4px 0;font-size:.92rem}
.pd-links li+li::before{content:"·";margin:0 10px;color:#b4bcc9}
.pd-links a{color:var(--brand);font-weight:500}
.pd-links span{color:#64748b}

.pd-pricebox{background:none;border:0;border-top:1px solid var(--line);border-radius:0;padding:18px 0 4px;margin:0 0 14px}
.pd-price{font-size:2rem;font-weight:700;color:var(--ink);letter-spacing:-.01em}
.pd-was{color:#94a3b8;font-size:1rem}
.pd-vat{font-size:.82rem;color:#94a3b8;margin-left:2px}
.pd-ask{font-size:1.05rem;font-weight:600;color:var(--ink)}
.pd-stock{margin-top:8px}
.chip{background:none;padding:0;gap:8px;font-weight:500;font-size:.9rem;color:#475569;border-radius:0}
.chip::before{content:"";width:8px;height:8px;border-radius:50%;background:#94a3b8;flex:none}
.chip-ok::before{background:#22a06b}.chip-warn::before{background:#d99a1f}
.chip-ok,.chip-warn,.chip-muted{background:none}

.pd-buy{margin-bottom:10px}
.pd-qty{border-color:#d9dee7;border-radius:10px}
.pd-qty button{background:#fff}
.pd-cta{border-radius:10px;font-weight:600;padding:12px 18px}
.pd-contact{margin-bottom:6px}
.pd-contact a,.btn-line,.btn-call{background:#fff;color:var(--ink);border:1px solid #d9dee7;border-radius:10px;font-weight:600}
.btn-line:hover,.btn-call:hover{background:#f6f8fb;color:var(--ink)}
.pd-contact i{color:#64748b}
.pd-trust{border-top:0;padding-top:12px;gap:6px;font-size:.86rem;color:#64748b}
.pd-trust i{color:#94a3b8}
.pd-bar-price b{color:var(--ink)}.pd-bar-price b.ask{color:var(--ink)}

/* ---- Footer: details always visible, link groups collapse on phones ---- */
.site-footer{padding:22px 0 18px}
.footer-name{display:block;font-size:1.15rem;margin-bottom:8px}
.footer-contact li{margin:3px 0;font-size:.95rem}
.footer-contact i{width:1.3rem;margin-right:2px;color:#475569}
.footer-contact i.footer-line{color:var(--ink);font-size:1.15rem;vertical-align:-1px}
.footer-contact a{color:var(--ink)}
.footer-acc-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;background:none;border:0;padding:16px 0 12px;font-weight:700;font-size:1.05rem;color:var(--ink);text-align:left}
.footer-acc-toggle i{font-size:.9rem;transition:transform .2s ease}
.footer-acc-toggle:not(.collapsed) i{transform:rotate(180deg)}
.footer-acc-body{padding-bottom:6px}
.footer-acc-body li{margin:4px 0}
.footer-sec+.footer-sec{border-top:1px solid #f0f2f6}
.footer-sec:first-child{border-top:0}
.footer-ship{display:flex;gap:14px;font-weight:600;color:#475569}
.footer-copy{margin-top:14px}
@media (min-width:992px){
  /* desktop: plain columns, no toggling */
  .footer-acc-toggle{pointer-events:none;padding:0 0 10px;font-size:1rem;cursor:default}
  .footer-acc-toggle i{display:none}
  .footer-acc .collapse{display:block!important;height:auto!important;visibility:visible}
  .footer-sec+.footer-sec{border-top:0}
  .footer-acc-body{padding-bottom:0}
}

@media (min-width:992px){
  /* desktop footer: company details on the left, four evenly spaced link columns on the right (no empty gaps) */
  .site-footer .container>.row{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:40px 56px;align-items:start;margin:0}
  .site-footer .container>.row>[class*="col-"]{width:auto;max-width:none;padding:0;flex:none}
  .site-footer .footer-acc{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 32px;align-items:start;margin:0}
  .site-footer .footer-acc>[class*="col-"]{width:auto;max-width:none;padding:0}
  .footer-name{line-height:1.3;margin-bottom:10px}
  .footer-acc-toggle{padding:0 0 12px;line-height:1.3}
  .footer-acc-body ul{margin:0}
  .footer-ship{flex-wrap:wrap;gap:4px 14px;margin:4px 0}
}
@media (min-width:992px) and (max-width:1199.98px){
  /* narrow desktops/tablets: tighter gaps so the link text keeps its room */
  .site-footer .container>.row{gap:32px 36px}
  .site-footer .footer-acc{gap:20px}
}

/* Anuphan is a little wider than the old font: keep the mobile buy bar inside very narrow screens */
@media (max-width:359.98px){.pd-bar .btn{font-size:.9rem;padding:9px 12px}.pd-bar-price b{font-size:1.05rem}}

/* ---- Listing filter sidebar (categories / brands) ---- */
.listing .grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
.filter-toggle{width:100%;display:flex;align-items:center;gap:8px;justify-content:center;background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px;font-weight:600;color:var(--ink);margin-bottom:12px}
.filter-card{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
@media (min-width:992px){.filter-card{position:sticky;top:84px;max-height:calc(100vh - 110px);overflow-y:auto;scrollbar-width:thin}}
.filter-group+.filter-group{border-top:1px solid var(--line)}
.filter-head{width:100%;display:flex;align-items:center;justify-content:space-between;background:#dbe8fb;border:0;padding:14px 18px;font-weight:700;color:#0d3b78;font-size:1rem;text-align:left}
.filter-head i{font-size:.9rem;transition:transform .2s ease}
.filter-head.collapsed i{transform:rotate(180deg)}
.filter-list{list-style:none;margin:0;padding:12px 16px 14px;max-height:340px;overflow-y:auto;scrollbar-width:thin}
.filter-item{display:flex;align-items:center;gap:10px;padding:6px 0;color:var(--ink);text-decoration:none;line-height:1.35}
.filter-item:hover .flabel{color:var(--brand)}
.fbox{flex:none;width:20px;height:20px;border:1.5px solid #cbd5e1;border-radius:5px;background:#fff;display:inline-flex;align-items:center;justify-content:center}
.filter-item.active .fbox{background:var(--brand);border-color:var(--brand)}
.filter-item.active .fbox::after{content:"";width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg) translate(-1px,-1px)}
.flabel{text-decoration:underline;text-underline-offset:3px;text-decoration-color:#9fb4d3;flex:1;min-width:0;word-break:break-word}
.filter-item.active .flabel{font-weight:600}
.fcount{color:#94a3b8;font-size:.72rem;flex:none}
/* smaller type in the filter sidebar */
.filter-head{font-size:.9rem;padding:10px 16px}
.filter-head i{font-size:.72rem}
.filter-list{padding:8px 14px 10px}
.filter-item{font-size:.82rem;gap:9px;padding:4px 0}
.fbox{width:17px;height:17px}
.filter-item.active .fbox::after{width:4px;height:8px}

/* ---- Editorial pages (e.g. contact / map): tidy cards, round tinted icons, one accent colour ---- */
.content-page .contact-card{border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:transform .25s ease,box-shadow .25s ease}
.content-page .contact-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(16,24,40,.10)}
.content-page .card-body{padding:1.6rem 1.7rem}
.content-page h1{font-size:1.9rem;letter-spacing:-.01em}
.content-page h3.text-primary{color:var(--brand)!important;font-size:1.35rem;font-weight:600}
/* card titles: a short accent bar only (the stored HTML adds its own underline; drop the site's left bar so they don't clash) */
.content-page .section-title{border-left:0;padding-left:0;font-size:1.15rem;font-weight:700;margin:0 0 22px;padding-bottom:12px}
.content-page .section-title::after{width:38px;height:3px;border-radius:3px;background:var(--accent)!important}
/* icons: soft round badges in the brand colour, whatever text-primary/success/danger class the stored HTML gave them */
.content-page .bi{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#eaf2fb;color:var(--brand)!important;font-size:.95rem;line-height:1;vertical-align:middle;flex:none;margin-right:10px!important}
.content-page .bi::before{line-height:1}
.content-page ul.list-unstyled li{padding:3px 0}
.content-page .card-text{display:flex;align-items:flex-start;gap:0;margin-bottom:12px}
.content-page .card-text .bi{margin-top:-4px}
.content-page a:not(.btn){color:var(--ink);font-weight:600;text-decoration:none}
.content-page a:not(.btn):hover{color:var(--brand);text-decoration:underline;text-underline-offset:3px}
.content-page strong{color:#334155}
.content-page .map-container{border:1px solid var(--line);border-radius:16px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.content-page .btn{border-radius:999px;font-weight:600;padding:.6rem 1.4rem;text-decoration:none!important}
.content-page .btn-outline-primary{border-color:#c9d7ea;color:var(--brand)}
.content-page .btn-outline-primary:hover{background:var(--brand);border-color:var(--brand);color:#fff}
.content-page .btn-outline-primary .bi{background:transparent;width:auto;height:auto;margin-right:8px!important}
.content-page .btn-success{background:#06c755;border-color:#06c755;color:#fff}
.content-page .btn-success:hover{background:#05b34c;border-color:#05b34c}
.content-page .btn-success .bi{background:rgba(255,255,255,.22);color:#fff!important;width:28px;height:28px;margin-right:8px!important}
/* the stored page nests two .container.py-5: on phones that wasted most of the width */
.content-page .container{padding-left:0;padding-right:0;max-width:none}
@media (max-width:575.98px){.content-page .container.py-5{padding-top:.5rem!important;padding-bottom:.5rem!important}.content-page h1{font-size:1.5rem}.content-page h3.text-primary{font-size:1.1rem}.content-page .card-body{padding:1.25rem}}
/* contact rows: icon, name and number stay aligned (and wrap as a unit) on narrow screens */
.content-page ul.list-unstyled li:not(:has(strong)){display:flex;flex-wrap:wrap;align-items:center;column-gap:.4rem}
.content-page ul.list-unstyled li .bi{margin-right:4px!important}

/* ---- monochrome icons and footer links (black ink instead of the brand blue) ---- */
.content-page .bi{color:var(--ink)!important;background:#f1f3f6}
.content-page .btn-success .bi{color:#fff!important;background:rgba(255,255,255,.22)}
.content-page .btn-outline-primary,.content-page .btn-outline-primary .bi{color:var(--ink)!important}
.content-page .btn-outline-primary:hover,.content-page .btn-outline-primary:hover .bi{color:#fff!important}
.site-footer a{color:var(--ink)}
.site-footer a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.site-footer .footer-acc-body i,.site-footer .footer-sec i.fa-envelope,.site-footer .footer-sec i.fa-line{color:var(--ink)}

/* product page: the photo + purchase block sits on a white card instead of the grey page background */
.pd{background:#fff;border:1px solid var(--line);border-radius:18px;padding:24px;box-shadow:0 1px 2px rgba(15,23,42,.04),0 10px 30px rgba(15,23,42,.04)}
.pd-main{border-color:#eef1f6}
@media(max-width:991.98px){.pd{padding:14px;border-radius:14px}}

/* the orange "Sale" badge was drawn underneath the photo slider (Swiper layers its slides at z-index 1), so only a sliver showed */
.pd-main .pbadge{z-index:6;pointer-events:none}

/* brand logo on the product photo, top right (the "n / N" photo counter moves to the bottom left to make room) */
.pd-brand{position:absolute;top:12px;right:12px;z-index:6;display:flex;align-items:center;justify-content:center;height:40px;max-width:46%;padding:6px 12px;background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:12px;box-shadow:0 2px 8px rgba(15,23,42,.06)}
.pd-brand img{display:block;height:26px;width:auto;max-width:100%;object-fit:contain}
.pd-counter{top:auto;right:auto;left:12px;bottom:12px}
@media(max-width:991.98px){.pd-brand{top:8px;right:8px;height:34px;padding:4px 9px}.pd-brand img{height:22px}.pd-counter{left:8px;bottom:8px}}

/* brand logo on the product photo: bigger, no box - just the logo, with a soft white halo so dark and light logos stay readable on any photo */
.pd-brand{height:auto;max-width:52%;padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.pd-brand img{height:56px;max-width:100%;filter:drop-shadow(0 0 2px rgba(255,255,255,.95)) drop-shadow(0 0 6px rgba(255,255,255,.75))}
@media(max-width:991.98px){.pd-brand{top:8px;right:10px;padding:0;height:auto}.pd-brand img{height:42px}}

/* brands page: logo tiles instead of name pills with product counts */
.brand-grid{list-style:none;margin:16px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:12px}
.brand-grid a{display:flex;align-items:center;justify-content:center;height:92px;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:14px;text-decoration:none;color:var(--ink);transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.brand-grid a:hover{transform:translateY(-2px);border-color:#cfdcf5;box-shadow:0 10px 24px rgba(15,23,42,.08)}
.brand-grid img{display:block;max-width:100%;max-height:54px;width:auto;height:auto;object-fit:contain}
.brand-grid .brand-name{font-weight:700;font-size:.95rem;text-align:center;line-height:1.3;word-break:break-word}
@media(max-width:575.98px){.brand-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.brand-grid a{height:80px;padding:10px}.brand-grid img{max-height:46px}}
