/* ══════════════════════════════════════════════════════════
   Vethra — giỏ hàng · thanh toán · tra cứu đơn
   Tách riêng khỏi style.css để phần bán hàng dễ sửa độc lập.
   ══════════════════════════════════════════════════════════ */

.icon-btn{position:relative;width:46px;height:46px;border:1.5px solid var(--line);
  background:#fff;border-radius:12px;cursor:pointer;display:flex;align-items:center;
  justify-content:center;color:var(--navy);transition:.16s}
.icon-btn:hover{border-color:var(--navy)}
.icon-btn svg{width:21px;height:21px}
.badge{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 5px;
  background:var(--lotus-mag);color:#fff;font-size:11.5px;font-weight:700;border-radius:999px;
  display:flex;align-items:center;justify-content:center}
.nav-links a.cur{color:var(--ink);border-bottom-color:var(--accent)}

.overlay{position:fixed;inset:0;background:rgba(15,23,41,.52);backdrop-filter:blur(3px);
  z-index:70;opacity:0;visibility:hidden;transition:.24s}
.overlay.show{opacity:1;visibility:visible}

/* ───────── ngăn kéo giỏ hàng ───────── */
.drawer{position:fixed;top:0;right:0;height:100%;width:430px;max-width:92vw;background:#fff;
  z-index:80;display:flex;flex-direction:column;transform:translateX(102%);
  transition:transform .32s cubic-bezier(.4,0,.2,1);box-shadow:-20px 0 60px rgba(20,29,59,.2)}
.drawer.show{transform:translateX(0)}
.drawer-head{display:flex;align-items:center;justify-content:space-between;
  padding:22px 24px;border-bottom:1px solid var(--line)}
.drawer-head h2{font-size:20px}
.close-x{background:none;border:none;font-size:30px;line-height:1;cursor:pointer;
  color:var(--muted);padding:0 4px}
.close-x:hover{color:var(--ink)}
.drawer-body{flex:1;overflow-y:auto;padding:20px 24px}
.cart-empty{text-align:center;padding:60px 10px;color:var(--muted)}
.ce-big{font-family:'Sora';font-size:18px;color:var(--ink);margin-bottom:8px}
.cart-line{display:flex;gap:14px;align-items:flex-start}
.cl-thumb{width:64px;height:64px;border-radius:13px;background:var(--bg);padding:9px;flex-shrink:0}
.cl-info{flex:1;min-width:0}
.cl-name{font-weight:600;font-size:16px}
.cl-var{font-size:13.5px;color:var(--muted);margin-bottom:10px}
.cl-right{text-align:right}
.cl-right b{font-size:16px;white-space:nowrap}
.cl-rm{display:block;margin-top:6px;margin-left:auto;background:none;border:none;
  font-size:13px;color:#dc2626;cursor:pointer;text-decoration:underline}
.qty.small button{width:36px;height:36px;font-size:17px}
.qty.small input{width:44px;height:36px;font-size:15px}
.drawer-foot{border-top:1px solid var(--line);padding:20px 24px}
.df-row{display:flex;justify-content:space-between;align-items:baseline;
  font-size:15px;color:var(--muted);margin-bottom:9px}
.df-row b{font-family:'Sora';font-size:21px;color:var(--ink)}
.free{color:var(--ok);font-weight:600}
.df-note{font-size:13px;color:var(--muted);text-align:center;margin-top:11px}

/* ───────── hộp thoại ───────── */
.modal{position:fixed;inset:0;z-index:90;display:none;align-items:flex-start;
  justify-content:center;padding:36px 18px;overflow-y:auto}
.modal.show{display:flex}
.modal-card{background:#fff;border-radius:22px;width:100%;max-width:600px;
  box-shadow:var(--shadow-lg);animation:pop .26s ease}
.modal-card.sm{max-width:440px}
@keyframes pop{from{transform:translateY(16px);opacity:0}to{transform:none;opacity:1}}
.modal-head{display:flex;align-items:center;justify-content:space-between;
  padding:24px 28px;border-bottom:1px solid var(--line)}
.modal-head h2{font-size:21px}
.steps{display:flex;gap:7px;padding:18px 28px 0}
.sdot{flex:1;height:4px;border-radius:99px;background:var(--line);transition:.28s}
.sdot.on{background:var(--accent)}
.modal-body{padding:22px 28px 28px}
.fhint{font-size:13px;color:var(--muted);margin-top:6px}
.ck-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;
  margin:22px -28px -28px;padding:20px 28px;border-top:1px solid var(--line);flex-wrap:wrap}
.ck-secure{font-size:13.5px;color:var(--ok);font-weight:500}

/* ───────── chọn cách trả ───────── */
.pay-list{display:flex;flex-direction:column;gap:11px}
.pay-opt{display:flex;align-items:flex-start;gap:14px;width:100%;text-align:left;
  padding:17px 18px;border:1.5px solid var(--line);border-radius:14px;background:#fff;
  cursor:pointer;transition:.16s;font:inherit}
.pay-opt:hover:not(.off){border-color:var(--accent)}
.pay-opt.sel{border-color:var(--accent);background:rgba(59,111,230,.045)}
.pay-opt.off{opacity:.55;cursor:not-allowed;background:var(--bg)}
.po-radio{width:21px;height:21px;border:2px solid var(--line);border-radius:50%;
  flex-shrink:0;margin-top:2px;position:relative;transition:.16s}
.pay-opt.sel .po-radio{border-color:var(--accent)}
.pay-opt.sel .po-radio::after{content:"";position:absolute;inset:3.5px;border-radius:50%;background:var(--accent)}
.po-text{display:flex;flex-direction:column;gap:2px}
.po-text b{font-size:16px;font-weight:600}
.po-text span{font-size:14px;color:var(--muted)}
.pay-safe{margin-top:16px;font-size:13.5px;color:var(--muted);background:rgba(15,157,118,.06);
  border:1px solid rgba(15,157,118,.18);border-radius:12px;padding:14px 16px}

/* ───────── xác nhận ───────── */
.ck-prod{display:flex;align-items:center;gap:14px;background:var(--bg);
  border-radius:14px;padding:16px;margin-bottom:18px}
.ck-prod img{width:52px;height:52px;flex-shrink:0}
.ck-prod div{flex:1;min-width:0}
.cp-name{font-weight:600}
.cp-var{font-size:13.5px;color:var(--muted)}
.ck-prod b{font-size:17px;white-space:nowrap}
.ck-list{display:flex;flex-direction:column;gap:10px}
.ck-list>div{display:flex;justify-content:space-between;gap:18px;font-size:15px}
.ck-list dt{color:var(--muted);flex-shrink:0}
.ck-list dd{text-align:right;font-weight:500}
.ck-list .tot{border-top:1px solid var(--line);padding-top:13px;margin-top:4px}
.ck-list .tot dt{font-weight:600;color:var(--ink);font-size:16px}
.ck-list .tot dd{font-family:'Sora';font-weight:800;font-size:21px}
.ck-note{margin-top:18px;font-size:14px;color:var(--muted);background:var(--bg);
  border-radius:12px;padding:14px 16px}

/* ───────── hoàn tất ───────── */
.ck-done{text-align:center;padding:14px 0}
.cd-tick,.order-done .tick{width:74px;height:74px;border-radius:50%;
  background:rgba(15,157,118,.12);color:var(--ok);display:flex;align-items:center;
  justify-content:center;margin:0 auto 18px}
.cd-tick svg,.order-done .tick svg{width:36px;height:36px}
.ck-done h3{font-size:23px;margin-bottom:12px}
.ck-done p{color:var(--muted);font-size:15.5px;margin-bottom:8px}
.cd-code,.order-done .code{font-family:'Sora';font-weight:800;font-size:25px;letter-spacing:2px;
  color:var(--ink);background:var(--bg);border:1.5px dashed var(--line);border-radius:12px;
  padding:12px 22px;display:inline-block;margin:6px 0 14px}
.cd-actions{display:flex;gap:11px;justify-content:center;margin-top:20px;flex-wrap:wrap}

/* ───────── mã VietQR ───────── */
.qr-wait{font-size:14.5px;color:var(--muted);margin:16px 0}
.qr-wait.err{color:#b45309}
.qr-card{background:var(--bg);border:1px solid var(--line);border-radius:16px;
  padding:20px;margin:18px 0;text-align:left}
.qr-img{width:200px;margin:0 auto 16px;background:#fff;padding:10px;border-radius:12px}
.qr-img svg{width:100%;height:auto;display:block}
.qr-info{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.qr-info>div{display:flex;justify-content:space-between;gap:14px;font-size:14.5px}
.qr-info dt{color:var(--muted)}
.qr-info dd{font-weight:600;text-align:right}
.qr-info code{background:#fff;border:1px solid var(--line);border-radius:6px;padding:2px 7px;font-size:13.5px}
.qr-note{font-size:13.5px;color:var(--muted)}

/* ───────── tra cứu đơn ───────── */
.tk-lede{font-size:15px;color:var(--muted);margin-bottom:18px}
.tk-err{margin-top:16px;font-size:14.5px;color:#dc2626;background:rgba(220,38,38,.06);
  border-radius:11px;padding:13px 15px}
.tk-card{margin-top:20px;background:var(--bg);border:1px solid var(--line);border-radius:14px;padding:20px}
.tk-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:16px}
.tk-head b{font-family:'Sora';font-size:18px;letter-spacing:1px}
.tk-head span{font-size:13px;color:var(--muted)}
.tk-steps{list-style:none;display:flex;flex-direction:column;gap:0;margin-bottom:14px}
.tk-steps li{position:relative;padding:0 0 20px 30px;font-size:15px;color:var(--muted)}
.tk-steps li:last-child{padding-bottom:0}
.tk-steps li::before{content:"";position:absolute;left:0;top:5px;width:14px;height:14px;
  border-radius:50%;background:var(--line);z-index:1}
.tk-steps li:not(:last-child)::after{content:"";position:absolute;left:6px;top:16px;
  bottom:0;width:2px;background:var(--line)}
.tk-steps li.on{color:var(--ink);font-weight:600}
.tk-steps li.on::before{background:var(--ok)}
.tk-steps li.on:not(:last-child)::after{background:var(--ok)}
.tk-huy{color:#dc2626;font-weight:600;margin-bottom:12px}
.tk-sum{font-size:15px;color:var(--muted);border-top:1px solid var(--line);padding-top:12px}

.toast.err{background:#b91c1c}

@media(max-width:680px){
  .modal{padding:16px 12px}
  .modal-body,.modal-head{padding-left:20px;padding-right:20px}
  .ck-foot{margin-left:-20px;margin-right:-20px;padding-left:20px;padding-right:20px}
  .drawer{width:100%}
  .icon-btn{width:42px;height:42px}
}
