/* ══════════════════════════════════════════════════════════
   TBP Cart Page Styles
   Matches the design from screenshot: orange accent, clean table
   ══════════════════════════════════════════════════════════ */

/* ── Cart Page Wrapper ─────────────────────────────────────── */
.tbp-cart-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  font-family: 'Poppins', sans-serif;
}

/* ── Page Title ───────────────────────────────────────────── */
.tbp-cart-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #0090dd;
  margin: 0 0 28px;
}

/* ── Progress Stepper ─────────────────────────────────────── */
.tbp-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 0 36px;
}

.tbp-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tbp-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0090dd;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tbp-step-label {
  font-size: 14px;
  color: #555;
  font-weight: 500;
  white-space: nowrap;
}

.tbp-step--active .tbp-step-label {
  color: #0090dd;
  font-weight: 600;
}

.tbp-step--inactive .tbp-step-num {
  background: #ccc;
}

.tbp-step-connector {
  width: 80px;
  height: 1px;
  background: #ccc;
  flex-shrink: 0;
  margin: 0 4px;
}

.tbp-cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.tbp-cart-empty p {
  font-size: 16px;
  margin: 0 0 20px;
}

.tbp-cart-empty a {
  display: inline-block;
  background: #0090dd;
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background .2s;
}

.tbp-cart-empty a:hover {
  background: #0090dd99;
}

/* ── Table Wrapper ────────────────────────────────────────── */
.tbp-cart-table-wrap {
  overflow-x: auto;
  margin-bottom: 0;
}

/* ── Cart Table ───────────────────────────────────────────── */
.tbp-cart-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.tbp-cart-table thead tr {
  border-bottom: 2px solid #eee;
}

.tbp-cart-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: #222;
  white-space: nowrap;
}

.tbp-cart-table th:not(:first-child) {
  text-align: center;
}

.tbp-cart-table td {
  padding: 20px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
}

/* ── Product Cell ─────────────────────────────────────────── */
.tbp-cart-product-cell {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.tbp-cart-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}

.tbp-cart-thumb img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
  display: block;
}

.tbp-cart-img-ph {
  width: 72px;
  height: 72px;
  background: #f3f4f6;
  border-radius: 6px;
}

.tbp-cart-product-info {
  min-width: 0;
}

.tbp-cart-product-name {
  font-weight: 600;
  font-size: 15px;
  color: #222;
  margin: 0 0 6px;
  line-height: 1.3;
}

.tbp-cart-product-specs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tbp-cart-product-specs span {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.tbp-cart-product-specs strong {
  color: #333;
}

/* ── Price / Subtotal Cells ───────────────────────────────── */
.tbp-cart-col-price,
.tbp-cart-col-subtotal {
  text-align: center;
  font-size: 14px;
  color: #333;
}

.tbp-unit-price {
  font-weight: 500;
}

.tbp-subtotal {
  font-weight: 600;
}

/* ── Qty Control ──────────────────────────────────────────── */
.tbp-cart-col-qty {
  text-align: center;
}

.tbp-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  height: 36px;
}

.tbp-qty-btn {
  width: 32px;
  height: 36px;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
  line-height: 1;
}

.tbp-qty-btn:hover {
  background: #eaeaea;
}

.tbp-qty-input {
  width: 52px;
  height: 36px;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  text-align: center;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: #222;
  padding: 0;
  -moz-appearance: textfield;
  appearance: textfield;
  outline: none;
}

.tbp-qty-input::-webkit-outer-spin-button,
.tbp-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.tbp-cart-col-remove {
  text-align: center;
  width: 44px;
}

.tbp-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #0090dd;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background .15s, color .15s;
}

.tbp-remove-btn:hover {
  background: #fdf0eb;
  color: #0090dd99;
}

.tbp-cart-footer {
  margin-top: 0;
  border-top: 2px solid #eee;
  padding-top: 20px;
}

.tbp-cart-total-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 20px;
}

.tbp-cart-total-label {
  color: #444;
}

.tbp-cart-total-value {
  color: #222;
  font-size: 17px;
}

.tbp-cart-total-value.tbp-na {
  color: #e8734a;
  font-weight: 700;
}

.tbp-cart-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 16px;
}
.tbp-checkout-btn {
  display: inline-block;
  background: #0090dd;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
}

.tbp-checkout-btn:hover:not(:disabled) {
  background: #0090dd99;
  color: #fff;
}

.tbp-checkout-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
#tbp-cart-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99999;
  padding: 12px 20px;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  max-width: 320px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

#tbp-cart-toast.tbp-toast--success { background: #2e7d32; }
#tbp-cart-toast.tbp-toast--error   { background: #c62828; }
#tbp-cart-toast.tbp-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.tbp-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0090dd;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
    position: relative;
    top: -10px;
    left: -10px;
}

.tbp-cart-summary {
  margin: 0 0 24px;
}

.tbp-cart-summary-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin: 0 0 12px;
}

.tbp-cart-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tbp-cart-summary-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #eee;
  color: #555;
  font-weight: 600;
}

.tbp-cart-summary-table td {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.tbp-cart-summary-table .tbp-summary-product {
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
}

.tbp-cart-summary-table .tbp-summary-specs {
  color: #666;
  font-size: 12px;
}

@media (max-width: 700px) {
  .tbp-stepper {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tbp-step-connector {
    display: none;
  }

  .tbp-cart-table thead {
    display: none;
  }

  .tbp-cart-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: none;
  }

  .tbp-cart-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 13px;
    color: #666;
    margin-right: 12px;
    flex-shrink: 0;
  }

  .tbp-cart-col-product {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .tbp-cart-col-product::before {
    display: none;
  }

  .tbp-cart-table tr {
    display: block;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 8px 0;
  }

  .tbp-cart-col-remove {
    justify-content: flex-end;
  }

  .tbp-cart-col-remove::before {
    display: none;
  }

  .tbp-cart-total-row {
    padding: 12px;
  }

  .tbp-cart-actions {
    padding: 0 12px 12px;
  }

  .tbp-checkout-btn {
    width: 100%;
    text-align: center;
  }

  #tbp-cart-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}
