:root{
  --bg:#f6f8fb;--card:#fff;--text:#162033;--muted:#667085;--line:#e6e9ef;
  --brand:#173a6d;--brand2:#245b9f;--soft:#eef4ff;--success:#0f7b4d;
  --danger:#b42318;--shadow:0 14px 35px rgba(17,24,39,.08);--radius:18px
}
*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
button,input,select{font:inherit}.hidden{display:none!important}
.topbar{position:sticky;top:0;z-index:30;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:22px;padding:14px 24px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:11px}.brand-mark{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,var(--brand),var(--brand2));display:grid;place-items:center;color:white;font-weight:800;font-size:22px}.brand strong{display:block;font-size:16px}.brand span{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.channel-tabs{justify-self:center;background:#eef1f5;border-radius:14px;padding:4px;display:flex;gap:4px}.tab{border:0;background:transparent;padding:10px 16px;border-radius:10px;color:#465467;cursor:pointer;font-weight:700}.tab.active{background:#fff;color:var(--brand);box-shadow:0 2px 8px rgba(16,24,40,.08)}
.header-actions{display:flex;gap:9px}.ghost,.primary,.cart-button,.icon-button{border:0;border-radius:12px;cursor:pointer;font-weight:700}.ghost{padding:10px 13px;background:#f2f4f7;color:#344054}.primary{padding:11px 16px;background:var(--brand);color:#fff}.primary:disabled{opacity:.45;cursor:not-allowed}.cart-button{padding:10px 14px;background:#162033;color:white}.cart-button span{background:white;color:#162033;border-radius:999px;padding:2px 7px;margin-left:5px}
main{max-width:1480px;margin:0 auto;padding:24px}.hero{background:linear-gradient(135deg,#102f5a,#1f5f9f);color:white;border-radius:26px;padding:30px;display:grid;grid-template-columns:1fr minmax(320px,560px);gap:30px;align-items:end;box-shadow:var(--shadow)}.hero h1{font-size:clamp(28px,4vw,46px);margin:7px 0 9px;line-height:1.03}.hero p{max-width:680px;margin:0;color:#dce9f8}.eyebrow{text-transform:uppercase;font-size:11px;letter-spacing:.11em;font-weight:800;color:#7a8aa0}.hero .eyebrow{color:#b9d7f4}.hero-actions{display:flex;gap:10px}.searchbox{flex:1;display:flex;align-items:center;gap:9px;background:#fff;border-radius:14px;padding:0 13px;color:#5b6675}.searchbox input{border:0;outline:0;width:100%;padding:13px 0;background:transparent}
.location-panel{margin-top:18px;background:#fff6df;border:1px solid #f6d77c;border-radius:18px;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px}.location-panel p{margin:5px 0 0;color:#715b23}.location-actions{display:flex;gap:8px}
.content-grid{display:grid;grid-template-columns:320px 1fr;gap:20px;margin-top:22px}.vendors-panel,.catalog-panel{background:var(--card);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}.vendors-panel{padding:18px;height:fit-content;position:sticky;top:88px}.catalog-panel{padding:20px;min-height:540px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.section-head h2{margin:3px 0 0;font-size:20px}.pill{background:#eef4ff;color:#245b9f;border-radius:999px;padding:4px 9px;font-weight:800;font-size:12px}
.vendor-list{display:flex;flex-direction:column;gap:10px}.vendor-card{border:1px solid var(--line);border-radius:15px;padding:13px;cursor:pointer;transition:.16s;background:#fff}.vendor-card:hover{transform:translateY(-1px);border-color:#b9c5d6}.vendor-card.active{border-color:#4f7db5;background:#f3f7fc}.vendor-title{font-weight:800}.vendor-meta{font-size:12px;color:var(--muted);margin-top:4px}.vendor-badges{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}.mini{font-size:10px;border-radius:999px;padding:3px 7px;background:#f2f4f7;color:#465467}
.service-badge{font-size:12px;background:#ecfdf3;color:#067647;padding:7px 10px;border-radius:999px;font-weight:800}.message{padding:28px;text-align:center;color:var(--muted);border:1px dashed #d5dae3;border-radius:16px}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:15px}.product-card{border:1px solid var(--line);border-radius:18px;overflow:hidden;background:#fff;display:flex;flex-direction:column}.product-image{height:145px;background:#fff;display:grid;place-items:center;color:#98a2b3;font-size:42px;overflow:hidden;padding:10px;box-sizing:border-box}.product-image img{width:100%;height:100%;object-fit:contain;object-position:center;background:#fff;border-radius:12px}.product-body{padding:13px;display:flex;flex-direction:column;gap:8px;flex:1}.product-name{font-weight:800;line-height:1.25}.sku{font-size:11px;color:var(--muted)}.price-row{display:flex;justify-content:space-between;align-items:center;margin-top:auto}.price{font-size:18px;font-weight:900}.add-btn{border:0;border-radius:10px;background:#162033;color:#fff;padding:8px 10px;cursor:pointer}
.drawer{position:fixed;inset:0;z-index:60;background:rgba(15,23,42,.42);display:none;justify-content:flex-end}.drawer.open{display:flex}.drawer-card{width:min(480px,100%);height:100%;background:white;padding:20px;display:flex;flex-direction:column;box-shadow:-20px 0 50px rgba(15,23,42,.12)}.drawer-head{display:flex;align-items:center;justify-content:space-between}.drawer-head h2{margin:3px 0 0}.icon-button{width:38px;height:38px;background:#f2f4f7;font-size:23px}.cart-vendor{margin:14px 0;font-size:13px;color:var(--muted)}.cart-items{display:flex;flex-direction:column;gap:10px;overflow:auto;flex:1}.cart-item{display:grid;grid-template-columns:1fr auto;gap:9px;border-bottom:1px solid var(--line);padding-bottom:10px}.qty{display:flex;align-items:center;gap:7px}.qty button{border:0;border-radius:8px;width:26px;height:26px;cursor:pointer}.cart-summary{border-top:1px solid var(--line);padding:13px 0;display:grid;gap:7px}.summary-row{display:flex;justify-content:space-between}.full{width:100%}
.modal{position:fixed;inset:0;z-index:70;background:rgba(15,23,42,.5);display:grid;place-items:center;padding:18px}.modal-card{background:white;border-radius:22px;width:min(760px,100%);max-height:92vh;overflow:auto;padding:22px;box-shadow:0 30px 70px rgba(15,23,42,.18)}.modal-card.small{width:min(650px,100%)}form{display:grid;gap:15px;margin-top:18px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#475467}input,select{width:100%;padding:11px 12px;border:1px solid #d0d5dd;border-radius:11px;background:white;outline:0}input:focus,select:focus{border-color:#6c91bc;box-shadow:0 0 0 3px #edf4fc}fieldset{border:1px solid var(--line);border-radius:15px;padding:14px}legend{font-size:12px;font-weight:800;padding:0 7px}.checkout-quote{background:#f8fafc;border-radius:12px;padding:12px;font-size:13px}.payment-hint{font-size:12px;color:var(--muted)}.map{height:340px;border-radius:15px;overflow:hidden;margin:14px 0}.coords{margin-bottom:12px}.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:90;background:#101828;color:white;border-radius:12px;padding:11px 16px;box-shadow:var(--shadow);max-width:min(560px,90vw)}.toast.error{background:#7a271a}
footer{max-width:1480px;margin:0 auto;padding:26px 24px 38px;color:var(--muted);display:flex;justify-content:space-between;gap:20px;font-size:12px}
@media(max-width:980px){.topbar{grid-template-columns:1fr auto}.channel-tabs{grid-row:2;grid-column:1/-1;justify-self:stretch}.tab{flex:1}.hero{grid-template-columns:1fr}.content-grid{grid-template-columns:1fr}.vendors-panel{position:static}.vendor-list{display:grid;grid-template-columns:repeat(2,1fr)}}@media(max-width:640px){.topbar{padding:10px 12px}.brand span{display:none}.header-actions .ghost{max-width:125px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hero{padding:22px;border-radius:18px}.hero-actions{flex-direction:column}.content-grid{gap:12px}.vendor-list{grid-template-columns:1fr}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.product-card{border-radius:14px}.product-image{height:118px}.product-body{padding:10px}.form-grid{grid-template-columns:1fr}main{padding:14px}.location-panel{flex-direction:column;align-items:flex-start}.location-actions{width:100%}.location-actions button{flex:1}footer{flex-direction:column}}

/* M1N v1.0.3 API/data-contract fixes */
.vendor-key{font-size:10px;color:#8792a2;margin-top:2px;word-break:break-all}
.mrp{font-size:12px;color:#98a2b3;text-decoration:line-through;margin-left:6px}
.stock{font-size:11px;color:#667085;font-weight:700}.stock.low{color:#b54708}
.qty-control{display:flex;align-items:center;gap:8px;margin-top:4px}
.qty-control button,.cart-qty button{border:0;border-radius:8px;width:29px;height:29px;cursor:pointer;background:#eef2f6;color:#172033;font-weight:900}
.cart-line-total{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.remove-link{border:0;background:transparent;color:#b42318;font-weight:800;font-size:11px;cursor:pointer;padding:0}
.toast{max-width:min(620px,92vw);max-height:140px;overflow:auto;white-space:normal;word-break:break-word;line-height:1.35}
.toast.error{background:#7a271a}
.product-image .image-placeholder{font-size:38px}

/* M1N v1.0.4 usability fixes */
.product-image .image-placeholder{opacity:.72;filter:saturate(.85)}
.cart-qty span{min-width:42px;text-align:center;font-variant-numeric:tabular-nums}
.coords input:placeholder-shown{color:#98a2b3}

/* M1N v1.0.5 strict channel separation */
.header-actions{min-height:40px}
#locationButton.hidden{display:none!important}

/* LEMURIAN_BAZAAR_M2A7_LABELS_IMAGEFIT */
.product-image .image-placeholder{display:grid;place-items:center;width:100%;height:100%;background:linear-gradient(135deg,#eff4f9,#f8fafc);border-radius:12px}


/* LEMURIAN_BAZAAR_M2A8_FULL_PRODUCT_IMAGE_STAGE
 * Keep the entire source image visible. Never crop product photography.
 */
.product-card .product-image{
  height:auto !important;
  aspect-ratio:1 / 1 !important;
  min-height:0 !important;
  padding:10px !important;
  box-sizing:border-box !important;
  background:#fff !important;
  overflow:hidden !important;
}
.product-card .product-image > img{
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  display:block !important;
  background:#fff !important;
}
@media(max-width:640px){
  .product-card .product-image{
    height:auto !important;
    aspect-ratio:1 / 1 !important;
    padding:7px !important;
  }
}


/* LEMURIAN_BAZAAR_M2A9_ADAPTIVE_PRODUCT_IMAGE_BACKGROUND
 * Preserve the full product image while using a soft same-image background
 * for wide or narrow source photos so cards look fuller without cropping.
 */
.product-card .product-image{
  background:#f8fafc !important;
}
.product-card .product-image-stage{
  position:relative;
  display:block;
  width:100%;
  height:100%;
  border-radius:16px;
  overflow:hidden;
  isolation:isolate;
  background:#fff;
  box-shadow:inset 0 0 0 1px rgba(15,23,42,.04);
}
.product-card .product-image-stage .product-image-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  filter:blur(16px) saturate(1.08);
  transform:scale(1.12);
  opacity:.34;
}
.product-card .product-image-stage::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.24) 100%);
  z-index:1;
  pointer-events:none;
}
.product-card .product-image-stage .product-image-fg{
  position:relative !important;
  z-index:2;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  display:block !important;
  background:transparent !important;
}
.product-card .product-image > .image-placeholder{
  border-radius:16px;
}
@media(max-width:640px){
  .product-card .product-image-stage{
    border-radius:12px;
  }
}
