/* Bison – Giỏ hàng và đặt hàng (1 trang) + Đặt hàng thành công */
.bco, .bco-done, .bco-sheet {
  --c-red: #C8161D; --c-red-d: #9E1016; --c-black: #141414; --c-text2: #333333; --c-text3: #4A4A4A;
  --c-line: #E3E3E3; --c-line2: #EEEEEE; --c-strong: #CFCFCF; --c-soft: #F4F4F4; --c-ok: #1F7A3A; --c-warn: #B45309;
  --c-zalo: #015CE0; --c-zalo-d: #0049B3; --c-errbg: #FFF4F4;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif; color: var(--c-black); font-size: 16px; line-height: 1.5;
}
.bco *, .bco *::before, .bco *::after, .bco-done *, .bco-sheet * { box-sizing: border-box; }
body.bco-page { background: #F4F4F4; }
body.bco-page .page-title, body.bco-page .checkout-page-title, body.bco-page .woocommerce-checkout .checkout-breadcrumbs { display: none; }
/* Trang Thanh toán trên bisontool.vn có sẵn "<h1 class=custom-title-h1>Thanh toán</h1>" trong nội dung → trùng H1 với "Giỏ hàng và đặt hàng" */
body.bco-page h1.custom-title-h1 { display: none !important; }
.bco [hidden], .bco-done [hidden], .bco-sheet [hidden], .bco-sheet[hidden] { display: none !important; }

.bco, .bco-done { max-width: 1280px; margin: 0 auto; padding: 28px 32px 80px; }
.bco-h1 { margin: 0 0 22px; font-size: 32px; line-height: 1.25; font-weight: 800; color: var(--c-black); }
.bco-h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.3; font-weight: 800; color: var(--c-black); }
.bco-h2--sm { font-size: 20px; margin-bottom: 10px; }
.bco-h2__sub { font-size: 17px; font-weight: 600; color: var(--c-text3); }
.bco-muted { color: var(--c-text3); }
.bco-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bco-card { background: #fff; border-radius: 16px; padding: 28px; }
.bco-card + .bco-card { margin-top: 20px; }

/* Bố cục: trái thông tin, phải giỏ hàng dính khi cuộn */
.bco-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.bco-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.bco-main > .bco-card + .bco-card { margin-top: 0; }
.bco-side { min-width: 0; position: sticky; top: 20px; }
body.bco-page:has(.bhs-main) .bco-side { top: 100px; }

/* Khung lỗi tổng */
.bco-errbox { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border: 2px solid var(--c-red); background: var(--c-errbg); border-radius: 14px; color: var(--c-red); }
.bco-errbox svg { flex: none; }
.bco-errbox > span { display: flex; flex-direction: column; gap: 4px; }
.bco-errbox strong { font-size: 17px; color: var(--c-red-d); }
.bco-errbox span span { font-size: 15px; color: var(--c-text3); }
.woocommerce-NoticeGroup-checkout { margin-bottom: 16px; }

/* Ô nhập */
.bco-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bco-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bco-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bco-label { font-size: 15px; font-weight: 600; color: var(--c-black); margin: 0; }
.bco-label--sm { font-size: 14px; font-weight: 500; color: var(--c-text3); }
.bco-req { color: var(--c-red); }
.bco .bco-input, .bco-sheet .bco-input {
  width: 100%; height: 52px; margin: 0; padding: 0 14px; border: 1.5px solid var(--c-strong); border-radius: 10px; background: #fff;
  font-family: inherit; font-size: 16px; color: var(--c-black); box-shadow: none; line-height: normal;
}
.bco .bco-input:focus, .bco-sheet .bco-input:focus { outline: none; border-color: var(--c-black); box-shadow: 0 0 0 3px rgba(20, 20, 20, .12); }
.bco .bco-input::placeholder { color: #7A7A7A; opacity: 1; }
.bco .bco-textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.bco-field.is-err .bco-input, .bco-field.is-err .bco-pick { border: 2px solid var(--c-red); background: #FFF6F6; }
.bco-err { margin: 0; font-size: 14px; font-weight: 600; color: var(--c-red); }
.bco-hint { margin: 0; font-size: 14px; color: var(--c-text3); }
.bco-hint--icon { display: flex; gap: 8px; align-items: flex-start; }
.bco-hint--icon svg { flex: none; margin-top: 2px; }

/* Nút chọn địa chỉ */
.bco .bco-pick {
  width: 100%; height: 52px; margin: 0; padding: 0 12px 0 14px; border: 1.5px solid var(--c-strong); border-radius: 10px; background: #fff;
  display: flex; align-items: center; gap: 8px; font-family: inherit; font-size: 16px; font-weight: 400; color: var(--c-black);
  text-align: left; text-transform: none; letter-spacing: 0; cursor: pointer; line-height: 1.3;
}
.bco .bco-pick > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bco .bco-pick.is-empty > span { color: #6B6B6B; }
.bco .bco-pick svg { flex: none; color: var(--c-text3); }
.bco .bco-pick:hover:not([disabled]) { border-color: var(--c-black); }
.bco .bco-pick[disabled] { background: var(--c-soft); color: #8A8A8A; cursor: not-allowed; }
.bco .bco-pick:focus-visible { outline: 3px solid var(--c-zalo); outline-offset: 2px; }

.bco-addr { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.bco-addr__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.bco-addr__head .bco-label { flex: 1; }
.bco .bco-link { border: 0; background: transparent; padding: 6px 0; margin: 0; min-height: 0; font-family: inherit; font-size: 15px; font-weight: 700; color: var(--c-red); text-decoration: underline; text-transform: none; letter-spacing: 0; cursor: pointer; }
.bco .bco-link:hover { color: var(--c-red-d); background: transparent; }
.bco-addr__old { display: flex; flex-direction: column; gap: 10px; }
.bco-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 14px; border-radius: 10px; background: #EEF5FF; font-size: 15px; }
.bco-suggest span { flex: 1; min-width: 200px; }

/* Tùy chọn */
.bco-opts { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-line2); }
.bco-check { display: flex; align-items: center; gap: 12px; min-height: 36px; margin: 0; font-size: 16px; font-weight: 400; cursor: pointer; }
.bco-check--strong { font-weight: 700; }
.bco-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--c-red); flex: none; }
#bco-vat .bco-hint { margin: 6px 0 14px; }

/* Thanh toán */
.bco .bco-pay { background: transparent; border-radius: 0; }
.bco .bco-pay__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; border: 0; }
.bco .bco-pay__list li { margin: 0; padding: 0; list-style: none; }
.bco .bco-paym { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px solid var(--c-strong); border-radius: 12px; cursor: pointer; margin: 0; font-weight: 400; }
.bco .bco-paym:has(input:checked) { border: 2px solid var(--c-black); background: var(--c-soft); }
.bco .bco-paym input { width: 22px; height: 22px; margin: 0; accent-color: var(--c-red); flex: none; }
.bco-paym__ic { display: flex; flex: none; }
.bco-paym__txt { display: flex; flex-direction: column; gap: 2px; }
.bco-paym__txt strong { font-size: 17px; }
.bco-paym__txt span { font-size: 14px; color: var(--c-text3); }

/* Giỏ hàng */
.bco-cart { padding: 24px; }
.bco-cart .bco-h2 { margin-bottom: 8px; }
.bco-undo { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 0 8px; border-radius: 10px; background: var(--c-black); color: #fff; font-size: 15px; }
.bco-undo > span { flex: 1; min-width: 0; }
.bco .bco-undo button { border: 0; background: transparent; color: #fff; font-family: inherit; font-size: 15px; font-weight: 800; text-decoration: underline; padding: 8px; margin: 0; min-height: 0; cursor: pointer; text-transform: none; }
.bco-items { list-style: none; margin: 0; padding: 0; }
.bco-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--c-line2); margin: 0; transition: opacity .2s; }
.bco-item.is-busy { opacity: .55; }
.bco-item__img { flex: none; width: 92px; height: 92px; border-radius: 10px; background: var(--c-soft); overflow: hidden; display: block; }
.bco-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.bco-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bco .bco-item__name { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--c-black); text-decoration: none; }
.bco .bco-item__name:hover { color: var(--c-red); }
.bco-item__meta { font-size: 14px; color: var(--c-text3); }
.bco-item__meta del { color: #8A8A8A; margin-left: 4px; }
.bco-item__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.bco-qty { display: inline-flex; align-items: center; height: 44px; border: 1.5px solid var(--c-strong); border-radius: 10px; overflow: hidden; background: #fff; }
.bco .bco-qty button { width: 44px; height: 44px; border: 0; margin: 0; padding: 0; background: #fff; color: var(--c-black); font-family: inherit; font-size: 22px; line-height: 1; cursor: pointer; min-height: 0; }
.bco .bco-qty button:hover { background: var(--c-soft); }
.bco .bco-qty button[aria-disabled="true"] { color: #BDBDBD; cursor: not-allowed; background: #fff; }
.bco-qty output { min-width: 40px; text-align: center; font-size: 17px; font-weight: 700; }
.bco .bco-item__rm { height: 44px; border: 0; margin: 0; padding: 0 6px; background: transparent; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-size: 15px; font-weight: 400; color: var(--c-text3); cursor: pointer; min-height: 0; text-transform: none; }
.bco .bco-item__rm:hover { color: var(--c-red); background: transparent; }
.bco-item__total { margin-left: auto; font-size: 18px; font-weight: 800; color: var(--c-red); }
.bco-item__limit { margin: 0; font-size: 14px; font-weight: 600; color: var(--c-warn); }
.bco-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; padding: 12px 14px; border-radius: 10px; background: var(--c-errbg); border: 1px solid #F2C4C6; }
.bco-confirm span { flex: 1 1 180px; font-size: 15px; font-weight: 600; }

/* Nút dùng chung */
.bco .bco-btn, .bco-done .bco-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; margin: 0; border-radius: 8px;
  font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: none; text-transform: none; letter-spacing: 0; cursor: pointer; line-height: 1.2; min-height: 0;
}
.bco .bco-btn--lg, .bco-done .bco-btn--lg { height: 56px; padding: 0 26px; border-radius: 12px; font-size: 17px; }
.bco-btn--red { background: var(--c-red); color: #fff !important; border: 0; }
.bco-btn--red:hover { background: var(--c-red-d); }
.bco-btn--ghost, .bco-btn--outline { background: #fff; color: var(--c-black) !important; border: 1.5px solid var(--c-black); }
.bco-btn--ghost:hover, .bco-btn--outline:hover { background: var(--c-soft); }
.bco-btn--zalo { background: var(--c-zalo); color: #fff !important; border: 0; }
.bco-btn--zalo:hover { background: var(--c-zalo-d); }
.bco-btn img { border-radius: 7px; }

/* Tóm tắt */
.bco-sum { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; }
.bco-sum__title { margin: 0; font-size: 20px; font-weight: 800; }
.bco-sum__row { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.bco-sum__row > span:first-child { color: var(--c-text3); }
.bco-sum__row strong { font-weight: 700; }
.bco-sum__row--total { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--c-line2); align-items: baseline; }
.bco-sum__row--total strong { font-size: 24px; font-weight: 800; color: var(--c-red); }
.bco-sum__later { font-weight: 700; color: var(--c-text3); }
.bco-sum__total { background: var(--c-soft); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.bco-sum__total > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bco-sum__total > div span { font-size: 17px; font-weight: 700; }
.bco-sum__total strong { font-size: 28px; font-weight: 800; color: var(--c-red); line-height: 1.2; }
.bco-sum__note { font-size: 14px; color: var(--c-text3); text-align: right; }
.bco-sum__ship { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--c-text2); }
.bco-sum__ship svg { flex: none; color: var(--c-zalo); margin-top: 1px; }

.bco .bco-place {
  width: 100%; height: 60px; margin: 18px 0 0; border: 0; border-radius: 12px; background: var(--c-red); color: #fff;
  font-family: inherit; font-size: 20px; font-weight: 800; letter-spacing: .02em; text-transform: none; cursor: pointer; line-height: 1;
}
.bco .bco-place:hover { background: var(--c-red-d); color: #fff; }
.bco .bco-place[aria-busy="true"] { opacity: .75; cursor: progress; }
.bco .bco-place:focus-visible { outline: 3px solid var(--c-zalo); outline-offset: 3px; }
.bco-policy { margin: 10px 0 0; font-size: 13px; color: var(--c-text3); text-align: center; }
.bco-policy a { color: var(--c-red); }

/* Thanh đặt hàng cố định (mobile, tablet) */
.bco-mbar { display: none; }

/* Bảng chọn địa chỉ */
.bco-sheet { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; }
.bco-sheet__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; margin: 0; padding: 0; background: rgba(20, 20, 20, .5); cursor: default; }
.bco-sheet__panel { position: relative; width: 520px; max-width: calc(100vw - 32px); max-height: 76vh; background: #fff; border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; }
.bco-sheet__head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px 20px; }
.bco-sheet__head strong { flex: 1; font-size: 19px; font-weight: 800; }
.bco-sheet .bco-iconbtn { width: 44px; height: 44px; border: 0; border-radius: 10px; margin: 0; padding: 0; background: var(--c-soft); color: var(--c-black); display: flex; align-items: center; justify-content: center; cursor: pointer; min-height: 0; }
.bco-sheet__search { position: relative; padding: 0 16px 12px; border-bottom: 1px solid var(--c-line2); }
.bco-sheet__search svg { position: absolute; left: 30px; top: 16px; color: var(--c-text3); pointer-events: none; }
.bco-sheet__search .bco-input { padding-left: 44px; }
.bco-sheet__list { list-style: none; margin: 0; padding: 6px 8px 12px; overflow-y: auto; flex: 1; }
.bco-sheet__list li { margin: 0; list-style: none; }
.bco-sheet__list button {
  width: 100%; min-height: 50px; margin: 0; padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; text-align: left;
  font-family: inherit; font-size: 16px; font-weight: 400; color: var(--c-black); text-transform: none; letter-spacing: 0; cursor: pointer; line-height: 1.35;
}
.bco-sheet__list button:hover, .bco-sheet__list button:focus-visible { background: var(--c-soft); outline: none; }
.bco-sheet__list button[aria-selected="true"] { background: #FFF0F0; color: var(--c-red-d); font-weight: 700; }
.bco-sheet__empty { margin: 0; padding: 24px; text-align: center; color: var(--c-text3); }
html.bco-lock, html.bco-lock body { overflow: hidden; }

/* Giỏ trống */
.bco--empty { max-width: 960px; }
.bco--empty .bco-undo { margin-bottom: 14px; }
.bco-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 48px 28px; }
.bco-empty__ic { color: #9A9A9A; display: flex; }
.bco-empty .bco-h2 { margin: 0; }
.bco-empty p { margin: 0; max-width: 520px; }
.bco-empty__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.bco-best { margin-top: 28px; }
.bco-best__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.bco-best__grid > li { margin: 0; list-style: none; min-width: 0; }
.bco-mini { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: #fff; color: var(--c-black); text-decoration: none; height: 100%; }
.bco-mini img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin: 0; }
.bco-mini__name { font-weight: 700; line-height: 1.4; }
.bco-mini__price { color: var(--c-red); }

/* Đặt hàng thành công */
.bco-done { max-width: 920px; display: flex; flex-direction: column; gap: 20px; }
.bco-done .bco-card + .bco-card { margin-top: 0; }
.bco-done__hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 36px 32px; }
.bco-done__hero .bco-h1 { margin: 6px 0 0; }
.bco-done__hero p { margin: 0; max-width: 580px; }
.bco-done__check { width: 76px; height: 76px; border-radius: 50%; background: #E7F4EC; color: var(--c-ok); display: flex; align-items: center; justify-content: center; }
.bco-done__num { font-size: 18px; }
.bco-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bco-steps li { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 12px; background: var(--c-soft); }
.bco-steps strong { font-size: 17px; }
.bco-steps li > span:last-child { font-size: 15px; color: var(--c-text3); }
.bco-steps__no { width: 36px; height: 36px; border-radius: 50%; background: var(--c-red); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.bco-done__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bco-done__grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.bco-done__grid .bco-card { margin: 0; }
.bco-done__grid p { margin: 0 0 6px; }
.bco-done__items { list-style: none; margin: 0 0 10px; padding: 0; }
.bco-done__items li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--c-line2); margin: 0; }
.bco-done__img { width: 64px; height: 64px; border-radius: 8px; background: var(--c-soft); overflow: hidden; flex: none; }
.bco-done__img img { width: 100%; height: 100%; object-fit: cover; margin: 0; }
.bco-done__name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bco-done__name .bco-muted { font-size: 14px; }
.bco-done__btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Tablet + mobile ---------- */
@media (max-width: 1023px) {
  .bco { padding: 16px 16px 140px; }
  .bco-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bco-side { position: static; order: -1; }
  .bco-main { gap: 12px; }
  .bco-cart .bco-place, .bco-cart .bco-policy { display: none; }
  .bco-mbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; background: #fff; border-top: 1px solid var(--c-line);
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06);
  }
  .bco-mbar__err { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--c-red); }
  .bco-mbar__row { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto; }
  .bco-mbar__sum { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .bco-mbar__label { font-size: 12px; color: var(--c-text3); }
  .bco-mbar__sum strong { font-size: 20px; font-weight: 800; color: var(--c-red); }
  .bco-mbar__note { font-size: 11px; color: var(--c-text3); }
  .bco .bco-place--bar { width: auto; height: 54px; margin: 0; padding: 0 28px; font-size: 18px; }
  /* Ẩn thanh điều hướng đáy chung khi đang ở trang đặt hàng */
  body.bco-page .bc-mbar, body.bco-page .bhs-bottomnav, body.bco-page .bc-zalo-fab { display: none !important; }
}
@media (max-width: 767px) {
  .bco-h1 { font-size: 24px; margin-bottom: 14px; }
  .bco-h2 { font-size: 20px; margin-bottom: 12px; }
  .bco-card { padding: 18px 14px; border-radius: 14px; }
  .bco-cart { padding: 14px; }
  .bco-row2, .bco-row3 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bco-item { gap: 12px; padding: 14px 0; }
  .bco-item__img { width: 80px; height: 80px; }
  .bco-item__total { font-size: 16px; }
  .bco-sum__total strong { font-size: 24px; }
  .bco-sheet { align-items: flex-end; }
  .bco-sheet__panel { width: 100%; max-width: none; max-height: 88vh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .bco-best__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bco-empty__btns, .bco-done__btns { flex-direction: column; align-self: stretch; }
  .bco-done { padding: 12px 12px 48px; gap: 12px; }
  .bco-done__hero { padding: 24px 16px; }
  .bco-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bco-steps li { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; padding: 14px; }
  .bco-steps li > span:last-child { flex-basis: 100%; padding-left: 48px; margin-top: -6px; }
  .bco-done__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .bco-item { transition: none; } }
