/*
Theme Name: Homemall Kadence
Template: kadence
Version: 1.0.0
Description: Homemall child theme (redesign 2026-11) — header/footer, product cards, member card
Text Domain: homemall
*/

:root{
  --hm-blue:#1D27A3; --hm-navy:#141C7A; --hm-navy2:#18228F; --hm-yellow:#FFC72C;
  --hm-ink:#182230; --hm-label:#344054; --hm-muted:#5B6478; --hm-line:#E3E7EF;
  --hm-bg:#F4F6FA; --hm-tint:#EEF0FB; --hm-red:#D92D20; --hm-green:#067647; --hm-green-bg:#ECFDF3;
  --hm-font:'Noto Sans Thai',Tahoma,sans-serif; --hm-wrap:1200px;
}
body{font-family:var(--hm-font);color:var(--hm-ink);background:var(--hm-bg)}
body .site, .content-bg, body.content-style-unboxed .site{background:var(--hm-bg)}
a{color:var(--hm-blue)}
.hm-wrap{max-width:var(--hm-wrap);margin:0 auto;padding:0 24px}
.hm-sr{position:absolute!important;left:-9999px!important}

/* ---------- header ---------- */
.hm-util{background:var(--hm-navy);color:#fff;font-size:13px}
.hm-util .hm-wrap{display:flex;flex-wrap:wrap;gap:8px 20px;align-items:center;justify-content:space-between;padding-top:7px;padding-bottom:7px}
.hm-util a{color:#fff;text-decoration:none}.hm-util a:hover{color:var(--hm-yellow)}
.hm-util .hm-links{display:flex;gap:18px;flex-wrap:wrap}
.hm-util svg{vertical-align:-3px;margin-right:6px}
.hm-head{background:var(--hm-blue)}
.hm-head .hm-wrap{display:flex;flex-wrap:wrap;gap:16px 20px;align-items:center;padding-top:14px;padding-bottom:14px}
.hm-logo img{max-height:64px;width:auto;display:block}
.hm-logo-text{color:#fff;font-size:28px;font-weight:800;text-decoration:none}
.hm-search{flex:1 1 380px;display:flex;background:#fff;border-radius:12px;padding:5px;min-width:0}
.hm-search input[type=search]{flex:1;border:0!important;outline:0;box-shadow:none!important;font:inherit;font-size:15px;padding:0 14px!important;min-width:0;background:transparent}
.hm-search button{background:var(--hm-yellow);border:0;border-radius:9px;padding:10px 20px;font:inherit;font-weight:800;color:var(--hm-navy);display:flex;gap:8px;align-items:center;cursor:pointer}
.hm-search button:hover{filter:brightness(.96);background:var(--hm-yellow);color:var(--hm-navy)}
.hm-actions{display:flex;gap:16px;align-items:center}
.hm-act{display:flex;gap:8px;align-items:center;color:#fff!important;text-decoration:none;font-size:13px;line-height:1.25;position:relative}
.hm-act b{display:block;font-size:14px}.hm-act span.sub{opacity:.85}
.hm-act.hm-member{background:rgba(255,255,255,.12);border-radius:10px;padding:8px 12px}
.hm-badge{position:absolute;top:-6px;left:14px;background:var(--hm-yellow);color:var(--hm-navy);font-size:11px;font-weight:800;border-radius:999px;padding:0 6px;line-height:18px}
.hm-nav{background:var(--hm-navy2)}
.hm-nav .hm-wrap{display:flex;flex-wrap:wrap;align-items:center;gap:2px}
.hm-nav a{color:#fff;text-decoration:none;padding:12px 14px;display:block;font-size:15px}
.hm-nav a:hover{color:var(--hm-yellow)}
.hm-nav .hm-nav-list{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}
.hm-nav .hm-nav-member{margin-left:auto;color:var(--hm-yellow);font-weight:700}
.hm-mega{position:relative}
.hm-mega > button{background:none;border:0;color:#fff;font:inherit;font-weight:700;font-size:15px;padding:12px 14px 12px 0;display:flex;gap:8px;align-items:center;cursor:pointer}
.hm-mega-panel{display:none;position:absolute;z-index:999;top:100%;left:0;width:min(900px,92vw);background:#fff;border-radius:0 0 14px 14px;box-shadow:0 18px 40px rgba(20,28,122,.18);padding:18px;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 18px}
.hm-mega:hover .hm-mega-panel,.hm-mega:focus-within .hm-mega-panel,.hm-mega.open .hm-mega-panel{display:grid}
.hm-mega-panel a{color:var(--hm-ink);padding:6px 8px;border-radius:8px;font-size:14px}
.hm-mega-panel a:hover{background:var(--hm-tint);color:var(--hm-blue)}
.hm-mega-panel .hm-mega-top{font-weight:700;color:var(--hm-blue)}
.hm-mega-panel .hm-mega-all{grid-column:1/-1;border-top:1px solid var(--hm-line);margin-top:6px;padding-top:10px;font-weight:700;color:var(--hm-blue)}

/* ---------- homepage blocks ---------- */
.hm-home{max-width:var(--hm-wrap);margin:0 auto;padding:24px;display:flex;flex-direction:column;gap:40px}
.hm-h2{margin:0;font-size:24px;color:var(--hm-navy);font-weight:800}
.hm-sec-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:16px}
.hm-sec-head a{font-weight:700;text-decoration:none}
/* hero: banner full width (keeps 1340x420 ratio, no crop) + store strip below */
.hm-hero{display:flex;flex-direction:column;gap:14px}
.hm-hero-main{width:100%;border-radius:16px;overflow:hidden;line-height:0}
.hm-store{background:#fff;border:1px solid var(--hm-line);border-radius:16px;padding:16px 20px;display:grid;grid-template-columns:1.1fr 1fr 1fr 1fr auto;gap:16px;align-items:center}
.hm-store .t{font-size:18px;font-weight:800;color:var(--hm-blue)}
.hm-store .row{display:flex;gap:12px;align-items:center;border-left:1px solid #EEF1F6;padding-left:16px}
.hm-store .hm-btn{white-space:nowrap}
@media(max-width:1024px){.hm-store{grid-template-columns:1fr 1fr}.hm-store .row{border-left:0;padding-left:0}.hm-store .hm-btn{grid-column:1/-1}}
@media(max-width:767px){.hm-store{grid-template-columns:1fr}.hm-hero-main{border-radius:12px}}
.hm-ico{width:40px;height:40px;border-radius:10px;background:var(--hm-tint);display:flex;align-items:center;justify-content:center;flex:none}
.hm-small{font-size:13px;color:var(--hm-muted)}
.hm-btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;border-radius:10px;padding:12px 20px;font-weight:800;text-decoration:none;border:0;cursor:pointer}
.hm-btn-yellow{background:var(--hm-yellow);color:var(--hm-navy)!important}
.hm-btn-line{background:#06C755;color:#fff!important}
.hm-btn-ghost{border:1px solid rgba(255,255,255,.5);color:#fff!important}
.hm-btn-outline{border:2px solid var(--hm-blue);color:var(--hm-blue)!important;background:#fff}
.hm-chips{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:-16px}
.hm-chips span{font-size:14px;color:var(--hm-muted);font-weight:700}
.hm-chip{border:1px solid #D6DBE7;background:#fff;border-radius:999px;padding:6px 14px;font-size:14px;color:var(--hm-label)!important;text-decoration:none}
.hm-chip:hover{border-color:var(--hm-blue);color:var(--hm-blue)!important}
.hm-cats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.hm-cat{background:#fff;border:1px solid var(--hm-line);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center;text-decoration:none;color:var(--hm-ink)!important}
.hm-cat:hover{border-color:var(--hm-blue);box-shadow:0 6px 18px rgba(29,39,163,.10)}
.hm-cat img{width:88px;height:88px;border-radius:50%;object-fit:contain;background:#F7F8FB}
.hm-cat b{font-size:14px;line-height:1.3}
.hm-member-strip{background:var(--hm-blue);border-radius:18px;padding:28px;display:flex;flex-wrap:wrap;gap:24px;align-items:center;color:#fff}
.hm-member-strip h2{color:#fff;margin:0;font-size:26px;line-height:1.3}
.hm-member-strip p{margin:0;opacity:.9}
.hm-pill{background:var(--hm-yellow);color:var(--hm-navy);font-weight:800;font-size:12px;border-radius:999px;padding:4px 12px;align-self:flex-start;display:inline-block}
.hm-steps{flex:1 1 340px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hm-step{background:#fff;color:var(--hm-ink);border-radius:14px;padding:14px 16px;font-size:14px}
.hm-step b{color:var(--hm-blue);display:block;font-size:15px}

/* ---------- product cards (all loops) ---------- */
.woocommerce ul.products{display:grid!important;grid-template-columns:repeat(var(--hm-cols,5),minmax(0,1fr));gap:14px;margin:0!important}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none!important}
.woocommerce ul.products.columns-4{--hm-cols:4}.woocommerce ul.products.columns-3{--hm-cols:3}
.woocommerce ul.products li.product{width:auto!important;margin:0!important;float:none!important;background:#fff;border:1px solid var(--hm-line);border-radius:14px;overflow:hidden;display:flex;flex-direction:column;padding:0!important;box-shadow:none}
.woocommerce ul.products li.product:hover{border-color:#C9CEF2;box-shadow:0 6px 18px rgba(29,39,163,.10)}
.woocommerce ul.products li.product .woocommerce-loop-image-link,.woocommerce ul.products li.product a img{margin:0!important}
.woocommerce ul.products li.product img{aspect-ratio:1/1;object-fit:contain;background:#fff;border-radius:0}
.woocommerce ul.products li.product .product-details,.woocommerce ul.products li.product .entry-content-wrap{padding:12px 14px 14px!important;display:flex;flex-direction:column;gap:4px;flex:1}
.hm-brand{font-size:12px;color:var(--hm-muted);font-weight:700}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:14px!important;font-weight:500!important;line-height:1.35;min-height:38px;padding:0!important;color:var(--hm-ink)}
.woocommerce ul.products li.product .price{font-size:19px!important;font-weight:800;color:var(--hm-navy)!important;margin:2px 0 0!important}
.woocommerce ul.products li.product .price del{font-size:13px;color:var(--hm-muted);font-weight:400}
.woocommerce ul.products li.product .price ins{color:var(--hm-red);text-decoration:none}
.hm-unit{font-size:12px;color:var(--hm-muted);font-weight:400}
.hm-stock{display:inline-block;font-size:12px;border-radius:6px;padding:2px 8px;align-self:flex-start;margin-top:4px}
.hm-stock.in{color:var(--hm-green);background:var(--hm-green-bg)}
.hm-stock.low{color:#B54708;background:#FFFAEB}
.hm-stock.out{color:#B42318;background:#FEF3F2}
.hm-camp-tag{position:absolute;top:10px;left:10px;z-index:2;background:var(--hm-yellow);color:var(--hm-navy);font-size:11px;font-weight:800;border-radius:6px;padding:2px 8px}
.woocommerce ul.products li.product{position:relative}
.woocommerce ul.products li.product .onsale,.woocommerce span.onsale{background:var(--hm-red)!important;border-radius:6px!important;min-height:0;min-width:0;padding:2px 8px;line-height:1.6;font-size:12px;top:10px;right:10px;left:auto}
.woocommerce ul.products li.product .product-action-wrap,.woocommerce ul.products li.product .button{margin-top:auto}
.woocommerce ul.products li.product .button,.woocommerce a.button.add_to_cart_button{background:var(--hm-yellow)!important;color:var(--hm-navy)!important;border-radius:10px!important;font-weight:800!important;padding:8px 12px!important;font-size:14px!important;box-shadow:none!important}

/* ---------- archive ---------- */
.woocommerce-products-header__title,.archive .entry-hero h1{color:var(--hm-navy)}
.woocommerce .woocommerce-ordering select{border-radius:8px;border:1px solid #D0D5DD;padding:8px 10px}
.primary-sidebar .widget{background:#fff;border:1px solid var(--hm-line);border-radius:14px;padding:16px;margin-bottom:12px}
.primary-sidebar .widget-title{font-size:15px;color:var(--hm-ink)}

/* ---------- single product ---------- */
.single-product .product_title{color:var(--hm-navy);font-size:28px;font-weight:800;line-height:1.3}
.single-product .summary .price{background:#fff;border:1px solid var(--hm-line);border-radius:14px;padding:14px 18px;font-size:34px!important;font-weight:800;color:var(--hm-navy)!important}
.hm-pbox{background:#fff;border:1px solid var(--hm-line);border-radius:14px;overflow:hidden;margin:14px 0}
.hm-pbox .row{display:flex;gap:12px;align-items:center;padding:14px 16px}
.hm-pbox .row+.row{border-top:1px solid #EEF1F6}
.hm-pbox .row div{flex:1}
.hm-campbox{background:var(--hm-tint);border:1px solid #C9CEF2;border-radius:14px;padding:14px 16px;display:flex;gap:14px;align-items:center;margin:14px 0}
.single-product form.cart .single_add_to_cart_button{background:var(--hm-yellow)!important;color:var(--hm-navy)!important;border-radius:12px!important;font-weight:800!important;font-size:16px!important;min-height:50px;padding:0 28px!important}
.single-product form.cart .quantity input{min-height:50px;border-radius:12px}
.hm-quote{display:flex;justify-content:center;align-items:center;gap:8px;border:1px solid #06C755;color:var(--hm-green)!important;border-radius:12px;min-height:46px;font-weight:700;text-decoration:none;margin-top:12px}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:var(--hm-blue)}

/* ---------- member ---------- */
.hm-card{background:var(--hm-blue);color:#fff;border-radius:20px;padding:24px;display:flex;flex-direction:column;gap:12px;max-width:520px}
.hm-card h3{color:#fff;margin:0}
.hm-howto{display:grid;gap:8px;margin:16px 0}
.hm-howto div{display:flex;gap:10px}.hm-howto b{color:var(--hm-blue)}

/* ---------- footer ---------- */
.hm-foot{background:var(--hm-navy);color:#fff;margin-top:40px}
.hm-foot a{color:#fff;opacity:.85;text-decoration:none}.hm-foot a:hover{opacity:1;color:var(--hm-yellow)}
.hm-foot-svc{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;padding-top:20px;padding-bottom:20px;border-bottom:1px solid rgba(255,255,255,.15)}
.hm-foot-svc div{font-size:13px;opacity:.85}.hm-foot-svc b{display:block;font-size:15px;opacity:1}
.hm-foot-cols{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:24px;padding-top:28px;padding-bottom:28px;font-size:14px}
.hm-foot-cols>div{display:flex;flex-direction:column;gap:8px}
.hm-foot-copy{text-align:center;font-size:12px;opacity:.7;padding:0 24px 20px}

/* ---------- mobile ---------- */
.hm-bottom-nav{display:none}
@media (max-width:1024px){
  .hm-cats{grid-template-columns:repeat(4,minmax(0,1fr))}
  .woocommerce ul.products{--hm-cols:3!important}
  .hm-foot-cols{grid-template-columns:1fr 1fr}
}
@media (max-width:767px){
  .hm-util .hm-links{display:none}
  .hm-head .hm-wrap{gap:10px;padding-top:10px;padding-bottom:12px}
  .hm-logo img{max-height:44px}
  .hm-search{order:3;flex-basis:100%}
  .hm-act span.txt{display:none}
  .hm-act.hm-member{padding:8px}
  .hm-actions{margin-left:auto;gap:10px}
  .hm-nav .hm-nav-list,.hm-nav .hm-nav-member{display:none}
  .hm-home{padding:16px;gap:28px}
  .hm-cats{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .hm-cat{padding:8px 4px;border:0;background:transparent}
  .hm-cat img{width:64px;height:64px;background:#fff}
  .hm-cat b{font-size:12px;font-weight:500}.hm-cat .hm-small{display:none}
  .woocommerce ul.products{--hm-cols:2!important;gap:10px}
  .hm-member-strip{padding:20px}.hm-member-strip h2{font-size:20px}
  .hm-steps{grid-template-columns:1fr}
  .hm-foot-svc{grid-template-columns:1fr 1fr}
  .hm-foot-cols{grid-template-columns:1fr}
  body{padding-bottom:64px}
  .hm-bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;height:64px;background:#fff;border-top:1px solid var(--hm-line);z-index:9999;font-size:11px;text-align:center}
  .hm-bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--hm-muted);text-decoration:none}
  .hm-bottom-nav a.on{color:var(--hm-blue);font-weight:800}
}

/* hm_banner — full-ratio carousel */
.hm-banner{position:relative;border-radius:16px;overflow:hidden;background:#e9eefc}
.hm-banner-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.hm-banner-track::-webkit-scrollbar{display:none}
.hm-banner-slide{flex:0 0 100%;scroll-snap-align:start;line-height:0}
.hm-banner-slide img{width:100%;height:auto;display:block}
.hm-banner-nav{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;border:0;background:rgba(255,255,255,.85);color:var(--hm-blue);font-size:26px;line-height:1;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.15);opacity:0;transition:opacity .2s}
.hm-banner:hover .hm-banner-nav{opacity:1}
.hm-banner-nav.prev{left:12px}.hm-banner-nav.next{right:12px}
.hm-banner-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px}
.hm-banner-dots button{width:8px;height:8px;padding:0;border:0;border-radius:4px;background:rgba(255,255,255,.6);cursor:pointer;transition:width .2s}
.hm-banner-dots button.on{width:22px;background:var(--hm-yellow)}
@media(max-width:767px){.hm-banner{border-radius:12px}.hm-banner-nav{display:none}}

/* ---------- catalog: ปุ่มสอบถาม ---------- */
.hm-btn-primary{background:var(--hm-yellow);color:var(--hm-navy);border:0;font-weight:700}
.hm-ask{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 6px}
.hm-ask .hm-btn,.hm-ask-bar .hm-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;font-size:15px;font-weight:700;text-decoration:none;border-radius:10px}
.hm-ask .hm-btn-line{background:#06C755;color:#fff;border:0}
.hm-ask .hm-btn-line:hover{background:#05b34c;color:#fff}
.hm-ask-note{margin-bottom:14px}
.hm-ask-bar{display:none}
@media(max-width:767px){
  .hm-ask{grid-template-columns:1fr}
  body.single-product .hm-bottom-nav{display:none}
  .hm-ask-bar{display:grid;grid-template-columns:1.6fr 1fr;gap:8px;position:fixed;left:0;right:0;bottom:0;padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--hm-line);z-index:9999}
  .hm-ask-bar .hm-btn{min-height:44px;font-size:14px}
  .hm-ask-bar .hm-btn-line{background:#06C755;color:#fff;border:0}
  .hm-ask-bar .hm-btn-outline span{font-size:0}.hm-ask-bar .hm-btn-outline span::after{content:'โทร';font-size:14px}
  body.single-product{padding-bottom:72px}
}

/* ---------- catalog: ตัวกรอง ---------- */
.hm-filter{background:#fff;border:1px solid var(--hm-line);border-radius:14px;margin:0 0 18px;width:100%}
.hm-filter summary{cursor:pointer;list-style:none;padding:12px 16px;font-weight:700;color:var(--hm-blue);display:flex;align-items:center;gap:8px}
.hm-filter summary::-webkit-details-marker{display:none}
.hm-filter-n{background:var(--hm-yellow);color:var(--hm-navy);font-size:12px;padding:2px 8px;border-radius:20px}
.hm-filter-form{padding:4px 16px 16px;display:flex;flex-direction:column;gap:14px;border-top:1px solid #EEF1F6}
.hm-fgroup b{display:block;font-size:14px;margin:10px 0 8px;color:#101828}
.hm-fchips{display:flex;flex-wrap:wrap;gap:8px}
.hm-fchip input{position:absolute;opacity:0;pointer-events:none}
.hm-fchip span{display:inline-block;padding:6px 12px;border:1px solid var(--hm-line);border-radius:20px;font-size:13px;cursor:pointer;background:#fff}
.hm-fchip span i{font-style:normal;color:#98A2B3;font-size:12px}
.hm-fchip input:checked+span{background:var(--hm-blue);border-color:var(--hm-blue);color:#fff}
.hm-fchip input:checked+span i{color:#C7CCF5}
.hm-fchip.more{display:none}.hm-fbrands.all .hm-fchip.more{display:inline-block}
.hm-fmore{border:0;background:none;color:var(--hm-blue);font-weight:700;cursor:pointer;font-size:13px}
.hm-frow{display:flex;flex-wrap:wrap;align-items:flex-end;gap:16px 24px}
.hm-fprice{display:flex;align-items:center;gap:6px}
.hm-fprice input{width:110px;height:40px;border:1px solid var(--hm-line);border-radius:8px;padding:0 10px}
.hm-fstock{display:flex;align-items:center;gap:8px;height:40px;font-size:14px;cursor:pointer}
.hm-fstock input{width:18px;height:18px;accent-color:var(--hm-blue)}
.hm-factions{margin-left:auto;display:flex;gap:8px}
.hm-factions .hm-btn{height:40px;padding:0 18px;border-radius:8px;display:inline-flex;align-items:center}
@media(max-width:767px){.hm-factions{margin-left:0;width:100%}.hm-factions .hm-btn{flex:1;justify-content:center}}

/* card: จัดแนว แบรนด์ / ชื่อ 2 บรรทัด / ราคา+สถานะ ชิดล่าง ให้ทุกการ์ดเท่ากัน */
.woocommerce ul.products li.product .product-details{flex:1 1 auto;display:flex;flex-direction:column;background:#fff}
.woocommerce ul.products li.product .hm-brand{display:block;min-height:18px;line-height:18px;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.woocommerce ul.products li.product .woocommerce-loop-product__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:2.7em;height:2.7em}
.woocommerce ul.products li.product .price{padding-top:8px}
.woocommerce ul.products li.product .product-details .button{margin-top:auto!important}
.woocommerce ul.products li.product .hm-stock{align-self:flex-start;margin-bottom:10px}

/* ---------- ปุ่มติดต่อลอยมุมขวาล่าง ---------- */
.hm-fab{position:fixed;right:20px;bottom:24px;z-index:10000;display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.hm-fab-btn{display:flex;align-items:center;gap:8px;height:56px;padding:0 20px 0 16px;border:0;border-radius:28px;background:var(--hm-blue);color:#fff;font-weight:700;font-size:15px;cursor:pointer;box-shadow:0 6px 20px rgba(20,28,122,.35)}
.hm-fab-btn .i-close{display:none}
.hm-fab.open .hm-fab-btn .i-open{display:none}.hm-fab.open .hm-fab-btn .i-close{display:inline}
.hm-fab-list{display:none;flex-direction:column;align-items:flex-end;gap:10px}
.hm-fab.open .hm-fab-list{display:flex}
.hm-fab-item{display:flex;align-items:center;gap:10px;text-decoration:none}
.hm-fab-label{background:#fff;color:#101828;font-size:14px;font-weight:600;padding:6px 12px;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.12)}
.hm-fab-ico{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.hm-social{display:flex;gap:10px;margin-top:10px}
.hm-social a{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center}
@media(max-width:767px){
  .hm-fab{right:14px;bottom:80px}
  body.single-product .hm-fab{bottom:76px}
  .hm-fab-btn{width:52px;height:52px;padding:0;justify-content:center;border-radius:50%}
  .hm-fab-txt{display:none}
}

/* banner arrows v2: ปุ่มกลมขาวโปร่ง เบลอพื้นหลัง (override ปุ่มของ Kadence) */
.hm-banner .hm-banner-nav{all:unset;box-sizing:border-box;position:absolute;top:50%;transform:translateY(-50%) scale(.9);width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--hm-navy);
  background:rgba(255,255,255,.78);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  box-shadow:0 4px 14px rgba(16,24,40,.18);opacity:0;transition:opacity .2s,transform .2s,background .2s}
.hm-banner .hm-banner-nav.prev{left:16px}.hm-banner .hm-banner-nav.next{right:16px}
.hm-banner:hover .hm-banner-nav{opacity:1;transform:translateY(-50%) scale(1)}
.hm-banner .hm-banner-nav:hover{background:#fff;color:var(--hm-blue)}
.hm-banner .hm-banner-nav:focus-visible{opacity:1;outline:2px solid var(--hm-yellow);outline-offset:2px}
.hm-banner-dots button{all:unset;width:8px;height:8px;border-radius:4px;background:rgba(255,255,255,.65);box-shadow:0 0 0 1px rgba(16,24,40,.08);cursor:pointer;transition:width .25s,background .25s}
.hm-banner-dots button.on{width:24px;background:var(--hm-yellow)}
@media(max-width:767px){.hm-banner .hm-banner-nav{display:none}}

/* หมวดสินค้า v2: การ์ดแนวนอน รูปซ้าย ชื่อหมวดตัวใหญ่ชัด (4 คอลัมน์) */
.hm-cats{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.hm-cat{flex-direction:row;align-items:center;text-align:left;gap:16px;padding:12px 18px;min-height:104px;border-radius:12px}
.hm-cat img{width:84px;height:84px;flex:0 0 84px;border-radius:8px;background:transparent;object-fit:contain}
.hm-cat b{font-size:18px;font-weight:800;line-height:1.3;color:var(--hm-navy)}
.hm-cat:hover b{color:var(--hm-blue)}
@media(max-width:1024px){.hm-cats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:767px){
  .hm-cats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .hm-cat{padding:10px 12px;gap:10px;min-height:76px;border:1px solid var(--hm-line);background:#fff}
  .hm-cat img{width:56px;height:56px;flex-basis:56px;background:transparent}
  .hm-cat b{font-size:15px;font-weight:700}
}

/* ===== รอบแก้ 30/11 (รายงานตรวจเว็บ) ===== */
/* D1: ความกว้างเนื้อหาเท่า header */
:root{--global-content-width:1200px;--global-content-edge-padding:24px}
/* หัวหน้าร้าน/หมวด: เตี้ยลง ชิดซ้าย */
.entry-hero .entry-hero-container-inner{background:transparent!important}
.entry-hero .entry-header{min-height:0!important;padding:22px 0 4px!important;align-items:flex-start!important;text-align:left!important;justify-content:flex-start!important}
.entry-hero .entry-title,.entry-hero .page-title{font-size:28px!important;color:var(--hm-navy)!important;font-weight:800;margin:0!important}
.entry-hero .kadence-breadcrumbs,.entry-hero .woocommerce-breadcrumb{margin:0 0 6px!important}
/* D2: รูปการ์ดสินค้าเท่ากันทุกใบ */
.woocommerce ul.products li.product a.woocommerce-loop-image-link{display:block;aspect-ratio:1/1;background:#fff;padding:12px}
.woocommerce ul.products li.product a.woocommerce-loop-image-link img{width:100%!important;height:100%!important;object-fit:contain!important;margin:0!important}
/* D3: สินค้าที่เกี่ยวข้อง 5 ช่อง */
.related ul.products,.upsells ul.products{grid-template-columns:repeat(5,minmax(0,1fr))!important}
@media(max-width:1024px){.related ul.products,.upsells ul.products{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:767px){.related ul.products,.upsells ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
/* D4: ปุ่มแชร์เฉพาะหน้าสินค้า และไม่ใช้ Twitter */
.seed-social:not(.-product-summary){display:none!important}
.seed-social li:has(a[href*="twitter.com"]),.seed-social li:has(a[href*="x.com/intent"]){display:none!important}
/* D5: ไม่แสดงสถานะซ้ำ (ใช้ป้ายในกล่องรับสินค้าแทน), tags ไม่ล้น */
.single-product .summary > p.stock,.single-product .summary form.cart + p.stock{display:none}
.product_meta .tagged_as{display:block;white-space:normal;word-break:break-word}
/* D7: ตัวเลือกจัดส่งในตะกร้า อ่านง่าย */
.wc-block-components-radio-control__label-group{display:block!important}
.wc-block-components-radio-control__label,.wc-block-components-radio-control__secondary-label{display:block!important;white-space:normal!important}
/* D8: เลขบัญชีใน checkout */
.hm-bank{background:#F4F6FB;border:1px solid var(--hm-line);border-radius:10px;padding:10px 14px;margin-top:8px;line-height:1.7;color:#101828}
/* D9: หมวดย่อย */
.hm-subcats{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px;width:100%}
.hm-subcats a{padding:7px 14px;border:1px solid var(--hm-line);border-radius:20px;background:#fff;font-size:14px;color:var(--hm-navy);text-decoration:none;font-weight:600}
.hm-subcats a:hover{border-color:var(--hm-blue);color:var(--hm-blue)}
/* D11: มือถือ เมนูหลักเลื่อนแนวนอนได้ + ลิงก์ในเมนูหมวด */
.hm-mega-links{display:none}
@media(max-width:767px){
  .hm-nav .hm-wrap{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .hm-nav .hm-wrap::-webkit-scrollbar{display:none}
  .hm-nav .hm-nav-list{flex-wrap:nowrap;white-space:nowrap}
  .hm-nav .hm-nav-member{margin-left:0;white-space:nowrap}
  .hm-mega-links{display:block;grid-column:1/-1;border-top:1px solid var(--hm-line);margin-top:6px;padding-top:6px}
  .hm-mega-links a{display:inline-block}
}
/* D12: ปุ่มลอยในหน้ารายการสินค้า เป็นวงกลมเล็ก ไม่บังปุ่มอื่น */
body.post-type-archive-product .hm-fab-btn,body.tax-product_cat .hm-fab-btn,body.tax-product_tag .hm-fab-btn,body.search .hm-fab-btn{width:56px;height:56px;padding:0;justify-content:center;border-radius:50%}
body.post-type-archive-product .hm-fab-txt,body.tax-product_cat .hm-fab-txt,body.tax-product_tag .hm-fab-txt,body.search .hm-fab-txt{display:none}
/* D13 + หน้าเนื้อหา: ฟอร์มเข้าธีม */
.entry-content form input[type=text],.entry-content form input[type=email],.entry-content form input[type=tel],.entry-content form input[type=number],.entry-content form input[type=date],.entry-content form input[type=time],.entry-content form select,.entry-content form textarea{width:100%;border:1px solid var(--hm-line);border-radius:10px;padding:10px 12px;font:inherit;background:#fff}
.entry-content form input[type=file]{font:inherit;padding:10px;border:1px dashed var(--hm-line);border-radius:10px;width:100%;background:#fff}
.entry-content form button[type=submit],.entry-content form input[type=submit]{background:var(--hm-yellow);color:var(--hm-navy);border:0;border-radius:10px;padding:12px 24px;font-weight:800;font:inherit;font-weight:800;cursor:pointer}
/* หน้าเนื้อหาใหม่ */
.hm-page{font-size:16px;line-height:1.8;color:#101828}
.hm-page h3{color:var(--hm-navy);font-size:20px;margin:24px 0 8px}
.hm-page-btns{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.hm-page-btns .hm-btn,.hm-page .hm-btn{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border-radius:10px;font-weight:700;text-decoration:none}
.hm-btn-line{background:#06C755;color:#fff!important}
.hm-steps-list{counter-reset:s;list-style:none;padding:0;margin:0;display:grid;gap:12px}
.hm-steps-list li{counter-increment:s;position:relative;padding:14px 16px 14px 60px;background:#fff;border:1px solid var(--hm-line);border-radius:12px}
.hm-steps-list li::before{content:counter(s);position:absolute;left:16px;top:14px;width:30px;height:30px;border-radius:50%;background:var(--hm-blue);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center}
.hm-contact{display:grid;grid-template-columns:1fr 1.2fr;gap:24px;align-items:start}
.hm-contact-info{background:#fff;border:1px solid var(--hm-line);border-radius:14px;padding:22px}
.hm-contact-info h2{margin:0 0 4px;color:var(--hm-navy);font-size:24px}
.hm-contact-map iframe{width:100%;height:460px;border:0;border-radius:14px}
@media(max-width:767px){.hm-contact{grid-template-columns:1fr}.hm-contact-map iframe{height:320px}}
.hm-faq details{background:#fff;border:1px solid var(--hm-line);border-radius:12px;margin-bottom:10px;padding:0 16px}
.hm-faq summary{cursor:pointer;padding:14px 0;font-weight:700;color:var(--hm-navy);list-style:none;position:relative;padding-right:28px}
.hm-faq summary::after{content:'+';position:absolute;right:0;top:10px;font-size:22px;color:var(--hm-blue)}
.hm-faq details[open] summary::after{content:'–'}
.hm-faq details > div{padding:0 0 14px}

/* ลดช่องว่างใต้หัวหน้า */
.entry-hero + .content-container .content-area,.entry-hero ~ #primary,.content-area{margin-top:16px!important}

/* ===== รอบแก้ 2 (รายงานตรวจรอบ 2) ===== */
/* D3: สินค้าเกี่ยวข้องน้อยกว่า 5 ชิ้น ให้เต็มแถว */
.related ul.products:has(> li:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))!important}
.related ul.products:has(> li:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))!important}
/* D11: มือถือ แสดงแถบเมนูหลักเลื่อนแนวนอน */
@media(max-width:767px){
  .hm-nav .hm-nav-list{display:flex!important}
  .hm-nav .hm-nav-member{display:block!important}
  .hm-nav a{padding:11px 12px;font-size:14px}
}
/* L1: แท็บเล็ต header 2 แถว (โลโก้+ปุ่ม / ค้นหาเต็มแถว) */
@media(min-width:768px) and (max-width:1100px){
  .hm-head .hm-wrap{flex-wrap:wrap}
  .hm-search{order:3;flex:1 1 100%}
  .hm-actions{margin-left:auto}
}
/* L2: มือถือหน้าสินค้า ไม่ต้องมีปุ่มลอย (มีแถบ LINE/โทร แล้ว) */
@media(max-width:767px){body.single-product .hm-fab{display:none}}
/* L3/L4: ตัวเลือกจัดส่ง ปุ่มวงกลมอยู่บรรทัดเดียวกับข้อความ ชิดซ้าย */
.woocommerce ul#shipping_method{text-align:left;margin:0;padding:0;list-style:none}
.woocommerce ul#shipping_method li{display:flex;align-items:flex-start;gap:8px;margin:0 0 8px;text-align:left}
.woocommerce ul#shipping_method li input{margin:4px 0 0;flex:0 0 auto}
.woocommerce ul#shipping_method li label{display:inline;margin:0}
.woocommerce-shipping-totals td{text-align:left!important}
.wc-block-components-radio-control__option{text-align:left}
/* L5: คูปองอยู่บรรทัดเดียว */
.woocommerce-cart .coupon{display:flex;flex-wrap:nowrap;gap:8px;align-items:center}
.woocommerce-cart .coupon .input-text{flex:1 1 auto;min-width:0}
.woocommerce-cart .coupon .button{white-space:nowrap;flex:0 0 auto}
/* L6: breadcrumb มีระยะห่างจากเมนู */
.single-product .content-area{margin-top:20px!important}
.woocommerce-breadcrumb,.kadence-breadcrumbs{margin-top:8px}
/* L7: mega menu หมวดหลัก + หมวดย่อย */
.hm-mega-panel{grid-template-columns:repeat(4,minmax(0,1fr))!important;max-height:75vh;overflow:auto;width:min(1100px,94vw)!important;align-items:start}
.hm-mega-col{display:flex;flex-direction:column;gap:2px;padding:4px 0}
.hm-mega-panel .hm-mega-sub{font-size:13px;color:#475467;padding:3px 8px}
@media(max-width:767px){.hm-mega-panel{grid-template-columns:1fr 1fr!important}}
/* 404 */
.hm-404{margin-top:20px;display:flex;flex-direction:column;gap:20px}
.hm-404-search{display:flex;gap:8px;max-width:640px}
.hm-404-search input{flex:1;height:46px;border:1px solid var(--hm-line);border-radius:10px;padding:0 14px;font:inherit}
.hm-404-search .hm-btn{height:46px;padding:0 22px;border-radius:10px}
/* บทความ: ไม่แสดงชื่อผู้เขียน */
.entry-meta .posted-by,.entry-meta .author,.entry-meta .byline,.entry-author{display:none!important}
/* ซ่อน h1 หน้าแรก (มีไว้ให้ SEO/โปรแกรมอ่านหน้าจอ) */
.hm-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ===== delivery pin (รถร้าน) ===== */
.hm-pin{margin:16px 0;padding:14px;border:1px solid #e3e6f0;border-radius:10px;background:#fff}
.hm-pin h3{font-size:17px;margin:0 0 8px}
.hm-pin-search{display:flex;gap:6px;flex-wrap:wrap}
.hm-pin-search input{flex:1;min-width:180px}
.hm-pin-res{list-style:none;margin:6px 0 0;padding:0;max-height:180px;overflow:auto}
.hm-pin-res li{padding:7px 8px;border-bottom:1px solid #eef0f5;cursor:pointer;font-size:14px}
.hm-pin-res li:hover{background:#f3f5fb}
#hm-pin-map{height:320px;border-radius:8px;margin:8px 0;z-index:0}
.hm-pin-msg{font-size:14px;color:#1e2a8a;margin:0}
/* ===== หน้ารายการสินค้าแบบกระชับ (ร้าน/หมวด/แบรนด์/ค้นหา) ===== */
.product-archive-hero-section .entry-hero-container-inner,.product-archive-hero-section .hero-container{padding-top:12px!important;padding-bottom:0!important;min-height:0!important}
.product-archive-hero-section .entry-header{margin:0!important;padding:0!important}
.product-archive-hero-section .page-title{font-size:24px!important;line-height:1.3!important;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.hm-count{font-size:14px;font-weight:500;color:#667085;letter-spacing:0}
.woocommerce-products-header,.woocommerce .woocommerce-result-count{display:none!important}
body.woocommerce-page #primary.content-area{margin-top:8px!important}
/* หมวดย่อย: แถวเดียว เลื่อนซ้าย-ขวา */
.hm-subcats{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 0 10px;padding-bottom:2px;-webkit-mask-image:linear-gradient(90deg,#000 92%,transparent);mask-image:linear-gradient(90deg,#000 92%,transparent)}
.hm-subcats::-webkit-scrollbar{display:none}
.hm-subcats a{flex:0 0 auto;padding:6px 14px;font-size:14px}
/* แถบเครื่องมือ: ตัวกรอง (ซ้าย) + เรียงลำดับ/มุมมอง (ขวา) อยู่บรรทัดเดียวกัน */
body.woocommerce-page main#main{display:flex;flex-wrap:wrap;align-items:center;column-gap:12px}
body.woocommerce-page main#main>*{flex:0 0 100%;min-width:0}
body.woocommerce-page main#main>.hm-filter{flex:0 0 auto;width:auto;margin:0;position:relative;border-radius:10px;z-index:30}
body.woocommerce-page main#main>.kadence-shop-top-row{flex:1 1 0;margin:0;padding:0;min-height:44px;display:flex;align-items:center;justify-content:flex-end}
body.woocommerce-page main#main>.woocommerce-notices-wrapper:empty{display:none}
body.woocommerce-page main#main>ul.products{margin-top:12px}
.hm-filter summary{padding:9px 14px;white-space:nowrap}
.hm-filter[open] summary{border-bottom:0}
.hm-filter-n{min-width:20px;text-align:center}
.hm-filter[open]>.hm-filter-form{position:absolute;top:calc(100% + 6px);left:0;width:min(760px,calc(100vw - 32px));background:#fff;border:1px solid var(--hm-line);border-radius:12px;box-shadow:0 12px 32px rgba(16,24,64,.16);padding:16px}
@media (max-width:767px){
  .product-archive-hero-section .page-title{font-size:20px!important}
  body.woocommerce-page main#main>.hm-filter{position:static}
  .hm-filter[open]>.hm-filter-form{left:12px;right:12px;width:auto;position:fixed;top:auto;bottom:12px;max-height:75vh;overflow:auto}
}
