/* ---------- BASE ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f7f3f0;
    color: #1f1f1f;
    line-height: 1.6;
}

/* ---------- HEADER ---------- */
.checkout-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 20;
}

.checkout-header .container {
    width: min(1120px, 90%);
    margin: 0 auto;
}

.checkout-logo img {
    height: 32px;
    display: block;
}

/* ---------- LAYOUT ---------- */
.checkout-container {
    padding: 2.5rem 0 3rem;
}

.checkout-container .container,
.checkout-grid {
    width: min(1120px, 90%);
    margin: 0 auto;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 2rem;
}

/* ---------- FORM ---------- */
.checkout-form {
    background: #ffffff;
    border-radius: 1.6rem;
    padding: 1.8rem 2rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

.checkout-form h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.checkout-form label {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.85rem;
    margin-bottom: 0.2rem;
    color: #555;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    border-radius: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    background: #faf7f4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: #b3193c;
    box-shadow: 0 0 0 1px rgba(179, 25, 60, 0.15);
    background: #ffffff;
}

.checkout-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* ---------- SUMMARY ---------- */
.checkout-summary {
    background: #ffffff;
    border-radius: 1.6rem;
    padding: 1.6rem 1.8rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

.checkout-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.summary-items {
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 0.9rem;
}

.summary-item {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.6rem;
}

.summary-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.8rem;
    background: #f3efec;
}

.item-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.item-qty {
    font-size: 0.8rem;
    color: #777;
}

.summary-row,
.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.summary-total {
    margin-top: 0.7rem;
    font-weight: 600;
    font-size: 1rem;
}

.checkout-summary hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin: 0.9rem 0;
}

/* ---------- MÉTODOS DE PAGO ---------- */
.payment-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.payment-logos div {
    flex: 1 1 75%;
    background: #faf7f4;
    border-radius: 0.9rem;
    padding: 0.5rem 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.payment-logos img {
    max-height: 48px;
    max-width: 100%;
    object-fit: contain;
}

.payment-info {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
}

/* ---------- BOTÓN PRINCIPAL ---------- */
.btn-checkout {
    width: 100%;
    border-radius: 999px;
    border: none;
    padding: 0.8rem 1.4rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    cursor: pointer;
    background: radial-gradient(circle at top left, #ff4f7d 0, #b3193c 70%);
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(179, 25, 60, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 55px rgba(179, 25, 60, 0.55);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- LISTA DE PRODUCTOS ---- */
.checkout-order-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.checkout-order-img img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 10px;
}

.checkout-order-details {
    flex: 1;
    margin-left: 15px;
}

.checkout-order-details h4 {
    margin: 0;
    font-weight: 600;
    font-size: 15px;
}

.checkout-order-details .mini {
    margin: 3px 0 0;
    color: #777;
    font-size: 12px;
}

.checkout-order-price {
    font-weight: bold;
    font-size: 15px;
}


/* ---- MEDIOS DE PAGO ---- */
.payment-methods {
    margin-top: 30px;
}

.payment-card {
    background: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 14px;
    margin-bottom: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    cursor: pointer;
}

.payment-card img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.payment-card span {
    font-size: 15px;
    font-weight: 500;
}

.payment-note {
    font-size: 12px;
    margin-top: 10px;
    color: #666;
}

/* Layout: dos columnas */
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2.5rem;
}

/* Tarjetas del sidebar */
.checkout-sidebar .summary-card {
    background: #ffffff;
    border-radius: 1.4rem;
    padding: 1.3rem 1.4rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

/* -------- MINI FOTOS DEL PEDIDO (checkout) -------- */
.checkout-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1e9e3;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-thumb img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 1rem;
    display: block;
}

/* por si acaso había una imagen vieja suelta a la derecha */
.checkout-sidebar > img {
    max-width: 80px;
    height: auto;
    border-radius: 1rem;
}

/* -------- TARJETAS DE MEDIOS DE PAGO CON LOGOS -------- */
.payment-card-group .payment-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.6rem;
    border-radius: 0.9rem;
    background: #faf5f2;
    margin-bottom: 0.7rem;
}

.payment-logo img {
    width: 64px;
    height: auto;
    display: block;
}

.payment-info strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.payment-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}
