/* Checkout marketplace đa-theme — brand-cohesive (dùng token brand-assets/base/base.css).
   Scope class .co* — tối giản, nhẹ: bỏ container viền đen, mở trên nền giấy ấm, panel tóm tắt trắng dịu.
   Chrome chỉ logo (không line/tem), shell 1100px nhất quán site. Standalone (không layout brand lớn). */

.co,
.co * {
  box-sizing: border-box;
}
.co {
  margin: 0;
  font-family: var(--brand-font);
  color: var(--brand-ink);
  background: var(--brand-bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Chrome tối giản: chỉ logo, KHÔNG line đáy (canh container brand 1496/28px) ── */
.co-top {
  background: var(--brand-bg);
}
.co-top-inner {
  max-width: 1496px;
  margin: 0 auto;
  height: 72px;
  padding: 0 28px;
  display: flex;
  align-items: center;
}
.co-logo {
  display: inline-flex;
}
.co-logo img {
  height: 26px;
  width: auto;
  display: block;
}

/* ── Vùng nội dung: shell 1100px (nhất quán account/site) ── */
.co-wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) 28px 88px;
}
.co-head {
  max-width: 620px;
  margin-bottom: 36px;
}
.co-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-muted);
}
.co-title {
  margin: 0 0 12px;
  font-family: var(--brand-font-display);
  font-size: clamp(27px, 3.6vw, 38px);
  font-weight: var(--brand-weight-display);
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.co-sub {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--brand-ink-2);
  max-width: 56ch;
}

.co-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 44px;
  align-items: start;
}
.co-main {
  min-width: 0;
}

/* ── Block (KHÔNG viền — mở, nhẹ). Block thứ 2 ngăn bằng hairline NHẠT trong cột ── */
.co-block {
  padding: 4px 0;
}
.co-block--divided {
  margin-top: 26px;
  padding-top: 30px;
  border-top: 1px solid var(--brand-strip-2);
}
.co-block-head {
  margin-bottom: 16px;
}
.co-block-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.co-count {
  color: var(--brand-muted);
  font-weight: 500;
  font-size: 14px;
}

/* ── Dòng website (theme + chọn gói) ── */
.co-line {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--brand-strip-2);
}
.co-line:first-child {
  border-top: none;
  padding-top: 4px;
}
/* Thumbnail = tỷ lệ 4/5 dọc như card theme (object-position top: lộ hero) */
.co-line-thumb {
  width: 96px;
  aspect-ratio: 4 / 5;
  border-radius: var(--brand-radius-sm);
  object-fit: cover;
  object-position: top;
  background: var(--brand-strip-2);
  display: block;
}
.co-line-body {
  min-width: 0;
}
.co-line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.co-line-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.co-line-meta {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--brand-muted);
}
.co-line-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--brand-muted);
  line-height: 0;
  transition: color var(--brand-dur-fast) var(--brand-ease);
}
.co-line-remove:hover {
  color: var(--brand-ink);
}
.co-line-remove svg {
  width: 17px;
  height: 17px;
}
/* Khối giá trong dòng: hàng "Thiết kế" (theme, một lần) + hàng gói (dropdown) */
.co-line-pricing {
  margin-top: 14px;
}
.co-line-prow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.co-line-prow--pkg {
  margin-top: 10px;
}
.co-line-plabel {
  font-size: 13px;
  color: var(--brand-ink-2);
}
.co-line-pval {
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.co-line-pval--pkg {
  min-width: 96px;
  text-align: right;
}
/* Dropdown gói: kiểu GẠCH CHÂN (underline), không hộp — nhẹ, không nặng nề trong dòng sản phẩm */
.co-select {
  flex: 0 1 300px;
  min-width: 0;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--brand-ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(40, 40, 47, 0.24);
  border-radius: 0;
  padding: 9px 26px 9px 0;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2328282f' stroke-width='1.6'%3E%3Cpath d='M2 4.5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  transition: border-color var(--brand-dur-fast) var(--brand-ease),
    box-shadow var(--brand-dur-fast) var(--brand-ease);
}
.co-select:focus {
  outline: none;
  border-bottom-color: var(--brand-ink);
  box-shadow: 0 1px 0 0 var(--brand-ink);
}
.co-line-price {
  font-size: 14.5px;
  font-weight: 650;
  white-space: nowrap;
}

/* ── Empty state ── */
.co-empty {
  text-align: center;
  padding: 28px 0 12px;
}
.co-empty p {
  margin: 0 0 16px;
  color: var(--brand-muted);
  font-size: 14.5px;
}

/* ── Fields liên hệ ── */
.co-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.co-field {
  margin-bottom: 4px;
}
/* Chỉ thêm khoảng cách DỌC cho field đứng SAU cả hàng 2 cột (email).
   KHÔNG dùng .co-field + .co-field — nó đẩy ô điện thoại trong grid lệch xuống 16px. */
.co-field-row + .co-field {
  margin-top: 16px;
}
.co-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-muted);
  margin-bottom: 8px;
}
/* Input liên hệ: kiểu GẠCH CHÂN (underline), không hộp — như ảnh tham chiếu */
.co-field input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--brand-ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(40, 40, 47, 0.24);
  border-radius: 0;
  padding: 8px 0;
  transition: border-color var(--brand-dur-fast) var(--brand-ease),
    box-shadow var(--brand-dur-fast) var(--brand-ease);
}
.co-field input:focus {
  outline: none;
  border-bottom-color: var(--brand-ink);
  box-shadow: 0 1px 0 0 var(--brand-ink);
}
.co-field input[readonly] {
  color: var(--brand-ink-2);
  cursor: default;
}
.co-field input::placeholder {
  color: var(--brand-muted);
}
.co-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--brand-muted);
}

/* ── Tóm tắt (cột phải, sticky) — panel trắng dịu, viền NHẠT (không đen) ── */
.co-side {
  position: sticky;
  top: 24px;
}
/* Panel tóm tắt: nền = màu trang + có viền (owner chốt — KHÔNG nền trắng) */
.co-summary {
  background: var(--brand-bg);
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  padding: clamp(20px, 3vw, 26px);
}
.co-summary-title {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-ink-2);
}
.co-sum-rows {
  display: flex;
  flex-direction: column;
}
/* Mỗi website 1 khối: tên + 2 dòng phụ (thiết kế / gói) */
.co-sum-item + .co-sum-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--brand-strip-2);
}
.co-sum-item-name {
  font-size: 13.5px;
  font-weight: 650;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-sum-sub {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--brand-ink-2);
  padding: 2px 0;
}
.co-sum-sub span:last-child {
  font-weight: 600;
  color: var(--brand-ink);
  white-space: nowrap;
}
.co-sum-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--brand-strip-2);
  font-size: 15px;
}
.co-sum-total strong {
  font-size: 20px;
  font-weight: var(--brand-weight-display);
}
.co-sum-note {
  margin: 12px 0 18px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--brand-muted);
}

/* ── Nút: ghost = viền (.btn-sweep-out), pay = đen (.btn-sweep) — hover ở brand-assets/base/components.css ── */
.co-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--brand-radius-sm);
  border: 1px solid var(--brand-ink);
}
.co-btn--ghost {
  background: transparent;
  color: var(--brand-ink);
  padding: 11px 0;
  font-size: 14px;
  text-decoration: none;
}
.co-btn--ghost .btn-sweep-label { padding: 0 20px; }
.co-btn--pay {
  width: 100%;
  padding: 15px 0;
  font-size: 15px;
  text-decoration: none;
}
.co-btn--pay .btn-sweep-label { padding: 0 20px; }
.co-btn--pay:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.co-includes {
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--brand-strip-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.co-includes li {
  position: relative;
  padding-left: 22px;
  font-size: 12.5px;
  color: var(--brand-ink-2);
}
.co-includes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 13px;
  height: 9px;
  border-left: 1.8px solid var(--brand-mint);
  border-bottom: 1.8px solid var(--brand-mint);
  transform: rotate(-45deg);
}

/* ── Alert lỗi ── */
.co-alert {
  border-radius: var(--brand-radius-sm);
  padding: 13px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
  line-height: 1.5;
}
.co-alert--error {
  background: #fdecec;
  border: 1px solid #e9a8a8;
  color: #8a2020;
}

/* ── Quay lại — dưới nội dung (không header) ── */
.co-back-wrap {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--brand-strip-2);
}
.co-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--brand-dur-fast) var(--brand-ease);
}
.co-back:hover {
  color: var(--brand-ink);
}
.co-back svg {
  width: 18px;
  height: 18px;
}

/* ── Modal yêu cầu đăng nhập ── */
.co-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.co-modal[hidden] {
  display: none;
}
.co-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(22, 22, 27, 0.42);
  animation: co-fade var(--brand-dur-fast) var(--brand-ease) both;
}
.co-modal-box {
  position: relative;
  width: 100%;
  max-width: 412px;
  background: var(--brand-surface);
  border-radius: var(--brand-radius-lg);
  box-shadow: var(--brand-shadow-lg);
  padding: 36px 32px 30px;
  text-align: center;
  animation: co-pop var(--brand-dur) var(--brand-ease) both;
}
.co-modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  padding: 4px;
  line-height: 0;
  cursor: pointer;
  color: var(--brand-muted);
  transition: color var(--brand-dur-fast) var(--brand-ease);
}
.co-modal-x:hover {
  color: var(--brand-ink);
}
.co-modal-x svg {
  width: 20px;
  height: 20px;
}
.co-modal-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-strip-2);
  color: var(--brand-ink);
}
.co-modal-mark svg {
  width: 26px;
  height: 26px;
}
.co-modal-title {
  margin: 0 0 10px;
  font-family: var(--brand-font-display);
  font-size: 20px;
  font-weight: var(--brand-weight-display);
  letter-spacing: -0.01em;
}
.co-modal-text {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--brand-ink-2);
}
.co-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@keyframes co-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes co-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ── Reveal nhẹ khi tải ── */
@media (prefers-reduced-motion: no-preference) {
  .co-block,
  .co-summary {
    animation: co-rise var(--brand-dur) var(--brand-ease) both;
  }
  .co-block--divided {
    animation-delay: 70ms;
  }
  .co-side {
    animation-delay: 100ms;
  }
  @keyframes co-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .co-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .co-side {
    position: static;
  }
}
@media (max-width: 520px) {
  .co-field-row {
    grid-template-columns: 1fr;
  }
}
