/* ── Checkout ───────────────────────────────────────────────── */
.checkout-wrap {
    max-width: 800px;
    margin: 2rem auto 4rem;
    padding: 0 1rem;
}

.checkout-titulo {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--negro);
    margin-bottom: 1.5rem;
}

/* Steps */
.checkout-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2rem;
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: #9ca3af;
    font-weight: 600;
    flex: 1;
}

.checkout-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.checkout-step.activo .checkout-step-num {
    background: var(--verde);
    color: #fff;
}
.checkout-step.activo { color: var(--negro); }

.checkout-step-sep {
    height: 2px;
    flex: 1;
    background: #e5e7eb;
    margin: 0 .5rem;
}

/* Card */
.checkout-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.checkout-card-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--negro);
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Items list */
.co-items { display: flex; flex-direction: column; gap: .75rem; }

.co-item {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.co-item-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
    flex-shrink: 0;
}

.co-item-img-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #d1d5db;
}

.co-item-info { flex: 1; min-width: 0; }
.co-item-nombre { font-size: .9rem; font-weight: 600; color: var(--negro); }
.co-item-cant { font-size: .8rem; color: #6b7280; margin-top: 2px; }
.co-item-precio { font-size: .95rem; font-weight: 700; color: var(--verde); white-space: nowrap; }

.co-item-eliminar {
    background: none;
    border: none;
    cursor: pointer;
    color: #d1d5db;
    padding: .25rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color .15s, background .15s;
    margin-left: .25rem;
}
.co-item-eliminar:hover { color: #dc2626; background: #fef2f2; }

/* Coupon */
.co-cupon-wrap {
    display: flex;
    gap: .5rem;
    margin-top: .25rem;
}

.co-cupon-input {
    flex: 1;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: .6rem .9rem;
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    text-transform: uppercase;
}
.co-cupon-input:focus { border-color: var(--verde); }

.co-cupon-btn {
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .6rem 1.1rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
    white-space: nowrap;
}
.co-cupon-btn:hover { opacity: .88; }

.co-cupon-msg {
    margin-top: .5rem;
    font-size: .85rem;
    min-height: 1.2em;
}
.co-cupon-msg.ok  { color: var(--verde); }
.co-cupon-msg.err { color: #dc2626; }

/* Totals */
.co-totales { display: flex; flex-direction: column; gap: .4rem; }

.co-total-fila {
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
    color: #6b7280;
}

.co-total-fila.principal {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--negro);
    padding-top: .5rem;
    border-top: 1px solid #f3f4f6;
    margin-top: .25rem;
}

.co-total-descuento { color: var(--verde) !important; }

/* Btn siguiente */
.co-btn-siguiente {
    width: 100%;
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: .9rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
    margin-top: .5rem;
}
.co-btn-siguiente:hover { opacity: .88; }

/* ── Paso 2: Envío ──────────────────────────────────────────── */
.co-form { display: flex; flex-direction: column; gap: .85rem; }

.co-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .3rem;
}

.co-field input,
.co-field select {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: .65rem .9rem;
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s;
    background: #fff;
}
.co-field input:focus,
.co-field select:focus { border-color: var(--verde); }

.co-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.co-cp-wrap {
    display: flex;
    gap: .5rem;
    align-items: flex-end;
}
.co-cp-wrap input { flex: 1; }

.co-cp-btn {
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .65rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s;
}
.co-cp-btn:hover { opacity: .88; }

.co-envio-resultado {
    font-size: .85rem;
    margin-top: .3rem;
    min-height: 1.2em;
}
.co-envio-resultado.ok  { color: var(--verde); }
.co-envio-resultado.err { color: #dc2626; }

/* Btn volver */
.co-btn-volver {
    background: none;
    border: 1.5px solid #d1d5db;
    border-radius: 12px;
    padding: .75rem 1.5rem;
    font-size: .95rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color .2s;
    width: 100%;
    margin-top: .25rem;
}
.co-btn-volver:hover { border-color: #9ca3af; }

/* Btn confirmar */
.co-btn-confirmar {
    width: 100%;
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: .9rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}
.co-btn-confirmar:hover { opacity: .88; }
.co-btn-confirmar:disabled { opacity: .5; cursor: not-allowed; }

/* Carrito vacío */
.co-vacio {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}
.co-vacio svg { width: 64px; height: 64px; fill: #d1d5db; margin-bottom: 1rem; }
.co-vacio p { font-size: 1rem; margin-bottom: 1.5rem; }
.co-vacio a {
    background: var(--verde);
    color: #fff;
    text-decoration: none;
    padding: .75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: .95rem;
}

@media (max-width: 500px) {
    .co-field-row { grid-template-columns: 1fr; }
    .checkout-card { padding: 1.1rem; }
}
