
/* ---------- TOKENS / THEME ---------- */
.bt-container {
  width: 100%;
  max-width: var(--container,1200px);
  margin: 0 auto;
  padding: 1.5rem 1rem 6rem;
}

/* ---------- PAGE HEADER ---------- */
.bt-cart-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.bt-breadcrumb {
  font-size: 14px;
  color: var(--muted);
}

.bt-breadcrumb span {
  opacity: 0.8;
}

.bt-cart-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bt-cart-title-row h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.bt-cart-count {
  font-size: 14px;
  color: var(--muted);
}

.bt-cart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.bt-cart-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--line);
  font-size: 13px;
}

.bt-cart-meta-pill strong {
  color: var(--barik-700);
}

/* ---------- LAYOUT ---------- */
.bt-cart-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 992px) {
  .bt-cart-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.bt-cart-items {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bt-cart-summary {
  flex: 0 0 320px;
}

/* ---------- CART ITEM ---------- */
.bt-cart-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  position: relative;
}

.bt-cart-item:hover {
  border-color: var(--barik-200);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  transition: all 160ms ease;
}

.bt-cart-item-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
}

.bt-cart-item-media img {
  max-height: 80px;
  object-fit: contain;
}

.bt-cart-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bt-cart-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.bt-cart-item-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.15rem;
}

.bt-cart-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 13px;
  color: var(--muted);
}

.bt-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--barik-50);
}

.bt-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}

.bt-tag-dot.low-stock {
  background: #f59e0b;
}

.bt-cart-item-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .bt-cart-item-bottom {
    justify-content: space-between;
  }
}

.bt-price-stack {
  text-align: right;
  margin-left: auto;
}

.bt-price-stack-label {
  font-size: 12px;
  color: var(--muted);
}

.bt-price-stack-value {
  font-weight: 600;
  font-size: 16px;
}

.bt-price-stack-original {
  font-size: 12px;
  text-decoration: line-through;
  color: rgba(11, 18, 36, 0.45);
}

.bt-remove-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 13px;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  margin-left: 0.1rem;
  transition: color 160ms ease, background 160ms ease;
  border: none;
}

.bt-remove-item:hover {
  background: #f2e3d2;
  color: var(--barik-700);
}

/* ---------- QTY CONTROL ---------- */
.bt-qty-control {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.bt-qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: transparent;
  color: rgba(11, 18, 36, 0.82);
  transition: background 160ms ease, color 160ms ease;
  border: none;
}

.bt-qty-btn:hover {
  background: var(--line);
}

.bt-qty-input {
  width: 44px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #ffffff;
  text-align: center;
  font-size: 14px;
  padding: 0.1rem 0.3rem;
  border: none;
}

.bt-qty-input::-webkit-inner-spin-button,
.bt-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---------- SUMMARY CARD ---------- */
.bt-summary-card {
  position: relative;
  padding: 1.1rem 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

@media (min-width: 992px) {
  .bt-summary-card {
    position: sticky;
    top: 1.4rem;
  }
}

.bt-summary-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.bt-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  margin-bottom: 0.35rem;
  color: rgba(11, 18, 36, 0.82);
}

.bt-summary-row-muted {
  color: var(--muted);
}

.bt-summary-row-total {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
  font-weight: 700;
  font-size: 16px;
}

.bt-summary-row-total span:last-child {
  color: var(--barik-700);
  font-size: 17px;
}

.bt-summary-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ---------- COUPON ---------- */
.bt-coupon {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}

.bt-coupon-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.bt-coupon-form {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.bt-input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.7rem;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--barik-50);
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
  color: var(--ink-900) !important;
  background: var(--surface);
}

.bt-input:focus {
  border-color: var(--barik-400);
  box-shadow: 0 0 0 1px rgba(142, 90, 34, 0.12);
}

.bt-input::placeholder,
.bt-input::-webkit-input-placeholder,
.bt-input::-moz-placeholder,
.bt-input:-ms-input-placeholder {
color: var(--ink-400) !important;
opacity: 1 !important;
}

/* On focus – subtle but readable */
.bt-input:focus::placeholder {
color: var(--ink-500) !important;
}

.bt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 14px;
  border-radius: 999px;
  border: none;
  background: var(--ink-900);
  color: var(--barik-50);
  font-weight: 500;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.bt-btn:hover {
  background: var(--ink-800);
  box-shadow: 0 12px 30px rgba(11, 18, 36, 0.20);
  transform: translateY(-0.5px);
}

.bt-btn-primary {
  background: var(--barik-600);
}

.bt-btn-primary:hover {
  background: var(--barik-700);
  box-shadow: 0 14px 34px rgba(142, 90, 34, 0.32);
}

.bt-btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 13px;
}

.bt-coupon-msg {
  font-size: 12px;
  min-height: 1rem;
}

.bt-coupon-msg.success {
  color: #16a34a;
}

.bt-coupon-msg.error {
  color: #b91c1c;
}

/* ---------- CHECKOUT BUTTON ---------- */
.bt-checkout-btn {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 15px;
  padding: 15px;
}

.bt-checkout-subtext {
  display: block;
  font-size: 12px;
  color: #f2e3d2;
  margin-top: 0.08rem;
}

.bt-badges {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 12px;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--bg);
  color: rgba(11, 18, 36, 0.82);
}

.text-success {
    color: green;
}

.bt-badge i {
  font-size: 12px;
}

/* ---------- EMPTY STATE (optional style) ---------- */
.bt-empty {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  text-align: center;
  font-size: 14px;
}

/* ---------- MOBILE CHECKOUT BAR ---------- */
.bt-mobile-checkout-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.55rem 0.9rem 0.65rem;
  background: rgba(11, 18, 36, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 30;
  color: var(--barik-50);
}

.bt-mobile-checkout-bar-main {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.bt-mobile-checkout-label {
  font-size: 11px;
  opacity: 0.7;
}

.bt-mobile-checkout-total {
  font-size: 16px;
  font-weight: 600;
}

.bt-mobile-checkout-total span {
  font-size: 13px;
  font-weight: 400;
  margin-left: 0.15rem;
  color: var(--line);
}

.bt-mobile-checkout-btn {
  flex: 0 0 auto;
  padding: 0.6rem 0.95rem;
  font-size: 13px;
  border-radius: 999px;
  background: var(--barik-600);
  color: var(--barik-50);
  font-weight: 500;
  box-shadow: 0 12px 27px rgba(142, 90, 34, 0.28);
  border: 1px solid var(--checkout);
}

.bt-mobile-checkout-btn:hover {
  background: var(--barik-700);
}

@media (min-width: 992px) {
  .bt-mobile-checkout-bar {
    display: none;
  }
}

/* ---------- SMALL SCREENS TWEAK ---------- */
@media (max-width: 639px) {
  .bt-cart-item {
    grid-template-columns: 84px 1fr;
    padding: 0.8rem 0.9rem;
  }
  .bt-cart-header {
    margin-bottom: 1rem;
  }
  .bt-container {
    padding-bottom: 4.5rem; /* space for mobile bar */
  }
  .bt-checkout-subtext {
    display: none;
  }
}
