
:root{
  --bg:#f3ede3;
  --panel:#ffffff;
  --text:#2b2520;
  --muted:#7a6f65;
  --accent:#6b4a35;
  --accent-2:#8b6146;
  --line:#e7dccf;
  --chip:#f7f2ea;
  --danger:#c0392b;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --radius:18px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:980px;margin:0 auto;padding:22px 16px 60px}
.header{text-align:center;margin:10px 0 14px}
.brand{font-weight:900;letter-spacing:.06em;font-size:30px}
.sub{margin-top:6px;color:var(--muted);font-size:13px;line-height:1.4}
.pillbar{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:18px 0 10px}
.pill{
  padding:10px 14px;border:1px solid var(--line);border-radius:999px;background:transparent;
  color:var(--accent);font-weight:700;font-size:13px;cursor:pointer;
}
.pill.active{background:var(--accent);border-color:var(--accent);color:#fff}
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.topcart{padding:14px 14px 10px;margin:16px 0}
.topcart-row{display:flex;gap:12px;flex-wrap:wrap}
.field{flex:1;min-width:210px}
.label{font-size:12px;color:var(--muted);margin:0 0 6px}
.input, .select, .textarea{
  width:100%;padding:12px 12px;border-radius:12px;border:1px solid var(--line);background:#fff;font-size:14px;outline:none;
}
.textarea{min-height:44px;resize:vertical}
.cart-summary{display:flex;justify-content:space-between;align-items:center;margin:12px 2px 0;gap:12px;flex-wrap:wrap}
.cart-count{color:var(--muted);font-size:13px}
.total{font-weight:900}
.btn{
  border:none;border-radius:14px;padding:12px 16px;background:var(--accent);color:#fff;font-weight:900;
  cursor:pointer;box-shadow:0 10px 22px rgba(107,74,53,.22);min-width:240px;text-transform:uppercase;letter-spacing:.04em;
}
.btn:disabled{opacity:.55;cursor:not-allowed}
.searchwrap{display:flex;gap:10px;justify-content:center;margin:10px 0 8px;flex-wrap:wrap}
.search{min-width:320px;max-width:560px;width:100%}
.grid{display:flex;flex-direction:column;gap:14px;margin-top:12px}
.item{display:flex;gap:14px;padding:14px;align-items:center}
.item-img{
  width:54px;height:54px;border-radius:14px;border:1px solid var(--line);background:var(--chip);display:flex;align-items:center;justify-content:center;overflow:hidden;
}
.item-img img{width:100%;height:100%;object-fit:cover;display:block}
.item-main{flex:1;min-width:220px}
.item-title{font-weight:900}
.item-price{margin-top:2px}
.old{color:#b8a79a;text-decoration:line-through;font-size:12px;margin-right:8px}
.now{color:#7a2f21;font-weight:900}
.controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.size-toggle{display:inline-flex;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.size-toggle button{
  padding:8px 12px;border:none;background:transparent;cursor:pointer;font-weight:900;color:var(--accent);min-width:42px;
}
.size-toggle button.active{background:var(--accent);color:#fff}
.qty{display:inline-flex;gap:8px;align-items:center}
.qbtn{
  width:34px;height:34px;border-radius:10px;border:none;background:var(--accent);color:#fff;font-weight:900;cursor:pointer;
}
.qval{min-width:16px;text-align:center;font-weight:900}
.footer{margin-top:16px;text-align:center;color:#9c8f84;font-size:12px}
.smalllink{font-size:12px;color:var(--muted)}
.badge{display:inline-block;padding:5px 10px;border-radius:999px;background:var(--chip);border:1px solid var(--line);color:var(--muted);font-weight:800;font-size:12px}

@media (max-width:600px){
  .brand{font-size:26px}
  .btn{width:100%;min-width:auto}
  .search{min-width:100%}

  /* Mobile layout: stack controls to avoid overflow */
  .item{flex-direction:column;align-items:stretch;gap:10px}
  .item-main{min-width:0}
  .controls{justify-content:flex-start;width:100%}
  .item-img{width:64px;height:64px;border-radius:16px}
  .size-toggle button{padding:7px 10px;min-width:38px}
  .qbtn{width:32px;height:32px}
}
