.bti-floating-cart {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9997;
  width: 330px;
  max-width: calc(100vw - 24px);
  font-family: inherit;
  color: #0b2b5c;
}
.bti-floating-cart * { box-sizing: border-box; }
.bti-floating-cart__toggle {
  display: none;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  border: 0;
  background: #062752;
  color: #fff;
  border-radius: 999px;
  min-height: 42px;
  padding: 8px 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  cursor: pointer;
  font-weight: 700;
}
.bti-floating-cart__icon { font-size: 16px; line-height: 1; }
.bti-floating-cart__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff8a3d;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
.bti-floating-cart__panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(6,39,82,.12);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0,0,0,.20);
}
.bti-floating-cart__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 10px;
  background: #062752;
  color: #fff;
}
.bti-floating-cart__title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}
.bti-floating-cart__sub {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255,255,255,.82);
  line-height: 1.25;
}
.bti-floating-cart__collapse {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 21px;
  cursor: pointer;
}
.bti-floating-cart__body { padding: 12px 14px 10px; }
.bti-floating-cart__row,
.bti-floating-cart__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  line-height: 1.25;
  margin-bottom: 8px;
}
.bti-floating-cart__row span:first-child { color: #667085; }
.bti-floating-cart__row strong { color: #0b2b5c; font-weight: 800; }
.bti-floating-cart__discount-row strong { color: #ff7a1a; }
.bti-floating-cart__total {
  margin: 10px 0 10px;
  padding-top: 10px;
  border-top: 1px dashed #e6e8eb;
  font-size: 14px;
}
.bti-floating-cart__total strong {
  color: #ff7a1a;
  font-size: 16px;
  font-weight: 900;
}
.bti-floating-cart__progress-wrap { margin-top: 8px; }
.bti-floating-cart__progress-label {
  margin-bottom: 6px;
  font-size: 12px;
  color: #475467;
}
.bti-floating-cart__progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f3;
}
.bti-floating-cart__progress span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb16d, #ff7a1a);
  transition: width .22s ease;
}
.bti-floating-cart__milestones {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: #98a2b3;
}
.bti-floating-cart__note {
  margin-top: 8px;
  font-size: 11px;
  color: #98a2b3;
  line-height: 1.35;
}
.bti-floating-cart__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}
.bti-floating-cart__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none !important;
}
.bti-floating-cart__btn--outline {
  border: 1px solid #ff8a3d;
  color: #ff7a1a !important;
  background: #fff;
}
.bti-floating-cart__btn--main {
  border: 1px solid #062752;
  color: #fff !important;
  background: #062752;
}
.bti-floating-cart.is-empty .bti-floating-cart__panel { display: none; }
.bti-floating-cart.is-empty .bti-floating-cart__toggle { display: inline-flex; }
.bti-floating-cart.is-collapsed .bti-floating-cart__panel { display: none; }
.bti-floating-cart.is-collapsed .bti-floating-cart__toggle { display: inline-flex; }
.bti-floating-cart.is-loading { opacity: .96; }
@media (max-width: 767px) {
  .bti-floating-cart {
    right: 10px;
    bottom: 74px;
    width: calc(100vw - 20px);
  }
  .bti-floating-cart__panel { border-radius: 12px; }
  .bti-floating-cart__actions { grid-template-columns: 1fr 1fr; }
}

/* BTIMEX floating cart update: avoid covering right-side contact buttons */
@media (min-width: 768px) {
  .bti-floating-cart {
    right: 92px !important;
    bottom: 18px;
    width: 340px;
  }
}
@media (min-width: 1200px) {
  .bti-floating-cart {
    right: 104px !important;
  }
}

/* BTIMEX floating cart product list */
.bti-floating-cart__items-wrap {
  margin: 10px 0 8px;
  padding-top: 10px;
  border-top: 1px dashed #e6e8eb;
}
.bti-floating-cart__items-title {
  margin-bottom: 6px;
  color: #0b2b5c;
  font-size: 12px;
  font-weight: 800;
}
.bti-floating-cart__items {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 175px;
  overflow-y: auto;
  padding-right: 2px;
}
.bti-floating-cart__item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.bti-floating-cart__item.is-updating {
  opacity: .62;
}
.bti-floating-cart__item-img {
  width: 38px;
  height: 38px;
  border: 1px solid #edf0f3;
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
}
.bti-floating-cart__item-img.is-empty {
  background: #f3f4f6;
}
.bti-floating-cart__item-info {
  min-width: 0;
}
.bti-floating-cart__item-name {
  overflow: hidden;
  color: #0b2b5c;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bti-floating-cart__item-variant {
  overflow: hidden;
  margin-top: 2px;
  color: #667085;
  font-size: 10.5px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bti-floating-cart__item-qty {
  display: inline-grid;
  grid-template-columns: 22px 34px 22px;
  align-items: center;
  border: 1px solid #e1e5ea;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}
.bti-floating-cart__qty-btn {
  width: 22px;
  height: 26px;
  border: 0;
  background: #f8f9fb;
  color: #0b2b5c;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.bti-floating-cart__qty-btn:disabled,
.bti-floating-cart__qty-input:disabled {
  cursor: wait;
  opacity: .6;
}
.bti-floating-cart__qty-input {
  width: 34px;
  height: 26px;
  border: 0;
  border-left: 1px solid #e1e5ea;
  border-right: 1px solid #e1e5ea;
  color: #0b2b5c;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  outline: none;
}
.bti-floating-cart__qty-input::-webkit-outer-spin-button,
.bti-floating-cart__qty-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.bti-floating-cart__zalo-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(255,122,26,.25);
  border-radius: 9px;
  background: #fff7f0;
}
.bti-floating-cart__zalo-text {
  color: #0b2b5c;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
}
.bti-floating-cart__zalo-text strong {
  color: #ff7a1a;
}
.bti-floating-cart__arrow {
  color: #ff7a1a;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  animation: btiArrowMove 0.9s ease-in-out infinite alternate;
}
@keyframes btiArrowMove {
  from { transform: translateX(-5px); }
  to { transform: translateX(7px); }
}
@media (max-width: 767px) {
  .bti-floating-cart__items {
    max-height: 135px;
  }
  .bti-floating-cart__zalo-offer {
    grid-template-columns: minmax(0, 1fr) 28px;
  }
}

/* BTIMEX discount tier update: 50 / 200 / 500 / 700 / 1.000 */
.bti-floating-cart__milestones span {
  flex: 1 1 0;
  text-align: center;
}
.bti-floating-cart__milestones span:first-child {
  text-align: left;
}
.bti-floating-cart__milestones span:last-child {
  text-align: right;
}

/* BTIMEX stock clamp notice */
.bti-floating-cart__stock-notice {
  margin-top: 3px;
  color: #ff7a1a;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
}

/* BTIMEX update: cart returns to right side and covers contact stack when open */
@media (min-width: 768px) {
  .bti-floating-cart {
    right: 18px !important;
    bottom: 18px !important;
    width: 330px !important;
    z-index: 10080 !important;
  }
}
@media (min-width: 1200px) {
  .bti-floating-cart {
    right: 18px !important;
  }
}

/* BTIMEX update: compact hotline/zalo buttons inside cart offer area */
.bti-floating-cart__zalo-offer {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px !important;
}
.bti-floating-cart__zalo-text {
  min-width: 0;
  font-size: 11px !important;
  line-height: 1.2 !important;
}
.bti-floating-cart__zalo-text span,
.bti-floating-cart__zalo-text strong {
  display: block;
  white-space: nowrap;
}
.bti-floating-cart__contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  justify-self: end;
}
.bti-floating-cart__contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 32px;
  padding: 6px 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
}
.bti-floating-cart__contact-btn--hotline {
  background: #e9262f;
  border: 1px solid #e9262f;
  color: #fff !important;
}
.bti-floating-cart__contact-btn--zalo {
  background: #1479ff;
  border: 1px solid #1479ff;
  color: #fff !important;
}
.bti-floating-cart__arrow {
  display: none !important;
}
@media (max-width: 767px) {
  .bti-floating-cart {
    z-index: 10080 !important;
  }
  .bti-floating-cart__contact-btn {
    min-width: 50px;
    font-size: 10.5px;
  }
}

/* BTIMEX update: add animated "Liên hệ ngay" nudge between offer and contact buttons */
.bti-floating-cart__zalo-offer {
  grid-template-columns: 82px minmax(0, 1fr) auto !important;
}
.bti-floating-cart__contact-nudge {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: #ff7a1a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  text-align: right;
}
.bti-floating-cart__contact-nudge span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.bti-floating-cart__contact-nudge b {
  display: inline-block;
  color: #ff7a1a;
  font-size: 19px;
  line-height: 1;
  animation: btiCartNudgeArrow 0.85s ease-in-out infinite alternate;
}
@keyframes btiCartNudgeArrow {
  from { transform: translateX(-4px); }
  to { transform: translateX(6px); }
}
@media (max-width: 390px) {
  .bti-floating-cart__zalo-offer {
    grid-template-columns: 72px minmax(0, 1fr) auto !important;
    gap: 5px !important;
  }
  .bti-floating-cart__contact-nudge {
    font-size: 10px;
  }
  .bti-floating-cart__contact-nudge b {
    font-size: 16px;
  }
  .bti-floating-cart__contact-btn {
    min-width: 46px;
    padding-left: 5px;
    padding-right: 5px;
  }
}

/* BTIMEX update: stock-limit notice stays longer and reappears every time */
.bti-floating-cart__stock-notice {
  min-height: 13px;
}
.bti-floating-cart__stock-notice.is-show {
  animation: btiStockNoticeBlink 0.28s ease-out 1;
}
@keyframes btiStockNoticeBlink {
  from { opacity: .15; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* BTIMEX update: ensure stock max notice remains visible after auto-clamp */
.bti-floating-cart__item-info .bti-floating-cart__stock-notice {
  display: block;
  min-height: 14px;
  margin-top: 3px;
  color: #ff7a1a;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
}

/* BTIMEX update: show "Liên hệ / ngay!" on two lines, no ellipsis */
.bti-floating-cart__contact-nudge {
  justify-content: center !important;
  gap: 3px !important;
  font-size: 10.5px !important;
  line-height: 1.05 !important;
  text-align: center !important;
  white-space: normal !important;
}
.bti-floating-cart__contact-nudge span {
  display: inline-block !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  line-height: 1.05 !important;
}
.bti-floating-cart__contact-nudge b {
  flex: 0 0 auto;
}

/* BTIMEX update: remove X button on each cart item */
.bti-floating-cart__item {
  position: relative;
  padding-right: 18px;
}
.bti-floating-cart__remove {
  position: absolute;
  top: 1px;
  right: 0;
  width: 16px;
  height: 16px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #9aa4b2;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.bti-floating-cart__remove:hover {
  color: #e9262f;
}
.bti-floating-cart__item.is-updating .bti-floating-cart__remove {
  opacity: .55;
  cursor: wait;
}
