/* ==========================================================================
   Baandee — WooCommerce overrides (PDP, archive, cart, checkout)
   ported from baandee_product.html, themed to tokens
   ========================================================================== */

/* ---- breadcrumb ---------------------------------------------------------- */
.baandee .woocommerce-breadcrumb,
.bd-crumb{font-size:12.5px;color:var(--muted);padding:14px 0;display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.bd-crumb b{color:var(--ink);font-weight:600}
.bd-crumb .sep{color:var(--border)}

/* ==========================================================================
   SINGLE PRODUCT (PDP)
   ========================================================================== */
.bd-pdp{display:grid;grid-template-columns:1fr 1fr;gap:34px;padding-bottom:40px}

/* gallery */
.bd-gallery{display:flex;gap:14px}
.bd-thumbs{display:flex;flex-direction:column;gap:10px}
.bd-thumb{width:62px;height:62px;border-radius:10px;background:var(--section);border:2px solid var(--border);
  display:grid;place-items:center;font-size:26px;cursor:pointer;transition:.15s;overflow:hidden}
.bd-thumb img{width:100% !important;height:100% !important;object-fit:contain;background:var(--surface)}
.bd-thumb.on,.bd-thumb:hover{border-color:var(--terra)}
.bd-main-img{flex:1;min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:18px;
  aspect-ratio:1;display:grid;place-items:center;font-size:150px;position:relative;box-shadow:var(--shadow);overflow:hidden}
/* ล็อกรูปให้เต็มกรอบจัตุรัสเสมอ (absolute กัน img{height:auto} ของ parent มา override) */
.bd-main-img img{position:absolute !important;inset:0;width:100% !important;height:100% !important;object-fit:contain;background:var(--surface)}
.bd-flash-tag{position:absolute;top:16px;left:16px;background:var(--sale);color:#fff;font-family:var(--font-head);font-weight:700;
  font-size:12.5px;letter-spacing:.5px;padding:6px 12px;border-radius:9px;display:inline-flex;align-items:center;gap:6px;
  white-space:nowrap;line-height:1;z-index:2}
.bd-flash-tag .bd-bolt{width:11px;height:14px;flex-shrink:0;display:block}
.bd-heart-lg{position:absolute;top:16px;right:16px;width:40px;height:40px;background:#fff;border:1px solid var(--border);
  border-radius:50%;display:grid;place-items:center;font-size:18px;color:var(--slate);cursor:pointer;z-index:2}
.bd-heart-lg:hover{color:var(--sale);border-color:var(--sale)}

/* info column */
.bd-brand{font-family:var(--font-head);font-size:13px;color:var(--terra);font-weight:500;letter-spacing:.3px}
.bd-pdp h1.product_title,
.bd-pdp .bd-title{font-size:26px;line-height:1.3;margin:5px 0 12px;font-family:var(--font-head);font-weight:600}
.bd-meta{display:flex;gap:16px;flex-wrap:wrap;font-size:12.5px;color:var(--muted);align-items:center;margin-bottom:6px}
.bd-meta b{color:var(--slate);font-weight:600}
.bd-stars{color:#E6A817}
.bd-sold{font-size:13px;color:var(--slate);margin:10px 0 4px}
.bd-sold b{color:var(--ink)}

/* real flash sale box */
.bd-fbox{background:linear-gradient(115deg,#3a1c12,#7a2a14);border-radius:16px;padding:16px 18px;color:#fff;margin:14px 0 18px}
.bd-fbox-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.bd-fbox .ft{font-family:var(--font-head);font-weight:700;font-size:16px;display:flex;align-items:center;gap:7px}
.bd-fbox .bd-timer .lab{font-size:12px;opacity:.9;margin-right:3px}
.bd-fbox .bd-tcell{width:34px;height:34px;font-size:15px}
.bd-fbar{height:8px;border-radius:5px;background:rgba(255,255,255,.25);overflow:hidden;margin:13px 0 6px}
.bd-fbar span{display:block;height:100%;background:linear-gradient(90deg,#FBE3C8,#fff);border-radius:5px}
.bd-fnote{font-size:11.5px;opacity:.92;display:flex;align-items:center;gap:6px}
.bd-fnote b{margin:0 3px}

/* price */
.bd-price-row{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.bd-now{font-family:var(--font-head);font-weight:700;font-size:38px;color:var(--terra)}
.bd-was{font-size:17px;color:var(--muted);text-decoration:line-through}
.bd-save{background:var(--terra-tint);color:var(--terra-dark);font-family:var(--font-head);font-weight:600;font-size:13px;padding:3px 10px;border-radius:7px}
.bd-honest{font-size:12.5px;color:var(--sale);margin-top:8px;display:flex;align-items:center;gap:6px}

/* collect code inline */
.bd-codes{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}
.bd-ccode{display:flex;align-items:center;gap:9px;background:var(--terra-tint);border:1.5px dashed var(--terra);border-radius:10px;padding:8px 12px}
.bd-ccode .ci{font-size:18px}
.bd-ccode .cl{font-family:var(--font-head);font-weight:600;font-size:13px;color:var(--terra-dark);line-height:1.2}
.bd-ccode .cl small{display:block;font-weight:400;font-size:10.5px;color:var(--slate)}
.bd-ccode button{border:none;background:var(--terra);color:#fff;font-family:var(--font-head);font-size:12px;font-weight:500;padding:6px 12px;border-radius:7px;cursor:pointer}
.bd-ccode button.done{background:var(--sage)}

/* qty + buy */
.bd-buyrow{display:flex;gap:12px;align-items:center;margin:18px 0 8px;flex-wrap:wrap}
.bd-qty{display:flex;align-items:center;border:1.5px solid var(--border);border-radius:10px;overflow:hidden}
.bd-qty button{width:42px;height:46px;border:none;background:var(--surface);font-size:20px;cursor:pointer;color:var(--slate)}
.bd-qty button:hover{background:var(--cream);color:var(--terra)}
.bd-qty input{width:48px;height:46px;border:none;text-align:center;font-family:var(--font-head);font-size:16px;font-weight:600;outline:none}
.bd-buyrow .bd-btn{flex:1;min-width:150px;border-radius:12px}

/* trust row */
.bd-ptrust{display:flex;gap:18px;flex-wrap:wrap;padding:16px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin:14px 0;font-size:13px}
.bd-ptrust div{display:flex;align-items:center;gap:7px;color:var(--slate)}
.bd-ptrust .ic{font-size:18px}

/* features + specs */
.bd-feat{margin-top:8px}
.bd-feat h3{font-size:15px;margin-bottom:10px}
.bd-feat ul{list-style:none;margin:0;padding:0}
.bd-feat li{position:relative;padding-left:24px;margin-bottom:9px;font-size:14px;color:var(--slate)}
.bd-feat li::before{content:'✓';position:absolute;left:0;color:var(--sage);font-weight:700}
.bd-specs{display:flex;gap:24px;margin-top:16px;flex-wrap:wrap}
.bd-spec{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--slate)}
.bd-spec .si{width:38px;height:38px;border-radius:10px;background:var(--section);display:grid;place-items:center;font-size:18px}
.bd-dprom{background:var(--terra-tint);border-left:3px solid var(--terra);border-radius:8px;padding:11px 14px;
  font-size:13px;color:var(--terra-dark);font-weight:500;margin-top:16px}

/* ==========================================================================
   ARCHIVE / SHOP (reuse .bd-card styling via woocommerce ul.products)
   ========================================================================== */
.baandee.woocommerce ul.products,
.baandee .woocommerce ul.products{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:0 0 30px;padding:0}
.baandee.woocommerce ul.products li.product,
.baandee .woocommerce ul.products li.product{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;
  margin:0;padding:0;transition:.2s;position:relative;width:auto;float:none}
.baandee.woocommerce ul.products li.product:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:var(--terra)}
.baandee.woocommerce ul.products li.product a img{margin:0;border-radius:0;width:100% !important;aspect-ratio:1;object-fit:cover;background:var(--surface)}
.baandee.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-family:var(--font-body);font-size:14px;font-weight:500;color:var(--ink);padding:10px 13px 0;line-height:1.45}
.baandee.woocommerce ul.products li.product .price{display:block;padding:6px 13px 0;font-family:var(--font-head)}
.baandee.woocommerce ul.products li.product .price{color:var(--terra);font-weight:700;font-size:18px}
.baandee.woocommerce ul.products li.product .price del{color:var(--muted);font-weight:400;font-size:12.5px;margin-right:6px}
.baandee.woocommerce ul.products li.product .price ins{text-decoration:none}
.baandee.woocommerce ul.products li.product .button{
  margin:10px 13px 14px;background:var(--terra);color:#fff;font-family:var(--font-head);font-weight:500;
  border-radius:999px;font-size:13px;padding:9px 16px}
.baandee.woocommerce ul.products li.product .button:hover{background:var(--terra-dark)}
.baandee.woocommerce span.onsale{
  background:var(--sale);color:#fff;font-family:var(--font-head);font-weight:700;border-radius:7px;
  min-height:auto;min-width:auto;padding:4px 9px;top:10px;left:10px;right:auto;margin:0;font-size:12px}

/* ship-free chip on cards (added via hook) */
.bd-loop-ship{padding:0 13px 12px;font-size:11.5px;color:var(--sage);font-family:var(--font-head);font-weight:500}

/* ==========================================================================
   CART + CHECKOUT (light theming — keep Storefront structure)
   ========================================================================== */
.baandee.woocommerce-cart table.cart,
.baandee.woocommerce-checkout .woocommerce-checkout-review-order table{border-radius:var(--r);overflow:hidden}
.baandee.woocommerce #respond input#submit,
.baandee.woocommerce a.button,
.baandee.woocommerce button.button,
.baandee.woocommerce input.button,
.baandee.woocommerce a.button.alt,
.baandee.woocommerce button.button.alt,
.baandee.woocommerce input.button.alt{
  background:var(--terra);color:#fff;border-radius:999px;font-family:var(--font-head);font-weight:500;border:none}
.baandee.woocommerce a.button:hover,
.baandee.woocommerce button.button:hover,
.baandee.woocommerce input.button:hover,
.baandee.woocommerce a.button.alt:hover,
.baandee.woocommerce button.button.alt:hover,
.baandee.woocommerce input.button.alt:hover{background:var(--terra-dark);color:#fff}
.baandee.woocommerce .cart-collaterals .cart_totals,
.baandee.woocommerce-checkout #order_review{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:18px}
.baandee.woocommerce-message,
.baandee.woocommerce-info{border-top-color:var(--terra)}
.baandee.woocommerce .woocommerce-message::before,
.baandee.woocommerce .woocommerce-info::before{color:var(--terra)}

/* cross-sell / up-sell bar reuse */
.bd-pdp + .bd-cross,.bd-cross{margin-top:10px}

/* ---- shop / archive head + ordering bar --------------------------------- */
.bd-shop{padding-bottom:40px}
.bd-shop-head{margin:10px 0 20px}
.bd-shop-title{font-size:26px;font-family:var(--font-head);font-weight:600}
.baandee.woocommerce .woocommerce-result-count{color:var(--muted);font-size:13px}
.baandee.woocommerce .woocommerce-ordering select{border:1.5px solid var(--border);border-radius:10px;
  padding:8px 12px;font-family:var(--font-body);background:var(--surface);color:var(--ink)}
.baandee.woocommerce nav.woocommerce-pagination ul{border:none;gap:6px;display:flex;justify-content:center}
.baandee.woocommerce nav.woocommerce-pagination ul li{border:none}
.baandee.woocommerce nav.woocommerce-pagination ul li a,
.baandee.woocommerce nav.woocommerce-pagination ul li span{
  border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--ink);font-family:var(--font-head)}
.baandee.woocommerce nav.woocommerce-pagination ul li span.current{background:var(--terra);color:#fff;border-color:var(--terra)}

/* ---- PDP native tabs (description / reviews) ---------------------------- */
.bd-pdp-tabs{padding-bottom:40px}
.baandee.woocommerce .woocommerce-tabs ul.tabs{padding:0;margin:0 0 18px}
.baandee.woocommerce .woocommerce-tabs ul.tabs::before{border-color:var(--border)}
.baandee.woocommerce .woocommerce-tabs ul.tabs li{border:1px solid var(--border);border-radius:10px 10px 0 0;background:var(--section)}
.baandee.woocommerce .woocommerce-tabs ul.tabs li.active{background:var(--surface);border-bottom-color:var(--surface)}
.baandee.woocommerce .woocommerce-tabs ul.tabs li a{font-family:var(--font-head);color:var(--ink)}
.baandee.woocommerce div.product .woocommerce-tabs .panel h2:first-child{font-family:var(--font-head)}
.baandee.woocommerce .related.products>h2,
.baandee.woocommerce .upsells.products>h2{font-family:var(--font-head);font-size:22px;margin-bottom:16px}

/* native add-to-cart fallback (variable products) themed */
.baandee.woocommerce div.product form.cart .quantity{margin-right:10px}
.baandee.woocommerce div.product form.cart .quantity input.qty{
  border:1.5px solid var(--border);border-radius:10px;height:46px;width:64px;font-family:var(--font-head);font-weight:600}

/* ---- video review (PDP) ------------------------------------------------- */
.bd-video{margin:0 0 42px}
.bd-video-h{font-family:var(--font-head);font-weight:600;font-size:22px;margin-bottom:16px}
.bd-video-embed{position:relative;max-width:720px;border-radius:14px;overflow:hidden;background:#000;box-shadow:var(--shadow)}
.bd-video-yt{aspect-ratio:16/9;cursor:pointer}
.bd-video-yt img{width:100%;height:100%;object-fit:cover;display:block;transition:.3s}
.bd-video-yt:hover img{opacity:.85}
.bd-video-play{position:absolute;inset:0;margin:auto;width:66px;height:66px;border-radius:50%;border:none;
  background:rgba(197,108,56,.92);color:#fff;font-size:24px;cursor:pointer;display:grid;place-items:center;transition:.2s}
.bd-video-yt:hover .bd-video-play{background:var(--terra);transform:scale(1.06)}
.bd-video-embed iframe{width:100%;height:100%;border:0;display:block;aspect-ratio:16/9}
.bd-video-tiktok{max-width:340px;background:transparent;box-shadow:none}
.bd-video-tiktok iframe,.bd-video-tiktok blockquote{aspect-ratio:auto}
.bd-video-link{display:inline-flex;align-items:center;gap:8px;font-family:var(--font-head);color:var(--terra);font-weight:500}

/* ---- variation as pills (แทน dropdown) -------------------------------- */
.bd-pdp .variations{display:block;margin:6px 0;border:none}
.bd-pdp .variations tbody,.bd-pdp .variations tr,.bd-pdp .variations td,.bd-pdp .variations th{display:block;border:none;padding:0;background:none}
.bd-pdp .variations .label,.bd-pdp .variations th{font-family:var(--font-head);font-weight:500;font-size:14px;color:var(--ink);margin:6px 0}
.bd-varpills{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 6px}
.bd-varpill{font-family:var(--font-head);font-size:13.5px;color:var(--slate);background:var(--surface);
  border:1.5px solid var(--border);border-radius:999px;padding:8px 16px;cursor:pointer;transition:.15s;line-height:1.2}
.bd-varpill:hover{border-color:var(--terra);color:var(--terra-dark)}
.bd-varpill.on{background:var(--terra);border-color:var(--terra);color:#fff}
.bd-varselect-hidden{display:none !important}
.bd-pdp .reset_variations{font-size:12px;color:var(--muted);margin-left:4px}
.bd-pdp .woocommerce-variation-add-to-cart{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:14px}
.bd-pdp .woocommerce-variation-add-to-cart .quantity{margin:0}
.bd-pdp .single_add_to_cart_button{flex:1;min-width:150px;border-radius:12px !important;
  background:var(--terra-tint) !important;color:var(--terra-dark) !important;border:1.5px solid var(--terra) !important}
.bd-pdp .single_add_to_cart_button:hover{background:#f6e0d0 !important}
.bd-buynow-inline{flex:1;min-width:150px;border-radius:12px}
.bd-pdp .woocommerce-variation-price .bd-now,.bd-pdp .woocommerce-variation-price span.price{font-family:var(--font-head);font-weight:700;color:var(--terra)}

/* ---- เอา spinner ↑↓ ของ number input ออก (เหลือแค่ปุ่ม − / +) ---------- */
.bd-qty input[type=number]::-webkit-inner-spin-button,
.bd-qty input[type=number]::-webkit-outer-spin-button,
.baandee.woocommerce .quantity input[type=number]::-webkit-inner-spin-button,
.baandee.woocommerce .quantity input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.bd-qty input[type=number],
.baandee.woocommerce .quantity input[type=number]{-moz-appearance:textfield;appearance:textfield}

@media(max-width:820px){
  .bd-pdp{grid-template-columns:1fr;gap:22px}
  .bd-now{font-size:32px}
  .bd-main-img{font-size:110px}
  /* gallery: รูปหลักจัตุรัสเต็มกว้างด้านบน, thumbnail เป็นแถวด้านล่าง */
  .bd-gallery{flex-direction:column-reverse}
  .bd-thumbs{flex-direction:row;flex-wrap:wrap}
  .baandee.woocommerce ul.products,
  .baandee .woocommerce ul.products{grid-template-columns:repeat(2,1fr);gap:12px}
}

/* ==========================================================================
   CART (Baandee redesign — implement ตาม mockup)
   ========================================================================== */
/* ซ่อน title หน้าเดิม (เราใส่ .bd-cart-head เอง) + ฟิกซ์พื้นหลังดำ + กรอบกลาง */
.woocommerce-cart .entry-header,.woocommerce-checkout .entry-header{display:none}
.woocommerce-cart .entry-content,.woocommerce-checkout .entry-content,
.woocommerce-cart .hentry,.woocommerce-checkout .hentry,
.woocommerce-cart .type-page,.woocommerce-checkout .type-page{padding:0;background:transparent!important;box-shadow:none!important}
.woocommerce-cart .woocommerce-notices-wrapper{max-width:1180px;margin:0 auto;padding:0 16px}
body.woocommerce-cart,body.woocommerce-checkout,
.woocommerce-cart #page,.woocommerce-checkout #page,
.woocommerce-cart .site,.woocommerce-checkout .site{background:var(--cream)!important}
/* specificity สูง เจาะตรง element ที่ Storefront ใส่พื้นหลัง/เงา (boxed content) */
body.woocommerce-cart #primary.content-area,body.woocommerce-cart main#main.site-main,body.woocommerce-cart article.hentry,body.woocommerce-cart .site-main,
body.woocommerce-checkout #primary.content-area,body.woocommerce-checkout main#main.site-main,body.woocommerce-checkout article.hentry,body.woocommerce-checkout .site-main{
  background:transparent!important;background-color:transparent!important;box-shadow:none!important;border:0!important;padding-top:0!important;padding-bottom:0!important}
.woocommerce-cart .site-content,.woocommerce-cart #content,.woocommerce-cart #primary,
.woocommerce-cart .content-area,.woocommerce-cart #main,.woocommerce-cart article,.woocommerce-cart .col-full,
.woocommerce-checkout .site-content,.woocommerce-checkout #content,.woocommerce-checkout #primary,
.woocommerce-checkout .content-area,.woocommerce-checkout #main,.woocommerce-checkout article,.woocommerce-checkout .col-full{background:transparent!important}
/* bulletproof: ไม่พึ่ง body class — เจาะ wrapper ที่ห่อตะกร้า/เช็คเอาต์ของเราไว้ (Storefront ใส่พื้นหลังดำที่ตัวใดตัวหนึ่งในนี้) */
:is(#primary,#content,#main,.content-area,.site-content,.site-main,article,.hentry,.type-page,.entry-content,.col-full):has(.bd-cart-layout),
:is(#primary,#content,#main,.content-area,.site-content,.site-main,article,.hentry,.type-page,.entry-content,.col-full):has(.bd-checkout-layout){
  background:transparent!important;background-color:transparent!important;box-shadow:none!important;border:0!important}
body:has(.bd-cart-layout),body:has(.bd-checkout-layout),
:is(#page,.site):has(.bd-cart-layout),:is(#page,.site):has(.bd-checkout-layout){background:var(--cream)!important;background-color:var(--cream)!important}

.bd-cart-head{max-width:1180px;margin:26px auto 18px;padding:0 16px;display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:10px}
.bd-cart-head h1{font-family:var(--font-head);font-weight:600;font-size:26px}
.bd-cart-head h1 span{color:var(--muted);font-weight:400;font-size:17px}
.bd-cart-head a{font-family:var(--font-head);font-size:14px;color:var(--terra);font-weight:500;white-space:nowrap}

.bd-cart-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,390px);gap:28px;align-items:start;max-width:1180px;margin:0 auto;padding:0 16px 50px}
.bd-cart-main{min-width:0;display:flex;flex-direction:column;gap:14px}

/* ส่งฟรี */
.bd-ship{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px 18px}
.bd-ship.done{border-color:var(--sage);background:#f4f9f5}
.bd-ship-msg{font-size:14px;color:var(--slate);margin-bottom:9px}
.bd-ship-msg b{color:var(--terra);font-weight:600}
.bd-ship.done .bd-ship-msg b{color:var(--sage)}
.bd-ship-bar{height:8px;border-radius:5px;background:var(--section);overflow:hidden}
.bd-ship-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--terra),var(--terra-dark));border-radius:5px;transition:.5s}
.bd-ship.done .bd-ship-bar span{background:var(--sage)}

/* item cards */
.bd-cart-items{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.bd-item{display:grid;grid-template-columns:90px 1fr auto;gap:16px;align-items:center;padding:16px 18px;border-bottom:1px solid var(--border)}
.bd-item:last-child{border-bottom:none}
.bd-item-img{width:90px;height:90px;border:1px solid var(--border);border-radius:10px;background:var(--surface);overflow:hidden;display:grid;place-items:center;flex-shrink:0}
.bd-item-img img{width:100%;height:100%;object-fit:contain}
.bd-item-name{font-family:var(--font-head);font-weight:500;font-size:15px;line-height:1.4;color:var(--ink);display:block}
.bd-item-name:hover{color:var(--terra)}
.bd-item-info dl,.bd-item-info .variation{font-size:12.5px;color:var(--muted);margin:3px 0 0}
.bd-item-each{font-size:12.5px;color:var(--slate);margin-top:6px}
.bd-item-right{display:flex;align-items:center;gap:16px}
.bd-cart-qty{display:flex;align-items:center;border:1.5px solid var(--border);border-radius:10px;overflow:hidden}
.bd-cart-qty button{width:36px;height:40px;border:none;background:var(--surface);font-size:18px;color:var(--slate);cursor:pointer;line-height:1}
.bd-cart-qty button:hover{background:var(--cream);color:var(--terra)}
.bd-cart-qty .quantity{margin:0}
.bd-cart-qty input.qty,.bd-cart-qty input{width:44px;height:40px;border:none;text-align:center;font-family:var(--font-head);font-weight:600;font-size:15px;outline:none;background:var(--surface);-moz-appearance:textfield}
.bd-cart-qty input::-webkit-inner-spin-button,.bd-cart-qty input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.bd-cart-qty.bd-qty-loading{opacity:.45;pointer-events:none}
.bd-item-line{font-family:var(--font-head);font-weight:700;color:var(--terra);font-size:17px;min-width:90px;text-align:right;white-space:nowrap}
.bd-item-rm{width:30px;height:30px;border-radius:50%;background:var(--section);color:var(--slate)!important;display:grid!important;place-items:center;font-size:17px;cursor:pointer;border:none;text-decoration:none;line-height:1}
.bd-item-rm:hover{background:var(--sale);color:#fff!important}

/* coupon */
.bd-coupon{display:flex;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px 18px}
.bd-coupon input{flex:1;border:1.5px solid var(--border);border-radius:10px;padding:11px 16px;font-family:var(--font-body);font-size:14px;background:var(--cream);outline:none;color:var(--ink)}
.bd-coupon input:focus{border-color:var(--terra)}
.bd-coupon .bd-btn{white-space:nowrap}

/* summary */
.bd-cart-summary{position:sticky;top:20px;display:flex;flex-direction:column;gap:14px;min-width:0;width:100%}
.woocommerce-cart .bd-cart-summary.cart-collaterals{float:none!important;clear:none!important;width:auto!important;max-width:none!important;margin:0!important}
.woocommerce-cart .bd-cart-summary.cart-collaterals::before,
.woocommerce-cart .bd-cart-summary.cart-collaterals::after{content:none!important;display:none!important}
.woocommerce-cart .bd-cart-summary .cart_totals{float:none!important;clear:none!important;width:100%!important;max-width:none!important;margin:0!important}
.bd-sumcard{box-sizing:border-box;width:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:20px}
.bd-sumcard h3{font-family:var(--font-head);font-weight:600;font-size:18px;margin-bottom:16px}
.bd-srow{display:flex;justify-content:space-between;align-items:baseline;gap:14px;font-size:14.5px;color:var(--slate);padding:9px 0}
.bd-srow>span:first-child{min-width:0}
.bd-srow>span:last-child,.bd-srow>b:last-child{margin-left:auto;text-align:right;white-space:nowrap}
.bd-srow b,.bd-srow .amount{color:var(--ink);font-weight:600}
.bd-srow b.free{color:var(--sage)}
.bd-srow.disc{color:var(--sage)}
.bd-srow.disc .amount,.bd-srow.disc span{color:var(--sage)}
.bd-srow-ship .amount{color:var(--sage)}
.bd-srow-ship ul{list-style:none;margin:0;padding:0;text-align:right}
.bd-sumcard hr{border:none;border-top:1px solid var(--border);margin:6px 0}
.bd-total{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:12px 0 4px}
.bd-total .lab{font-family:var(--font-head);font-weight:600;font-size:16px;white-space:nowrap;flex-shrink:0}
.bd-total .val{margin-left:auto;text-align:right}
.bd-total .val,.bd-total .val .amount{font-family:var(--font-head);font-weight:700;color:var(--terra);font-size:23px;white-space:nowrap}
.bd-cart-summary .wc-proceed-to-checkout{margin-top:16px;padding:0}
.bd-cart-summary .checkout-button,.bd-cart-summary a.checkout-button.button{display:block;width:100%;text-align:center;
  background:var(--terra)!important;color:#fff!important;border-radius:12px!important;font-family:var(--font-head)!important;
  font-weight:600!important;padding:15px!important;font-size:16px!important;border:none!important;line-height:1.3!important;white-space:nowrap!important;
  box-shadow:0 6px 16px rgba(197,108,56,.25)!important;transition:background .15s,transform .1s}
.bd-cart-summary .checkout-button::after,.bd-cart-summary .checkout-button.wc-forward::after{content:none!important;display:none!important}
.bd-cart-summary .checkout-button:hover{background:var(--terra-dark)!important}
.bd-cart-summary .checkout-button:active{transform:translateY(1px)}
.bd-pay-safe{text-align:center;font-size:12.5px;color:var(--sage);font-weight:500;margin-top:13px}
.bd-pay{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}
.bd-pay span{background:var(--section);font-size:12px;color:var(--slate);padding:7px 4px;border-radius:8px;font-family:var(--font-head);text-align:center;white-space:nowrap}
.bd-sumcard.bd-trust{display:flex;flex-direction:column;gap:11px;font-size:13px;color:var(--slate);padding:16px 18px}
.bd-sumcard.bd-trust div{display:flex;align-items:center;gap:10px}
.bd-sumcard.bd-trust .ic{width:30px;height:30px;border-radius:8px;background:var(--terra-tint);display:grid;place-items:center;font-size:15px;flex-shrink:0}

@media(max-width:880px){
  .bd-cart-layout{grid-template-columns:1fr;gap:18px}
  .bd-cart-summary{position:static}
  .bd-item{grid-template-columns:72px 1fr;row-gap:12px}
  .bd-item-img{width:72px;height:72px}
  .bd-item-right{grid-column:1/-1;justify-content:space-between}
  .bd-coupon{flex-wrap:wrap}.bd-coupon input{min-width:0;flex:1 1 100%}
}

/* ==========================================================================
   SHOP — sidebar filters (หมวดหมู่ + ราคา + ลดราคา)
   ========================================================================== */
.bd-shop-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:26px;align-items:start}
.bd-shop-main{min-width:0}
/* grid สินค้าในพื้นที่หลัก = 3 คอลัมน์ (แคบลงเพราะมี sidebar)
   บังคับ grid + ล้าง width/float/clear ของ Storefront columns-4 (กัน grid เพี้ยน 2-3-1) */
body.baandee .bd-shop-main ul.products,
.bd-shop-main ul.products{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(200px,1fr))!important;gap:16px!important;margin:0 0 30px!important;padding:0!important;width:100%!important;float:none!important}
body.baandee .bd-shop-main ul.products li.product,
.bd-shop-main ul.products li.product{width:auto!important;min-width:0!important;max-width:none!important;float:none!important;clear:none!important;margin:0!important}
/* ซ่อน clearfix ::before/::after ที่กลายเป็น grid item ไปกินช่องแรก/ช่องท้าย (ทำให้มีช่องว่าง) */
body.baandee .bd-shop-main ul.products::before,
body.baandee .bd-shop-main ul.products::after,
.bd-shop-main ul.products::before,
.bd-shop-main ul.products::after{content:none!important;display:none!important}

/* sidebar */
.bd-shop-sidebar{position:sticky;top:18px;display:flex;flex-direction:column;gap:16px}
.bd-filter-box{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:16px 18px}
.bd-filter-box h3{font-family:var(--font-head);font-weight:600;font-size:15px;margin:0 0 12px;color:var(--ink)}

/* รายการหมวดหมู่ */
.bd-cat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.bd-cat-list li a{display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:8px 10px;border-radius:9px;font-size:14px;color:var(--slate);text-decoration:none;transition:.12s}
.bd-cat-list li a:hover{background:var(--cream);color:var(--terra)}
.bd-cat-list li.on a{background:var(--terra-tint);color:var(--terra-dark);font-weight:600}
.bd-cat-list .ct{font-size:11.5px;color:var(--muted);background:var(--section);padding:1px 8px;border-radius:20px;flex-shrink:0}
.bd-cat-list li.on .ct{background:#fff;color:var(--terra)}

/* กรองราคา */
.bd-price-row{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.bd-price-row input{width:100%;min-width:0;border:1.5px solid var(--border);border-radius:9px;padding:8px 10px;
  font-family:var(--font-body);font-size:13.5px;background:var(--cream);outline:none;color:var(--ink)}
.bd-price-row input:focus{border-color:var(--terra)}
.bd-price-row span{color:var(--muted)}
.bd-price-filter .bd-btn{width:100%;text-align:center;padding:9px;font-size:14px;border-radius:9px}

/* toggle ลดราคา + ล้าง */
.bd-toggle-filter{display:flex;align-items:center;gap:8px;padding:9px 11px;border:1.5px solid var(--border);
  border-radius:9px;font-size:14px;color:var(--slate);text-decoration:none;transition:.12s}
.bd-toggle-filter:hover{border-color:var(--terra);color:var(--terra)}
.bd-toggle-filter.on{border-color:var(--sale);background:#fdeee9;color:var(--sale);font-weight:600}
.bd-clear-filter{display:block;text-align:center;font-size:13px;color:var(--muted);text-decoration:none;padding:4px}
.bd-clear-filter:hover{color:var(--sale)}

@media(max-width:980px){
  .bd-shop-layout{grid-template-columns:1fr}
  .bd-shop-sidebar{position:static;flex-direction:row;flex-wrap:wrap}
  .bd-shop-sidebar .bd-filter-box{flex:1 1 220px}
}
@media(max-width:560px){
  .bd-shop-sidebar{flex-direction:column}
  body.baandee .bd-shop-main ul.products,
  .bd-shop-main ul.products{grid-template-columns:repeat(2,1fr)!important}
}
