/* extracted from templates/marketplace.html line 22 — patch_split_static 20260706 */

  :root{--br:#8B6C4A;--br-light:#F5EFE6;--br-dark:#6A4E30;--br-cream:#F0E5D5;}
  *{box-sizing:border-box;}
  body{background:#F5EFE6;font-family:'Sarabun','Segoe UI',sans-serif;color:#2d2010;
       padding-bottom:env(safe-area-inset-bottom);}

  /* Buttons */
  .btn{display:inline-flex;align-items:center;gap:.4rem;padding:.5rem 1.1rem;
       border-radius:.6rem;font-weight:600;font-size:.875rem;transition:.15s;cursor:pointer;border:none;}
  .btn-primary{background:var(--br);color:#fff;} .btn-primary:hover{background:var(--br-dark);}
  .btn-ghost{background:#fff;color:var(--br);border:1.5px solid var(--br);}
  .btn-ghost:hover{background:var(--br);color:#fff;}
  .btn-sm{padding:.35rem .8rem;font-size:.78rem;}
  .btn:disabled{opacity:.5;cursor:not-allowed;}

  /* Card */
  .card{background:#fff;border-radius:1rem;box-shadow:0 2px 10px rgba(0,0,0,.07);overflow:hidden;}

  /* Input */
  .inp{border:1.5px solid #e0d5c5;border-radius:.6rem;padding:.5rem .75rem;font-size:.875rem;
       width:100%;outline:none;transition:.15s;background:#fff;}
  .inp:focus{border-color:var(--br);box-shadow:0 0 0 3px rgba(124,92,46,.12);}

  /* Category chips */
  .chip{padding:.35rem .85rem;border-radius:999px;font-size:.78rem;font-weight:600;
        border:1.5px solid #e0d5c5;background:#fff;color:#6b5035;cursor:pointer;white-space:nowrap;transition:.15s;}
  .chip.active{background:var(--br);color:#fff;border-color:var(--br);}
  .chip:hover:not(.active){background:var(--br-light);border-color:var(--br);}

  /* Product card */
  .prod-card{background:#fff;border-radius:12px;overflow:hidden;cursor:pointer;
             border:0.5px solid #e8ddd0;
             transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s;
             box-shadow:0 2px 0 #e0d0b8,0 3px 10px rgba(90,63,26,.06);}
  .prod-card:hover{transform:translateY(-5px);box-shadow:0 7px 0 #d0b898,0 14px 28px rgba(90,63,26,.13);border-color:#c4a882;}
  .prod-img{width:100%;aspect-ratio:1/1;object-fit:cover;background:#f5ede0;}
  /* Visual card — larger image area */
  .prod-card.type-visual .prod-img{aspect-ratio:4/3;}
  /* Spec card — compact horizontal layout */
  .prod-card.type-spec{display:flex;flex-direction:row;}
  .prod-card.type-spec .prod-img{width:80px;height:80px;flex-shrink:0;aspect-ratio:1/1;object-fit:cover;}
  .prod-card.type-spec .prod-info{flex:1;padding:.6rem .7rem;display:flex;flex-direction:column;justify-content:space-between;}
  .prod-card.type-spec .prod-price{font-size:1.05rem;font-weight:800;color:var(--br);font-variant-numeric:tabular-nums;}
  /* Hybrid — standard but with spec strip */
  .prod-card.type-hybrid .prod-spec-strip{background:#faf6f0;padding:.35rem .65rem;font-size:.65rem;color:#8a7060;border-top:0.5px solid #e8ddd0;}

  /* Verified badge */
  .v-badge{background:#ecfdf5;color:#059669;font-size:.68rem;font-weight:600;
           padding:.15rem .45rem;border-radius:999px;display:inline-flex;align-items:center;gap:.2rem;}

  /* Bottom nav (mobile only) */
  .bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:40;background:#fff;
              border-top:1px solid #ede7dd;display:flex;padding-bottom:env(safe-area-inset-bottom);}
  .bnav-item{flex:1;display:flex;flex-direction:column;align-items:center;padding:.6rem .25rem .4rem;
             font-size:.65rem;font-weight:600;color:#a08060;cursor:pointer;transition:.15s;gap:.2rem;border:none;background:transparent;}
  .bnav-item.active{color:var(--br);}
  .bnav-item i{font-size:1.1rem;}

  /* Sidebar (desktop) */
  @media(min-width:768px){
    .bottom-nav{display:none;}
    .layout{display:grid;grid-template-columns:200px 1fr;gap:0;min-height:calc(100vh - 56px);}
    .sidebar{background:#faf6f0;border-right:0.5px solid #e8ddd0;padding:1rem 0;position:sticky;top:56px;height:calc(100vh - 56px);overflow-y:auto;}
    .side-item{display:flex;align-items:center;gap:.6rem;padding:.6rem 1.1rem;font-size:.82rem;font-weight:600;
               color:#7a5c3a;cursor:pointer;transition:.12s;border:none;background:transparent;width:100%;border-left:2px solid transparent;}
    .side-item:hover{background:var(--br-light);color:var(--br);}
    .side-item.active{background:var(--br-light);color:var(--br);border-left-color:var(--br);font-weight:700;}
    body{padding-bottom:0;}
    .main-content{padding:1.25rem;}
  }
  @media(max-width:767px){
    .sidebar{display:none;}
    .layout{display:block;}
    .main-content{padding:.875rem .875rem 5rem;}
  }

  /* Sheet modal */
  .sheet-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:60;
                 display:flex;align-items:flex-end;justify-content:center;}
  @media(min-width:640px){
    .sheet-overlay{align-items:center;}
    .sheet{border-radius:1.25rem!important;max-width:500px;width:100%;}
  }
  .sheet{background:#fff;border-radius:1.25rem 1.25rem 0 0;width:100%;
         max-height:92vh;overflow-y:auto;padding:1.25rem;}
  .sheet-handle{width:2.5rem;height:.25rem;background:#e0d5c5;border-radius:999px;margin:0 auto .875rem;}

  /* Skeleton */
  .sk{background:linear-gradient(90deg,#f0ebe3 25%,#e8e0d4 50%,#f0ebe3 75%);
      background-size:200% 100%;animation:sk 1.4s infinite;border-radius:.5rem;}
  @keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}
  @keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

  /* Toast */
  #toast{position:fixed;bottom:5rem;left:50%;transform:translateX(-50%);
         background:#1f2937;color:#fff;padding:.6rem 1.2rem;border-radius:.75rem;
         font-size:.8rem;z-index:100;opacity:0;transition:.3s;pointer-events:none;white-space:nowrap;}
  #toast.show{opacity:1;}
  @media(min-width:768px){ #toast{bottom:1.5rem;}}

  /* Cart badge */
  .cart-badge{position:absolute;top:-6px;right:-6px;background:#ef4444;color:#fff;
              font-size:.58rem;font-weight:700;min-width:17px;height:17px;
              border-radius:999px;display:flex;align-items:center;justify-content:center;
              padding:0 .25rem;line-height:1;border:2px solid #fff;}

  /* Order status chips */
  .ord-status{font-size:.65rem;font-weight:700;padding:.18rem .5rem;border-radius:999px;}
  .ord-pending{background:#fef3c7;color:#d97706;}
  .ord-confirmed{background:#dbeafe;color:#1d4ed8;}
  .ord-processing{background:#ede9fe;color:#7c3aed;}
  .ord-shipped{background:#d1fae5;color:#059669;}
  .ord-completed{background:#f0fdf4;color:#166534;}
  .ord-cancelled{background:#fee2e2;color:#dc2626;}
  /* Verified badge */
  .v-badge{display:inline-flex;align-items:center;gap:.2rem;font-size:.65rem;font-weight:700;
           background:#dbeafe;color:#1d4ed8;padding:.12rem .4rem;border-radius:999px;vertical-align:middle;}
  /* Star rating */
  .stars{color:#f59e0b;letter-spacing:.05rem;}
  /* Forum post card */
  .forum-card{background:#fff;border:1px solid #f0ebe3;border-radius:.75rem;padding:.875rem;
              margin-bottom:.5rem;cursor:pointer;transition:box-shadow .15s;}
  .forum-card:hover{box-shadow:0 2px 12px rgba(0,0,0,.08);}
  .forum-pinned{border-left:3px solid var(--br);}

  /* QR payment modal */
  #pay-modal{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:90;
             display:flex;align-items:center;justify-content:center;padding:1rem;}
  #pay-modal .pay-box{background:#fff;border-radius:1.25rem;padding:1.75rem;
                      max-width:380px;width:100%;text-align:center;}
