/* ==========================================================================
   Cartlo Unified Public Checkout Core Stylesheet
   ========================================================================== */

:root {
  --co-bg-main: #ffffff;
  --co-bg-sidebar: #fafafa;
  --co-border: #e6e6e6;
  --co-ink: #111111;
  --co-muted: #707070;
  --co-green: #10b981;
  --co-accent: #111111;
  --co-radius: 8px;
  --co-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: var(--co-font);
  color: var(--co-ink);
  background: var(--co-bg-main);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* 1. STANDARDIZED HEADER: CENTERED LOGO, ZERO CART IN NAVBAR */
.checkout-header {
  padding: 22px 20px;
  border-bottom: 1px solid var(--co-border);
  background: #ffffff;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-header__inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.brand-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.brand-logo img {
  height: 32px;
  max-height: 38px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.brand-logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--co-ink);
  text-transform: uppercase;
}

/* 2. LAYOUT GRID */
.checkout-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 430px;
  min-height: calc(100vh - 80px);
}

.checkout-container.single-col {
  max-width: 620px;
  display: flex;
  flex-direction: column;
}

.form-column {
  padding: 36px 48px 60px 20px;
  border-right: 1px solid var(--co-border);
}

.summary-column {
  position: relative;
  padding: 36px 20px 60px 48px;
  background: var(--co-bg-sidebar);
}

@media (min-width: 901px) {
  .summary-column::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    background: var(--co-bg-sidebar);
    z-index: 0;
    pointer-events: none;
  }
}

.summary-inner {
  position: sticky;
  top: 24px;
  z-index: 1;
}

/* 3. INPUTS & CARDS */
.section-block {
  margin-bottom: 28px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--co-ink);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-box {
  position: relative;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #ffffff;
}

.input-box:focus-within {
  border-color: var(--co-ink);
  box-shadow: 0 0 0 1px var(--co-ink);
}

.input-box label {
  position: absolute;
  left: 12px;
  top: 9px;
  font-size: 11px;
  color: var(--co-muted);
  pointer-events: none;
}

.input-box input,
.input-box select {
  width: 100%;
  height: 50px;
  padding: 20px 12px 6px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--co-ink);
  font-family: inherit;
  outline: none;
}

/* 4. ITEMS LIST IN SUMMARY */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.item-thumb-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
  background: #ffffff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.item-thumb-wrap img {
  width: 100%;
  height: 100%;
  max-width: 64px;
  max-height: 64px;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.item-qty-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  line-height: 1;
}

/* 5. ORDER BUMP (REFINED D2C BENCHMARK) */
.order-bumps-section {
  margin-top: 30px;
  margin-bottom: 26px;
}
.order-bump-card {
  position: relative;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  user-select: none;
}
.order-bump-card:hover {
  border-color: #94a3b8;
  background: #fafbfc;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}
.order-bump-card.checked {
  border: 1.5px solid #0f172a;
  background: #f8fafc;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}
.bump-custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.order-bump-card:hover .bump-custom-checkbox {
  border-color: #64748b;
}
.order-bump-card.checked .bump-custom-checkbox {
  background: #0f172a;
  border-color: #0f172a;
}
.bump-custom-checkbox svg {
  width: 13px;
  height: 13px;
  stroke: #ffffff;
  stroke-width: 2.8;
  fill: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.order-bump-card.checked .bump-custom-checkbox svg {
  opacity: 1;
  transform: scale(1);
}
.bump-thumb-wrap {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f1f5f9;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bump-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bump-content {
  flex: 1;
  min-width: 0;
}
.bump-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.bump-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.bump-badge--dark {
  background: #0f172a;
  color: #ffffff;
}
.bump-badge--green {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.bump-badge--amber {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.bump-action-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.order-bump-card.checked .bump-action-pill {
  background: #0f172a;
  color: #ffffff;
}
.bump-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}
.bump-desc {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.4;
}
.bump-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}
.bump-price-now {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}
.bump-price-was {
  font-size: 11.5px;
  color: #94a3b8;
  text-decoration: line-through;
}
.bump-price-save {
  font-size: 10.5px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  padding: 1.5px 6px;
  border-radius: 4px;
}

/* 6. SUMMARY & TOTALS */
.totals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: #444;
  margin-bottom: 16px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.totals-total {
  font-size: 18px;
  font-weight: 700;
  color: var(--co-ink);
  padding-top: 14px;
  border-top: 1px solid var(--co-border);
}

.btn-pay-now {
  width: 100%;
  height: 52px;
  background: var(--co-ink);
  color: #ffffff;
  border: none;
  border-radius: var(--co-radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-pay-now:hover {
  opacity: 0.92;
}

@media (max-width: 900px) {
  .checkout-container {
    display: flex;
    flex-direction: column;
  }
  .summary-column {
    order: -1;
    padding: 24px 20px;
    border-bottom: 1px solid var(--co-border);
  }
  .form-column {
    padding: 28px 20px 50px;
    border-right: none;
  }
}
