/* ==========================================================================
   SCENTVAULT SV - CHECKOUT COMPLETO Y RESPONSIVO
   ========================================================================== */

.checkout-wrapper {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    max-width: 1150px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.checkout-wrapper *,
.checkout-wrapper *::before,
.checkout-wrapper *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   COLUMNA IZQUIERDA: FORMULARIO
   -------------------------------------------------------------------------- */

.checkout-left {
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #eae6df; /* Corrección del borde morado a tono crema */
    box-shadow: 0 4px 12px rgba(61, 52, 45, 0.02);
}

/* Botón de regreso minimalista */
.checkout-back-container {
    margin-bottom: 20px;
}

.back-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #7a7571;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.back-link-btn:hover {
    color: #bfa36a;
}

.checkout-left h2 {
    font-size: 24px;
    font-weight: 700;
    color: #3d342d;
    margin: 0 0 24px 0;
    letter-spacing: 0.5px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Agrupadores de campos de texto con etiquetas */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.checkout-label {
    font-size: 11px;
    font-weight: 700;
    color: #7a7571;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

/* Estilización de Inputs y Textareas */
.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #eae6df;
    border-radius: 8px;
    font-size: 14px;
    color: #3d342d;
    outline: none;
    transition: all 0.2s ease;
}

.checkout-form textarea {
    min-height: 100px;
    resize: vertical; /* Evita que rompan la UI horizontalmente */
    line-height: 1.5;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-select:focus {
    border-color: #bfa36a;
    box-shadow: 0 0 0 3px rgba(191, 163, 106, 0.1);
}

/* Contenedor del selector nativo estilizado */
.checkout-select-wrapper {
    position: relative;
    width: 100%;
}

.checkout-select-wrapper::after {
    content: '▾';
    font-size: 12px;
    color: #7a7571;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.checkout-select {
    width: 100%;
    padding: 12px 32px 12px 16px;
    background: #ffffff;
    border: 1px solid #eae6df;
    border-radius: 8px;
    font-size: 14px;
    color: #3d342d;
    outline: none;
    appearance: none; /* Elimina la flecha genérica de Windows/iOS */
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Sección de Cupones */
.coupon-box {
    margin-top: 8px;
    background: #faf9f6;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #eae6df;
}

.coupon-input-field {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.coupon-input-field input {
    background: #ffffff;
}

.coupon-input-field button.gold-btn {
    padding: 0 24px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Botón Principal de Finalizar */
.checkout-btn {
    width: 100%;
    margin-top: 28px;
    padding: 14px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
}


/* --------------------------------------------------------------------------
   COLUMNA DERECHA: RESUMEN DE COMPRA
   -------------------------------------------------------------------------- */

.checkout-right {
    background: #faf9f6;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid #eae6df;
    height: fit-content;
}

.checkout-right h3 {
    font-size: 18px;
    font-weight: 700;
    color: #3d342d;
    margin: 0 0 20px 0;
    letter-spacing: 0.5px;
}

.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 380px; /* Scroll elegante si llevan demasiados decants */
    overflow-y: auto;
    padding-right: 4px;
}

/* Tarjeta interna de producto en resumen */
.checkout-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #f3efe9;
}

.checkout-item-img-container {
    width: 60px;
    height: 60px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-item-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.checkout-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkout-item-name {
    font-size: 14px;
    color: #3d342d;
    margin: 0;
}

.checkout-item-meta {
    font-size: 12px;
    color: #7a7571;
    margin: 0;
}

.checkout-item-meta .multiplier {
    font-weight: 600;
    color: #bfa36a;
    margin-left: 4px;
}

.checkout-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #3d342d;
    margin: 4px 0 0 0;
}

.checkout-divider {
    border: 0;
    border-top: 1px solid #eae6df;
    margin: 20px 0;
}

/* Totales numéricos */
.summary-totals {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-totals p {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #7a7571;
    margin: 0;
}

.summary-totals p span {
    color: #3d342d;
    font-weight: 500;
}

.total-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: #3d342d;
    margin: 10px 0 0 0;
    padding-top: 14px;
    border-top: 1px solid #eae6df;
}