.checkout-main {
    flex: 1;
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: 36px 28px 110px;
}

.checkout-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.7rem;
    margin: 0 0 28px;
    letter-spacing: -0.01em;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* ---- Order summary ---- */

.order-summary {
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 22px;
    order: 2;
}

.order-summary h2 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 16px;
}

.order-summary-line {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
}

.order-summary-line img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: var(--ice-soft);
    border-radius: var(--radius-sm);
    padding: 6px;
    flex-shrink: 0;
}

.order-summary-line-name {
    font-size: 0.88rem;
    font-weight: 600;
    flex: 1;
}

.order-summary-line-qty {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--slate);
}

.order-summary-line-total {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--amber-deep);
    min-width: 70px;
    text-align: right;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 16px;
    margin-top: 6px;
    font-weight: 600;
    font-size: 1rem;
}

.order-summary-total-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--amber-deep);
}

.cod-note {
    margin-top: 16px;
    padding: 12px 14px;
    background: var(--ice-soft);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--blue-700);
    font-weight: 600;
}

/* ---- Form ---- */

.checkout-form {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    transition: border-color 0.15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--blue-500);
}

.form-field textarea { resize: vertical; min-height: 70px; }

.checkout-submit {
    padding: 15px;
    background: var(--blue-700);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-top: 6px;
}

.checkout-submit:hover:not(:disabled) { background: var(--blue-600); }
.checkout-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.checkout-error {
    background: #FFF1EC;
    border: 1.5px solid #F5C2AE;
    color: #B4441F;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
}

/* ---- Empty cart / confirmation states ---- */

.checkout-empty,
.checkout-confirmation {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
}

.checkout-confirmation .confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: var(--blue-700);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-confirmation h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 0 0 10px;
}

.checkout-confirmation p {
    color: var(--slate);
    max-width: 46ch;
    margin: 0 auto 22px;
    line-height: 1.6;
}

.checkout-confirmation .order-number {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--blue-700);
}

@media (max-width: 800px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .order-summary { order: 1; }
    .checkout-form { order: 2; }
}


/* ============================================================
   Checkout — additions
   ============================================================ */

/* ---------- Step indicator ---------- */

.checkout-steps {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    flex-wrap: wrap;
}

.checkout-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--slate);
}

.checkout-steps li + li::before {
    content: '';
    width: 26px;
    height: 1.5px;
    background: var(--line);
    margin-right: 2px;
}

.step-dot {
    display: grid;
    place-items: center;
    width: 24px; height: 24px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--slate);
    border: 1.5px solid var(--line);
    border-radius: 50%;
}

.checkout-steps .is-current { color: var(--ink); font-weight: 600; }
.checkout-steps .is-current .step-dot { background: var(--blue-700); color: var(--white); border-color: var(--blue-700); }
.checkout-steps .is-done { color: var(--blue-700); }
.checkout-steps .is-done .step-dot { background: var(--ice-soft); color: var(--blue-700); border-color: var(--blue-500); }


/* ---------- Fulfilment choice ---------- */

.fulfilment {
    border: none;
    margin: 0 0 22px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.fulfilment legend {
    padding: 0;
    margin-bottom: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink);
}

.fulfilment-option {
    position: relative;
    display: grid;
    gap: 3px;
    padding: 14px 16px 14px 44px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.fulfilment-option:hover { border-color: var(--blue-500); }
.fulfilment-option.is-selected { border-color: var(--blue-500); background: var(--ice-soft); }

.fulfilment-option input {
    position: absolute;
    left: 16px; top: 17px;
    accent-color: var(--blue-700);
    width: 16px; height: 16px;
}

.fulfilment-title { font-size: 0.9rem; font-weight: 600; }
.fulfilment-note { font-size: 0.82rem; color: var(--slate); line-height: 1.5; }


/* ---------- Field validation ---------- */

.field-msg {
    margin: 6px 0 0;
    font-size: 0.79rem;
    line-height: 1.45;
    /* Reserved height: the slot is always in the layout so swapping a
       hint for an error never moves anything below it. */
    min-height: 1.15em;
}

.field-msg:empty { min-height: 0; margin-top: 0; }
.field-msg.is-hint { color: var(--slate); }
.field-msg.is-error { color: #d23c4e; font-weight: 500; }
[data-theme="dark"] .field-msg.is-error { color: #ff8e9c; }

.form-field.has-error input,
.form-field.has-error textarea {
    border-color: #d23c4e;
    background: #fff6f7;
}

[data-theme="dark"] .form-field.has-error input,
[data-theme="dark"] .form-field.has-error textarea { background: #2a1116; }

.pickup-card {
    padding: 16px;
    margin-bottom: 20px;
    background: var(--ice-soft);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
}

.pickup-card strong { display: block; font-size: 0.86rem; margin-bottom: 5px; }
.pickup-card p { margin: 0 0 9px; font-size: 0.85rem; color: var(--slate); line-height: 1.55; }
.pickup-card a { font-size: 0.83rem; font-weight: 600; color: var(--blue-700); }


/* ---------- Review step ---------- */

.review-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0 0 18px;
}

.review-list { margin: 0 0 24px; display: grid; gap: 14px; }
.review-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.review-list dt { font-size: 0.8rem; font-weight: 600; color: var(--slate); }
.review-list dd { margin: 0; font-size: 0.88rem; line-height: 1.55; word-break: break-word; }

.review-actions { display: flex; flex-direction: column; gap: 10px; }

.review-back {
    padding: 11px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    background: transparent;
    color: var(--slate);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.review-back:hover { color: var(--blue-700); border-color: var(--blue-500); }

.review-legal { margin: 16px 0 0; font-size: 0.79rem; color: var(--slate); line-height: 1.6; }

@media (max-width: 480px) {
    .review-list > div { grid-template-columns: 1fr; gap: 2px; }
}


/* ---------- Summary + confirmation ---------- */

.order-summary-total small { font-weight: 400; color: var(--slate); font-size: 0.8rem; }

.summary-edit {
    display: block;
    margin-top: 14px;
    text-align: center;
    font-size: 0.83rem;
    color: var(--blue-700);
    font-weight: 600;
}

.confirm-keep {
    max-width: 420px;
    margin: 0 auto 22px;
    padding: 16px 18px;
    background: var(--ice-soft);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    text-align: left;
}

.confirm-keep strong { display: block; font-size: 0.87rem; margin-bottom: 5px; }
.confirm-keep p { margin: 0 0 12px; font-size: 0.84rem; color: var(--slate); line-height: 1.55; }
.confirm-keep b { font-family: var(--font-mono); color: var(--amber-deep); }
