/* Moso Foods - Cart page (v1). Prefix: ct- */
.ct-page{background:#FAFAF9;min-height:60vh;padding:28px 16px 72px;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:#1C1917}
.ct-wrap{max-width:1180px;margin:0 auto}
.ct-top{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:22px;flex-wrap:wrap}
.ct-title{font-family:Poppins,Inter,sans-serif;font-size:28px;line-height:1.2;font-weight:700;margin:0;color:#1C1917}
.ct-count{font-family:Inter,sans-serif;font-size:15px;font-weight:500;color:#57534E;margin-left:8px}
.ct-back{display:inline-flex;align-items:center;gap:8px;color:#1B5E20;font-weight:600;font-size:14.5px;text-decoration:none}
.ct-back:hover{color:#124116;text-decoration:underline}

.ct-grid{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:28px;align-items:start}

/* free delivery progress */
.ct-ship{background:#fff;border:1px solid #E7E5E4;border-radius:16px;padding:16px 20px;margin-bottom:16px}
.ct-ship p{margin:0 0 10px;font-size:14.5px;color:#292524;display:flex;align-items:center;gap:10px}
.ct-ship p i{color:#1B5E20}
.ct-ship.is-done{background:#E8F5E9;border-color:#C8E6C9}
.ct-ship.is-done p{margin:0;color:#124116;font-weight:600}
.ct-bar{height:8px;border-radius:99px;background:#F0EFED;overflow:hidden}
.ct-bar span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#1B5E20,#43A047)}

/* items */
.ct-list{background:#fff;border:1px solid #E7E5E4;border-radius:16px;overflow:hidden}
.ct-item{display:grid;grid-template-columns:104px minmax(0,1fr);gap:18px;padding:20px;border-bottom:1px solid #F0EFED}
.ct-item:last-child{border-bottom:0}
.ct-item.is-oos{background:#FEF6F5}
.ct-img{position:relative;width:104px;height:104px;border-radius:12px;overflow:hidden;background:#F5F5F4;display:block}
.ct-img img{width:100%;height:100%;object-fit:cover;display:block}
.ct-oos-tag{position:absolute;left:6px;bottom:6px;right:6px;background:#DD2B1C;color:#fff;font-size:11px;font-weight:700;text-align:center;padding:3px 0;border-radius:6px;letter-spacing:.02em}
.ct-info{min-width:0;display:flex;flex-direction:column;gap:6px}
.ct-name{font-size:16px;font-weight:600;line-height:1.35;color:#1C1917;text-decoration:none;margin:0;overflow-wrap:anywhere}
.ct-name:hover{color:#1B5E20}
.ct-price{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:15px}
.ct-price b{font-weight:700;font-size:16px}
.ct-price s{color:#A8A29E;font-size:14px}
.ct-off{background:#E8F5E9;color:#1B5E20;font-size:12px;font-weight:700;padding:2px 8px;border-radius:99px}
.ct-note{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;margin:0}
.ct-note.low{color:#B45309}
.ct-note.out{color:#DD2B1C}
.ct-row{display:flex;align-items:center;gap:14px;margin-top:auto;padding-top:8px;flex-wrap:wrap}
.ct-qty{display:inline-flex;align-items:center;border:1.5px solid #E7E5E4;border-radius:99px;background:#fff;overflow:hidden}
.ct-qty button{width:38px;height:38px;border:0;background:transparent;color:#1B5E20;font-size:20px;line-height:1;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s}
.ct-qty button:hover:not(:disabled){background:#E8F5E9}
.ct-qty button:disabled{color:#D6D3D1;cursor:not-allowed}
.ct-qty span{min-width:34px;text-align:center;font-weight:600;font-size:15px}
.ct-remove{background:none;border:0;padding:6px 4px;color:#78716C;font-size:13.5px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:color .15s}
.ct-remove:hover{color:#DD2B1C}
.ct-line{margin-left:auto;font-weight:700;font-size:17px}

/* summary */
.ct-sum{background:#fff;border:1px solid #E7E5E4;border-radius:16px;padding:24px;position:sticky;top:150px}
.ct-sum h2{font-family:Poppins,Inter,sans-serif;font-size:19px;font-weight:700;margin:0 0 16px}
.ct-srow{display:flex;justify-content:space-between;gap:12px;padding:10px 0;font-size:15px;color:#44403C}
.ct-srow .free{color:#1B5E20;font-weight:700}
.ct-total{display:flex;justify-content:space-between;align-items:baseline;padding:16px 0 0;margin-top:8px;border-top:1px dashed #D6D3D1;font-weight:700}
.ct-total span:first-child{font-size:16px}
.ct-total span:last-child{font-size:24px;color:#124116;font-family:Poppins,Inter,sans-serif}
.ct-btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:52px;margin-top:20px;padding:0 20px;border:0;border-radius:12px;background:#1B5E20;color:#fff;font-size:16px;font-weight:600;font-family:inherit;text-decoration:none;cursor:pointer;box-shadow:0 10px 22px -12px rgba(27,94,32,.75);transition:background .2s,transform .15s}
.ct-btn:hover{background:#124116;color:#fff}
.ct-btn:active{transform:scale(.99)}
.ct-btn:disabled{background:#D6D3D1;color:#78716C;box-shadow:none;cursor:not-allowed}
.ct-btn.ghost{background:#fff;color:#1B5E20;border:1.5px solid #1B5E20;box-shadow:none;margin-top:12px;min-height:48px;font-size:15px}
.ct-btn.ghost:hover{background:#E8F5E9;color:#124116}
.ct-alert{background:#FEF2F1;border:1px solid #FBD0CC;color:#B42318;border-radius:12px;padding:12px 14px;margin-top:14px;font-size:13.5px;font-weight:500;line-height:1.5}
.ct-guest{background:#FFF8E1;border:1px solid #FFE08A;border-radius:12px;padding:16px;margin-top:18px;text-align:center}
.ct-guest h3{margin:0 0 6px;font-size:16px;font-weight:700;color:#5D4300}
.ct-guest p{margin:0 0 4px;font-size:13.5px;color:#6B5200;line-height:1.5}
.ct-guest .ct-btn{margin-top:12px}
.ct-guest a.login{color:#1B5E20;font-weight:600}

/* empty */
.ct-empty{background:#fff;border:1px solid #E7E5E4;border-radius:20px;text-align:center;padding:64px 20px}
.ct-empty .ic{width:84px;height:84px;margin:0 auto 20px;border-radius:50%;background:#E8F5E9;color:#1B5E20;display:flex;align-items:center;justify-content:center;font-size:32px}
.ct-empty h2{font-family:Poppins,Inter,sans-serif;font-size:22px;margin:0 0 8px}
.ct-empty p{margin:0 auto 24px;max-width:380px;color:#57534E;font-size:15px;line-height:1.6}
.ct-empty .acts{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.ct-empty .ct-btn{width:auto;margin:0;padding:0 28px}

/* success notice */
.ct-notice{display:flex;align-items:flex-start;gap:12px;background:#E8F5E9;border:1px solid #C8E6C9;color:#124116;border-radius:14px;padding:14px 16px;margin-bottom:18px}
.ct-notice i.ok{margin-top:3px;font-size:18px}
.ct-notice div{flex:1;font-size:14.5px;line-height:1.5}
.ct-notice b{display:block;font-size:15px}
.ct-notice button{background:none;border:0;color:#124116;font-size:18px;cursor:pointer;padding:2px 6px}

/* toast + dialog */
#toast-container{position:fixed;top:16px;right:16px;z-index:10000;display:flex;flex-direction:column;gap:10px;width:min(360px,calc(100vw - 32px));pointer-events:none}
.toast{pointer-events:auto;background:#fff;border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.16);padding:14px 16px;border-left:4px solid #DD2B1C;transform:translateX(120%);transition:transform .35s cubic-bezier(.4,0,.2,1)}
.toast.show{transform:none}
.toast.success{border-left-color:#1B5E20}
.toast.warning{border-left-color:#F59E0B}
.toast.info{border-left-color:#2563EB}
.toast-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.toast-title{margin:0;font-size:14.5px;font-weight:700;display:flex;align-items:center;gap:8px}
.toast.error .toast-icon{color:#DD2B1C}.toast.success .toast-icon{color:#1B5E20}.toast.warning .toast-icon{color:#F59E0B}.toast.info .toast-icon{color:#2563EB}
.toast-close{background:none;border:0;font-size:20px;color:#A8A29E;cursor:pointer;line-height:1}
.toast-message{margin:0;font-size:13.5px;color:#57534E;line-height:1.5}
.custom-dialog-overlay{position:fixed;inset:0;background:rgba(28,25,23,.55);display:flex;align-items:center;justify-content:center;z-index:10001;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s;padding:16px}
.custom-dialog-overlay.show{opacity:1;visibility:visible}
.custom-dialog{background:#fff;border-radius:18px;padding:28px 24px 22px;max-width:380px;width:100%;text-align:center;box-shadow:0 24px 60px rgba(0,0,0,.3);transform:translateY(16px) scale(.97);transition:transform .25s}
.custom-dialog-overlay.show .custom-dialog{transform:none}
.dialog-icon{width:56px;height:56px;margin:0 auto 14px;border-radius:50%;background:#FEF2F1;color:#DD2B1C;display:flex;align-items:center;justify-content:center;font-size:22px}
.dialog-title{font-size:19px;font-weight:700;margin:0 0 8px}
.dialog-message{color:#57534E;font-size:14.5px;line-height:1.55;margin:0 0 22px}
.dialog-buttons{display:flex;gap:10px}
.dialog-btn{flex:1;min-height:46px;border-radius:12px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;border:1.5px solid transparent}
.dialog-btn-cancel{background:#fff;color:#44403C;border-color:#D6D3D1}
.dialog-btn-cancel:hover{background:#F5F5F4}
.dialog-btn-confirm{background:#DD2B1C;color:#fff}
.dialog-btn-confirm:hover{background:#B42318}

/* responsive */
@media(max-width:991px){
  .ct-grid{grid-template-columns:1fr;gap:20px}
  .ct-sum{position:static}
}
@media(max-width:600px){
  .ct-page{padding:18px 12px 110px}
  .ct-title{font-size:23px}
  .ct-top{margin-bottom:16px}
  .ct-item{grid-template-columns:84px minmax(0,1fr);gap:14px;padding:16px 14px}
  .ct-img{width:84px;height:84px}
  .ct-name{font-size:15px}
  .ct-row{gap:10px}
  .ct-qty button{width:34px;height:34px}
  .ct-line{font-size:16px}
  .ct-sum{padding:20px 16px}
  .ct-empty{padding:44px 16px}
  #toast-container{top:10px;right:10px}
}
@media(prefers-reduced-motion:reduce){.toast,.custom-dialog,.ct-btn{transition:none}}
