/* ตลาดกระทุ่มแบน Order/Cart v0.1 */
.order-floating-cart{position:fixed;right:16px;bottom:18px;z-index:940;background:#b31217;color:#fff;border:0;border-radius:999px;padding:12px 16px;font:700 15px Prompt,sans-serif;box-shadow:0 10px 28px rgba(0,0,0,.22);cursor:pointer}.order-floating-cart .count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;margin-left:6px;border-radius:99px;background:#fff;color:#b31217;font-size:12px}.market-order-nav{white-space:nowrap}.market-order-btn{
  display:block!important;
  width:calc(100% - 20px)!important;
  max-width:560px!important;
  min-height:52px;
  margin:12px auto 4px!important;
  border:0!important;
  border-radius:12px!important;
  background:#8f0d12!important;
  color:#fff!important;
  padding:14px 18px!important;
  text-align:center!important;
  font:800 17px Prompt,sans-serif!important;
  box-shadow:0 5px 14px rgba(143,13,18,.28);
  cursor:pointer;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease
}
.market-order-btn:hover{background:#760b0f!important;box-shadow:0 7px 18px rgba(143,13,18,.34);transform:translateY(-1px)}
.market-order-btn:active{transform:translateY(1px);box-shadow:0 3px 8px rgba(143,13,18,.24)}
.market-order-btn:focus-visible{outline:3px solid rgba(143,13,18,.25);outline-offset:3px}
@media(max-width:640px){.market-order-btn{width:calc(100% - 16px)!important;max-width:none!important;min-height:54px;font-size:17px!important;margin:12px auto 4px!important}}
.market-order-modal{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:16px}.market-order-modal.hidden{display:none}.market-order-modal .mo-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5)}.market-order-panel{position:relative;width:min(760px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:22px;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.28);font-family:Prompt,sans-serif}.market-order-panel.wide{width:min(1040px,100%)}.mo-close{position:absolute;right:14px;top:12px;border:0;background:#f1f1f1;width:38px;height:38px;border-radius:50%;font-size:24px;cursor:pointer}.mo-title{margin:0 46px 6px 0;font-size:24px}.mo-muted{color:#6f6f6f;font-size:13px}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin-top:16px}.product-card{border:1px solid #eee;border-radius:16px;overflow:hidden;background:#fff}.product-card img{width:100%;aspect-ratio:4/3;object-fit:cover;background:#f5f5f5}.product-card .body{padding:12px}.product-card h4{margin:0 0 5px;font-size:16px}.product-card p{margin:0 0 8px;color:#666;font-size:12px;min-height:34px}.product-card .price{font-weight:800;color:#b31217;font-size:18px}.product-card button{width:100%;margin-top:8px;border:0;border-radius:10px;background:#b31217;color:#fff;padding:9px;font-weight:700;cursor:pointer}.cart-shop{border:1px solid #e6e6e6;border-radius:16px;margin:12px 0;overflow:hidden}.cart-shop-head{padding:11px 14px;background:#faf7f3;font-weight:800}.cart-line{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px 14px;border-top:1px solid #eee}.cart-line small{display:block;color:#777}.qty-control{display:flex;align-items:center;gap:7px}.qty-control button{border:1px solid #ddd;background:#fff;border-radius:8px;width:30px;height:30px}.cart-total{display:flex;justify-content:space-between;font-size:20px;font-weight:800;margin:18px 0}.mo-primary,.mo-secondary,.mo-danger{border:0;border-radius:12px;padding:11px 15px;font:700 14px Prompt,sans-serif;cursor:pointer}.mo-primary{background:#b31217;color:#fff}.mo-secondary{background:#f1f1f1;color:#222}.mo-danger{background:#fff0f0;color:#a40000}.mo-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.mo-form{display:grid;gap:12px;margin-top:14px}.mo-form.two{grid-template-columns:repeat(2,minmax(0,1fr))}.mo-form label{font-weight:600;font-size:13px}.mo-form input,.mo-form textarea,.mo-form select{width:100%;box-sizing:border-box;margin-top:5px;border:1px solid #ddd;border-radius:10px;padding:10px;font:400 14px Prompt,sans-serif}.full{grid-column:1/-1}.checkout-summary{border:1px solid #eee;border-radius:14px;padding:12px;margin-top:14px}.payment-card{border:1px solid #e7e7e7;border-radius:16px;padding:14px;margin:12px 0}.payment-card img{display:block;max-width:240px;width:70%;margin:12px auto;border-radius:12px;border:1px solid #eee}.payment-amount{font-size:22px;font-weight:800;color:#b31217}.status-pill{display:inline-block;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:700;background:#f1f1f1}.status-awaiting_payment{background:#fff4d6;color:#845600}.status-payment_review{background:#e8f2ff;color:#15508d}.status-preparing{background:#fff0e7;color:#9d4300}.status-ready{background:#e8f8ed;color:#126c2e}.status-cancelled{background:#ffecec;color:#9a1111}.order-card{border:1px solid #e5e5e5;border-radius:16px;padding:14px;margin:12px 0}.order-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.order-items{margin:10px 0;padding:10px;background:#fafafa;border-radius:10px;font-size:13px}.seller-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.seller-tabs button{border:1px solid #ddd;background:#fff;border-radius:999px;padding:8px 12px}.seller-tabs button.active{background:#222;color:#fff;border-color:#222}.seller-section{border-top:1px solid #eee;padding-top:16px;margin-top:16px}.seller-shop-card{border:1px solid #eee;border-radius:14px;padding:12px;margin:10px 0}.seller-product-row{display:grid;grid-template-columns:1fr auto;gap:10px;border-top:1px solid #eee;padding:10px 0}.ready-banner{padding:12px;border-radius:14px;background:#e9f8ee;color:#145f2b;margin:12px 0}.warning-banner{padding:12px;border-radius:14px;background:#fff4d9;color:#7c5700;margin:12px 0}.delivery-cost-box{padding:12px;border-radius:14px;background:#f7f7f7;margin:12px 0}.slip-thumb{max-width:180px;border-radius:10px;border:1px solid #ddd}.hidden{display:none!important}@media(max-width:650px){.mo-form.two{grid-template-columns:1fr}.market-order-panel{padding:18px 14px;border-radius:18px}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-card p{display:none}.order-floating-cart{bottom:12px;right:12px}.market-order-nav{font-size:0}.market-order-nav::before{content:'🛍️';font-size:16px}}

.product-category-tabs{display:flex;gap:8px;overflow-x:auto;padding:10px 1px 4px;margin-top:8px;scrollbar-width:thin}
.product-category-tabs button{flex:0 0 auto;border:1px solid #ddd;background:#fff;color:#3d3333;border-radius:999px;padding:8px 14px;font:700 14px Prompt,sans-serif;cursor:pointer}
.product-category-tabs button.active{background:#8f0d12;color:#fff;border-color:#8f0d12}
.seller-category-group{margin-top:14px;border-top:1px solid #eee;padding-top:8px}
.seller-category-group h4{margin:0 0 6px;font-size:15px}
.category-admin-list{margin-top:8px}

/* V0.5.20.12: Order CTA must stay on one line and stretch to available width */
.market-order-btn{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
  margin:12px auto 4px!important;
  padding:14px 12px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  text-align:center!important;
  font-size:clamp(14px,3.8vw,17px)!important;
  line-height:1.25!important;
}
@media(max-width:380px){
  .market-order-btn{font-size:14px!important;padding-left:8px!important;padding-right:8px!important}
}

/* V0.5.20.13: CTA gets a dedicated full-width row inside shop card */
.market-order-cta-row{
  flex:0 0 100%!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  display:block!important;
  box-sizing:border-box!important;
  clear:both!important;
}
.market-order-cta-row .market-order-btn{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:10px 0 2px!important;
  box-sizing:border-box!important;
  white-space:nowrap!important;
  overflow:visible!important;
}

/* V0.5.20.14: balanced CTA width on desktop, near-full width on mobile */
@media (min-width:641px){
  .market-order-cta-row{
    display:flex!important;
    justify-content:center!important;
    width:100%!important;
  }
  .market-order-cta-row .market-order-btn{
    width:88%!important;
    max-width:88%!important;
    margin:10px auto 2px!important;
  }
}
@media (max-width:640px){
  .market-order-cta-row .market-order-btn{
    width:100%!important;
    max-width:100%!important;
    margin:10px 0 2px!important;
  }
}

/* V0.5.20.15: balanced CTA on both desktop and mobile */
@media (min-width:641px){
  .market-order-cta-row{
    display:flex!important;
    justify-content:center!important;
  }
  .market-order-cta-row .market-order-btn{
    width:88%!important;
    max-width:88%!important;
    min-height:52px!important;
    margin:10px auto 2px!important;
    font-size:17px!important;
  }
}
@media (min-width:381px) and (max-width:640px){
  .market-order-cta-row{
    display:flex!important;
    justify-content:center!important;
  }
  .market-order-cta-row .market-order-btn{
    width:94%!important;
    max-width:94%!important;
    min-height:52px!important;
    margin:10px auto 2px!important;
    padding:13px 10px!important;
    font-size:16px!important;
    white-space:nowrap!important;
  }
}
@media (max-width:380px){
  .market-order-cta-row{
    display:flex!important;
    justify-content:center!important;
  }
  .market-order-cta-row .market-order-btn{
    width:96%!important;
    max-width:96%!important;
    min-height:50px!important;
    margin:10px auto 2px!important;
    padding:12px 8px!important;
    font-size:14px!important;
    white-space:nowrap!important;
  }
}

/* V0.5.20.16 FIX: CTA is physically outside the compact action row */
.market-order-cta-row{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  margin:8px 0 0!important;
  padding:0!important;
  clear:both!important;
}
.market-order-cta-row .market-order-btn{
  display:block!important;
  width:92%!important;
  max-width:92%!important;
  min-width:0!important;
  min-height:50px!important;
  margin:0 auto!important;
  box-sizing:border-box!important;
  border:0!important;
  border-radius:12px!important;
  background:#8f0d12!important;
  color:#fff!important;
  padding:13px 10px!important;
  text-align:center!important;
  white-space:nowrap!important;
  overflow:visible!important;
  font:800 16px/1.25 Prompt,sans-serif!important;
}
@media(max-width:640px){
  .market-order-cta-row .market-order-btn{
    width:96%!important;
    max-width:96%!important;
    font-size:15px!important;
  }
}

/* V0.5.20.17: Marketplace CTA sits directly below external delivery buttons */
.market-order-cta-row{
  margin-top:8px!important;
  margin-bottom:8px!important;
}
.market-order-cta-row + .community-actions{
  margin-top:10px!important;
}

/* V0.5.20.21 product quick status toggle */
.mo-warning{border:1px solid #d99b20!important;background:#fff7df!important;color:#7a5200!important;border-radius:10px;padding:8px 10px;font-weight:700;cursor:pointer}
.mo-success{border:1px solid #2d8a55!important;background:#eaf8ef!important;color:#17643b!important;border-radius:10px;padding:8px 10px;font-weight:700;cursor:pointer}
