.co-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 28px auto 64px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

/* ── CARD ── */
.co-card {
    margin-bottom: 14px;
    overflow: hidden;
    transition: box-shadow .2s;
}

.co-card:last-child { margin-bottom: 0; }

.co-card-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom:1px solid #ddd;
}

.co-card-hd h3 {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    text-transform:uppercase;
}

.co-card-hd h3 .ico {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.ico-contact  { background: #ede9fe; }
.ico-shipping { background: #dbeafe; }
.ico-billing  { background: #fef9c3; }
.ico-payment  { background: #fce7f3; }
.ico-note     { background: #f0fdf4; }
.ico-summary  { background: #fff7ed; }

.co-card-bd { padding: 16px 0px; }

/* ── USER BANNER ── */
.user-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: var(--co-primary-light);
    border: 1px solid rgba(124,58,237,.15);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--co-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-info .uname  { font-size: 13px; font-weight: 600; color: var(--co-primary); }
.user-info .uemail { font-size: 11px; color: var(--co-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-logout {
    font-size: 11px;
    color: var(--co-danger);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.user-logout:hover { text-decoration: underline; }

.guest-note {
    font-size: 12px;
    color: var(--co-muted);
    margin-top: 12px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid var(--co-border);
}
.guest-note a { color: var(--co-primary); text-decoration: none; font-weight: 500; }

/* ── FORM FIELDS ── */
.fg { margin-bottom: 12px; }
.fg:last-of-type { margin-bottom: 0; }

.fg label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.label-optional {
    font-weight: 400;
    text-transform: none;
    font-size: 11px;
    color: #9ca3af;
}

.fg input,
.fg select,
.fg textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--co-border);
    font-size: 13px;
    color: var(--co-ink);
    background: var(--co-white);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
    font-family: inherit;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
    border-color: var(--co-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,.09);
}

.fg input::placeholder { color: #c1c7d0; }

.fg select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 32px;
}

/* ── GRIDS ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr;     gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ── CHECKBOX ROWS ── */
.same-addr-label,
.note-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--co-muted);
    cursor: pointer;
    margin-top: 10px;
    user-select: none;
}

.same-addr-label input[type="checkbox"],
.note-toggle-label input[type="checkbox"] {
    accent-color: var(--co-primary);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

/* ── NOTE BOX ── */
.note-box {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--co-border);
    font-size: 13px;
    height: 80px;
    resize: vertical;
    outline: none;
    color: var(--co-ink);
    font-family: inherit;
    transition: border-color .15s;
}

.note-box:focus { border-color: var(--co-primary); }

/* ── PAYMENT OPTIONS ── */
.pay-methods {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.pay-opt {
    border: 1px solid var(--co-border);
    padding: 13px 14px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.pay-opt:hover    { border-color: var(--co-primary); }
.pay-opt.selected { border: 1px solid var(--co-primary); background: var(--co-primary-light); }

.pay-opt input[type=radio] {
    accent-color: var(--co-primary);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

.pay-opt-body      { flex: 1; min-width: 0; }
.pay-opt-title     { font-size: 13px; font-weight: 600; color: var(--co-ink); margin-bottom: 2px; }
.pay-opt-desc      { font-size: 11px; color: var(--co-muted); }

.pay-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-purple { background: var(--co-primary-light); color: var(--co-primary); border: 1px solid rgba(124,58,237,.2); }
.badge-green  { background: var(--co-success-light);  color: var(--co-success);  border: 1px solid #bbf7d0; }

/* ── PLACE ORDER BUTTON ── */
.btn-place {
    width: 100%;
    padding: 14px;
    background: var(--co-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none; 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all .2s;
    margin-top: 4px;
    text-transform: uppercase;
}

/* .btn-place:hover:not(:disabled) {
    background: var(--co-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(124,58,237,.3);
} */

.btn-place:active:not(:disabled) { transform: translateY(0); }

.btn-place:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading state */
.spin {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    animation: co-spin .7s linear infinite;
    flex-shrink: 0;
}

.btn-place.loading .spin     { display: block; }
.btn-place.loading .btn-text { opacity: .65; }

@keyframes co-spin { to { transform: rotate(360deg); } }

/* ── SUMMARY STICKY ── */
.summary-sticky { position: sticky; top: 100px; }

/* ── SUMMARY ITEMS ── */
.summary-items {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 2px;
    margin-bottom: 2px;
}

.summary-items::-webkit-scrollbar       { width: 3px; }
.summary-items::-webkit-scrollbar-thumb { background: var(--co-border); }

.summary-loading,
.summary-empty,
.summary-error {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: var(--co-muted);
}

.summary-error { color: var(--co-danger); }

/* ── CART ITEM ── */
.si {
    display: flex;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid #f3f4f6;
}

.si:last-child { border-bottom: none; }

.si-img { position: relative; flex-shrink: 0; }

.si-img img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 1px solid var(--co-border);
    display: block;
}

.si-qty-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--co-ink);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.si-info      { flex: 1; min-width: 0; }
.si-name      { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 2px; color: var(--co-ink); }
.si-attr      { font-size: 11px; color: var(--co-muted); margin-bottom: 3px; }
.si-price     { font-size: 13px; font-weight: 700; color: var(--co-ink); }

/* ── PHOTO SLOTS IN SUMMARY ── */
.si-photos      { margin-top: 6px; }
.si-photos-lbl  { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--co-success); margin-bottom: 5px; }
.si-photos-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.si-photo-slot  { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.si-photo-slot img { width: 34px; height: 34px; object-fit: cover; border: 1.5px solid #bbf7d0; }
.si-photo-slot span { font-size: 9px; color: var(--co-muted); }

/* ── ITEM COUNT LABEL ── */
.item-count-label {
    font-size: 11px;
    font-weight: 600;
    background: #f3f4f6;
    color: var(--co-muted);
    padding: 3px 9px;
}

/* ── TOTALS ── */
.totals {
    border-top: 1px solid var(--co-border);
    padding-top: 12px;
    margin-top: 6px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 13px;
    color: var(--co-ink);
}

.total-row .lbl { color: var(--co-muted); }

.total-row.grand {
    padding-top: 10px;
    margin-top: 7px;
    border-top: 2px solid var(--co-border);
    font-size: 16px;
    font-weight: 700;
}

.free-ship { color: var(--co-success); font-weight: 600; }

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--co-ink);
    color: #fff;
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    opacity: 0;
    transition: all .35s cubic-bezier(.175,.885,.32,1.275);
    z-index: 9999;
    white-space: nowrap;
    pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.err  { background: var(--co-danger); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .co-wrap {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .summary-sticky {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 640px) {
    .co-wrap   { padding: 0 14px; margin-top: 18px; }
    .steps     { padding: 0 14px; margin-top: 16px; }
    .top-inner { padding: 0 16px; }
    .grid2     { grid-template-columns: 1fr; }
    .grid3     { grid-template-columns: 1fr 1fr; }
    .step span { display: none; }
    .trust     { gap: 10px; }
    .btn-place { font-size: 14px; padding: 13px; }
}

@media (max-width: 400px) {
    .grid3   { grid-template-columns: 1fr; }
    .pay-opt { flex-wrap: wrap; }
}