/* --- 6. PÁGINAS DE CARRITO Y CHECKOUT --- */
.carrito-vacio {
    text-align: center;
    padding: 50px 20px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.carrito-vacio p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.carrito-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.carrito-items {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.carrito-item {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    gap: 15px;
}

.carrito-item-img {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    /* Centrar imagen en móvil */
}

.carrito-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.carrito-item-info {
    flex-grow: 1;
}

.carrito-item-info h3 {
    margin: 0 0 10px;
    font-size: 1.1em;
    color: #333;
}

.carrito-item-info p {
    margin: 5px 0;
    color: #666;
}

/* --- NUEVO SELECTOR DE CANTIDAD ESTÉTICO --- */
.form-cantidad-wrapper {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-cantidad-wrapper label {
    font-weight: 600;
    font-size: 0.9em;
    color: #444;
}

.cantidad-selector {
    display: flex;
    align-items: center;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.btn-cantidad {
    background: #eee;
    border: none;
    width: 35px;
    height: 35px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3483fa;
    font-weight: bold;
}

.btn-cantidad:hover {
    background: #e0e0e0;
}

.btn-cantidad:active {
    background: #d4d4d4;
}

.input-cantidad {
    width: 50px;
    border: none;
    background: #fff;
    text-align: center;
    font-size: 1em;
    font-weight: bold;
    height: 35px;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

.input-cantidad::-webkit-outer-spin-button,
.input-cantidad::-webkit-inner-spin-button {
    -webkit-appearance: none;
    display: none;
    margin: 0;
}

.carrito-item-subtotal {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carrito-item-subtotal strong {
    font-size: 1.2em;
    color: #333;
}

.carrito-total {
    flex-shrink: 0;
    /*width: 100%;*/
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
}

.carrito-total h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.carrito-total p {
    font-size: 1.2em;
    display: flex;
    justify-content: space-between;
}

.carrito-acciones {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.carrito-acciones a {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 15px;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s;
}

@media (min-width: 992px) {
    .carrito-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .carrito-total {
        width: 300px;
    }

    .checkout-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .checkout-summary {
        width: 350px;
    }
}