:root{
  --bg:#f6f2ec;
  --card:rgba(255,255,255,.78);
  --card2:rgba(255,255,255,.92);
  --text:#211b16;
  --muted:#8a7b70;
  --accent:#ff6b35;
  --accent2:#ffb703;
  --green:#22c55e;
  --red:#ef4444;
  --line:rgba(40,30,20,.1);
  --shadow:0 18px 45px rgba(71,42,21,.13);
  --radius:24px;
}
*{box-sizing:border-box}
body{
  margin:0;
  min-height:100vh;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans Thai",sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, #ffe3c7 0 26%, transparent 48%),
    radial-gradient(circle at top right, #ffd1dc 0 20%, transparent 42%),
    linear-gradient(180deg,#fffaf3,var(--bg));
}
button,input,select,textarea{font:inherit}
button{cursor:pointer;border:0}
.hidden{display:none!important}
.app-shell{

width:100%;

max-width:430px;

margin:0 auto;

padding:12px;

}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}
.brand{display:flex;align-items:center;gap:12px}
.logo{width:54px;height:54px;border-radius:18px;background:linear-gradient(145deg,#ffb703,#ff6b35);display:grid;place-items:center;font-size:28px;box-shadow:var(--shadow)}
h1{font-size:28px;margin:0;line-height:1.1}
.subtitle{color:var(--muted);font-size:14px;margin-top:3px}
.pill{padding:9px 13px;border-radius:999px;background:var(--card);box-shadow:0 8px 22px rgba(0,0,0,.06);border:1px solid var(--line);color:var(--muted);font-weight:700}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.card{background:var(--card);border:1px solid rgba(255,255,255,.85);border-radius:var(--radius);box-shadow:var(--shadow);backdrop-filter:blur(18px);overflow:hidden}
.product-card{

width:100%;

box-sizing:border-box;

}
.product-img{width:100%;aspect-ratio:1/1;border-radius:20px;object-fit:cover;background:#fff3e0;display:block}
.product-info{padding:10px 2px 0}
.product-name{font-weight:900;font-size:17px;margin:2px 0 8px;min-height:42px}
.price-row{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.old-price{text-decoration:line-through;color:var(--muted);font-size:14px}.sale-price{font-size:22px;font-weight:1000;color:var(--accent)}.normal-price{font-size:22px;font-weight:1000}.stock{font-size:13px;color:var(--muted);font-weight:700}.badge{position:absolute;top:18px;left:18px;background:rgba(255,255,255,.9);border-radius:999px;padding:6px 10px;font-weight:900;font-size:12px;color:var(--accent);box-shadow:0 8px 18px rgba(0,0,0,.08)}
.qty-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.qty-control{display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.7);border-radius:999px;padding:5px}.round{width:34px;height:34px;border-radius:50%;background:#fff;font-size:20px;font-weight:900;box-shadow:0 5px 13px rgba(0,0,0,.07)}.qty{min-width:24px;text-align:center;font-weight:900}.add-btn,.primary-btn{background:linear-gradient(135deg,var(--accent),#ff8f3d);color:white;border-radius:999px;padding:12px 15px;font-weight:900;box-shadow:0 10px 22px rgba(255,107,53,.27)}.add-btn:disabled,.primary-btn:disabled{opacity:.5;cursor:not-allowed}.secondary-btn{background:#fff;color:var(--text);border:1px solid var(--line);border-radius:999px;padding:11px 14px;font-weight:900}.danger-btn{background:#fff0f0;color:var(--red);border-radius:999px;padding:11px 14px;font-weight:900}
.cart-bar{position:fixed;left:12px;right:12px;bottom:12px;max-width:860px;margin:0 auto;background:rgba(35,25,18,.9);color:white;border-radius:26px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 20px 45px rgba(0,0,0,.28);backdrop-filter:blur(18px);z-index:10}.cart-total{font-weight:1000;font-size:18px}.cart-note{font-size:12px;color:rgba(255,255,255,.66)}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.38);display:grid;place-items:end center;z-index:30;padding:12px}.modal-card{width:100%;max-width:560px;max-height:92vh;overflow:auto;background:rgba(255,255,255,.96);border-radius:30px;padding:18px;box-shadow:0 -16px 60px rgba(0,0,0,.25)}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.modal-title{font-size:22px;font-weight:1000}.xbtn{width:38px;height:38px;border-radius:50%;background:#f2eee9;font-weight:1000}.line-item{display:flex;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.field{margin:12px 0}.label{font-size:13px;color:var(--muted);font-weight:800;margin-bottom:7px}.input,.textarea,.select{width:100%;border:1px solid var(--line);background:#fff;border-radius:16px;padding:13px 14px;outline:none}.textarea{min-height:88px;resize:vertical}.options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.option{border:1px solid var(--line);border-radius:18px;padding:13px;background:#fff;font-weight:900;text-align:center}.option.active{border-color:var(--accent);background:#fff3ea;color:var(--accent)}.qr-box{text-align:center;background:#fff8ee;border:1px dashed #ffc077;border-radius:20px;padding:14px;margin:12px 0}.qr-placeholder{width:180px;height:180px;border-radius:20px;background:#fff;margin:10px auto;display:grid;place-items:center;color:var(--muted);font-weight:900;border:1px solid var(--line)}
.admin-layout{display:grid;grid-template-columns:360px 1fr;gap:16px}.panel{padding:16px}.form-grid{display:grid;gap:10px}.preview{width:130px;aspect-ratio:1/1;border-radius:24px;object-fit:cover;background:#fff3e0;border:1px solid var(--line)}.product-list{display:grid;gap:10px}.admin-product{display:grid;grid-template-columns:70px 1fr;gap:12px;padding:12px}.admin-product img{width:70px;height:70px;border-radius:18px;object-fit:cover}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.mini{padding:8px 10px;border-radius:999px;font-weight:900;background:#fff;border:1px solid var(--line)}.mini.green{background:#ecfdf3;color:#15803d}.mini.red{background:#fff1f2;color:#be123c}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}.stat{padding:14px}.stat-value{font-size:24px;font-weight:1000}.stat-label{color:var(--muted);font-size:13px;font-weight:800}
.toast{position:fixed;top:14px;left:50%;transform:translateX(-50%);background:#211b16;color:white;padding:12px 18px;border-radius:999px;box-shadow:var(--shadow);z-index:99;font-weight:900}
.empty{padding:35px;text-align:center;color:var(--muted);font-weight:800}
@media(max-width:760px){.grid{grid-template-columns:repeat(2,1fr)}.admin-layout{grid-template-columns:1fr}.topbar{align-items:flex-start}.brand{align-items:flex-start}h1{font-size:25px}.app-shell{padding-bottom:105px}.options{grid-template-columns:1fr}.stat-grid{grid-template-columns:1fr 1fr}.product-name{font-size:15px}.sale-price,.normal-price{font-size:20px}}
@media(max-width:390px){.grid{gap:10px}.product-card{padding:9px}.product-name{min-height:36px}.add-btn{padding:10px 12px;font-size:13px}.round{width:31px;height:31px}}

/* ===== Sizz Shop V3 Mobile + Admin polish ===== */
.mobile-shell{

max-width:430px;

}
.shop-topbar{

position:sticky;

top:0;

z-index:5;

padding:6px 0;

margin-top:0;

}
.shop-grid{

display:grid;

grid-template-columns:repeat(2,1fr);

gap:12px;

}
.add-btn{min-width:64px}.cart-bar{padding-bottom:calc(12px + env(safe-area-inset-bottom))}.checkout-total-card{margin:14px 0 12px;padding:18px;border-radius:24px;background:linear-gradient(135deg,#fff4e8,#ffe2cc);display:flex;align-items:center;justify-content:space-between;border:1px solid rgba(255,107,53,.18)}.checkout-total-card div{font-size:16px;color:var(--muted);font-weight:900}.checkout-total-card strong{font-size:38px;color:var(--accent);line-height:1}.checkout-submit{

width:100%;
max-width:520px;

margin:
20px auto 0;

display:flex;
align-items:center;
justify-content:center;

font-size:18px;
font-weight:900;

padding:18px;

border-radius:28px;

}.pay-amount{font-size:18px;margin-bottom:8px}.pay-amount b{font-size:26px;color:var(--accent)}.qr-instruction{color:var(--muted);font-weight:800;margin:8px auto 12px;max-width:330px}.line-slip-btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;text-decoration:none;background:#06c755;color:white;font-weight:1000;border-radius:999px;padding:13px 18px;box-shadow:0 12px 24px rgba(6,199,85,.23)}.line-icon{background:white;color:#06c755;border-radius:8px;padding:4px 7px;font-size:12px;font-weight:1000}.admin-lock{min-height:100vh;display:grid;place-items:center;padding:20px}.lock-card{width:100%;max-width:390px;padding:22px;text-align:center}.lock-logo{margin:0 auto 12px}.pin-input{text-align:center;font-size:28px;font-weight:1000;letter-spacing:10px;margin:18px 0}.admin-toolbar{display:flex;justify-content:flex-end;margin:0 0 14px}.product-form-panel{margin-bottom:16px}.form-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.compact-admin{grid-template-columns:1fr}.products-panel{min-height:220px}.dashboard-grid{grid-template-columns:repeat(3,1fr)}.dashboard-grid .stat:nth-child(1),.dashboard-grid .stat:nth-child(2){background:linear-gradient(135deg,rgba(255,255,255,.86),rgba(255,240,220,.9))}.dashboard-grid .stat-value{font-size:26px}.admin-product .actions .mini{min-width:72px}
@media(max-width:760px){

.app-shell{

max-width:430px;

}
.dashboard-grid{grid-template-columns:repeat(2,1fr)}.modal{align-items:end}.modal-card{border-bottom-left-radius:0;border-bottom-right-radius:0}.checkout-total-card strong{font-size:34px}.admin-toolbar{justify-content:stretch}.admin-toolbar .primary-btn{width:100%}}
@media(max-width:430px){.shop-grid{gap:10px}.logo{width:48px;height:48px}.product-card{padding:9px;border-radius:22px}.product-img{border-radius:18px}.product-name{font-size:15px;min-height:38px}.qty-row{gap:6px}.round{width:32px;height:32px}.qty-control{gap:5px;padding:4px}.add-btn{padding:10px 12px}.cart-bar{left:8px;right:8px;border-radius:22px}.cart-total{font-size:16px}.checkout-total-card strong{font-size:32px}.stat-grid{gap:9px}.dashboard-grid .stat-value{font-size:22px}.admin-product{grid-template-columns:64px 1fr}.admin-product img{width:64px;height:64px}}
.slip-choice{
display:grid;
grid-template-columns:1fr 1fr;
gap:12px;
margin-top:18px;
}

.slip-option{
background:white;
border:1px solid #eee;
border-radius:20px;
padding:15px;

display:flex;
gap:10px;
align-items:center;

text-decoration:none;
color:#333;

box-shadow:
0 8px 20px rgba(0,0,0,.06);
}

.slip-icon{
font-size:26px;
}

.slip-option b{
display:block;
font-size:15px;
}

.slip-option small{
display:block;
font-size:12px;
color:#888;
margin-top:3px;
}
.slip-choice{
margin-top:18px;
display:flex;
flex-direction:column;
gap:12px;
}


.slip-big-btn{
width:100%;
height:54px;

border-radius:18px;

display:flex;
align-items:center;
justify-content:center;

font-size:16px;
font-weight:800;

text-decoration:none;

cursor:pointer;
}


.slip-big-btn.upload{

background:#fff;
border:2px solid #ff7043;
color:#ff7043;

}


.slip-big-btn.line{

background:#06c755;
color:white;

}


.or-text{

text-align:center;
font-weight:800;
color:#999;
font-size:14px;

}
.checkout-qty{
display:flex;
align-items:center;
gap:10px;
}


.checkout-qty button,
.remove-item{

width:34px;
height:34px;

border:none;
border-radius:50%;

background:#f5f5f5;

font-weight:bold;
font-size:18px;

}


.remove-item{

background:#ffecec;

}
.line-slip-btn{

margin-top:16px;

height:56px;

background:#06c755;
color:white;

border-radius:18px;

display:flex;
flex-direction:column;
align-items:center;
justify-content:center;

font-size:16px;
font-weight:800;

text-decoration:none;

}


.line-slip-btn small{

font-size:12px;
opacity:.85;
margin-top:3px;

}
.modal-card{

max-width:620px;
margin:auto;

}
/* ===== FIX CHECKOUT HEIGHT ===== */

.modal-card{

max-height:90vh;
overflow-y:auto;

}


.checkout-submit{

position:static;

width:100%;
max-width:none;

margin-top:20px;

}
.bank-card{

background:white;

padding:18px;

border-radius:22px;

display:flex;
flex-direction:column;
align-items:center;

gap:10px;

}


.bank-logo{

width:120px;
height:auto;

}


.bank-name{

font-size:17px;
font-weight:900;

}


.bank-owner{

font-size:15px;
font-weight:800;

}


.account-number{

width:100%;

background:#f7f7f7;

padding:14px;

border-radius:16px;

text-align:center;

font-size:22px;

letter-spacing:1px;

}


.copy-bank-btn{

border:none;

width:100%;

height:46px;

border-radius:18px;

background:#ff7043;
color:white;

font-size:15px;
font-weight:900;

}
/* ===== FIX PRODUCT IMAGE ===== */

.product-img{

display:block !important;

width:100%;

aspect-ratio:1/1;

object-fit:cover;

background:#fff3e0;

}/* ===== ADMIN STOCK BADGE ===== */

.stock-badge{

margin-top:10px;

width:max-content;

padding:8px 16px;

border-radius:18px;

background:#eefaf2;

display:flex;

align-items:center;

gap:8px;

font-weight:900;

}


.stock-badge span{

font-size:12px;

}


.stock-badge strong{

font-size:24px;

}


.stock-badge small{

font-size:12px;

opacity:.7;

}


.low-stock{

background:#fff0f0;

}


.low-stock strong{

color:#e63946;

}


.product-status{

margin-top:6px;

font-size:13px;

font-weight:800;

opacity:.65;

}
/* ===== FIX TOP SPACE ===== */

body{

margin:0;

}


.shop-page .app-shell{

padding-top:8px;

}


.topbar{

margin-top:0;

}
/* ===== FORCE MOBILE SHOP SIZE ===== */

.shop-page .app-shell,
.mobile-shell{

max-width:430px !important;

margin:0 auto;

}


.shop-grid{

grid-template-columns:repeat(2,1fr) !important;

}


.product-card{

max-width:100%;

}


.product-img{

max-height:260px;

object-fit:cover;

}
.product-img{

width:100%;

aspect-ratio:1/1;

height:auto !important;

object-fit:cover;

border-radius:18px;

}
/* ===== SHOP 2 COLUMN MOBILE ===== */

.product-card{

padding:10px;

border-radius:22px;

}


.product-name{

font-size:14px;

min-height:32px;

}


.sale-price,
.normal-price{

font-size:18px;

}


.stock{

font-size:12px;

}


.qty-row{

gap:6px;

}


.round{

width:30px;

height:30px;

}


.add-btn{

padding:10px 14px;

font-size:14px;

}
/* ===== SHOP GRID FINAL ===== */

.shop-grid{

display:grid !important;

grid-template-columns:repeat(2,1fr) !important;

gap:12px;

}


.product-card{

padding:10px;

}


.product-img{

aspect-ratio:1/1;

height:auto !important;

}


.product-name{

font-size:14px;

}


.price-row{

margin-bottom:4px;

}


.sale-price{

font-size:18px;

}


.qty-row{

margin-top:8px;

}


.add-btn{

padding:9px 14px;

}
/* ===== THANK YOU ===== */

.thank-box{

text-align:center;

padding:20px;

}


.thank-img{

width:160px;

height:160px;

border-radius:50%;

object-fit:cover;

margin-bottom:15px;

box-shadow:
0 15px 35px rgba(0,0,0,.18);

}


.thank-box h2{

font-size:26px;

margin:10px 0;

}


.thank-box p{

font-size:16px;

font-weight:700;

color:#777;

line-height:1.6;

}